dsh-inkmap 0.0.0-stage → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/LICENSE.md +89 -0
  2. package/README.md +19 -2
  3. package/README.zh.md +20 -0
  4. package/THIRD_PARTY_NOTICES.md +2446 -0
  5. package/client.js +231 -0
  6. package/cordis.patch.yml +3 -0
  7. package/host.js +1413 -0
  8. package/icon.svg +24 -0
  9. package/locale/en.json +7 -0
  10. package/locale/zh.json +7 -0
  11. package/package.json +73 -4
  12. package/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  13. package/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  14. package/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  15. package/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  16. package/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  17. package/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  18. package/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  19. package/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  20. package/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  21. package/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  22. package/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  23. package/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  24. package/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  25. package/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  26. package/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  27. package/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  28. package/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  29. package/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  30. package/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  31. package/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  32. package/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  33. package/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  34. package/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  35. package/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  36. package/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  37. package/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  38. package/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  39. package/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  40. package/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  41. package/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  42. package/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  43. package/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  44. package/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  45. package/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  46. package/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  47. package/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  48. package/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  49. package/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  50. package/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  51. package/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  52. package/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  53. package/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  54. package/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  55. package/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  56. package/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  57. package/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  58. package/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  59. package/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  60. package/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  61. package/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  62. package/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  63. package/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  64. package/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  65. package/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  66. package/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  67. package/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  68. package/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  69. package/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  70. package/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  71. package/web/assets/abnfDiagram-S7VZAUFO-DCzUGFRF.js +1 -0
  72. package/web/assets/architectureDiagram-YGSQEFNW-DCDp7B_s.js +36 -0
  73. package/web/assets/blockDiagram-APKKGZFW-Dp98xzjW.js +140 -0
  74. package/web/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
  75. package/web/assets/c4Diagram-KJ2TOQU5-CxPOkxbV.js +38 -0
  76. package/web/assets/chunk-2Q5K7J3B-BMceFX8f.js +1 -0
  77. package/web/assets/chunk-5VM5RSS4-C9Qw2XEx.js +15 -0
  78. package/web/assets/chunk-HFQBQIA3-CnMYAsuk.js +1 -0
  79. package/web/assets/chunk-JWPE2WC7-BSqiGtEr.js +1 -0
  80. package/web/assets/chunk-KQLB2F66-Crtz58vF.js +2 -0
  81. package/web/assets/chunk-KS47KZWR-Dv5wN_u7.js +1 -0
  82. package/web/assets/chunk-OY52VR5R-C8pYN-C4.js +88 -0
  83. package/web/assets/chunk-TU62E6Q5-CFoEpZGl.js +1 -0
  84. package/web/assets/chunk-XXDRQBXY-D4qfiWHi.js +1 -0
  85. package/web/assets/classDiagram-v2-L25IHNXF-BpUzliMF.js +217 -0
  86. package/web/assets/cose-bilkent-JH36ORCC-O-0rZBHt.js +1 -0
  87. package/web/assets/cynefin-EF2NZ3EQ-DDFv76G2.js +141 -0
  88. package/web/assets/cynefinDiagram-L36ESFBY-Bqq6kFZK.js +62 -0
  89. package/web/assets/cytoscape.esm-Bw5aGq32.js +332 -0
  90. package/web/assets/d3-scale-4DPf7zan.js +1 -0
  91. package/web/assets/dagre-SPEB5RXH-DMnAnp6O.js +4 -0
  92. package/web/assets/diagram-3B7GL73J-CGrQKQaU.js +200 -0
  93. package/web/assets/diagram-DNEMPZML-Bkae5AE1.js +24 -0
  94. package/web/assets/diagram-L3MUGCDN-BGWxbw_y.js +41 -0
  95. package/web/assets/diagram-LA4NIPWU-BtnLKThN.js +24 -0
  96. package/web/assets/diagram-MHCOC4E2-Cvp57UMh.js +3 -0
  97. package/web/assets/diagram-XPFHEONP-Cvho1yP_.js +30 -0
  98. package/web/assets/ebnfDiagram-UZSYDL2S-CvU-EhVB.js +1 -0
  99. package/web/assets/elk-XV6XMXQE-DrGf1_tu.js +27 -0
  100. package/web/assets/erDiagram-EYBAPDEH-BnO8m7Bv.js +99 -0
  101. package/web/assets/flowDiagram-MALGAFMO-D87SYE69.js +213 -0
  102. package/web/assets/ganttDiagram-23REXITY-BBYnxsjP.js +292 -0
  103. package/web/assets/gitGraphDiagram-STJD7YCW-DqsbpPW5.js +106 -0
  104. package/web/assets/graph-Bn3Yngep.js +1 -0
  105. package/web/assets/index-CfSzSt6G.js +648 -0
  106. package/web/assets/index-Dzbmi6PZ.css +11 -0
  107. package/web/assets/infoDiagram-KBXO4MBG-Dxx-5YUy.js +2 -0
  108. package/web/assets/ishikawaDiagram-M35NCXHK-5sFCM32b.js +70 -0
  109. package/web/assets/journeyDiagram-OPLOXDXO-B7LH-gFu.js +139 -0
  110. package/web/assets/kanban-definition-BZKZHSQY-BMVXBGIk.js +89 -0
  111. package/web/assets/katex-RYEII7GN.js +257 -0
  112. package/web/assets/mermaid.core-CD6VFwtI.js +312 -0
  113. package/web/assets/mindmap-definition-I2QAS2VK-gQHH0qKH.js +98 -0
  114. package/web/assets/pegDiagram-FD4XPPHP-BuGYbf1-.js +1 -0
  115. package/web/assets/pieDiagram-J4AKIIQI-C5JF9vSK.js +39 -0
  116. package/web/assets/quadrantDiagram-XTYBLID2-DgU9d7wQ.js +7 -0
  117. package/web/assets/railroadDiagram-MRQ6NCDL-44C0bWJw.js +1 -0
  118. package/web/assets/requirementDiagram-Y7LWUY3S-CBp6AUBf.js +84 -0
  119. package/web/assets/sankeyDiagram-WGJFYUXA-C1Y-Bxdt.js +40 -0
  120. package/web/assets/sequenceDiagram-5NDRBG5M-BABmlKjV.js +169 -0
  121. package/web/assets/sizeCapture-INFHLROL-DfwsWa78.js +1 -0
  122. package/web/assets/stateDiagram-v2-FJ4FJNEA-BYGt7M38.js +291 -0
  123. package/web/assets/swimlanes-UMQ2AFYF-Dz5f-g49.js +1 -0
  124. package/web/assets/swimlanesDiagram-OMPLPG4O-DVEAjyOD.js +8 -0
  125. package/web/assets/timeline-definition-SEUHKTQE-BJnwE8wH.js +120 -0
  126. package/web/assets/usecaseDiagram-AFA6YXN4-D2RoWXSY.js +370 -0
  127. package/web/assets/vennDiagram-NNMJR3RB-DuoZW-lM.js +34 -0
  128. package/web/assets/wardleyDiagram-S7YFUSEH-Cug9e2FD.js +78 -0
  129. package/web/assets/xychartDiagram-GGNKY7IX-MQVbHA6N.js +7 -0
  130. package/web/index.html +300 -0
@@ -0,0 +1,648 @@
1
+ var nu=Object.defineProperty;var ru=(i,e,t)=>e in i?nu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ne=(i,e,t)=>ru(i,typeof e!="symbol"?e+"":e,t);const su={undo:"撤销",redo:"重做",undoTitle:"撤销 ⌘Z",redoTitle:"重做",expandTo:"展开",expandToTitle:"按层级展开节点",all:"全部",fit:"适应",fitTitle:"适应窗口大小",editMarkdown:"编辑 Markdown",layout:"结构",theme:"配色",export:"导出",find:"查找",findTitle:"查找与替换 ⌘F",present:"演示",presentTitle:"演示模式:逐个节点放映,Esc 退出",trialBadge:"试用 {days}天",proBadge:"PRO",proActive:"Pro 终身会员",trialEnded:"试用已结束",saved:"已保存",readOnly:"只读",savedInCopy:"已更新副本",synced:"已同步",pending:"待保存",saving:"保存中…",saveFailed:"保存失败",conflict:"文件已在别处修改,已载入最新内容;刚才这一步修改没有写入,请重做。",selectNode:"先选中一个节点",newTopic:"新主题",sourceHead:"节点 Markdown",sourcePlaceholder:"先选中一个节点",zoomDiagram:"单独打开",editDiagram:"编辑流程图源码",diagramInvalid:"无法渲染,编辑源码",diagramHint:"触控板:双指平移 · 捏合或 ⌘滚轮缩放 · 双击放大焦点",sourceHint:"修改即时生效并写回文件。表格、图片、多行内容在这里编辑;普通文字也可以在图上双击编辑。",close:"关闭",insertChildNode:"添加子节点",insertSiblingNode:"添加同级节点",insertParentNode:"添加父节点",moveNodeUp:"上移节点",moveNodeDown:"下移节点",removeNode:"删除节点",expandAllDescendants:"展开所有子孙节点",addToChat:"添加到对话",addToChatTitle:"把选中节点对应的 Markdown 发送到 Cursor 对话",findPlaceholder:"查找",replacePlaceholder:"替换为",replace:"替换",replaceAll:"全部替换",noResults:"无结果",replaced:"已替换 {n} 处",prev:"上一个",next:"下一个",exportPng:"导出 PNG 图片",exportSvg:"导出 SVG 矢量图",exported:"已导出 {name}",exportFailed:"导出失败:{error}","layout.logicalStructure":"逻辑结构图","layout.mindMap":"思维导图(左右展开)","layout.logicalStructureLeft":"向左逻辑结构图","layout.organizationStructure":"组织结构图","layout.catalogOrganization":"目录组织图","layout.timeline":"时间轴","layout.timeline2":"时间轴(上下交错)","layout.verticalTimeline":"竖向时间轴","layout.fishbone":"鱼骨图","theme.classic":"经典蓝","theme.mint":"薄荷绿","theme.sunset":"暖阳橙","theme.dusk":"夜色(深色)",proTitle:"Inkmap Pro 终身会员",proSubtitle:"一次购买,永久使用,包含后续全部更新","feature.markdown":"在思维导图中编辑 Markdown,并与源文件同步","feature.diagram":"预览 Mermaid 流程图和状态图,修改源码即更新","feature.noAds":"去除全部广告,界面清爽专注","feature.browser":"在 Chrome 中全屏编辑,与编辑器实时同步","feature.export":"导出 PNG 高清图片和 SVG 矢量图,直接放进文档和 PPT","feature.layouts":"7 种额外结构:组织结构图、目录组织图、时间轴、鱼骨图等","feature.themes":"3 套额外配色,含护眼深色主题","feature.replace":"整张导图查找替换,一键批量修改","feature.present":"演示模式:逐个节点放映,适合讲解、汇报和复习","feature.updates":"终身会员:之后新增的 Pro 功能全部免费获得","featureName.noAds":"去除广告","featureName.browser":"浏览器全屏编辑","featureName.export":"导出图片","featureName.layouts":"更多结构","featureName.themes":"更多配色","featureName.replace":"查找替换","featureName.present":"演示模式",locked:"「{feature}」是 Pro 功能",buyPro:"购买 Pro",signIn:"登录",phoneSignIn:"邮箱登录 / 注册",phoneNumber:"邮箱地址",phonePlaceholder:"请输入邮箱地址(如 name@example.com)",phoneCode:"邮箱验证码",phoneCodePlaceholder:"6 位验证码",sendPhoneCode:"获取验证码",resendPhoneCode:"{seconds} 秒后重发",phoneCodeSent:"6 位验证码已发送至邮箱(有效期 10 分钟),请查收。",phoneInvalid:"请输入有效的邮箱地址。",phoneCodeInvalid:"验证码错误或已过期,请检查后重试。",phoneRateLimited:"请求过于频繁,请稍后重试。",phoneSignInUnavailable:"邮件服务暂不可用。请稍后重试,或在浏览器登录。",browserSignIn:"在浏览器登录",signInFailed:"无法打开登录页面:{error}",signInPageUnavailable:"登录页面暂时无法打开,请重试。",allowAccountPopups:"浏览器拦截了弹窗,请点击下方链接或复制后在浏览器打开。",openLoginLink:"直接打开页面",copyLink:"复制链接",linkCopied:"已复制",editNode:"编辑节点",checkoutOpened:"请在浏览器完成操作,权益会自动刷新。",signInOpened:"请在浏览器完成登录。已有 Pro 权益会自动同步。",checkoutFailed:"无法打开购买页面:{error}",trialUntil:"免费试用至 {date}",trialExpired:"7 天试用已结束。购买 Pro 后可继续使用。已购买的用户登录原账号即可。",trialExpiredSignedIn:"7 天试用已结束。当前账号未开通 Pro,可购买 Pro 或切换到已购买的账号。",trialExpiredSignIn:"7 天试用已结束。请登录已开通 Pro 的账号同步权益。",trialExpiredNoPro:"7 天试用已结束。当前账号未开通 Pro,请切换到已开通 Pro 的账号。",trialExpiredNoAccount:"7 天试用已结束。请在支持账号登录的 Inkmap 客户端继续使用。",accountHeading:"已登录",accountSignedOutSub:"登录账号以同步已有 Pro 权益",accountConnected:"已登录",accountSignedOut:"未登录",accountSync:"登录后,已有 Pro 权益会自动同步。",accountUnavailable:"此面板暂不支持连接账号。",phoneSignInSub:"新邮箱验证后自动注册,无需设置密码",phoneSignInHint:"验证码 10 分钟有效 · 新账号自动创建 · Pro 权益跨设备同步",phoneVerifySubmit:"验证并登录 / 注册",phoneSignInForPay:"验证邮箱后获取付款码",phoneSignInForPaySub:"付款后 Pro 终身权益将自动绑定至该邮箱账号",phoneVerifyAndPay:"验证并显示微信收款码",wechatPayTitle:"微信扫码付款",wechatPaySub:"打开微信扫一扫,支付后自动开通 Pro",wechatPayProduct:"Inkmap Pro 终身版",wechatPayAccount:"绑定账号:{account}",wechatPayWaiting:"等待扫码支付 · 有效至 {time}",wechatPayWaitingSimple:"等待微信扫码支付…",wechatPayExpired:"二维码已过期",wechatPayRefresh:"刷新二维码",wechatPayNote:"一次买断 · 无自动续费 · 含后续更新",wechatPayBrowser:"在浏览器中打开支付页",proUnlocked:"Inkmap Pro 已开通",proPerksTitle:"Pro 终身权益",proPerksAll:"全部权益",proPriceTag:"¥29.90 买断","perk.markdown":"Markdown ⇄ 导图实时双向同步,源码与节点互定位","perk.diagram":"Mermaid 流程图、LaTeX 公式与表格原生渲染","perk.layouts":"9 种专业结构 + 夜色深色主题 + 全套快捷键同步","perk.export":"一键导出高清 PNG 与矢量 SVG(适配 PPT)","perk.rich":"全主流 AI 与 IDE(Cursor / Codex / Claude / VS Code)通用","perk.present":"逐节点聚焦演示模式 + 全图查找与批量替换","perk.updates":"一次买断永久免费升级 · 14 天无理由全额退款",trialPlan:"7 天免费试用",noProOnAccount:"Pro 尚未开通",proActiveDetail:"权益已开通 · 登录同一账号可跨端使用",switchAccount:"切换账号",signOut:"退出登录",signedOut:"已退出账号",signOutFailed:"退出失败:{error}",officialWebsite:"访问付款官网 (zhiyuanv.com)",webCheckoutLink:"网页收银台付款 (微信 / 国际卡)",presentPrev:"← 上一步",presentNext:"下一步 →",presentExit:"退出放映 (Esc)",adLabel:"广告",adHide:"暂时关闭",removeAds:"去除广告","house.export.title":"把导图导出成高清图片","house.export.text":"Pro 版一键导出 PNG / SVG,直接放进笔记、文档和 PPT。","house.layouts.title":"试试组织结构图和时间轴","house.layouts.text":"Pro 版解锁 7 种结构和深色主题,同一份大纲换个视角看。","house.present.title":"用导图来讲解和汇报","house.present.text":"Pro 版演示模式逐个节点放映,复习和汇报都更清楚。","house.cta":"了解 Pro"},au={undo:"Undo",redo:"Redo",undoTitle:"Undo ⌘Z",redoTitle:"Redo",expandTo:"Expand",expandToTitle:"Expand nodes to level",all:"All",fit:"Fit",fitTitle:"Fit map to window",editMarkdown:"Edit Markdown",layout:"Layout",theme:"Theme",export:"Export",find:"Find",findTitle:"Find and replace ⌘F",present:"Present",presentTitle:"Presentation mode: step through nodes, Esc to exit",trialBadge:"{days}d trial",proBadge:"PRO",proActive:"Lifetime Pro",trialEnded:"Trial ended",saved:"Saved",readOnly:"Read only",savedInCopy:"Copy updated",synced:"Synced",pending:"Unsaved",saving:"Saving…",saveFailed:"Save failed",conflict:"The file changed elsewhere and the latest version was loaded; your last edit was not written, please redo it.",selectNode:"Select a node first",newTopic:"New topic",sourceHead:"Node Markdown",sourcePlaceholder:"Select a node first",zoomDiagram:"Open separately",editDiagram:"Edit diagram source",diagramInvalid:"Cannot render. Edit source",diagramHint:"Trackpad: two-finger pan · pinch or ⌘-scroll to zoom · double-click to focus",sourceHint:"Changes apply immediately and are written back. Edit tables, images and multi-line content here; plain text can also be edited on the map by double-clicking.",close:"Close",insertChildNode:"Add child node",insertSiblingNode:"Add sibling node",insertParentNode:"Add parent node",moveNodeUp:"Move node up",moveNodeDown:"Move node down",removeNode:"Delete node",expandAllDescendants:"Expand all descendants",addToChat:"Add to Chat",addToChatTitle:"Send the selected node's Markdown to the Cursor chat",findPlaceholder:"Find",replacePlaceholder:"Replace with",replace:"Replace",replaceAll:"Replace all",noResults:"No results",replaced:"Replaced {n}",prev:"Previous",next:"Next",exportPng:"Export PNG image",exportSvg:"Export SVG vector",exported:"Exported {name}",exportFailed:"Export failed: {error}","layout.logicalStructure":"Logic chart","layout.mindMap":"Mind map (both sides)","layout.logicalStructureLeft":"Logic chart (left)","layout.organizationStructure":"Org chart","layout.catalogOrganization":"Catalog","layout.timeline":"Timeline","layout.timeline2":"Timeline (alternating)","layout.verticalTimeline":"Vertical timeline","layout.fishbone":"Fishbone","theme.classic":"Classic","theme.mint":"Mint","theme.sunset":"Sunset","theme.dusk":"Dusk (dark)",proTitle:"Inkmap Pro — Lifetime",proSubtitle:"Pay once, use forever, every future update included","feature.markdown":"Edit Markdown in the mind map and sync changes to the source file","feature.diagram":"Preview Mermaid flowcharts and state diagrams, then edit their source","feature.noAds":"No ads — a clean, focused workspace","feature.browser":"Full-screen editing in Chrome, synced live with your editor","feature.export":"Export high-resolution PNG and SVG for docs and slides","feature.layouts":"7 extra layouts: org chart, catalog, timelines, fishbone and more","feature.themes":"3 extra color themes, including dark","feature.replace":"Find and replace across the whole map","feature.present":"Presentation mode: walk through nodes one by one","feature.updates":"Lifetime: every Pro feature added later is included","featureName.noAds":"No ads","featureName.browser":"Browser editing","featureName.export":"Export","featureName.layouts":"More layouts","featureName.themes":"More themes","featureName.replace":"Find and replace","featureName.present":"Presentation mode",locked:"“{feature}” is a Pro feature",buyPro:"Buy Pro",signIn:"Sign in",phoneSignIn:"Sign in with Email",phoneNumber:"Email address",phonePlaceholder:"you@example.com",phoneCode:"Verification code",phoneCodePlaceholder:"6-digit code",sendPhoneCode:"Send code",resendPhoneCode:"Resend in {seconds}s",phoneCodeSent:"6-digit code sent (valid for 10 minutes)! Check your inbox.",phoneInvalid:"Enter a valid email address.",phoneCodeInvalid:"The code is incorrect or expired. Check it and try again.",phoneRateLimited:"Too many attempts. Try again in a moment.",phoneSignInUnavailable:"Email sign-in is unavailable. Try again later or sign in in your browser.",browserSignIn:"Sign in in your browser",signInFailed:"Could not open sign-in: {error}",signInPageUnavailable:"The sign-in page is unavailable. Try again.",allowAccountPopups:"Pop-up was blocked. Use the link below to open in your browser.",openLoginLink:"Open link",copyLink:"Copy link",linkCopied:"Copied",editNode:"Edit node",checkoutOpened:"Continue in your browser. Your access will refresh automatically.",signInOpened:"Finish signing in in your browser. Any existing Pro access will sync automatically.",checkoutFailed:"Could not open checkout: {error}",trialUntil:"Free trial ends {date}",trialExpired:"Your 7-day trial has ended. Buy Pro to continue. If you already bought Pro, sign in with that account.",trialExpiredSignedIn:"Your 7-day trial has ended. Buy Pro or switch to an account that already has it.",trialExpiredSignIn:"Your 7-day trial has ended. Sign in with your Pro account to sync access.",trialExpiredNoPro:"Your 7-day trial has ended. Switch to an account with active Pro access.",trialExpiredNoAccount:"Your 7-day trial has ended. Open Inkmap in a client that supports account sign-in.",accountHeading:"Signed in",accountSignedOutSub:"Sign in to sync your Pro access",accountConnected:"Signed in",accountSignedOut:"Signed out",accountSync:"Sign in and your existing Pro access will sync automatically.",accountUnavailable:"Account connection is not available in this panel.",phoneSignInSub:"New emails register automatically — no password needed",phoneSignInHint:"Passwordless · Auto-creates new accounts · Syncs Pro",phoneVerifySubmit:"Verify & Continue",phoneSignInForPay:"Verify email to continue",phoneSignInForPaySub:"Lifetime Pro access will be bound to this email account",phoneVerifyAndPay:"Verify & continue",wechatPayTitle:"WeChat Pay",wechatPaySub:"Scan with WeChat · Unlocks Pro automatically",wechatPayProduct:"Inkmap Pro · Lifetime",wechatPayAccount:"Account: {account}",wechatPayWaiting:"Waiting for payment · Valid until {time}",wechatPayWaitingSimple:"Waiting for WeChat scan…",wechatPayExpired:"QR code expired",wechatPayRefresh:"Refresh QR code",wechatPayNote:"One-time purchase · No auto-renewal · Lifetime updates",wechatPayBrowser:"Open checkout in browser",proUnlocked:"Inkmap Pro is now active",proPerksTitle:"Pro Lifetime Perks",proPerksAll:"All features",proPriceTag:"US$15.00 once","perk.markdown":"Two-way live Markdown ⇄ Mind Map sync & line linking","perk.diagram":"Native Mermaid diagrams, LaTeX math & Markdown tables","perk.layouts":"9 pro layouts, Dusk dark mode & full keyboard shortcuts","perk.export":"One-click HD PNG & vector SVG export for slides","perk.rich":"Universal across Cursor, Codex, Claude, VS Code & Browser IDE","perk.present":"Presentation mode + global find & batch replace","perk.updates":"Free lifetime upgrades · 14-day full refund guarantee",trialPlan:"7-day free trial",noProOnAccount:"Pro is inactive",proActiveDetail:"Active on any device where you sign in with this account",switchAccount:"Switch account",signOut:"Sign out",signedOut:"Signed out",signOutFailed:"Could not sign out: {error}",officialWebsite:"Official Website & Pricing (zhiyuanv.com)",webCheckoutLink:"Web Checkout (WeChat / Card)",presentPrev:"← Prev",presentNext:"Next →",presentExit:"Exit (Esc)",adLabel:"Ad",adHide:"Hide for now",removeAds:"Remove ads","house.export.title":"Export your map as an image","house.export.text":"Pro exports PNG and SVG in one click, ready for notes, docs and slides.","house.layouts.title":"Try org charts and timelines","house.layouts.text":"Pro unlocks 7 layouts and a dark theme — see the same outline from a new angle.","house.present.title":"Present with your map","house.present.text":"Pro's presentation mode reveals nodes one by one for talks and revision.","house.cta":"See Pro"};function Fa(i){if(i==="zh"||i&&/^zh\b/i.test(i))return"zh";try{if(typeof navigator<"u"&&/^zh\b/i.test(navigator.language||""))return"zh";const e=Intl.DateTimeFormat().resolvedOptions().timeZone||"";if(/^Asia\/(Shanghai|Chongqing|Harbin|Urumqi)$/i.test(e))return"zh"}catch{}return i==="en"||i&&/^en\b/i.test(i),"en"}let X0=Fa();const ou={zh:su,en:au};function Fl(i){X0=i,document.documentElement.lang=i==="zh"?"zh-CN":"en"}const Ha=()=>X0;function J(i,e={}){return ou[X0][i].replace(/\{(\w+)\}/g,(t,n)=>String(e[n]??""))}function ba(i=document){i.querySelectorAll("[data-i18n]").forEach(e=>e.textContent=J(e.dataset.i18n)),i.querySelectorAll("[data-i18n-title]").forEach(e=>e.title=J(e.dataset.i18nTitle)),i.querySelectorAll("[data-i18n-placeholder]").forEach(e=>e.placeholder=J(e.dataset.i18nPlaceholder))}const lu=20.8,hu=12;function cu(i,e,t=e){var c,d;const n=i.value.split(`
2
+ `),r=Math.max(0,n.length-1),s=Math.max(0,Math.min(e,r)),a=Math.max(s,Math.min(t,r));let o=0;for(let f=0;f<s;f++)o+=(((c=n[f])==null?void 0:c.length)??0)+1;let l=o;for(let f=s;f<=a;f++)l+=(((d=n[f])==null?void 0:d.length)??0)+(f<a?1:0);const h=Math.max(0,hu+s*lu-i.clientHeight*.35);if(document.activeElement===i)try{i.setSelectionRange(o,Math.max(o,l))}catch{}i.scrollTop=h,requestAnimationFrame(()=>{i.isConnected&&(i.scrollTop=h)})}class ka extends Error{constructor(e,t){super(e),this.url=t}}const du=()=>Fa();class uu{constructor(){ne(this,"base",/^\/s\/[a-f0-9]{48}\/$/.test(location.pathname)?location.pathname:"/");ne(this,"sidebar",this.base!=="/");ne(this,"account",this.sidebar?"restore":"purchase");ne(this,"hostAccountNavigation",!1);ne(this,"currentFile",null);ne(this,"currentMd","");ne(this,"currentVersion","");ne(this,"cachedFiles",[]);ne(this,"expandedKeys",new Set);ne(this,"initializedExpansionForFile","");ne(this,"treeOpen",!1);ne(this,"mdOpen",!1);ne(this,"treeWidthPx",240);ne(this,"mdWidthPx",420);ne(this,"mdEditTimer",0);ne(this,"activeStartLine",0);ne(this,"activeEndLine",0);ne(this,"treeBtnEl",null);ne(this,"splitBtnEl",null);ne(this,"treePaneEl",null);ne(this,"treeTitleEl",null);ne(this,"treeCloseBtnEl",null);ne(this,"treeBodyEl",null);ne(this,"treeSearchEl",null);ne(this,"mdPaneEl",null);ne(this,"mdTitleEl",null);ne(this,"mdLineBadgeEl",null);ne(this,"mdCloseBtnEl",null);ne(this,"mdGutterEl",null);ne(this,"mdBandEl",null);ne(this,"mdTextareaEl",null);ne(this,"externalListeners",[]);ne(this,"revealListeners",[]);ne(this,"assetBase",this.base+"doc-assets/");ne(this,"locale",du());ne(this,"events",new EventSource(this.base+"api/events"));ne(this,"phoneSignIn",{send:async e=>{const t=await fetch(this.base+"api/phone-send",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({phone:e})});return t.ok?(await t.json()).result:{ok:!1,reason:"unavailable"}},verify:async(e,t)=>{const n=await fetch(this.base+"api/phone-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({phone:e,code:t})});return n.ok?(await n.json()).result:{ok:!1,reason:"unavailable"}}})}get capabilities(){return{saveTarget:"file",account:this.account,compact:this.sidebar,restrictAssets:this.sidebar}}uiText(e,t){return Ha()==="zh"?e:t}parseFileEntry(e){const t=typeof e.label=="string"?e.label:"",n=t.indexOf(" / ");if(n>0){const l=t.slice(0,n).trim(),h=t.slice(n+3).replace(/\\/g,"/");return{project:l,rel:h,item:e}}const r=(t||(e.path||"").split(/[\\/]/).pop()||"").replace(/\\/g,"/"),s=(e.path||"").replace(/\\/g,"/"),a="/"+r;let o=this.uiText("当前项目","Workspace");return s.endsWith(a)&&(o=s.slice(0,s.length-a.length).split("/").filter(Boolean).pop()||o),{project:o,rel:r,item:e}}renderMdGutterAndBand(){if(!this.mdTextareaEl)return;const e=Math.max(1,this.mdTextareaEl.value.split(`
3
+ `).length),t=Math.max(0,Math.min(this.activeStartLine,e-1)),n=Math.max(t,Math.min(this.activeEndLine,e-1));if(this.mdLineBadgeEl){const r=t===n?`${t+1}`:`${t+1}–${n+1}`;this.mdLineBadgeEl.textContent=this.uiText(`行 ${r}`,`Ln ${r}`)}if(this.mdGutterEl){const r=[];for(let s=0;s<e;s++){const a=s>=t&&s<=n;r.push(`<div class="md-gutter-ln${a?" is-active":""}">${s+1}</div>`)}this.mdGutterEl.innerHTML=r.join(""),this.mdGutterEl.scrollTop=this.mdTextareaEl.scrollTop}if(this.mdBandEl){const a=12+t*20.8-this.mdTextareaEl.scrollTop,o=Math.max(1,n-t+1)*20.8;this.mdBandEl.style.transform=`translateY(${a}px)`,this.mdBandEl.style.height=`${o}px`}}syncMdPane(e=this.currentMd,t=!1){if(this.mdTitleEl){const n=this.currentFile&&this.currentFile.split(/[\\/]/).pop()||"Markdown";this.mdTitleEl.textContent=n,this.mdTitleEl.title=this.currentFile||n}this.mdTextareaEl&&((t||document.activeElement!==this.mdTextareaEl)&&this.mdTextareaEl.value!==e&&(this.mdTextareaEl.value=e),this.renderMdGutterAndBand())}applyWorkspaceLayout(e=!1){const t=this.treeOpen?this.treeWidthPx:0,n=this.mdOpen?this.mdWidthPx:0,r=t+n,s=t;if(document.documentElement.classList.toggle("http-ide-active",r>0),document.documentElement.style.setProperty("--http-tree-w",`${t}px`),document.documentElement.style.setProperty("--http-md-left",`${s}px`),document.documentElement.style.setProperty("--http-md-w",`${n}px`),document.documentElement.style.setProperty("--http-map-left",`${r}px`),this.treePaneEl&&(this.treePaneEl.hidden=!this.treeOpen),this.mdPaneEl&&(this.mdPaneEl.hidden=!this.mdOpen),this.treeBtnEl){this.treeBtnEl.dataset.active=String(this.treeOpen);const a=this.treeBtnEl.querySelector("span");a&&(a.textContent=this.uiText("项目目录","Files")),this.treeBtnEl.title=this.treeOpen?this.uiText("隐藏左侧项目文件目录树","Hide project file tree sidebar"):this.uiText("显示左侧项目文件目录树","Show project file tree sidebar")}this.splitBtnEl&&(this.splitBtnEl.dataset.active=String(this.mdOpen),this.splitBtnEl.textContent=this.mdOpen?this.uiText("仅留导图","Map Only"):this.uiText("左MD/右导图","Split MD"),this.splitBtnEl.title=this.mdOpen?this.uiText("关闭左侧 Markdown 源文件,仅保留右侧思维导图","Close left Markdown source and keep mind map"):this.uiText("打开左侧原始 Markdown、右侧思维导图分屏对比与编辑","Open left raw Markdown + right mind map split view")),this.treeTitleEl&&(this.treeTitleEl.textContent=this.uiText("项目文件 (Explorer)","Project Explorer")),this.treeCloseBtnEl&&(this.treeCloseBtnEl.textContent=this.uiText("× 收起","× Hide")),this.treeSearchEl&&(this.treeSearchEl.placeholder=this.uiText("搜索项目 .md 文件…","Filter .md files…")),this.mdCloseBtnEl&&(this.mdCloseBtnEl.textContent=this.uiText("× 关闭MD","× Close MD")),this.mdOpen&&this.syncMdPane(this.currentMd,!0),this.treeOpen&&this.renderTreeDom(),requestAnimationFrame(()=>{var a,o,l;try{const h=window.inkmap;(a=h==null?void 0:h.mindMap)==null||a.resize(),e&&((l=(o=h==null?void 0:h.mindMap)==null?void 0:o.view)==null||l.fit())}catch{}})}renderTreeDom(){var d;if(!this.treeBodyEl)return;const e=(((d=this.treeSearchEl)==null?void 0:d.value)??"").trim().toLowerCase(),t=!!e,n=new Map;for(const f of this.cachedFiles){const{project:m,rel:v,item:g}=this.parseFileEntry(f);if(e&&!m.toLowerCase().includes(e)&&!v.toLowerCase().includes(e))continue;let x=n.get(m);x||(x={name:m,key:`proj:${m}`,active:g.group==="active",count:0,root:{name:"",key:`proj:${m}`,folders:new Map,sortedFolders:[],files:[],totalFiles:0}},n.set(m,x)),g.group==="active"&&(x.active=!0),x.count++;const b=v.split("/").filter(Boolean),E=b.pop()||v;let M=x.root,z=`proj:${m}`;for(const R of b){z+=`/${R}`;let O=M.folders.get(R);O||(O={name:R,key:z,folders:new Map,sortedFolders:[],files:[],totalFiles:0},M.folders.set(R,O)),M=O}M.files.push({name:E,path:g.path,rel:v,project:m,isMarkmap:/\.markmap\.md$/i.test(E)})}const r=f=>{const m=[];for(const g of f.folders.values()){for(;g.files.length===0&&g.folders.size===1;){const x=[...g.folders.values()][0];g.name=`${g.name}/${x.name}`,g.key=x.key,g.folders=x.folders,g.files=x.files}r(g),m.push(g)}m.sort((g,x)=>g.name.localeCompare(x.name,void 0,{numeric:!0,sensitivity:"base"})),f.sortedFolders=m,f.files.sort((g,x)=>g.isMarkmap!==x.isMarkmap?g.isMarkmap?-1:1:g.name.localeCompare(x.name,void 0,{numeric:!0,sensitivity:"base"}));let v=f.files.length;for(const g of m)v+=g.totalFiles;f.totalFiles=v},s=[...n.values()];for(const f of s)r(f.root);if(s.sort((f,m)=>f.active!==m.active?f.active?-1:1:f.name.localeCompare(m.name)),this.currentFile&&this.initializedExpansionForFile!==this.currentFile){this.initializedExpansionForFile=this.currentFile;for(const f of s){f.active&&this.expandedKeys.add(f.key);const m=v=>{let g=v.files.some(x=>x.path===this.currentFile);for(const x of v.sortedFolders)m(x)&&(g=!0);return g&&this.expandedKeys.add(v.key),g};m(f.root)&&this.expandedKeys.add(f.key)}}if(this.treeBodyEl.innerHTML="",!s.length){const f=document.createElement("div");f.className="http-tree-empty",f.textContent=t?this.uiText("无匹配的 Markdown 文件","No matching Markdown files"):this.uiText("未找到 Markdown 文件","No Markdown files"),this.treeBodyEl.appendChild(f);return}const a='<svg class="http-tree-chevron" viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4l4 4-4 4"/></svg>',o='<svg class="http-tree-icon http-icon-folder" viewBox="0 0 16 16" width="14" height="14" fill="currentColor"><path d="M1.75 2.5A1.75 1.75 0 0 0 0 4.25v7.5C0 12.716.784 13.5 1.75 13.5h12.5A1.75 1.75 0 0 0 16 11.75v-5.5A1.75 1.75 0 0 0 14.25 4.5H7.82a.25.25 0 0 1-.177-.073L6.28 3.063A1.75 1.75 0 0 0 5.043 2.5H1.75Z"/></svg>',l='<svg class="http-tree-icon http-icon-map" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="3.5" cy="8" r="1.75"/><circle cx="12.5" cy="4" r="1.75"/><circle cx="12.5" cy="12" r="1.75"/><path d="M5.25 7.3L10.75 4.7M5.25 8.7l5.5 2.6"/></svg>',h='<svg class="http-tree-icon http-icon-md" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 1.5H4A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8a1.5 1.5 0 0 0 1.5-1.5V5.5L9.5 1.5Z"/><path d="M9.5 1.5v4h4"/></svg>',c=(f,m,v)=>{for(const g of f.sortedFolders){const x=t||this.expandedKeys.has(g.key),b=document.createElement("div");b.className="http-tree-group";const E=document.createElement("button");if(E.type="button",E.className=`http-tree-row http-tree-folder ${x?"is-open":""}`,E.style.paddingLeft=`${8+v*13}px`,E.innerHTML=`${a}${o}<span class="http-tree-label"></span><span class="http-tree-count">${g.totalFiles}</span>`,E.querySelector(".http-tree-label").textContent=g.name,E.title=g.name,E.addEventListener("click",()=>{this.expandedKeys.has(g.key)?this.expandedKeys.delete(g.key):this.expandedKeys.add(g.key),this.renderTreeDom()}),b.appendChild(E),x){const M=document.createElement("div");M.className="http-tree-children",c(g,M,v+1),b.appendChild(M)}m.appendChild(b)}for(const g of f.files){const x=g.path===this.currentFile,b=document.createElement("button");b.type="button",b.className=`http-tree-row http-tree-file ${x?"is-selected":""}`,b.style.paddingLeft=`${8+v*13}px`,b.innerHTML=`<span class="http-tree-check">${x?"✓":""}</span>${g.isMarkmap?l:h}<span class="http-tree-label"></span>${g.isMarkmap?`<span class="http-tree-tag">${this.uiText("导图","Map")}</span>`:""}`,b.querySelector(".http-tree-label").textContent=g.name,b.title=`${g.project} / ${g.rel}`,b.addEventListener("click",()=>{this.switchFile(g.path)}),m.appendChild(b)}};for(const f of s){const m=t||this.expandedKeys.has(f.key)||s.length===1,v=document.createElement("div");v.className="http-tree-project";const g=document.createElement("button");if(g.type="button",g.className=`http-tree-row http-tree-proj-header ${m?"is-open":""}`,g.innerHTML=`${a}${o}<span class="http-tree-label"></span><span class="http-tree-count">${f.count}</span>`,g.querySelector(".http-tree-label").textContent=f.name,g.addEventListener("click",()=>{this.expandedKeys.has(f.key)?this.expandedKeys.delete(f.key):this.expandedKeys.add(f.key),this.renderTreeDom()}),v.appendChild(g),m){const x=document.createElement("div");x.className="http-tree-proj-body",c(f.root,x,1),v.appendChild(x)}this.treeBodyEl.appendChild(v)}}async flushPendingEdits(){var e,t;this.mdEditTimer&&(window.clearTimeout(this.mdEditTimer),this.mdEditTimer=0,await((t=(e=window.inkmap)==null?void 0:e.load)==null?void 0:t.call(e,this.currentMd,!0)))}async switchFile(e){var r,s;if(!e||e===this.currentFile)return;await this.flushPendingEdits(),await((s=(r=window.inkmap)==null?void 0:r.flushSave)==null?void 0:s.call(r));const t=await fetch(this.base+"api/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({file:e})});if(!t.ok)return;const n=await t.json();this.currentFile=n.currentFile??e,Array.isArray(n.files)&&(this.cachedFiles=n.files),n.doc&&(this.currentMd=n.doc.md,this.currentVersion=n.doc.version,this.syncMdPane(n.doc.md,!0),this.renderTreeDom(),this.externalListeners.forEach(a=>a(n.doc)),window.setTimeout(()=>{var a,o,l;try{(l=(o=(a=window.inkmap)==null?void 0:a.mindMap)==null?void 0:o.view)==null||l.fit()}catch{}},120))}mountWorkspaceControls(e){var l,h,c,d,f,m,v;const t=document.getElementById("bar");if(!t||document.getElementById("http-tree-btn"))return;const n=document.createElement("style");n.textContent=`
4
+ :root.http-ide-active #bar {
5
+ top: 0 !important; left: 0 !important; right: 0 !important;
6
+ min-height: 44px; border-radius: 0 !important;
7
+ border-top: none !important; border-left: none !important; border-right: none !important;
8
+ border-bottom: 1px solid var(--ui-border-strong, rgba(31,35,41,.15)) !important;
9
+ box-shadow: none !important; padding: 4px 12px !important;
10
+ background: var(--ui-solid, #fff) !important;
11
+ }
12
+ :root.http-ide-active #map {
13
+ top: var(--toolbar-height, 44px) !important;
14
+ left: var(--http-map-left, 0px) !important;
15
+ width: calc(100vw - var(--http-map-left, 0px)) !important;
16
+ height: calc(100vh - var(--toolbar-height, 44px)) !important;
17
+ }
18
+ #http-tree-btn, #http-split-btn {
19
+ display: inline-flex; align-items: center; gap: 5px; height: 29px; padding: 0 10px;
20
+ border: 1px solid var(--ui-border, rgba(31,35,41,.1)); border-radius: 7px;
21
+ background: var(--ui-subtle, #f6f7f9); font-size: 12px; font-weight: 560;
22
+ }
23
+ #http-tree-btn:hover, #http-split-btn:hover {
24
+ background: var(--ui-hover, rgba(31,35,41,.06)); border-color: var(--ui-border-strong, rgba(31,35,41,.16));
25
+ }
26
+ #http-tree-btn[data-active="true"], #http-split-btn[data-active="true"] {
27
+ background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
28
+ border-color: color-mix(in srgb, var(--ui-primary, #336df4) 30%, transparent);
29
+ color: var(--ui-primary, #336df4); font-weight: 600;
30
+ }
31
+ #http-tree-pane, #http-md-pane {
32
+ position: fixed; top: var(--toolbar-height, 44px); bottom: 0; z-index: 30;
33
+ display: flex; flex-direction: column;
34
+ background: var(--ui-solid, #fff); color: var(--ui-text, #1f2329);
35
+ border-right: 1px solid var(--ui-border-strong, rgba(31,35,41,.16));
36
+ border-radius: 0; box-shadow: none; overflow: hidden;
37
+ }
38
+ #http-tree-pane {
39
+ left: 0; width: var(--http-tree-w, 240px);
40
+ background: var(--ui-subtle, #f6f7f9);
41
+ }
42
+ #http-md-pane {
43
+ left: var(--http-md-left, 240px); width: var(--http-md-w, 420px);
44
+ }
45
+ #http-tree-pane[hidden], #http-md-pane[hidden] { display: none !important; }
46
+ .http-pane-header {
47
+ display: flex; align-items: center; justify-content: space-between; gap: 6px;
48
+ height: 35px; padding: 0 10px; box-sizing: border-box;
49
+ border-bottom: 1px solid var(--ui-border, rgba(31,35,41,.09));
50
+ background: var(--ui-subtle, #f6f7f9); font-size: 12px; flex: none;
51
+ }
52
+ .http-pane-title {
53
+ display: inline-flex; align-items: center; gap: 5px;
54
+ font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
55
+ }
56
+ .http-md-line-badge {
57
+ font-size: 11px; font-weight: 560; font-variant-numeric: tabular-nums;
58
+ padding: 1px 6px; border-radius: 4px;
59
+ background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
60
+ color: var(--ui-primary, #336df4); flex: none;
61
+ }
62
+ .http-pane-close {
63
+ border: 1px solid var(--ui-border-strong, rgba(31,35,41,.15)); background: var(--ui-solid, #fff);
64
+ color: var(--ui-muted, #646a73); border-radius: 5px; padding: 2px 7px; font-size: 11px; cursor: pointer;
65
+ }
66
+ .http-pane-close:hover { background: var(--ui-hover, rgba(31,35,41,.06)); color: var(--ui-text, #1f2329); }
67
+ .http-tree-search-box {
68
+ padding: 6px 8px; border-bottom: 1px solid var(--ui-border, rgba(31,35,41,.08)); flex: none;
69
+ }
70
+ .http-tree-search {
71
+ width: 100%; box-sizing: border-box; border: 1px solid var(--ui-border-strong, rgba(31,35,41,.15));
72
+ border-radius: 6px; padding: 4px 8px; font-size: 12px; background: var(--ui-solid, #fff);
73
+ color: var(--ui-text, #1f2329); outline: none;
74
+ }
75
+ .http-tree-search:focus { border-color: var(--ui-primary, #336df4); }
76
+ .http-tree-body { flex: 1; overflow-y: auto; padding: 6px; scrollbar-width: thin; }
77
+ .http-tree-row {
78
+ display: flex; align-items: center; gap: 5px; width: 100%; box-sizing: border-box;
79
+ min-height: 26px; padding: 3px 7px; border: 0; border-radius: 6px;
80
+ background: transparent; color: var(--ui-text, #1f2329); font-size: 12px;
81
+ cursor: pointer; text-align: left;
82
+ }
83
+ .http-tree-row:hover { background: var(--ui-hover, rgba(31,35,41,.06)); }
84
+ .http-tree-proj-header { font-weight: 650; color: var(--ui-muted, #646a73); }
85
+ .http-tree-folder { font-weight: 550; }
86
+ .http-tree-chevron { flex: none; color: var(--ui-muted, #646a73); transition: transform .14s ease; }
87
+ .http-tree-folder.is-open > .http-tree-chevron,
88
+ .http-tree-proj-header.is-open > .http-tree-chevron { transform: rotate(90deg); }
89
+ .http-tree-icon { flex: none; }
90
+ .http-icon-folder { color: #e09f3e; }
91
+ .http-icon-map { color: var(--ui-primary, #336df4); }
92
+ .http-icon-md { color: var(--ui-muted, #646a73); }
93
+ .http-tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
94
+ .http-tree-count {
95
+ flex: none; font-size: 10px; color: var(--ui-muted, #646a73);
96
+ background: color-mix(in srgb, var(--ui-text, #1f2329) 6%, transparent);
97
+ padding: 0 5px; border-radius: 999px;
98
+ }
99
+ .http-tree-check { width: 11px; flex: none; font-size: 11px; font-weight: 700; color: var(--ui-primary, #336df4); }
100
+ .http-tree-tag {
101
+ flex: none; font-size: 10px; font-weight: 600; padding: 0 4px; border-radius: 4px;
102
+ background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent); color: var(--ui-primary, #336df4);
103
+ }
104
+ .http-tree-file.is-selected {
105
+ background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
106
+ color: var(--ui-primary, #336df4); font-weight: 600;
107
+ }
108
+ .http-tree-empty { padding: 16px 10px; text-align: center; font-size: 12px; color: var(--ui-muted, #646a73); }
109
+ .http-md-body {
110
+ position: relative; flex: 1; display: flex; min-height: 0; overflow: hidden;
111
+ background: var(--ui-solid, #fff);
112
+ }
113
+ #http-md-gutter {
114
+ width: 40px; flex: none; overflow: hidden; user-select: none;
115
+ padding: 12px 6px 12px 0; box-sizing: border-box; text-align: right;
116
+ background: color-mix(in srgb, var(--ui-subtle, #f6f7f9) 65%, var(--ui-solid, #fff));
117
+ border-right: 1px solid var(--ui-border, rgba(31,35,41,.08));
118
+ font: 11.5px/20.8px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
119
+ color: var(--ui-muted, #646a73); font-variant-numeric: tabular-nums;
120
+ }
121
+ .md-gutter-ln { height: 20.8px; padding-right: 4px; }
122
+ .md-gutter-ln.is-active {
123
+ color: var(--ui-primary, #336df4); font-weight: 700;
124
+ background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
125
+ }
126
+ .http-md-editor-stage {
127
+ position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden;
128
+ }
129
+ #http-md-band {
130
+ position: absolute; left: 0; right: 0; top: 0; height: 20.8px; pointer-events: none;
131
+ background: color-mix(in srgb, var(--ui-primary, #336df4) 10%, transparent);
132
+ border-left: 2.5px solid var(--ui-primary, #336df4);
133
+ transition: transform .06s ease-out, height .06s ease-out;
134
+ }
135
+ #http-md-textarea {
136
+ position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: border-box;
137
+ border: 0; outline: none; resize: none;
138
+ padding: 12px 14px; background: transparent; color: var(--ui-text, #1f2329);
139
+ font: 13px/20.8px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
140
+ tab-size: 2; white-space: pre; overflow: auto;
141
+ }
142
+ .http-pane-resizer {
143
+ position: absolute; top: 0; right: 0; bottom: 0; width: 5px; z-index: 5; cursor: col-resize; background: transparent;
144
+ transition: background .12s ease;
145
+ }
146
+ .http-pane-resizer:hover, .http-pane-resizer:active { background: var(--ui-primary, #336df4); }
147
+ `,document.head.appendChild(n),this.treeBtnEl=document.createElement("button"),this.treeBtnEl.id="http-tree-btn",this.treeBtnEl.type="button",this.treeBtnEl.innerHTML=`<svg viewBox="0 0 16 16" width="13" height="13" fill="currentColor"><path d="M1.75 2.5A1.75 1.75 0 0 0 0 4.25v7.5C0 12.716.784 13.5 1.75 13.5h12.5A1.75 1.75 0 0 0 16 11.75v-5.5A1.75 1.75 0 0 0 14.25 4.5H7.82a.25.25 0 0 1-.177-.073L6.28 3.063A1.75 1.75 0 0 0 5.043 2.5H1.75Z"/></svg><span>${this.uiText("项目目录","Files")}</span>`,this.treeBtnEl.addEventListener("click",()=>{var g;this.treeOpen=!this.treeOpen,this.applyWorkspaceLayout(!0),(g=this.treeBtnEl)==null||g.blur()}),this.splitBtnEl=document.createElement("button"),this.splitBtnEl.id="http-split-btn",this.splitBtnEl.type="button",this.splitBtnEl.addEventListener("click",()=>{var g;this.mdOpen=!this.mdOpen,this.mdOpen&&this.track("split_view"),this.applyWorkspaceLayout(!0),(g=this.splitBtnEl)==null||g.blur()});const r=document.createElement("span");r.className="sep",t.prepend(this.treeBtnEl,this.splitBtnEl,r),this.treePaneEl=document.createElement("aside"),this.treePaneEl.id="http-tree-pane",this.treePaneEl.hidden=!0,this.treePaneEl.innerHTML=`
148
+ <div class="http-pane-header">
149
+ <span class="http-pane-title" id="http-tree-title">${this.uiText("项目文件 (Explorer)","Project Explorer")}</span>
150
+ <button type="button" class="http-pane-close" id="http-tree-close">${this.uiText("× 收起","× Hide")}</button>
151
+ </div>
152
+ <div class="http-tree-search-box">
153
+ <input type="search" class="http-tree-search" placeholder="${this.uiText("搜索项目 .md 文件…","Filter .md files…")}" />
154
+ </div>
155
+ <div class="http-tree-body" role="tree"></div>
156
+ <div class="http-pane-resizer" id="http-tree-resizer" title="${this.uiText("拖拽调整目录树宽度","Drag to resize file tree")}"></div>
157
+ `,document.body.appendChild(this.treePaneEl),this.treeTitleEl=this.treePaneEl.querySelector("#http-tree-title"),this.treeCloseBtnEl=this.treePaneEl.querySelector("#http-tree-close"),this.treeBodyEl=this.treePaneEl.querySelector(".http-tree-body"),this.treeSearchEl=this.treePaneEl.querySelector(".http-tree-search"),(l=this.treeSearchEl)==null||l.addEventListener("input",()=>this.renderTreeDom()),(h=this.treeCloseBtnEl)==null||h.addEventListener("click",()=>{this.treeOpen=!1,this.applyWorkspaceLayout(!0)});const s=this.treePaneEl.querySelector("#http-tree-resizer");s==null||s.addEventListener("pointerdown",g=>{g.preventDefault(),s.setPointerCapture(g.pointerId);const x=E=>{this.treeWidthPx=Math.max(170,Math.min(420,Math.round(E.clientX))),this.applyWorkspaceLayout(!1)},b=()=>{var E,M,z;s.removeEventListener("pointermove",x),s.removeEventListener("pointerup",b),s.removeEventListener("pointercancel",b);try{(z=(M=(E=window.inkmap)==null?void 0:E.mindMap)==null?void 0:M.view)==null||z.fit()}catch{}};s.addEventListener("pointermove",x),s.addEventListener("pointerup",b),s.addEventListener("pointercancel",b)}),this.mdPaneEl=document.createElement("aside"),this.mdPaneEl.id="http-md-pane",this.mdPaneEl.hidden=!0,this.mdPaneEl.innerHTML=`
158
+ <div class="http-pane-header">
159
+ <span class="http-pane-title" id="http-md-title">Markdown</span>
160
+ <span class="http-md-line-badge" id="http-md-line-badge">Ln 1</span>
161
+ <button type="button" class="http-pane-close" id="http-md-close">${this.uiText("× 关闭MD","× Close MD")}</button>
162
+ </div>
163
+ <div class="http-md-body">
164
+ <div id="http-md-gutter" aria-hidden="true"></div>
165
+ <div class="http-md-editor-stage">
166
+ <div id="http-md-band" aria-hidden="true"></div>
167
+ <textarea id="http-md-textarea" spellcheck="false"></textarea>
168
+ </div>
169
+ </div>
170
+ <div class="http-pane-resizer" id="http-md-resizer" title="${this.uiText("拖拽调整原文件窗口宽度","Drag to resize Markdown pane")}"></div>
171
+ `,document.body.appendChild(this.mdPaneEl),this.mdTitleEl=this.mdPaneEl.querySelector("#http-md-title"),this.mdLineBadgeEl=this.mdPaneEl.querySelector("#http-md-line-badge"),this.mdCloseBtnEl=this.mdPaneEl.querySelector("#http-md-close"),this.mdGutterEl=this.mdPaneEl.querySelector("#http-md-gutter"),this.mdBandEl=this.mdPaneEl.querySelector("#http-md-band"),this.mdTextareaEl=this.mdPaneEl.querySelector("#http-md-textarea"),(c=this.mdCloseBtnEl)==null||c.addEventListener("click",()=>{this.mdOpen=!1,this.applyWorkspaceLayout(!0)}),(d=this.mdTextareaEl)==null||d.addEventListener("scroll",()=>{this.renderMdGutterAndBand()});const a=()=>{if(!this.mdTextareaEl)return;const g=this.mdTextareaEl.selectionStart??0,x=this.mdTextareaEl.selectionEnd??g,b=this.mdTextareaEl.value.slice(0,g).split(`
172
+ `).length-1,E=this.mdTextareaEl.value.slice(0,x).split(`
173
+ `).length-1;this.activeStartLine=b,this.activeEndLine=Math.max(b,E),this.renderMdGutterAndBand(),this.revealListeners.forEach(M=>M(b))};(f=this.mdTextareaEl)==null||f.addEventListener("click",a),(m=this.mdTextareaEl)==null||m.addEventListener("keyup",g=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(g.key)&&a()}),(v=this.mdTextareaEl)==null||v.addEventListener("input",()=>{const g=this.mdTextareaEl.value;this.currentMd=g;const x=this.mdTextareaEl.selectionStart??0,b=g.slice(0,x).split(`
174
+ `).length-1;this.activeStartLine=b,this.activeEndLine=b,this.renderMdGutterAndBand(),window.clearTimeout(this.mdEditTimer),this.mdEditTimer=window.setTimeout(()=>{const E=window.inkmap;E!=null&&E.load&&E.load(g,!0).then(()=>{this.revealListeners.forEach(M=>M(b))})},280)});const o=this.mdPaneEl.querySelector("#http-md-resizer");o==null||o.addEventListener("pointerdown",g=>{g.preventDefault(),o.setPointerCapture(g.pointerId);const x=E=>{const M=this.treeOpen?this.treeWidthPx:0,z=Math.max(260,Math.round(window.innerWidth*.65)-M);this.mdWidthPx=Math.max(220,Math.min(z,Math.round(E.clientX-M))),this.applyWorkspaceLayout(!1)},b=()=>{var E,M,z;o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",b),o.removeEventListener("pointercancel",b);try{(z=(M=(E=window.inkmap)==null?void 0:E.mindMap)==null?void 0:M.view)==null||z.fit()}catch{}};o.addEventListener("pointermove",x),o.addEventListener("pointerup",b),o.addEventListener("pointercancel",b)}),e&&(this.treeOpen=!0,this.mdOpen=!0),this.applyWorkspaceLayout(!1)}async load(){const[e,t,n]=await Promise.all([fetch(this.base+"api/doc"),fetch(this.base+"api/capabilities").then(o=>o.ok?o.json():null).catch(()=>null),fetch(this.base+"api/files").then(o=>o.ok?o.json():null).catch(()=>null)]);if(!e.ok)throw new Error(`读取文档失败:${e.status}`);t?this.account=t.purchase===!0?"purchase":"restore":this.sidebar&&(this.account="restore"),this.hostAccountNavigation=(t==null?void 0:t.accountNavigation)==="host"&&new URLSearchParams(location.search).get("account-navigation")==="host"&&window.parent!==window;const r=await e.json();this.currentMd=r.md,this.currentVersion=r.version,this.currentFile=(n==null?void 0:n.currentFile)??r.currentFile??null,Array.isArray(n==null?void 0:n.files)&&(this.cachedFiles=n.files);const s=new URLSearchParams(location.search).get("ide")==="1",a=!this.sidebar&&(s||(t==null?void 0:t.ideWorkspace)===!0);return this.mountWorkspaceControls(a),this.syncMdPane(r.md,!0),r}onReveal(e){this.revealListeners.push(e)}select(e,t=e){this.activeStartLine=Math.max(0,e),this.activeEndLine=Math.max(this.activeStartLine,t),!(!this.mdTextareaEl||!this.mdOpen)&&(cu(this.mdTextareaEl,this.activeStartLine,this.activeEndLine),this.renderMdGutterAndBand())}onMapMarkdownChange(e){this.currentMd=e,this.syncMdPane(e,!1)}refreshLanguage(){this.applyWorkspaceLayout(!1)}async save(e,t){this.currentMd=e,this.syncMdPane(e,!1);const n=await fetch(this.base+"api/doc",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({md:e,baseVersion:t})});if(n.status===409){const s=await n.json();return this.currentMd=s.md,this.currentVersion=s.version,this.syncMdPane(s.md,!0),{ok:!1,doc:s}}if(!n.ok)throw new Error(`保存失败:${n.status}`);const r=await n.json();return this.currentVersion=r.version,{ok:!0,...r}}onExternalChange(e){this.externalListeners.push(e),this.events.addEventListener("change",t=>{const n=JSON.parse(t.data),r=!!(n.currentFile&&n.currentFile!==this.currentFile),s=n.md!==this.currentMd;this.currentMd=n.md,this.currentVersion=n.version,n.currentFile&&(this.currentFile=n.currentFile),(r||s)&&this.syncMdPane(n.md,r),this.treeOpen&&this.renderTreeDom(),e(n)})}saveView(e){fetch(this.base+"api/view",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e),keepalive:!0}).catch(()=>{})}async license(){const e=await fetch(this.base+"api/license");return e.ok?e.json():{pro:!1}}async checkout(e){if(e==="restore"&&this.hostAccountNavigation){await new Promise((n,r)=>{const s=crypto.randomUUID(),a="inkmap:open-account";function o(c){window.clearTimeout(h),window.removeEventListener("message",l),c?n():r(new Error(J("signInPageUnavailable")))}function l(c){var d;c.source===window.parent&&((d=c.data)==null?void 0:d.type)===a&&c.data.id===s&&o(c.data.ok===!0)}const h=window.setTimeout(()=>o(!1),12e3);window.addEventListener("message",l),window.parent.postMessage({type:a,id:s,mode:e},"*")});return}const t=window.open("about:blank","_blank");t&&(t.opener=null);try{const n=await fetch(this.base+"api/checkout",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:e})}),r=await n.json();if(!n.ok)throw new Error(r.error??n.statusText);if(!t)throw new ka(J("allowAccountPopups"),r.url);t.location.replace(r.url)}catch(n){throw t==null||t.close(),n}}async orderPro(){const e=await fetch(this.base+"api/order-pro",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(e.status===501)return await this.checkout("buy"),{status:"redirect",url:"about:blank"};const t=await e.json().catch(()=>({}));if(!e.ok)throw new Error(t.error??e.statusText);const n=t.result;if(n.status==="redirect"&&!window.open(n.url,"_blank","noopener,noreferrer"))throw new ka(J("allowAccountPopups"),n.url);return n}async signOut(){const e=await fetch(this.base+"api/signout",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??e.statusText)}}onLicenseChange(e){this.events.addEventListener("license",n=>e(JSON.parse(n.data)));const t=()=>{this.license().then(e).catch(()=>{})};window.addEventListener("focus",t),window.addEventListener("pagehide",()=>window.removeEventListener("focus",t),{once:!0})}async ads(){const e=await fetch(this.base+"api/ads").catch(()=>null);return e!=null&&e.ok?e.json():[]}async saveFile(e,t){const n=document.createElement("a");return n.href=t,n.download=e,n.click(),!0}track(e){fetch(this.base+"api/telemetry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:e})}).catch(()=>{})}}class fu{constructor(e,t,n){ne(this,"capabilities",{saveTarget:"editor",account:window.INKMAP_ACCOUNT_MODE??"purchase"});ne(this,"nextId",1);ne(this,"waiting",new Map);ne(this,"listeners",{});ne(this,"first");ne(this,"currentLicense");ne(this,"history",{undo:()=>this.post({type:"undo"}),redo:()=>this.post({type:"redo"})});ne(this,"phoneSignIn",{send:e=>this.request(t=>({type:"sendPhoneCode",id:t,phone:e}),t=>t.result),verify:(e,t)=>this.request(n=>({type:"signInByPhone",id:n,phone:e,code:t}),n=>{const{result:r}=n;return r.ok&&(this.currentLicense=r.value),r})});this.api=e,this.assetBase=t,this.locale=n,window.addEventListener("message",r=>{var a;const s=r.data;!s||typeof s!="object"||("id"in s&&this.waiting.has(s.id)&&(this.waiting.get(s.id)(s),this.waiting.delete(s.id)),s.type==="license"&&(this.currentLicense=s.state),(a=this.listeners[s.type])==null||a.forEach(o=>o(s)))})}on(e,t){const n=e;this.listeners[n]=[...this.listeners[n]??[],t]}post(e){this.api.postMessage(e)}request(e,t){const n=this.nextId++;return new Promise((r,s)=>{this.waiting.set(n,a=>{a.type==="error"?s(new Error(a.message)):r(t(a))}),this.post(e(n))})}hello(){return this.first??(this.first=new Promise(e=>{this.on("doc",t=>e(t)),this.post({type:"ready"})}))}async load(){return(await this.hello()).doc}save(e,t){return this.request(n=>({type:"save",id:n,md:e,baseVersion:t}),n=>n.type==="saved"?{ok:!0,version:n.version}:{ok:!1,doc:n.doc})}onExternalChange(e){this.on("change",t=>e(t.doc))}onReveal(e){this.on("reveal",t=>e(t.line))}select(e,t){this.post({type:"select",line:e,...t!==void 0&&{endLine:t}})}onMapMarkdownChange(e){this.post({type:"mapMarkdownChange",md:e})}saveView(e){this.post({type:"viewState",state:e})}async canAddToChat(){return(await this.hello()).chat===!0}addToChat(e){this.post({type:"addToChat",...e})}onChatRequest(e){this.on("requestChat",()=>e())}async license(){return this.currentLicense??(await this.hello()).license}checkout(e){return this.request(t=>({type:"checkout",id:t,mode:e}),()=>{})}orderPro(){return this.request(e=>({type:"orderPro",id:e}),e=>{const{result:t}=e;return t.status==="active"&&(this.currentLicense=t.state),t})}signOut(){return this.request(e=>({type:"signOut",id:e}),()=>{})}onLicenseChange(e){this.on("license",t=>e(t.state))}async ads(){return(await this.hello()).ads}saveFile(e,t){return this.request(n=>({type:"saveFile",id:n,name:e,dataUrl:t}),n=>n.saved)}track(e){this.post({type:"telemetry",event:e})}}function pu(){if(window.acquireVsCodeApi){const i=Fa(window.INKMAP_LOCALE);return new fu(window.acquireVsCodeApi(),window.INKMAP_ASSET_BASE??"",i)}return new uu}const _={CHANGE_THEME:"changeTheme",CHANGE_LAYOUT:"changeLayout",MODE:{READONLY:"readonly",EDIT:"edit"},LAYOUT:{LOGICAL_STRUCTURE:"logicalStructure",LOGICAL_STRUCTURE_LEFT:"logicalStructureLeft",MIND_MAP:"mindMap",ORGANIZATION_STRUCTURE:"organizationStructure",CATALOG_ORGANIZATION:"catalogOrganization",TIMELINE:"timeline",TIMELINE2:"timeline2",FISHBONE:"fishbone",FISHBONE2:"fishbone2",RIGHT_FISHBONE:"rightFishbone",RIGHT_FISHBONE2:"rightFishbone2",VERTICAL_TIMELINE:"verticalTimeline",VERTICAL_TIMELINE2:"verticalTimeline2",VERTICAL_TIMELINE3:"verticalTimeline3"},DIR:{UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right"},KEY_DIR:{LEFT:"Left",UP:"Up",RIGHT:"Right",DOWN:"Down"},SHAPE:{RECTANGLE:"rectangle",DIAMOND:"diamond",PARALLELOGRAM:"parallelogram",ROUNDED_RECTANGLE:"roundedRectangle",OCTAGONAL_RECTANGLE:"octagonalRectangle",OUTER_TRIANGULAR_RECTANGLE:"outerTriangularRectangle",INNER_TRIANGULAR_RECTANGLE:"innerTriangularRectangle",ELLIPSE:"ellipse",CIRCLE:"circle"},MOUSE_WHEEL_ACTION:{ZOOM:"zoom",MOVE:"move"},INIT_ROOT_NODE_POSITION:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom",CENTER:"center"},LAYOUT_GROW_DIR:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"},CREATE_NEW_NODE_BEHAVIOR:{DEFAULT:"default",NOT_ACTIVE:"notActive",ACTIVE_ONLY:"activeOnly"},TAG_PLACEMENT:{RIGHT:"right",BOTTOM:"bottom"},IMG_PLACEMENT:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"}},Hl={[_.INIT_ROOT_NODE_POSITION.LEFT]:0,[_.INIT_ROOT_NODE_POSITION.TOP]:0,[_.INIT_ROOT_NODE_POSITION.RIGHT]:1,[_.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[_.INIT_ROOT_NODE_POSITION.CENTER]:.5},Ul=[_.LAYOUT.LOGICAL_STRUCTURE,_.LAYOUT.LOGICAL_STRUCTURE_LEFT,_.LAYOUT.MIND_MAP,_.LAYOUT.CATALOG_ORGANIZATION,_.LAYOUT.ORGANIZATION_STRUCTURE,_.LAYOUT.TIMELINE,_.LAYOUT.TIMELINE2,_.LAYOUT.VERTICAL_TIMELINE,_.LAYOUT.VERTICAL_TIMELINE2,_.LAYOUT.VERTICAL_TIMELINE3,_.LAYOUT.FISHBONE,_.LAYOUT.FISHBONE2,_.LAYOUT.RIGHT_FISHBONE,_.LAYOUT.RIGHT_FISHBONE2],Ta=["text","image","imageTitle","imageSize","icon","tag","hyperlink","hyperlinkTitle","note","expand","isActive","generalization","richText","resetRichText","uid","activeStyle","associativeLineTargets","associativeLineTargetControlOffsets","associativeLinePoint","associativeLineText","attachmentUrl","attachmentName","notation","outerFrame","number","range","customLeft","customTop","customTextWidth","checkbox","dir","needUpdate","imgMap","nodeLink"],ur={READ_CLIPBOARD_ERROR:"read_clipboard_error",PARSE_PASTE_DATA_ERROR:"parse_paste_data_error",CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR:"custom_handle_clipboard_text_error",LOAD_CLIPBOARD_IMAGE_ERROR:"load_clipboard_image_error",BEFORE_TEXT_EDIT_ERROR:"before_text_edit_error",EXPORT_ERROR:"export_error",EXPORT_LOAD_IMAGE_ERROR:"export_load_image_error",DATA_CHANGE_DETAIL_EVENT_ERROR:"data_change_detail_event_error"},mu=`
175
+ /* 鼠标hover和激活时渲染的矩形 */
176
+ .smm-hover-node{
177
+ display: none;
178
+ opacity: 0.6;
179
+ stroke-width: 1;
180
+ }
181
+
182
+ .smm-node:not(.smm-node-dragging):hover .smm-hover-node{
183
+ display: block;
184
+ }
185
+
186
+ .smm-node.active .smm-hover-node, .smm-node-highlight .smm-hover-node{
187
+ display: block;
188
+ opacity: 1;
189
+ stroke-width: 2;
190
+ }
191
+
192
+ .smm-text-node-wrap, .smm-expand-btn-text {
193
+ user-select: none;
194
+ }
195
+ `,gu=["img","br","hr","input","link","meta","area"],Ea=1.2,vu=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"];class xu{constructor(e={}){this.opt=e,this.mindMap=this.opt.mindMap,this.scale=1,this.sx=0,this.sy=0,this.x=0,this.y=0,this.firstDrag=!0,this.setTransformData(this.mindMap.opt.viewData),this.bind()}bind(){this.mindMap.keyCommand.addShortcut("Control+=",()=>{this.enlarge()}),this.mindMap.keyCommand.addShortcut("Control+-",()=>{this.narrow()}),this.mindMap.keyCommand.addShortcut("Control+i",()=>{this.fit()}),this.mindMap.event.on("mousedown",e=>{const{isDisableDrag:t,mousedownEventPreventDefault:n}=this.mindMap.opt;t||(n&&e.preventDefault(),this.sx=this.x,this.sy=this.y)}),this.mindMap.event.on("drag",(e,t)=>{e.ctrlKey||e.metaKey||this.mindMap.opt.isDisableDrag||(this.firstDrag&&(this.firstDrag=!1,this.mindMap.renderer.activeNodeList.length>0&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")),this.x=this.sx+t.mousemoveOffset.x,this.y=this.sy+t.mousemoveOffset.y,this.transform())}),this.mindMap.event.on("mouseup",()=>{this.firstDrag=!0}),this.mindMap.event.on("mousewheel",(e,t,n,r)=>{const{customHandleMousewheel:s,mousewheelAction:a,mouseScaleCenterUseMousePosition:o,mousewheelMoveStep:l,mousewheelZoomActionReverse:h,disableMouseWheelZoom:c,translateRatio:d}=this.mindMap.opt;if(s&&typeof s=="function")return s(e);if(a===_.MOUSE_WHEEL_ACTION.ZOOM||e.ctrlKey||e.metaKey){if(c)return;const{x:f,y:m}=this.mindMap.toPos(e.clientX,e.clientY),v=o?f:void 0,g=o?m:void 0;switch(r&&(t.includes(_.DIR.LEFT)||t.includes(_.DIR.RIGHT))&&(t=t.filter(x=>![_.DIR.LEFT,_.DIR.RIGHT].includes(x))),!0){case t.includes(_.DIR.UP):h?this.enlarge(v,g,r):this.narrow(v,g,r);break;case t.includes(_.DIR.DOWN):h?this.narrow(v,g,r):this.enlarge(v,g,r);break}}else{let f=0,m=0;r?(f=Math.abs(e.wheelDeltaX),m=Math.abs(e.wheelDeltaY)):f=m=l;let v=0,g=0;t.includes(_.DIR.DOWN)&&(g=-m),t.includes(_.DIR.UP)&&(g=m),t.includes(_.DIR.LEFT)&&(v=f),t.includes(_.DIR.RIGHT)&&(v=-f),this.translateXY(v*d,g*d)}}),this.mindMap.on("resize",()=>{this.checkNeedMindMapInCanvas()&&this.transform()})}getTransformData(){return{transform:this.mindMap.draw.transform(),state:{scale:this.scale,x:this.x,y:this.y,sx:this.sx,sy:this.sy}}}setTransformData(e){e&&(Object.keys(e.state).forEach(t=>{this[t]=e.state[t]}),this.mindMap.draw.transform({...e.transform}),this.mindMap.emit("view_data_change",this.getTransformData()),this.emitEvent("scale"),this.emitEvent("translate"))}translateXY(e,t){e===0&&t===0||(this.x+=e,this.y+=t,this.transform(),this.emitEvent("translate"))}translateX(e){e!==0&&(this.x+=e,this.transform(),this.emitEvent("translate"))}translateXTo(e){this.x=e,this.transform(),this.emitEvent("translate")}translateY(e){e!==0&&(this.y+=e,this.transform(),this.emitEvent("translate"))}translateYTo(e){this.y=e,this.transform(),this.emitEvent("translate")}transform(){try{this.limitMindMapInCanvas()}catch{}this.mindMap.draw.transform({origin:[0,0],scale:this.scale,translate:[this.x,this.y]}),this.mindMap.emit("view_data_change",this.getTransformData())}reset(){const e=this.scale!==1,t=this.x!==0||this.y!==0;this.scale=1,this.x=0,this.y=0,this.transform(),e&&this.emitEvent("scale"),t&&this.emitEvent("translate")}narrow(e,t,n){let{scaleRatio:r,minZoomRatio:s}=this.mindMap.opt;r=r/(n?5:1);const a=Math.max(this.scale-r,s/100);this.scaleInCenter(a,e,t),this.transform(),this.emitEvent("scale")}enlarge(e,t,n){let{scaleRatio:r,maxZoomRatio:s}=this.mindMap.opt;r=r/(n?5:1);let a=0;s===-1?a=this.scale+r:a=Math.min(this.scale+r,s/100),this.scaleInCenter(a,e,t),this.transform(),this.emitEvent("scale")}scaleInCenter(e,t,n){(t===void 0||n===void 0)&&(t=this.mindMap.width/2,n=this.mindMap.height/2);const r=this.scale,s=1-e/r,a=(t-this.x)*s,o=(n-this.y)*s;this.x+=a,this.y+=o,this.scale=e}setScale(e,t,n){t!==void 0&&n!==void 0?this.scaleInCenter(e,t,n):this.scale=e,this.transform(),this.emitEvent("scale")}fit(e=()=>{},t=!1,n){n=n===void 0?this.mindMap.opt.fitPadding:n;const r=this.mindMap.draw,s=r.transform(),a=e()||r.rbox(),o=a.width/s.scaleX,l=a.height/s.scaleY,h=o/l;let{width:c,height:d}=this.mindMap.elRect;c=c-n*2,d=d-n*2;const f=c/d;let m=0,v="";if(o<=c&&l<=d&&!t)m=1,v=1;else{let E=0;h>f?(E=c,v=2):(E=d*h,v=3),m=E/o}this.setScale(m);const g=e()||r.rbox();g.x-=this.mindMap.elRect.left,g.y-=this.mindMap.elRect.top;let x=0,b=0;v===1?(x=-g.x+n+(c-g.width)/2,b=-g.y+n+(d-g.height)/2):v===2?(x=-g.x+n,b=-g.y+n+(d-g.height)/2):v===3&&(x=-g.x+n+(c-g.width)/2,b=-g.y+n),this.translateXY(x,b)}checkNeedMindMapInCanvas(){if(this.mindMap.demonstrate&&this.mindMap.demonstrate.isInDemonstrate)return!1;const{isLimitMindMapInCanvasWhenHasScrollbar:e,isLimitMindMapInCanvas:t}=this.mindMap.opt;return this.mindMap.scrollbar?e:t}limitMindMapInCanvas(){if(!this.checkNeedMindMapInCanvas())return;let{scale:e,left:t,top:n,right:r,bottom:s}=this.getPositionLimit();const a=(this.mindMap.width-this.mindMap.initWidth)/2*e,o=(this.mindMap.height-this.mindMap.initHeight)/2*e,l=this.scale/e;t*=l,r*=l,n*=l,s*=l;const h=this.mindMap.width/2,c=this.mindMap.height/2,d=this.scale-1;t-=d*h-a,r-=d*h-a,n-=d*c-o,s-=d*c-o,this.x>t&&(this.x=t),this.x<r&&(this.x=r),this.y>n&&(this.y=n),this.y<s&&(this.y=s)}getPositionLimit(){const{scaleX:e,scaleY:t}=this.mindMap.draw.transform(),n=this.mindMap.draw.rbox(),r=this.mindMap.renderer.root.group.rbox(),s=this.mindMap.renderer.layout.getRootCenterOffset(r.width,r.height),a=r.x-n.x-s.x*e,o=r.x-n.x2-s.x*e,l=r.y-n.y-s.y*t,h=r.y-n.y2-s.y*t;return{scale:e,left:a,right:o,top:l,bottom:h}}emitEvent(e){switch(e){case"scale":this.mindMap.emit("scale",this.scale);case"translate":this.mindMap.emit("translate",this.x,this.y)}}}var o7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var uo={exports:{}},$l;function wu(){return $l||($l=1,(function(i){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(l,h,c){this.fn=l,this.context=h,this.once=c||!1}function s(l,h,c,d,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var m=new r(c,d||l,f),v=t?t+h:h;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],m]:l._events[v].push(m):(l._events[v]=m,l._eventsCount++),l}function a(l,h){--l._eventsCount===0?l._events=new n:delete l._events[h]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var h=[],c,d;if(this._eventsCount===0)return h;for(d in c=this._events)e.call(c,d)&&h.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(c)):h},o.prototype.listeners=function(h){var c=t?t+h:h,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,m=d.length,v=new Array(m);f<m;f++)v[f]=d[f].fn;return v},o.prototype.listenerCount=function(h){var c=t?t+h:h,d=this._events[c];return d?d.fn?1:d.length:0},o.prototype.emit=function(h,c,d,f,m,v){var g=t?t+h:h;if(!this._events[g])return!1;var x=this._events[g],b=arguments.length,E,M;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),b){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,c),!0;case 3:return x.fn.call(x.context,c,d),!0;case 4:return x.fn.call(x.context,c,d,f),!0;case 5:return x.fn.call(x.context,c,d,f,m),!0;case 6:return x.fn.call(x.context,c,d,f,m,v),!0}for(M=1,E=new Array(b-1);M<b;M++)E[M-1]=arguments[M];x.fn.apply(x.context,E)}else{var z=x.length,R;for(M=0;M<z;M++)switch(x[M].once&&this.removeListener(h,x[M].fn,void 0,!0),b){case 1:x[M].fn.call(x[M].context);break;case 2:x[M].fn.call(x[M].context,c);break;case 3:x[M].fn.call(x[M].context,c,d);break;case 4:x[M].fn.call(x[M].context,c,d,f);break;default:if(!E)for(R=1,E=new Array(b-1);R<b;R++)E[R-1]=arguments[R];x[M].fn.apply(x[M].context,E)}}return!0},o.prototype.on=function(h,c,d){return s(this,h,c,d,!1)},o.prototype.once=function(h,c,d){return s(this,h,c,d,!0)},o.prototype.removeListener=function(h,c,d,f){var m=t?t+h:h;if(!this._events[m])return this;if(!c)return a(this,m),this;var v=this._events[m];if(v.fn)v.fn===c&&(!f||v.once)&&(!d||v.context===d)&&a(this,m);else{for(var g=0,x=[],b=v.length;g<b;g++)(v[g].fn!==c||f&&!v[g].once||d&&v[g].context!==d)&&x.push(v[g]);x.length?this._events[m]=x.length===1?x[0]:x:a(this,m)}return this},o.prototype.removeAllListeners=function(h){var c;return h?(c=t?t+h:h,this._events[c]&&a(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,i.exports=o})(uo)),uo.exports}var bu=wu();const ku=yu(bu);let Tu=class extends ku{constructor(e={}){super(),this.opt=e,this.mindMap=e.mindMap,this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1,this.mousedownPos={x:0,y:0},this.mousemovePos={x:0,y:0},this.mousemoveOffset={x:0,y:0},this.bindFn(),this.bind()}bindFn(){this.onBodyMousedown=this.onBodyMousedown.bind(this),this.onBodyClick=this.onBodyClick.bind(this),this.onDrawClick=this.onDrawClick.bind(this),this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onNodeMouseup=this.onNodeMouseup.bind(this),this.onMousewheel=this.onMousewheel.bind(this),this.onContextmenu=this.onContextmenu.bind(this),this.onSvgMousedown=this.onSvgMousedown.bind(this),this.onKeyup=this.onKeyup.bind(this),this.onMouseenter=this.onMouseenter.bind(this),this.onMouseleave=this.onMouseleave.bind(this)}bind(){document.body.addEventListener("mousedown",this.onBodyMousedown),document.body.addEventListener("click",this.onBodyClick),this.mindMap.svg.on("click",this.onDrawClick),this.mindMap.el.addEventListener("mousedown",this.onMousedown),this.mindMap.svg.on("mousedown",this.onSvgMousedown),window.addEventListener("mousemove",this.onMousemove),window.addEventListener("mouseup",this.onMouseup),this.on("node_mouseup",this.onNodeMouseup),this.mindMap.el.addEventListener("wheel",this.onMousewheel),this.mindMap.svg.on("contextmenu",this.onContextmenu),this.mindMap.svg.on("mouseenter",this.onMouseenter),this.mindMap.svg.on("mouseleave",this.onMouseleave),window.addEventListener("keyup",this.onKeyup)}unbind(){document.body.removeEventListener("mousedown",this.onBodyMousedown),document.body.removeEventListener("click",this.onBodyClick),this.mindMap.svg.off("click",this.onDrawClick),this.mindMap.el.removeEventListener("mousedown",this.onMousedown),window.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("mouseup",this.onMouseup),this.off("node_mouseup",this.onNodeMouseup),this.mindMap.el.removeEventListener("wheel",this.onMousewheel),this.mindMap.svg.off("contextmenu",this.onContextmenu),this.mindMap.svg.off("mouseenter",this.onMouseenter),this.mindMap.svg.off("mouseleave",this.onMouseleave),window.removeEventListener("keyup",this.onKeyup)}onDrawClick(e){this.emit("draw_click",e)}onBodyMousedown(e){this.emit("body_mousedown",e)}onBodyClick(e){this.emit("body_click",e)}onSvgMousedown(e){this.emit("svg_mousedown",e)}onMousedown(e){e.which===1?this.isLeftMousedown=!0:e.which===3?this.isRightMousedown=!0:e.which===2&&(this.isMiddleMousedown=!0),this.mousedownPos.x=e.clientX,this.mousedownPos.y=e.clientY,this.emit("mousedown",e,this)}onMousemove(e){let{useLeftKeySelectionRightKeyDrag:t}=this.mindMap.opt;this.mousemovePos.x=e.clientX,this.mousemovePos.y=e.clientY,this.mousemoveOffset.x=e.clientX-this.mousedownPos.x,this.mousemoveOffset.y=e.clientY-this.mousedownPos.y,this.emit("mousemove",e,this),(this.isMiddleMousedown||(t?this.isRightMousedown:this.isLeftMousedown))&&(e.preventDefault(),this.emit("drag",e,this))}onMouseup(e){this.onNodeMouseup(),this.emit("mouseup",e,this)}onNodeMouseup(){this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1}onMousewheel(e){e.stopPropagation(),e.preventDefault();const t=[];e.deltaY<0&&t.push(_.DIR.UP),e.deltaY>0&&t.push(_.DIR.DOWN),e.deltaX<0&&t.push(_.DIR.LEFT),e.deltaX>0&&t.push(_.DIR.RIGHT);let n=!1;const{customCheckIsTouchPad:r}=this.mindMap.opt;typeof r=="function"?n=r(e):n=Math.abs(e.deltaY)<=10,this.emit("mousewheel",e,t,this,n)}onContextmenu(e){e.preventDefault(),!e.ctrlKey&&this.emit("contextmenu",e)}onKeyup(e){this.emit("keyup",e)}onMouseenter(e){this.emit("svg_mouseenter",e)}onMouseleave(e){this.emit("svg_mouseleave",e)}};var Ma=function(e){return Eu(e)&&!Mu(e)};function Eu(i){return!!i&&typeof i=="object"}function Mu(i){var e=Object.prototype.toString.call(i);return e==="[object RegExp]"||e==="[object Date]"||Cu(i)}var Su=typeof Symbol=="function"&&Symbol.for,zu=Su?Symbol.for("react.element"):60103;function Cu(i){return i.$$typeof===zu}function Nu(i){return Array.isArray(i)?[]:{}}function ks(i,e){var t=e&&e.clone===!0;return t&&Ma(i)?$r(Nu(i),i,e):i}function Gl(i,e,t){var n=i.slice();return e.forEach(function(r,s){typeof n[s]>"u"?n[s]=ks(r,t):Ma(r)?n[s]=$r(i[s],r,t):i.indexOf(r)===-1&&n.push(ks(r,t))}),n}function Lu(i,e,t){var n={};return Ma(i)&&Object.keys(i).forEach(function(r){n[r]=ks(i[r],t)}),Object.keys(e).forEach(function(r){!Ma(e[r])||!i[r]?n[r]=ks(e[r],t):n[r]=$r(i[r],e[r],t)}),n}function $r(i,e,t){var n=Array.isArray(e),r=Array.isArray(i),s=t||{arrayMerge:Gl},a=n===r;if(a)if(n){var o=s.arrayMerge||Gl;return o(i,e,t)}else return Lu(i,e,t);else return ks(e,t)}$r.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(n,r){return $r(n,r,t)})};var Sa=$r;let js;const Au=new Uint8Array(16);function _u(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(Au)}const Ft=[];for(let i=0;i<256;++i)Ft.push((i+256).toString(16).slice(1));function Ru(i,e=0){return Ft[i[e+0]]+Ft[i[e+1]]+Ft[i[e+2]]+Ft[i[e+3]]+"-"+Ft[i[e+4]]+Ft[i[e+5]]+"-"+Ft[i[e+6]]+Ft[i[e+7]]+"-"+Ft[i[e+8]]+Ft[i[e+9]]+"-"+Ft[i[e+10]]+Ft[i[e+11]]+Ft[i[e+12]]+Ft[i[e+13]]+Ft[i[e+14]]+Ft[i[e+15]]}const Du=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ql={randomUUID:Du};function Iu(i,e,t){if(ql.randomUUID&&!i)return ql.randomUUID();i=i||{};const n=i.random||(i.rng||_u)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ru(n)}function V0(i){this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(i)}V0.prototype.init_genrand=function(i){for(this.mt[0]=i>>>0,this.mti=1;this.mti<this.N;this.mti++)i=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(((i&4294901760)>>>16)*1812433253<<16)+(i&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0};V0.prototype.genrand_int32=function(){var i,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var t;for(this.mti==this.N+1&&this.init_genrand(5489),t=0;t<this.N-this.M;t++)i=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+this.M]^i>>>1^e[i&1];for(;t<this.N-1;t++)i=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+(this.M-this.N)]^i>>>1^e[i&1];i=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^i>>>1^e[i&1],this.mti=0}return i=this.mt[this.mti++],i^=i>>>11,i^=i<<7&2636928640,i^=i<<15&4022730752,i^=i>>>18,i>>>0};const Qo={},Pc=[];function Ce(i,e){if(Array.isArray(i)){for(const t of i)Ce(t,e);return}if(typeof i=="object"){for(const t in i)Ce(t,i[t]);return}Fc(Object.getOwnPropertyNames(e)),Qo[i]=Object.assign(Qo[i]||{},e)}function hi(i){return Qo[i]||{}}function Ou(){return[...new Set(Pc)]}function Fc(i){Pc.push(...i)}function j0(i,e){let t;const n=i.length,r=[];for(t=0;t<n;t++)r.push(e(i[t]));return r}function Bu(i,e){let t;const n=i.length,r=[];for(t=0;t<n;t++)e(i[t])&&r.push(i[t]);return r}function fo(i){return i%360*Math.PI/180}function Ks(i){return i.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Pu(i){return i.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}function Hc(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Xr(i,e,t,n){return(e==null||t==null)&&(n=n||i.bbox(),e==null?e=n.width/n.height*t:t==null&&(t=n.height/n.width*e)),{width:e,height:t}}function Jo(i,e){const t=i.origin;let n=i.ox!=null?i.ox:i.originX!=null?i.originX:"center",r=i.oy!=null?i.oy:i.originY!=null?i.originY:"center";t!=null&&([n,r]=Array.isArray(t)?t:typeof t=="object"?[t.x,t.y]:[t,t]);const s=typeof n=="string",a=typeof r=="string";if(s||a){const{height:o,width:l,x:h,y:c}=e.bbox();s&&(n=n.includes("left")?h:n.includes("right")?h+l:h+l/2),a&&(r=r.includes("top")?c:r.includes("bottom")?c+o:c+o/2)}return[n,r]}const K0="http://www.w3.org/2000/svg",Fu="http://www.w3.org/1999/xhtml",Zs="http://www.w3.org/2000/xmlns/",_s="http://www.w3.org/1999/xlink",Hu="http://svgjs.dev/svgjs",Fe={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};let Z0=class{};const fr={},Q0="___SYMBOL___ROOT___";function Ts(i,e=K0){return Fe.document.createElementNS(e,i)}function Qt(i,e=!1){if(i instanceof Z0)return i;if(typeof i=="object")return po(i);if(i==null)return new fr[Q0];if(typeof i=="string"&&i.charAt(0)!=="<")return po(Fe.document.querySelector(i));const t=e?Fe.document.createElement("div"):Ts("svg");return t.innerHTML=i,i=po(t.firstChild),t.removeChild(t.firstChild),i}function et(i,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:Ts(i)}function Ci(i){if(!i)return null;if(i.instance instanceof Z0)return i.instance;if(i.nodeName==="#document-fragment")return new fr.Fragment(i);let e=Hc(i.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":fr[e]||(e="Dom"),new fr[e](i)}let po=Ci;function Oe(i,e=i.name,t=!1){return fr[e]=i,t&&(fr[Q0]=i),Fc(Object.getOwnPropertyNames(i.prototype)),i}function Uu(i){return fr[i]}let $u=1e3;function Uc(i){return"Svgjs"+Hc(i)+$u++}function $c(i){for(let e=i.children.length-1;e>=0;e--)$c(i.children[e]);return i.id&&(i.id=Uc(i.nodeName)),i}function Re(i,e){let t,n;for(i=Array.isArray(i)?i:[i],n=i.length-1;n>=0;n--)for(t in e)i[n].prototype[t]=e[t]}function Je(i){return function(...e){const t=e[e.length-1];return t&&t.constructor===Object&&!(t instanceof Array)?i.apply(this,e.slice(0,-1)).attr(t):i.apply(this,e)}}function Gu(){return this.parent().children()}function qu(){return this.parent().index(this)}function Wu(){return this.siblings()[this.position()+1]}function Yu(){return this.siblings()[this.position()-1]}function Xu(){const i=this.position();return this.parent().add(this.remove(),i+1),this}function Vu(){const i=this.position();return this.parent().add(this.remove(),i?i-1:0),this}function ju(){return this.parent().add(this.remove()),this}function Ku(){return this.parent().add(this.remove(),0),this}function Zu(i){i=Qt(i),i.remove();const e=this.position();return this.parent().add(i,e),this}function Qu(i){i=Qt(i),i.remove();const e=this.position();return this.parent().add(i,e+1),this}function Ju(i){return i=Qt(i),i.before(this),this}function e3(i){return i=Qt(i),i.after(this),this}Ce("Dom",{siblings:Gu,position:qu,next:Wu,prev:Yu,forward:Xu,backward:Vu,front:ju,back:Ku,before:Zu,after:Qu,insertBefore:Ju,insertAfter:e3});const Gc=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,t3=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,i3=/rgb\((\d+),(\d+),(\d+)\)/,n3=/(#[a-z_][a-z0-9\-_]*)/i,r3=/\)\s*,?\s*/,s3=/\s/g,Wl=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Yl=/^rgb\(/,Xl=/^(\s+)?$/,Vl=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,a3=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dn=/[\s,]+/,J0=/[MLHVCSQTAZ]/i;function o3(){const i=this.attr("class");return i==null?[]:i.trim().split(dn)}function l3(i){return this.classes().indexOf(i)!==-1}function h3(i){if(!this.hasClass(i)){const e=this.classes();e.push(i),this.attr("class",e.join(" "))}return this}function c3(i){return this.hasClass(i)&&this.attr("class",this.classes().filter(function(e){return e!==i}).join(" ")),this}function d3(i){return this.hasClass(i)?this.removeClass(i):this.addClass(i)}Ce("Dom",{classes:o3,hasClass:l3,addClass:h3,removeClass:c3,toggleClass:d3});function u3(i,e){const t={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(n){return!!n.length}).forEach(function(n){const r=n.split(/\s*:\s*/);t[r[0]]=r[1]}),t;if(arguments.length<2){if(Array.isArray(i)){for(const n of i){const r=Ks(n);t[n]=this.node.style[r]}return t}if(typeof i=="string")return this.node.style[Ks(i)];if(typeof i=="object")for(const n in i)this.node.style[Ks(n)]=i[n]==null||Xl.test(i[n])?"":i[n]}return arguments.length===2&&(this.node.style[Ks(i)]=e==null||Xl.test(e)?"":e),this}function f3(){return this.css("display","")}function p3(){return this.css("display","none")}function m3(){return this.css("display")!=="none"}Ce("Dom",{css:u3,show:f3,hide:p3,visible:m3});function g3(i,e,t){if(i==null)return this.data(j0(Bu(this.node.attributes,n=>n.nodeName.indexOf("data-")===0),n=>n.nodeName.slice(5)));if(i instanceof Array){const n={};for(const r of i)n[r]=this.data(r);return n}else if(typeof i=="object")for(e in i)this.data(e,i[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+i))}catch{return this.attr("data-"+i)}else this.attr("data-"+i,e===null?null:t===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}Ce("Dom",{data:g3});function v3(i,e){if(typeof arguments[0]=="object")for(const t in i)this.remember(t,i[t]);else{if(arguments.length===1)return this.memory()[i];this.memory()[i]=e}return this}function x3(){if(arguments.length===0)this._memory={};else for(let i=arguments.length-1;i>=0;i--)delete this.memory()[arguments[i]];return this}function y3(){return this._memory=this._memory||{}}Ce("Dom",{remember:v3,forget:x3,memory:y3});function w3(i){return i.length===4?["#",i.substring(1,2),i.substring(1,2),i.substring(2,3),i.substring(2,3),i.substring(3,4),i.substring(3,4)].join(""):i}function b3(i){const e=Math.round(i),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function Nr(i,e){for(let t=e.length;t--;)if(i[e[t]]==null)return!1;return!0}function k3(i,e){const t=Nr(i,"rgb")?{_a:i.r,_b:i.g,_c:i.b,_d:0,space:"rgb"}:Nr(i,"xyz")?{_a:i.x,_b:i.y,_c:i.z,_d:0,space:"xyz"}:Nr(i,"hsl")?{_a:i.h,_b:i.s,_c:i.l,_d:0,space:"hsl"}:Nr(i,"lab")?{_a:i.l,_b:i.a,_c:i.b,_d:0,space:"lab"}:Nr(i,"lch")?{_a:i.l,_b:i.c,_c:i.h,_d:0,space:"lch"}:Nr(i,"cmyk")?{_a:i.c,_b:i.m,_c:i.y,_d:i.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return t.space=e||t.space,t}function T3(i){return i==="lab"||i==="xyz"||i==="lch"}function mo(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}class Ve{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ve||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",t,n){const{random:r,round:s,sin:a,PI:o}=Math;if(e==="vibrant"){const l=24*r()+57,h=38*r()+45,c=360*r();return new Ve(l,h,c,"lch")}else if(e==="sine"){t=t??r();const l=s(80*a(2*o*t/.5+.01)+150),h=s(50*a(2*o*t/.5+4.6)+200),c=s(100*a(2*o*t/.5+2.3)+150);return new Ve(l,h,c)}else if(e==="pastel"){const l=8*r()+86,h=17*r()+9,c=360*r();return new Ve(l,h,c,"lch")}else if(e==="dark"){const l=10+10*r(),h=50*r()+86,c=360*r();return new Ve(l,h,c,"lch")}else if(e==="rgb"){const l=255*r(),h=255*r(),c=255*r();return new Ve(l,h,c)}else if(e==="lab"){const l=100*r(),h=256*r()-128,c=256*r()-128;return new Ve(l,h,c,"lab")}else if(e==="grey"){const l=255*r();return new Ve(l,l,l)}else throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(Wl.test(e)||Yl.test(e))}cmyk(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,s,a]=[e,t,n].map(f=>f/255),o=Math.min(1-r,1-s,1-a);if(o===1)return new Ve(0,0,0,1,"cmyk");const l=(1-r-o)/(1-o),h=(1-s-o)/(1-o),c=(1-a-o)/(1-o);return new Ve(l,h,c,o,"cmyk")}hsl(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,s,a]=[e,t,n].map(g=>g/255),o=Math.max(r,s,a),l=Math.min(r,s,a),h=(o+l)/2,c=o===l,d=o-l,f=c?0:h>.5?d/(2-o-l):d/(o+l),m=c?0:o===r?((s-a)/d+(s<a?6:0))/6:o===s?((a-r)/d+2)/6:o===a?((r-s)/d+4)/6:0;return new Ve(360*m,100*f,100*h,"hsl")}init(e=0,t=0,n=0,r=0,s="rgb"){if(e=e||0,this.space)for(const d in this.space)delete this[this.space[d]];if(typeof e=="number")s=typeof r=="string"?r:s,r=typeof r=="string"?0:r,Object.assign(this,{_a:e,_b:t,_c:n,_d:r,space:s});else if(e instanceof Array)this.space=t||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const d=k3(e,t);Object.assign(this,d)}else if(typeof e=="string")if(Yl.test(e)){const d=e.replace(s3,""),[f,m,v]=i3.exec(d).slice(1,4).map(g=>parseInt(g));Object.assign(this,{_a:f,_b:m,_c:v,_d:0,space:"rgb"})}else if(Wl.test(e)){const d=g=>parseInt(g,16),[,f,m,v]=t3.exec(w3(e)).map(d);Object.assign(this,{_a:f,_b:m,_c:v,_d:0,space:"rgb"})}else throw Error("Unsupported string format, can't construct Color");const{_a:a,_b:o,_c:l,_d:h}=this,c=this.space==="rgb"?{r:a,g:o,b:l}:this.space==="xyz"?{x:a,y:o,z:l}:this.space==="hsl"?{h:a,s:o,l}:this.space==="lab"?{l:a,a:o,b:l}:this.space==="lch"?{l:a,c:o,h:l}:this.space==="cmyk"?{c:a,m:o,y:l,k:h}:{};Object.assign(this,c)}lab(){const{x:e,y:t,z:n}=this.xyz(),r=116*t-16,s=500*(e-t),a=200*(t-n);return new Ve(r,s,a,"lab")}lch(){const{l:e,a:t,b:n}=this.lab(),r=Math.sqrt(t**2+n**2);let s=180*Math.atan2(n,t)/Math.PI;return s<0&&(s*=-1,s=360-s),new Ve(e,r,s,"lch")}rgb(){if(this.space==="rgb")return this;if(T3(this.space)){let{x:e,y:t,z:n}=this;if(this.space==="lab"||this.space==="lch"){let{l:m,a:v,b:g}=this;if(this.space==="lch"){const{c:O,h:B}=this,F=Math.PI/180;v=O*Math.cos(F*B),g=O*Math.sin(F*B)}const x=(m+16)/116,b=v/500+x,E=x-g/200,M=16/116,z=.008856,R=7.787;e=.95047*(b**3>z?b**3:(b-M)/R),t=1*(x**3>z?x**3:(x-M)/R),n=1.08883*(E**3>z?E**3:(E-M)/R)}const r=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,a=e*.0557+t*-.204+n*1.057,o=Math.pow,l=.0031308,h=r>l?1.055*o(r,1/2.4)-.055:12.92*r,c=s>l?1.055*o(s,1/2.4)-.055:12.92*s,d=a>l?1.055*o(a,1/2.4)-.055:12.92*a;return new Ve(255*h,255*c,255*d)}else if(this.space==="hsl"){let{h:e,s:t,l:n}=this;if(e/=360,t/=100,n/=100,t===0)return n*=255,new Ve(n,n,n);const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r,a=255*mo(s,r,e+1/3),o=255*mo(s,r,e),l=255*mo(s,r,e-1/3);return new Ve(a,o,l)}else if(this.space==="cmyk"){const{c:e,m:t,y:n,k:r}=this,s=255*(1-Math.min(1,e*(1-r)+r)),a=255*(1-Math.min(1,t*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new Ve(s,a,o)}else return this}toArray(){const{_a:e,_b:t,_c:n,_d:r,space:s}=this;return[e,t,n,r,s]}toHex(){const[e,t,n]=this._clamped().map(b3);return`#${e}${t}${n}`}toRgb(){const[e,t,n]=this._clamped();return`rgb(${e},${t},${n})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,s,a]=[e,t,n].map(b=>b/255),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,l=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,c=(o*.4124+l*.3576+h*.1805)/.95047,d=(o*.2126+l*.7152+h*.0722)/1,f=(o*.0193+l*.1192+h*.9505)/1.08883,m=c>.008856?Math.pow(c,1/3):7.787*c+16/116,v=d>.008856?Math.pow(d,1/3):7.787*d+16/116,g=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new Ve(m,v,g,"xyz")}_clamped(){const{_a:e,_b:t,_c:n}=this.rgb(),{max:r,min:s,round:a}=Math,o=l=>r(0,s(a(l),255));return[e,t,n].map(o)}}class xt{constructor(...e){this.init(...e)}clone(){return new xt(this)}init(e,t){const n={x:0,y:0},r=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:t};return this.x=r.x==null?n.x:r.x,this.y=r.y==null?n.y:r.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){pe.isMatrixLike(e)||(e=new pe(e));const{x:t,y:n}=this;return this.x=e.a*t+e.c*n+e.e,this.y=e.b*t+e.d*n+e.f,this}}function E3(i,e){return new xt(i,e).transformO(this.screenCTM().inverseO())}function Lr(i,e,t){return Math.abs(e-i)<1e-6}class pe{constructor(...e){this.init(...e)}static formatTransforms(e){const t=e.flip==="both"||e.flip===!0,n=e.flip&&(t||e.flip==="x")?-1:1,r=e.flip&&(t||e.flip==="y")?-1:1,s=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,a=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,o=e.scale&&e.scale.length?e.scale[0]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleX)?e.scaleX*n:n,l=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,h=e.shear||0,c=e.rotate||e.theta||0,d=new xt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),f=d.x,m=d.y,v=new xt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),g=v.x,x=v.y,b=new xt(e.translate||e.tx||e.translateX,e.ty||e.translateY),E=b.x,M=b.y,z=new xt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY),R=z.x,O=z.y;return{scaleX:o,scaleY:l,skewX:s,skewY:a,shear:h,theta:c,rx:R,ry:O,tx:E,ty:M,ox:f,oy:m,px:g,py:x}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,t,n){const r=e.a*t.a+e.c*t.b,s=e.b*t.a+e.d*t.b,a=e.a*t.c+e.c*t.d,o=e.b*t.c+e.d*t.d,l=e.e+e.a*t.e+e.c*t.f,h=e.f+e.b*t.e+e.d*t.f;return n.a=r,n.b=s,n.c=a,n.d=o,n.e=l,n.f=h,n}around(e,t,n){return this.clone().aroundO(e,t,n)}aroundO(e,t,n){const r=e||0,s=t||0;return this.translateO(-r,-s).lmultiplyO(n).translateO(r,s)}clone(){return new pe(this)}decompose(e=0,t=0){const n=this.a,r=this.b,s=this.c,a=this.d,o=this.e,l=this.f,h=n*a-r*s,c=h>0?1:-1,d=c*Math.sqrt(n*n+r*r),f=Math.atan2(c*r,c*n),m=180/Math.PI*f,v=Math.cos(f),g=Math.sin(f),x=(n*s+r*a)/h,b=s*d/(x*n-r)||a*d/(x*r+n),E=o-e+e*v*d+t*(x*v*d-g*b),M=l-t+e*g*d+t*(x*g*d+v*b);return{scaleX:d,scaleY:b,shear:x,rotate:m,translateX:E,translateY:M,originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const t=new pe(e);return Lr(this.a,t.a)&&Lr(this.b,t.b)&&Lr(this.c,t.c)&&Lr(this.d,t.d)&&Lr(this.e,t.e)&&Lr(this.f,t.f)}flip(e,t){return this.clone().flipO(e,t)}flipO(e,t){return e==="x"?this.scaleO(-1,1,t,0):e==="y"?this.scaleO(1,-1,0,t):this.scaleO(-1,-1,e,t||e)}init(e){const t=pe.fromArray([1,0,0,1,0,0]);return e=e instanceof Xi?e.matrixify():typeof e=="string"?pe.fromArray(e.split(dn).map(parseFloat)):Array.isArray(e)?pe.fromArray(e):typeof e=="object"&&pe.isMatrixLike(e)?e:typeof e=="object"?new pe().transform(e):arguments.length===6?pe.fromArray([].slice.call(arguments)):t,this.a=e.a!=null?e.a:t.a,this.b=e.b!=null?e.b:t.b,this.c=e.c!=null?e.c:t.c,this.d=e.d!=null?e.d:t.d,this.e=e.e!=null?e.e:t.e,this.f=e.f!=null?e.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,t=this.b,n=this.c,r=this.d,s=this.e,a=this.f,o=e*r-t*n;if(!o)throw new Error("Cannot invert "+this);const l=r/o,h=-t/o,c=-n/o,d=e/o,f=-(l*s+c*a),m=-(h*s+d*a);return this.a=l,this.b=h,this.c=c,this.d=d,this.e=f,this.f=m,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const t=this,n=e instanceof pe?e:new pe(e);return pe.matrixMultiply(n,t,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=this,n=e instanceof pe?e:new pe(e);return pe.matrixMultiply(t,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=fo(e);const r=Math.cos(e),s=Math.sin(e),{a,b:o,c:l,d:h,e:c,f:d}=this;return this.a=a*r-o*s,this.b=o*r+a*s,this.c=l*r-h*s,this.d=h*r+l*s,this.e=c*r-d*s+n*s-t*r+t,this.f=d*r+c*s-t*s-n*r+n,this}scale(e,t,n,r){return this.clone().scaleO(...arguments)}scaleO(e,t=e,n=0,r=0){arguments.length===3&&(r=n,n=t,t=e);const{a:s,b:a,c:o,d:l,e:h,f:c}=this;return this.a=s*e,this.b=a*t,this.c=o*e,this.d=l*t,this.e=h*e-n*e+n,this.f=c*t-r*t+r,this}shear(e,t,n){return this.clone().shearO(e,t,n)}shearO(e,t=0,n=0){const{a:r,b:s,c:a,d:o,e:l,f:h}=this;return this.a=r+s*e,this.c=a+o*e,this.e=l+h*e-n*e,this}skew(e,t,n,r){return this.clone().skewO(...arguments)}skewO(e,t=e,n=0,r=0){arguments.length===3&&(r=n,n=t,t=e),e=fo(e),t=fo(t);const s=Math.tan(e),a=Math.tan(t),{a:o,b:l,c:h,d:c,e:d,f}=this;return this.a=o+l*s,this.b=l+o*a,this.c=h+c*s,this.d=c+h*a,this.e=d+f*s-r*s,this.f=f+d*a-n*a,this}skewX(e,t,n){return this.skew(e,0,t,n)}skewY(e,t,n){return this.skew(0,e,t,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(pe.isMatrixLike(e))return new pe(e).multiplyO(this);const t=pe.formatTransforms(e),n=this,{x:r,y:s}=new xt(t.ox,t.oy).transform(n),a=new pe().translateO(t.rx,t.ry).lmultiplyO(n).translateO(-r,-s).scaleO(t.scaleX,t.scaleY).skewO(t.skewX,t.skewY).shearO(t.shear).rotateO(t.theta).translateO(r,s);if(isFinite(t.px)||isFinite(t.py)){const o=new xt(r,s).transform(a),l=isFinite(t.px)?t.px-o.x:0,h=isFinite(t.py)?t.py-o.y:0;a.translateO(l,h)}return a.translateO(t.tx,t.ty),a}translate(e,t){return this.clone().translateO(e,t)}translateO(e,t){return this.e+=e||0,this.f+=t||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function M3(){return new pe(this.node.getCTM())}function S3(){if(typeof this.isRoot=="function"&&!this.isRoot()){const i=this.rect(1,1),e=i.node.getScreenCTM();return i.remove(),new pe(e)}return new pe(this.node.getScreenCTM())}Oe(pe,"Matrix");function Ln(){if(!Ln.nodes){const i=Qt().size(2,0);i.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),i.attr("focusable","false"),i.attr("aria-hidden","true");const e=i.path().node;Ln.nodes={svg:i,path:e}}if(!Ln.nodes.svg.node.parentNode){const i=Fe.document.body||Fe.document.documentElement;Ln.nodes.svg.addTo(i)}return Ln.nodes}function qc(i){return!i.width&&!i.height&&!i.x&&!i.y}function z3(i){return i===Fe.document||(Fe.document.documentElement.contains||function(e){for(;e.parentNode;)e=e.parentNode;return e===Fe.document}).call(Fe.document.documentElement,i)}class Xt{constructor(...e){this.init(...e)}addOffset(){return this.x+=Fe.window.pageXOffset,this.y+=Fe.window.pageYOffset,new Xt(this)}init(e){const t=[0,0,0,0];return e=typeof e=="string"?e.split(dn).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):t,this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return qc(this)}merge(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width)-t,s=Math.max(this.y+this.height,e.y+e.height)-n;return new Xt(t,n,r,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof pe||(e=new pe(e));let t=1/0,n=-1/0,r=1/0,s=-1/0;return[new xt(this.x,this.y),new xt(this.x2,this.y),new xt(this.x,this.y2),new xt(this.x2,this.y2)].forEach(function(o){o=o.transform(e),t=Math.min(t,o.x),n=Math.max(n,o.x),r=Math.min(r,o.y),s=Math.max(s,o.y)}),new Xt(t,r,n-t,s-r)}}function Wc(i,e,t){let n;try{if(n=e(i.node),qc(n)&&!z3(i.node))throw new Error("Element not in the dom")}catch{n=t(i)}return n}function C3(){const t=Wc(this,r=>r.getBBox(),r=>{try{const s=r.clone().addTo(Ln().svg).show(),a=s.node.getBBox();return s.remove(),a}catch(s){throw new Error(`Getting bbox of element "${r.node.nodeName}" is not possible: ${s.toString()}`)}});return new Xt(t)}function N3(i){const n=Wc(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),r=new Xt(n);return i?r.transform(i.screenCTM().inverseO()):r.addOffset()}function L3(i,e){const t=this.bbox();return i>t.x&&e>t.y&&i<t.x+t.width&&e<t.y+t.height}Ce({viewbox:{viewbox(i,e,t,n){return i==null?new Xt(this.attr("viewBox")):this.attr("viewBox",new Xt(i,e,t,n))},zoom(i,e){let{width:t,height:n}=this.attr(["width","height"]);if((!t&&!n||typeof t=="string"||typeof n=="string")&&(t=this.node.clientWidth,n=this.node.clientHeight),!t||!n)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const r=this.viewbox(),s=t/r.width,a=n/r.height,o=Math.min(s,a);if(i==null)return o;let l=o/i;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new xt(t/2/s+r.x,n/2/a+r.y);const h=new Xt(r).transform(new pe({scale:l,origin:e}));return this.viewbox(h)}}});Oe(Xt,"Box");class mr extends Array{constructor(e=[],...t){if(super(e,...t),typeof e=="number")return this;this.length=0,this.push(...e)}}Re([mr],{each(i,...e){return typeof i=="function"?this.map((t,n,r)=>i.call(t,t,n,r)):this.map(t=>t[i](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const A3=["toArray","constructor","each"];mr.extend=function(i){i=i.reduce((e,t)=>(A3.includes(t)||t[0]==="_"||(e[t]=function(...n){return this.each(t,...n)}),e),{}),Re([mr],i)};function Vr(i,e){return new mr(j0((e||Fe.document).querySelectorAll(i),function(t){return Ci(t)}))}function _3(i){return Vr(i,this.node)}function R3(i){return Ci(this.node.querySelector(i))}let D3=0;const Yc={};function Xc(i){let e=i.getEventHolder();return e===Fe.window&&(e=Yc),e.events||(e.events={}),e.events}function el(i){return i.getEventTarget()}function I3(i){let e=i.getEventHolder();e===Fe.window&&(e=Yc),e.events&&(e.events={})}function e0(i,e,t,n,r){const s=t.bind(n||i),a=Qt(i),o=Xc(a),l=el(a);e=Array.isArray(e)?e:e.split(dn),t._svgjsListenerId||(t._svgjsListenerId=++D3),e.forEach(function(h){const c=h.split(".")[0],d=h.split(".")[1]||"*";o[c]=o[c]||{},o[c][d]=o[c][d]||{},o[c][d][t._svgjsListenerId]=s,l.addEventListener(c,s,r||!1)})}function Ir(i,e,t,n){const r=Qt(i),s=Xc(r),a=el(r);typeof t=="function"&&(t=t._svgjsListenerId,!t)||(e=Array.isArray(e)?e:(e||"").split(dn),e.forEach(function(o){const l=o&&o.split(".")[0],h=o&&o.split(".")[1];let c,d;if(t)s[l]&&s[l][h||"*"]&&(a.removeEventListener(l,s[l][h||"*"][t],n||!1),delete s[l][h||"*"][t]);else if(l&&h){if(s[l]&&s[l][h]){for(d in s[l][h])Ir(a,[l,h].join("."),d);delete s[l][h]}}else if(h)for(o in s)for(c in s[o])h===c&&Ir(a,[o,h].join("."));else if(l){if(s[l]){for(c in s[l])Ir(a,[l,c].join("."));delete s[l]}}else{for(o in s)Ir(a,o);I3(r)}}))}function O3(i,e,t,n){const r=el(i);return e instanceof Fe.window.Event||(e=new Fe.window.CustomEvent(e,{detail:t,cancelable:!0,...n})),r.dispatchEvent(e),e}class Rs extends Z0{addEventListener(){}dispatch(e,t,n){return O3(this,e,t,n)}dispatchEvent(e){const t=this.getEventHolder().events;if(!t)return!0;const n=t[e.type];for(const r in n)for(const s in n[r])n[r][s](e);return!e.defaultPrevented}fire(e,t,n){return this.dispatch(e,t,n),this}getEventHolder(){return this}getEventTarget(){return this}off(e,t,n){return Ir(this,e,t,n),this}on(e,t,n,r){return e0(this,e,t,n,r),this}removeEventListener(){}}Oe(Rs,"EventTarget");function jl(){}const gs={duration:400,ease:">",delay:0},B3={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Gr extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"?this:(this.length=0,this.push(...this.parse(e)),this)}parse(e=[]){return e instanceof Array?e:e.trim().split(dn).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class ke{constructor(...e){this.init(...e)}convert(e){return new ke(this.value,e)}divide(e){return e=new ke(e),new ke(this/e,this.unit||e.unit)}init(e,t){return t=Array.isArray(e)?e[1]:t,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=t||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(t=e.match(Gc),t&&(this.value=parseFloat(t[1]),t[5]==="%"?this.value/=100:t[5]==="s"&&(this.value*=1e3),this.unit=t[5])):e instanceof ke&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new ke(e),new ke(this-e,this.unit||e.unit)}plus(e){return e=new ke(e),new ke(this+e,this.unit||e.unit)}times(e){return e=new ke(e),new ke(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(this.value*1e8)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Vc=[];function P3(i){Vc.push(i)}function F3(i,e,t){if(i==null){i={},e=this.node.attributes;for(const n of e)i[n.nodeName]=Vl.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return i}else{if(i instanceof Array)return i.reduce((n,r)=>(n[r]=this.attr(r),n),{});if(typeof i=="object"&&i.constructor===Object)for(e in i)this.attr(e,i[e]);else if(e===null)this.node.removeAttribute(i);else{if(e==null)return e=this.node.getAttribute(i),e==null?B3[i]:Vl.test(e)?parseFloat(e):e;e=Vc.reduce((n,r)=>r(i,n,this),e),typeof e=="number"?e=new ke(e):Ve.isColor(e)?e=new Ve(e):e.constructor===Array&&(e=new Gr(e)),i==="leading"?this.leading&&this.leading(e):typeof t=="string"?this.node.setAttributeNS(t,i,e.toString()):this.node.setAttribute(i,e.toString()),this.rebuild&&(i==="font-size"||i==="x")&&this.rebuild()}}return this}class _n extends Rs{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return e=Qt(e),e.removeNamespace&&this.node instanceof Fe.window.SVGElement&&e.removeNamespace(),t==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this}addTo(e,t){return Qt(e).put(this,t)}children(){return new mr(j0(this.node.children,function(e){return Ci(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,t=!0){this.writeDataToDom();let n=this.node.cloneNode(e);return t&&(n=$c(n)),new this.constructor(n)}each(e,t){const n=this.children();let r,s;for(r=0,s=n.length;r<s;r++)e.apply(n[r],[r,n]),t&&n[r].each(e,t);return this}element(e,t){return this.put(new _n(Ts(e),t))}first(){return Ci(this.node.firstChild)}get(e){return Ci(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,t){return this.xml(e,t,Fu)}id(e){return typeof e>"u"&&!this.node.id&&(this.node.id=Uc(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Ci(this.node.lastChild)}matches(e){const t=this.node,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return n&&n.call(t,e)}parent(e){let t=this;if(!t.node.parentNode)return null;if(t=Ci(t.node.parentNode),!e)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=Ci(t.node.parentNode));return t}put(e,t){return e=Qt(e),this.add(e,t),e}putIn(e,t){return Qt(e).add(this,t)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=Qt(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){const n=10**e,r=this.attr(t);for(const s in r)typeof r[s]=="number"&&(r[s]=Math.round(r[s]*n)/n);return this.attr(r),this}svg(e,t){return this.xml(e,t,K0)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const t=this.parent();if(!t)return this.addTo(e);const n=t.index(this);return t.put(e,n).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,t,n){if(typeof e=="boolean"&&(n=t,t=e,e=null),e==null||typeof e=="function"){t=t??!0,this.writeDataToDom();let o=this;if(e!=null){if(o=Ci(o.node.cloneNode(!0)),t){const l=e(o);if(o=l||o,l===!1)return""}o.each(function(){const l=e(this),h=l||this;l===!1?this.remove():l&&this!==h&&this.replace(h)},!0)}return t?o.node.outerHTML:o.node.innerHTML}t=t??!1;const r=Ts("wrapper",n),s=Fe.document.createDocumentFragment();r.innerHTML=e;for(let o=r.children.length;o--;)s.appendChild(r.firstElementChild);const a=this.parent();return t?this.replace(s)&&a:this.add(s)}}Re(_n,{attr:F3,find:_3,findOne:R3});Oe(_n,"Dom");let Xi=class extends _n{constructor(e,t){super(e,t),this.dom={},this.node.instance=this,e.hasAttribute("svgjs:data")&&this.setData(JSON.parse(e.getAttribute("svgjs:data"))||{})}center(e,t){return this.cx(e).cy(t)}cx(e){return e==null?this.x()+this.width()/2:this.x(e-this.width()/2)}cy(e){return e==null?this.y()+this.height()/2:this.y(e-this.height()/2)}defs(){const e=this.root();return e&&e.defs()}dmove(e,t){return this.dx(e).dy(t)}dx(e=0){return this.x(new ke(e).plus(this.x()))}dy(e=0){return this.y(new ke(e).plus(this.y()))}getEventHolder(){return this}height(e){return this.attr("height",e)}move(e,t){return this.x(e).y(t)}parents(e=this.root()){const t=typeof e=="string";t||(e=Qt(e));const n=new mr;let r=this;for(;(r=r.parent())&&r.node!==Fe.document&&r.nodeName!=="#document-fragment"&&(n.push(r),!(!t&&r.node===e.node||t&&r.matches(e)));)if(r.node===this.root().node)return null;return n}reference(e){if(e=this.attr(e),!e)return null;const t=(e+"").match(n3);return t?Qt(t[1]):null}root(){const e=this.parent(Uu(Q0));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){const n=Xr(this,e,t);return this.width(new ke(n.width)).height(new ke(n.height))}width(e){return this.attr("width",e)}writeDataToDom(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),super.writeDataToDom()}x(e){return this.attr("x",e)}y(e){return this.attr("y",e)}};Re(Xi,{bbox:C3,rbox:N3,inside:L3,point:E3,ctm:M3,screenCTM:S3});Oe(Xi,"Element");const ls={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(i,e){return e==="color"?i:i+"-"+e}};["fill","stroke"].forEach(function(i){const e={};let t;e[i]=function(n){if(typeof n>"u")return this.attr(i);if(typeof n=="string"||n instanceof Ve||Ve.isRgb(n)||n instanceof Xi)this.attr(i,n);else for(t=ls[i].length-1;t>=0;t--)n[ls[i][t]]!=null&&this.attr(ls.prefix(i,ls[i][t]),n[ls[i][t]]);return this},Ce(["Element","Runner"],e)});Ce(["Element","Runner"],{matrix:function(i,e,t,n,r,s){return i==null?new pe(this):this.attr("transform",new pe(i,e,t,n,r,s))},rotate:function(i,e,t){return this.transform({rotate:i,ox:e,oy:t},!0)},skew:function(i,e,t,n){return arguments.length===1||arguments.length===3?this.transform({skew:i,ox:e,oy:t},!0):this.transform({skew:[i,e],ox:t,oy:n},!0)},shear:function(i,e,t){return this.transform({shear:i,ox:e,oy:t},!0)},scale:function(i,e,t,n){return arguments.length===1||arguments.length===3?this.transform({scale:i,ox:e,oy:t},!0):this.transform({scale:[i,e],ox:t,oy:n},!0)},translate:function(i,e){return this.transform({translate:[i,e]},!0)},relative:function(i,e){return this.transform({relative:[i,e]},!0)},flip:function(i="both",e="center"){return"xybothtrue".indexOf(i)===-1&&(e=i,i="both"),this.transform({flip:i,origin:e},!0)},opacity:function(i){return this.attr("opacity",i)}});Ce("radius",{radius:function(i,e=i){return(this._element||this).type==="radialGradient"?this.attr("r",new ke(i)):this.rx(i).ry(e)}});Ce("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(i){return new xt(this.node.getPointAtLength(i))}});Ce(["Element","Runner"],{font:function(i,e){if(typeof i=="object"){for(e in i)this.font(e,i[e]);return this}return i==="leading"?this.leading(e):i==="anchor"?this.attr("text-anchor",e):i==="size"||i==="family"||i==="weight"||i==="stretch"||i==="variant"||i==="style"?this.attr("font-"+i,e):this.attr(i,e)}});const H3=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(i,e){const t=function(n){return n===null?this.off(e):this.on(e,n),this};return i[e]=t,i},{});Ce("Element",H3);function U3(){return this.attr("transform",null)}function $3(){return(this.attr("transform")||"").split(r3).slice(0,-1).map(function(e){const t=e.trim().split("(");return[t[0],t[1].split(dn).map(function(n){return parseFloat(n)})]}).reverse().reduce(function(e,t){return t[0]==="matrix"?e.lmultiply(pe.fromArray(t[1])):e[t[0]].apply(e,t[1])},new pe)}function G3(i,e){if(this===i)return this;const t=this.screenCTM(),n=i.screenCTM().inverse();return this.addTo(i,e).untransform().transform(n.multiply(t)),this}function q3(i){return this.toParent(this.root(),i)}function W3(i,e){if(i==null||typeof i=="string"){const r=new pe(this).decompose();return i==null?r:r[i]}pe.isMatrixLike(i)||(i={...i,origin:Jo(i,this)});const t=e===!0?this:e||!1,n=new pe(t).transform(i);return this.attr("transform",n)}Ce("Element",{untransform:U3,matrixify:$3,toParent:G3,toRoot:q3,transform:W3});class ci extends Xi{flatten(e=this,t){return this.each(function(){if(this instanceof ci)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),t=e.index(this)){return t=t===-1?e.children().length:t,this.each(function(n,r){return r[r.length-n-1].toParent(e,t)}),this.remove()}}Oe(ci,"Container");class tl extends ci{constructor(e,t=e){super(et("defs",e),t)}flatten(){return this}ungroup(){return this}}Oe(tl,"Defs");let vi=class extends Xi{};Oe(vi,"Shape");function il(i){return this.attr("rx",i)}function nl(i){return this.attr("ry",i)}function jc(i){return i==null?this.cx()-this.rx():this.cx(i+this.rx())}function Kc(i){return i==null?this.cy()-this.ry():this.cy(i+this.ry())}function Zc(i){return this.attr("cx",i)}function Qc(i){return this.attr("cy",i)}function Jc(i){return i==null?this.rx()*2:this.rx(new ke(i).divide(2))}function ed(i){return i==null?this.ry()*2:this.ry(new ke(i).divide(2))}var Y3={__proto__:null,rx:il,ry:nl,x:jc,y:Kc,cx:Zc,cy:Qc,width:Jc,height:ed};class Ua extends vi{constructor(e,t=e){super(et("ellipse",e),t)}size(e,t){const n=Xr(this,e,t);return this.rx(new ke(n.width).divide(2)).ry(new ke(n.height).divide(2))}}Re(Ua,Y3);Ce("Container",{ellipse:Je(function(i=0,e=i){return this.put(new Ua).size(i,e).move(0,0)})});Oe(Ua,"Ellipse");class td extends _n{constructor(e=Fe.document.createDocumentFragment()){super(e)}xml(e,t,n){if(typeof e=="boolean"&&(n=t,t=e,e=null),e==null||typeof e=="function"){const r=new _n(Ts("wrapper",n));return r.add(this.node.cloneNode(!0)),r.xml(!1,n)}return super.xml(e,!1,n)}}Oe(td,"Fragment");function id(i,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new ke(i),fy:new ke(e)}):this.attr({x1:new ke(i),y1:new ke(e)})}function nd(i,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new ke(i),cy:new ke(e)}):this.attr({x2:new ke(i),y2:new ke(e)})}var X3={__proto__:null,from:id,to:nd};class Ds extends ci{constructor(e,t){super(et(e+"Gradient",typeof e=="string"?null:e),t)}attr(e,t,n){return e==="transform"&&(e="gradientTransform"),super.attr(e,t,n)}bbox(){return new Xt}targets(){return Vr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Re(Ds,X3);Ce({Container:{gradient(...i){return this.defs().gradient(...i)}},Defs:{gradient:Je(function(i,e){return this.put(new Ds(i)).update(e)})}});Oe(Ds,"Gradient");class Es extends ci{constructor(e,t=e){super(et("pattern",e),t)}attr(e,t,n){return e==="transform"&&(e="patternTransform"),super.attr(e,t,n)}bbox(){return new Xt}targets(){return Vr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Ce({Container:{pattern(...i){return this.defs().pattern(...i)}},Defs:{pattern:Je(function(i,e,t){return this.put(new Es).update(t).attr({x:0,y:0,width:i,height:e,patternUnits:"userSpaceOnUse"})})}});Oe(Es,"Pattern");let xr=class extends vi{constructor(e,t=e){super(et("image",e),t)}load(e,t){if(!e)return this;const n=new Fe.window.Image;return e0(n,"load",function(r){const s=this.parent(Es);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof Es&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof t=="function"&&t.call(this,r)},this),e0(n,"load error",function(){Ir(n)}),this.attr("href",n.src=e,_s)}};P3(function(i,e,t){return(i==="fill"||i==="stroke")&&a3.test(e)&&(e=t.root().defs().image(e)),e instanceof xr&&(e=t.root().defs().pattern(0,0,n=>{n.add(e)})),e});Ce({Container:{image:Je(function(i,e){return this.put(new xr).size(0,0).load(i,e)})}});Oe(xr,"Image");class Rn extends Gr{bbox(){let e=-1/0,t=-1/0,n=1/0,r=1/0;return this.forEach(function(s){e=Math.max(s[0],e),t=Math.max(s[1],t),n=Math.min(s[0],n),r=Math.min(s[1],r)}),new Xt(n,r,e-n,t-r)}move(e,t){const n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+e,this[r][1]+t];return this}parse(e=[0,0]){const t=[];e instanceof Array?e=Array.prototype.concat.apply([],e):e=e.trim().split(dn).map(parseFloat),e.length%2!==0&&e.pop();for(let n=0,r=e.length;n<r;n=n+2)t.push([e[n],e[n+1]]);return t}size(e,t){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*e/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*t/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let t=0,n=this.length;t<n;t++)e.push(this[t].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){pe.isMatrixLike(e)||(e=new pe(e));for(let t=this.length;t--;){const[n,r]=this[t];this[t][0]=e.a*n+e.c*r+e.e,this[t][1]=e.b*n+e.d*r+e.f}return this}}const V3=Rn;function j3(i){return i==null?this.bbox().x:this.move(i,this.bbox().y)}function K3(i){return i==null?this.bbox().y:this.move(this.bbox().x,i)}function Z3(i){const e=this.bbox();return i==null?e.width:this.size(i,e.height)}function Q3(i){const e=this.bbox();return i==null?e.height:this.size(e.width,i)}var rl={__proto__:null,MorphArray:V3,x:j3,y:K3,width:Z3,height:Q3};class Ms extends vi{constructor(e,t=e){super(et("line",e),t)}array(){return new Rn([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(e,t){return this.attr(this.array().move(e,t).toLine())}plot(e,t,n,r){return e==null?this.array():(typeof t<"u"?e={x1:e,y1:t,x2:n,y2:r}:e=new Rn(e).toLine(),this.attr(e))}size(e,t){const n=Xr(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}}Re(Ms,rl);Ce({Container:{line:Je(function(...i){return Ms.prototype.plot.apply(this.put(new Ms),i[0]!=null?i:[0,0,0,0])})}});Oe(Ms,"Line");class za extends ci{constructor(e,t=e){super(et("marker",e),t)}height(e){return this.attr("markerHeight",e)}orient(e){return this.attr("orient",e)}ref(e,t){return this.attr("refX",e).attr("refY",t)}toString(){return"url(#"+this.id()+")"}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}width(e){return this.attr("markerWidth",e)}}Ce({Container:{marker(...i){return this.defs().marker(...i)}},Defs:{marker:Je(function(i,e,t){return this.put(new za).size(i,e).ref(i/2,e/2).viewbox(0,0,i,e).attr("orient","auto").update(t)})},marker:{marker(i,e,t,n){let r=["marker"];return i!=="all"&&r.push(i),r=r.join("-"),i=arguments[1]instanceof za?arguments[1]:this.defs().marker(e,t,n),this.attr(r,i)}}});Oe(za,"Marker");function Or(i,e){return function(t){return t==null?this[i]:(this[i]=t,e&&e.call(this),this)}}const J3={"-":function(i){return i},"<>":function(i){return-Math.cos(i*Math.PI)/2+.5},">":function(i){return Math.sin(i*Math.PI/2)},"<":function(i){return-Math.cos(i*Math.PI/2)+1},bezier:function(i,e,t,n){return function(r){return r<0?i>0?e/i*r:t>0?n/t*r:0:r>1?t<1?(1-n)/(1-t)*r+(n-t)/(1-t):i<1?(1-e)/(1-i)*r+(e-i)/(1-i):1:3*r*(1-r)**2*e+3*r**2*(1-r)*n+r**3}},steps:function(i,e="end"){e=e.split("-").reverse()[0];let t=i;return e==="none"?--t:e==="both"&&++t,(n,r=!1)=>{let s=Math.floor(n*i);const a=n*s%1===0;return(e==="start"||e==="both")&&++s,r&&a&&--s,n>=0&&s<0&&(s=0),n<=1&&s>t&&(s=t),s/t}}};class sl{done(){return!1}}class t0 extends sl{constructor(e=gs.ease){super(),this.ease=J3[e]||e}step(e,t,n){return typeof e!="number"?n<1?e:t:e+(t-e)*this.ease(n)}}class Ca extends sl{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}}function Kl(){const i=(this._duration||500)/1e3,e=this._overshoot||0,t=1e-10,n=Math.PI,r=Math.log(e/100+t),s=-r/Math.sqrt(n*n+r*r),a=3.9/(s*i);this.d=2*s*a,this.k=a*a}class ef extends Ca{constructor(e=500,t=0){super(),this.duration(e).overshoot(t)}step(e,t,n,r){if(typeof e=="string")return e;if(r.done=n===1/0,n===1/0)return t;if(n===0)return e;n>100&&(n=16),n/=1e3;const s=r.velocity||0,a=-this.d*s-this.k*(e-t),o=e+s*n+a*n*n/2;return r.velocity=s+a*n,r.done=Math.abs(t-o)+Math.abs(s)<.002,r.done?t:o}}Re(ef,{duration:Or("_duration",Kl),overshoot:Or("_overshoot",Kl)});class tf extends Ca{constructor(e=.1,t=.01,n=0,r=1e3){super(),this.p(e).i(t).d(n).windup(r)}step(e,t,n,r){if(typeof e=="string")return e;if(r.done=n===1/0,n===1/0)return t;if(n===0)return e;const s=t-e;let a=(r.integral||0)+s*n;const o=(s-(r.error||0))/n,l=this._windup;return l!==!1&&(a=Math.max(-l,Math.min(a,l))),r.error=s,r.integral=a,r.done=Math.abs(s)<.001,r.done?t:e+(this.P*s+this.I*a+this.D*o)}}Re(tf,{windup:Or("_windup"),p:Or("P"),i:Or("I"),d:Or("D")});const nf={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},i0={M:function(i,e,t){return e.x=t.x=i[0],e.y=t.y=i[1],["M",e.x,e.y]},L:function(i,e){return e.x=i[0],e.y=i[1],["L",i[0],i[1]]},H:function(i,e){return e.x=i[0],["H",i[0]]},V:function(i,e){return e.y=i[0],["V",i[0]]},C:function(i,e){return e.x=i[4],e.y=i[5],["C",i[0],i[1],i[2],i[3],i[4],i[5]]},S:function(i,e){return e.x=i[2],e.y=i[3],["S",i[0],i[1],i[2],i[3]]},Q:function(i,e){return e.x=i[2],e.y=i[3],["Q",i[0],i[1],i[2],i[3]]},T:function(i,e){return e.x=i[0],e.y=i[1],["T",i[0],i[1]]},Z:function(i,e,t){return e.x=t.x,e.y=t.y,["Z"]},A:function(i,e){return e.x=i[5],e.y=i[6],["A",i[0],i[1],i[2],i[3],i[4],i[5],i[6]]}},go="mlhvqtcsaz".split("");for(let i=0,e=go.length;i<e;++i)i0[go[i]]=(function(t){return function(n,r,s){if(t==="H")n[0]=n[0]+r.x;else if(t==="V")n[0]=n[0]+r.y;else if(t==="A")n[5]=n[5]+r.x,n[6]=n[6]+r.y;else for(let a=0,o=n.length;a<o;++a)n[a]=n[a]+(a%2?r.y:r.x);return i0[t](n,r,s)}})(go[i].toUpperCase());function rf(i){const e=i.segment[0];return i0[e](i.segment.slice(1),i.p,i.p0)}function n0(i){return i.segment.length&&i.segment.length-1===nf[i.segment[0].toUpperCase()]}function sf(i,e){i.inNumber&&sr(i,!1);const t=J0.test(e);if(t)i.segment=[e];else{const n=i.lastCommand,r=n.toLowerCase(),s=n===r;i.segment=[r==="m"?s?"l":"L":n]}return i.inSegment=!0,i.lastCommand=i.segment[0],t}function sr(i,e){if(!i.inNumber)throw new Error("Parser Error");i.number&&i.segment.push(parseFloat(i.number)),i.inNumber=e,i.number="",i.pointSeen=!1,i.hasExponent=!1,n0(i)&&r0(i)}function r0(i){i.inSegment=!1,i.absolute&&(i.segment=rf(i)),i.segments.push(i.segment)}function af(i){if(!i.segment.length)return!1;const e=i.segment[0].toUpperCase()==="A",t=i.segment.length;return e&&(t===4||t===5)}function of(i){return i.lastToken.toUpperCase()==="E"}function lf(i,e=!0){let t=0,n="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new xt,p:new xt};for(;r.lastToken=n,n=i.charAt(t++);)if(!(!r.inSegment&&sf(r,n))){if(n==="."){if(r.pointSeen||r.hasExponent){sr(r,!1),--t;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=n;continue}if(!isNaN(parseInt(n))){if(r.number==="0"||af(r)){r.inNumber=!0,r.number=n,sr(r,!0);continue}r.inNumber=!0,r.number+=n;continue}if(n===" "||n===","){r.inNumber&&sr(r,!1);continue}if(n==="-"){if(r.inNumber&&!of(r)){sr(r,!1),--t;continue}r.number+=n,r.inNumber=!0;continue}if(n.toUpperCase()==="E"){r.number+=n,r.hasExponent=!0;continue}if(J0.test(n)){if(r.inNumber)sr(r,!1);else if(n0(r))r0(r);else throw new Error("parser Error");--t}}return r.inNumber&&sr(r,!1),r.inSegment&&n0(r)&&r0(r),r.segments}function hf(i){let e="";for(let t=0,n=i.length;t<n;t++)e+=i[t][0],i[t][1]!=null&&(e+=i[t][1],i[t][2]!=null&&(e+=" ",e+=i[t][2],i[t][3]!=null&&(e+=" ",e+=i[t][3],e+=" ",e+=i[t][4],i[t][5]!=null&&(e+=" ",e+=i[t][5],e+=" ",e+=i[t][6],i[t][7]!=null&&(e+=" ",e+=i[t][7])))));return e+" "}class gr extends Gr{bbox(){return Ln().path.setAttribute("d",this.toString()),new Xt(Ln.nodes.path.getBBox())}move(e,t){const n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let r,s=this.length-1;s>=0;s--)r=this[s][0],r==="M"||r==="L"||r==="T"?(this[s][1]+=e,this[s][2]+=t):r==="H"?this[s][1]+=e:r==="V"?this[s][1]+=t:r==="C"||r==="S"||r==="Q"?(this[s][1]+=e,this[s][2]+=t,this[s][3]+=e,this[s][4]+=t,r==="C"&&(this[s][5]+=e,this[s][6]+=t)):r==="A"&&(this[s][6]+=e,this[s][7]+=t);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),lf(e)}size(e,t){const n=this.bbox();let r,s;for(n.width=n.width===0?1:n.width,n.height=n.height===0?1:n.height,r=this.length-1;r>=0;r--)s=this[r][0],s==="M"||s==="L"||s==="T"?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y):s==="H"?this[r][1]=(this[r][1]-n.x)*e/n.width+n.x:s==="V"?this[r][1]=(this[r][1]-n.y)*t/n.height+n.y:s==="C"||s==="S"||s==="Q"?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y,this[r][3]=(this[r][3]-n.x)*e/n.width+n.x,this[r][4]=(this[r][4]-n.y)*t/n.height+n.y,s==="C"&&(this[r][5]=(this[r][5]-n.x)*e/n.width+n.x,this[r][6]=(this[r][6]-n.y)*t/n.height+n.y)):s==="A"&&(this[r][1]=this[r][1]*e/n.width,this[r][2]=this[r][2]*t/n.height,this[r][6]=(this[r][6]-n.x)*e/n.width+n.x,this[r][7]=(this[r][7]-n.y)*t/n.height+n.y);return this}toString(){return hf(this)}}const rd=i=>{const e=typeof i;return e==="number"?ke:e==="string"?Ve.isColor(i)?Ve:dn.test(i)?J0.test(i)?gr:Gr:Gc.test(i)?ke:s0:al.indexOf(i.constructor)>-1?i.constructor:Array.isArray(i)?Gr:e==="object"?Ss:s0};class ar{constructor(e){this._stepper=e||new t0("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(t,n){return t&&n},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(rd(e));let t=new this._type(e);return this._type===Ve&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===Ss&&(t=this._to?t.align(this._to):this._from?t.align(this._from):t),t=t.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(t.length)).map(Object).map(function(n){return n.done=!0,n}),t}}class s0{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Is{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Is.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Is.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const cf=(i,e)=>i[0]<e[0]?-1:i[0]>e[0]?1:0;class Ss{constructor(...e){this.init(...e)}align(e){const t=this.values;for(let n=0,r=t.length;n<r;++n){if(t[n+1]===e[n+1]){if(t[n+1]===Ve&&e[n+7]!==t[n+7]){const o=e[n+7],l=new Ve(this.values.splice(n+3,5))[o]().toArray();this.values.splice(n+3,0,...l)}n+=t[n+2]+2;continue}if(!e[n+1])return this;const s=new e[n+1]().toArray(),a=t[n+2]+3;t.splice(n,a,e[n],e[n+1],e[n+2],...s),n+=t[n+2]+2}return this}init(e){if(this.values=[],Array.isArray(e)){this.values=e.slice();return}e=e||{};const t=[];for(const n in e){const r=rd(e[n]),s=new r(e[n]).toArray();t.push([n,r,s.length,...s])}return t.sort(cf),this.values=t.reduce((n,r)=>n.concat(r),[]),this}toArray(){return this.values}valueOf(){const e={},t=this.values;for(;t.length;){const n=t.shift(),r=t.shift(),s=t.shift(),a=t.splice(0,s);e[n]=new r(a)}return e}}const al=[s0,Is,Ss];function df(i=[]){al.push(...[].concat(i))}function uf(){Re(al,{to(i){return new ar().type(this.constructor).from(this.toArray()).to(i)},fromArray(i){return this.init(i),this},toConsumable(){return this.toArray()},morph(i,e,t,n,r){const s=function(a,o){return n.step(a,e[o],t,r[o],r)};return this.fromArray(i.map(s))}})}class yr extends vi{constructor(e,t=e){super(et("path",e),t)}array(){return this._array||(this._array=new gr(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,t){return this.attr("d",this.array().move(e,t))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new gr(e))}size(e,t){const n=Xr(this,e,t);return this.attr("d",this.array().size(n.width,n.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}yr.prototype.MorphArray=gr;Ce({Container:{path:Je(function(i){return this.put(new yr).plot(i||new gr)})}});Oe(yr,"Path");function ff(){return this._array||(this._array=new Rn(this.attr("points")))}function pf(){return delete this._array,this}function mf(i,e){return this.attr("points",this.array().move(i,e))}function gf(i){return i==null?this.array():this.clear().attr("points",typeof i=="string"?i:this._array=new Rn(i))}function vf(i,e){const t=Xr(this,i,e);return this.attr("points",this.array().size(t.width,t.height))}var sd={__proto__:null,array:ff,clear:pf,move:mf,plot:gf,size:vf};class wr extends vi{constructor(e,t=e){super(et("polygon",e),t)}}Ce({Container:{polygon:Je(function(i){return this.put(new wr).plot(i||new Rn)})}});Re(wr,rl);Re(wr,sd);Oe(wr,"Polygon");class Os extends vi{constructor(e,t=e){super(et("polyline",e),t)}}Ce({Container:{polyline:Je(function(i){return this.put(new Os).plot(i||new Rn)})}});Re(Os,rl);Re(Os,sd);Oe(Os,"Polyline");class mi extends vi{constructor(e,t=e){super(et("rect",e),t)}}Re(mi,{rx:il,ry:nl});Ce({Container:{rect:Je(function(i,e){return this.put(new mi).size(i,e)})}});Oe(mi,"Rect");class vo{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const t=typeof e.next<"u"?e:{value:e,next:null,prev:null};return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._last=t,this._first=t),t}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Ye={nextDraw:null,frames:new vo,timeouts:new vo,immediates:new vo,timer:()=>Fe.window.performance||Fe.window.Date,transforms:[],frame(i){const e=Ye.frames.push({run:i});return Ye.nextDraw===null&&(Ye.nextDraw=Fe.window.requestAnimationFrame(Ye._draw)),e},timeout(i,e){e=e||0;const t=Ye.timer().now()+e,n=Ye.timeouts.push({run:i,time:t});return Ye.nextDraw===null&&(Ye.nextDraw=Fe.window.requestAnimationFrame(Ye._draw)),n},immediate(i){const e=Ye.immediates.push(i);return Ye.nextDraw===null&&(Ye.nextDraw=Fe.window.requestAnimationFrame(Ye._draw)),e},cancelFrame(i){i!=null&&Ye.frames.remove(i)},clearTimeout(i){i!=null&&Ye.timeouts.remove(i)},cancelImmediate(i){i!=null&&Ye.immediates.remove(i)},_draw(i){let e=null;const t=Ye.timeouts.last();for(;(e=Ye.timeouts.shift())&&(i>=e.time?e.run():Ye.timeouts.push(e),e!==t););let n=null;const r=Ye.frames.last();for(;n!==r&&(n=Ye.frames.shift());)n.run(i);let s=null;for(;s=Ye.immediates.shift();)s();Ye.nextDraw=Ye.timeouts.first()||Ye.frames.first()?Fe.window.requestAnimationFrame(Ye._draw):null}},xf=function(i){const e=i.start,t=i.runner.duration(),n=e+t;return{start:e,duration:t,end:n,runner:i.runner}},yf=function(){const i=Fe.window;return(i.performance||i.Date).now()};let ad=class extends Rs{constructor(e=yf){super(),this._timeSource=e,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),t=e?e.runner.duration():0;return(e?e.start:this._time)+t}getEndTimeOfTimeline(){const e=this._runners.map(t=>t.start+t.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const t=this.speed();if(e==null)return this.speed(-t);const n=Math.abs(t);return this.speed(e?-n:n)}schedule(e,t,n){if(e==null)return this._runners.map(xf);let r=0;const s=this.getEndTime();if(t=t||0,n==null||n==="last"||n==="after")r=s;else if(n==="absolute"||n==="start")r=t,t=0;else if(n==="now")r=this._time;else if(n==="relative"){const l=this.getRunnerInfoById(e.id);l&&(r=l.start+t,t=0)}else if(n==="with-last"){const l=this.getLastRunnerInfo();r=l?l.start:this._time}else throw new Error('Invalid value for the "when" parameter');e.unschedule(),e.timeline(this);const a=e.persist(),o={persist:a===null?this._persist:a,start:r+t,runner:e};return this._lastRunnerId=e.id,this._runners.push(o),this._runners.sort((l,h)=>l.start-h.start),this._runnerIds=this._runners.map(l=>l.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const t=this._runnerIds.indexOf(e.id);return t<0?this:(this._runners.splice(t,1),this._runnerIds.splice(t,1),e.timeline(null),this)}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Ye.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():this._paused?this:(this._nextFrame=Ye.frame(this._step),this)}_stepFn(e=!1){const t=this._timeSource();let n=t-this._lastSourceTime;e&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=t,e||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let a=this._runners.length;a--;){const o=this._runners[a],l=o.runner;this._time-o.start<=0&&l.reset()}let s=!1;for(let a=0,o=this._runners.length;a<o;a++){const l=this._runners[a],h=l.runner;let c=r;const d=this._time-l.start;if(d<=0){s=!0;continue}else d<c&&(c=d);if(!h.active())continue;h.step(c).done?l.persist!==!0&&h.duration()-h.time()+this._time+l.persist<this._time&&(h.unschedule(),--a,--o):s=!0}return s&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}};Ce({Element:{timeline:function(i){return i==null?(this._timeline=this._timeline||new ad,this._timeline):(this._timeline=i,this)}}});class fi extends Rs{constructor(e){super(),this.id=fi.id++,e=e??gs.duration,e=typeof e=="function"?new Ca(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Ca,this._stepper=this._isDeclarative?e:new t0,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new pe,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=this._isDeclarative?!0:null}static sanitise(e,t,n){let r=1,s=!1,a=0;return e=e||gs.duration,t=t||gs.delay,n=n||"last",typeof e=="object"&&!(e instanceof sl)&&(t=e.delay||t,n=e.when||n,s=e.swing||s,r=e.times||r,a=e.wait||a,e=e.duration||gs.duration),{duration:e,delay:t,swing:s,times:r,wait:a,when:n}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e,t){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,t,n){const r=fi.sanitise(e,t,n),s=new fi(r.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new pe,this}clearTransformsFromQueue(){(!this.done||!this._timeline||!this._timeline._runnerIds.includes(this.id))&&(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new t0(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,t,n){return typeof e=="object"&&(t=e.swing,n=e.wait,e=e.times),this._times=e||1/0,this._swing=t||!1,this._wait=n||0,this._times===!0&&(this._times=1/0),this}loops(e){const t=this._duration+this._wait;if(e==null){const a=Math.floor(this._time/t),l=(this._time-a*t)/this._duration;return Math.min(a+l,this._times)}const n=Math.floor(e),r=e%1,s=t*n+this._duration*r;return this.time(s)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const t=this._time,n=this._duration,r=this._wait,s=this._times,a=this._swing,o=this._reverse;let l;if(e==null){const f=function(v){const g=a*Math.floor(v%(2*(r+n))/(r+n)),x=g&&!o||!g&&o,b=Math.pow(-1,x)*(v%(r+n))/n+x;return Math.max(Math.min(b,1),0)},m=s*(r+n)-r;return l=t<=0?Math.round(f(1e-5)):t<m?f(t):Math.round(f(m-1e-5)),l}const h=Math.floor(this.loops()),c=a&&h%2===0;return l=h+(c&&!o||o&&c?e:1-e),this.loops(l)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,t,n,r){return this._queue.push({initialiser:e||jl,runner:t||jl,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted?this:(this.time(0),this._reseted=!0,this)}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,t,n){if(e instanceof ad||(n=t,t=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,t,n),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const t=this.position(),n=this._lastPosition!==t&&this._time>=0;this._lastPosition=t;const r=this.duration(),s=this._lastTime<=0&&this._time>0,a=this._lastTime<r&&this._time>=r;this._lastTime=this._time,s&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!a&&this._time>=r,this._reseted=!1;let l=!1;return(n||o)&&(this._initialise(n),this.transforms=new pe,l=this._run(o?e:t),this.fire("step",this)),this.done=this.done||l&&o,a&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const t=e-this._time;return this.step(t),this}timeline(e){return typeof e>"u"?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(!(!e&&!this._isDeclarative))for(let t=0,n=this._queue.length;t<n;++t){const r=this._queue[t],s=this._isDeclarative||!r.initialised&&e;e=!r.finished,s&&e&&(r.initialiser.call(this),r.initialised=!0)}}_rememberMorpher(e,t){if(this._history[e]={morpher:t,caller:this._queue[this._queue.length-1]},this._isDeclarative){const n=this.timeline();n&&n.play()}}_run(e){let t=!0;for(let n=0,r=this._queue.length;n<r;++n){const s=this._queue[n],a=s.runner.call(this,e);s.finished=s.finished||a===!0,t=t&&s.finished}return t}_tryRetarget(e,t,n){if(this._history[e]){if(!this._history[e].caller.initialised){const s=this._queue.indexOf(this._history[e].caller);return this._queue.splice(s,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,t,n):this._history[e].morpher.to(t),this._history[e].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}fi.id=0;class Na{constructor(e=new pe,t=-1,n=!0){this.transforms=e,this.id=t,this.done=n}clearTransformsFromQueue(){}}Re([fi,Na],{mergeWith(i){return new Na(i.transforms.lmultiply(this.transforms),i.id)}});const od=(i,e)=>i.lmultiplyO(e),ld=i=>i.transforms;function wf(){const e=this._transformationRunners.runners.map(ld).reduce(od,new pe);this.transform(e),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class bf{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const t=e.id+1;return this.runners.push(e),this.ids.push(t),this}clearBefore(e){const t=this.ids.indexOf(e+1)||1;return this.ids.splice(0,t,0),this.runners.splice(0,t,new Na).forEach(n=>n.clearTransformsFromQueue()),this}edit(e,t){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1,e+1),this.runners.splice(n,1,t),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let t=0;t<this.runners.length;++t){const n=this.runners[t];if(e&&n.done&&e.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(n.id);const s=n.mergeWith(e);this.edit(e.id,s),e=s,--t}else e=n}return this}remove(e){const t=this.ids.indexOf(e+1);return this.ids.splice(t,1),this.runners.splice(t,1),this}}Ce({Element:{animate(i,e,t){const n=fi.sanitise(i,e,t),r=this.timeline();return new fi(n.duration).loop(n).element(this).timeline(r.play()).schedule(n.delay,n.when)},delay(i,e){return this.animate(0,i,e)},_clearTransformRunnersBefore(i){this._transformationRunners.clearBefore(i.id)},_currentTransform(i){return this._transformationRunners.runners.filter(e=>e.id<=i.id).map(ld).reduce(od,new pe)},_addRunner(i){this._transformationRunners.add(i),Ye.cancelImmediate(this._frameId),this._frameId=Ye.immediate(wf.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new bf().add(new Na(new pe(this))))}}});const kf=(i,e)=>i.filter(t=>!e.includes(t));Re(fi,{attr(i,e){return this.styleAttr("attr",i,e)},css(i,e){return this.styleAttr("css",i,e)},styleAttr(i,e,t){if(typeof e=="string")return this.styleAttr(i,{[e]:t});let n=e;if(this._tryRetarget(i,n))return this;let r=new ar(this._stepper).to(n),s=Object.keys(n);return this.queue(function(){r=r.from(this.element()[i](s))},function(a){return this.element()[i](r.at(a).valueOf()),r.done()},function(a){const o=Object.keys(a),l=kf(o,s);if(l.length){const c=this.element()[i](l),d=new Ss(r.from()).valueOf();Object.assign(d,c),r.from(d)}const h=new Ss(r.to()).valueOf();Object.assign(h,a),r.to(h),s=o,n=a}),this._rememberMorpher(i,r),this},zoom(i,e){if(this._tryRetarget("zoom",i,e))return this;let t=new ar(this._stepper).to(new ke(i));return this.queue(function(){t=t.from(this.element().zoom())},function(n){return this.element().zoom(t.at(n),e),t.done()},function(n,r){e=r,t.to(n)}),this._rememberMorpher("zoom",t),this},transform(i,e,t){if(e=i.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",i))return this;const n=pe.isMatrixLike(i);t=i.affine!=null?i.affine:t??!n;const r=new ar(this._stepper).type(t?Is:pe);let s,a,o,l,h;function c(){a=a||this.element(),s=s||Jo(i,a),h=new pe(e?void 0:a),a._addRunner(this),e||a._clearTransformRunnersBefore(this)}function d(m){e||this.clearTransform();const{x:v,y:g}=new xt(s).transform(a._currentTransform(this));let x=new pe({...i,origin:[v,g]}),b=this._isDeclarative&&o?o:h;if(t){x=x.decompose(v,g),b=b.decompose(v,g);const M=x.rotate,z=b.rotate,R=[M-360,M,M+360],O=R.map(P=>Math.abs(P-z)),B=Math.min(...O),F=O.indexOf(B);x.rotate=R[F]}e&&(n||(x.rotate=i.rotate||0),this._isDeclarative&&l&&(b.rotate=l)),r.from(b),r.to(x);const E=r.at(m);return l=E.rotate,o=new pe(E),this.addTransform(o),a._addRunner(this),r.done()}function f(m){(m.origin||"center").toString()!==(i.origin||"center").toString()&&(s=Jo(m,a)),i={...m,origin:s}}return this.queue(c,d,f,!0),this._isDeclarative&&this._rememberMorpher("transform",r),this},x(i,e){return this._queueNumber("x",i)},y(i){return this._queueNumber("y",i)},dx(i=0){return this._queueNumberDelta("x",i)},dy(i=0){return this._queueNumberDelta("y",i)},dmove(i,e){return this.dx(i).dy(e)},_queueNumberDelta(i,e){if(e=new ke(e),this._tryRetarget(i,e))return this;const t=new ar(this._stepper).to(e);let n=null;return this.queue(function(){n=this.element()[i](),t.from(n),t.to(n+e)},function(r){return this.element()[i](t.at(r)),t.done()},function(r){t.to(n+new ke(r))}),this._rememberMorpher(i,t),this},_queueObject(i,e){if(this._tryRetarget(i,e))return this;const t=new ar(this._stepper).to(e);return this.queue(function(){t.from(this.element()[i]())},function(n){return this.element()[i](t.at(n)),t.done()}),this._rememberMorpher(i,t),this},_queueNumber(i,e){return this._queueObject(i,new ke(e))},cx(i){return this._queueNumber("cx",i)},cy(i){return this._queueNumber("cy",i)},move(i,e){return this.x(i).y(e)},center(i,e){return this.cx(i).cy(e)},size(i,e){let t;return(!i||!e)&&(t=this._element.bbox()),i||(i=t.width/t.height*e),e||(e=t.height/t.width*i),this.width(i).height(e)},width(i){return this._queueNumber("width",i)},height(i){return this._queueNumber("height",i)},plot(i,e,t,n){if(arguments.length===4)return this.plot([i,e,t,n]);if(this._tryRetarget("plot",i))return this;const r=new ar(this._stepper).type(this._element.MorphArray).to(i);return this.queue(function(){r.from(this._element.array())},function(s){return this._element.plot(r.at(s)),r.done()}),this._rememberMorpher("plot",r),this},leading(i){return this._queueNumber("leading",i)},viewbox(i,e,t,n){return this._queueObject("viewbox",new Xt(i,e,t,n))},update(i){return typeof i!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(i.opacity!=null&&this.attr("stop-opacity",i.opacity),i.color!=null&&this.attr("stop-color",i.color),i.offset!=null&&this.attr("offset",i.offset),this)}});Re(fi,{rx:il,ry:nl,from:id,to:nd});Oe(fi,"Runner");class ol extends ci{constructor(e,t=e){super(et("svg",e),t),this.namespace()}defs(){return this.isRoot()?Ci(this.node.querySelector("defs"))||this.put(new tl):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Fe.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:K0,version:"1.1"}).attr("xmlns:xlink",_s,Zs).attr("xmlns:svgjs",Hu,Zs):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Zs).attr("xmlns:svgjs",null,Zs)}root(){return this.isRoot()?this:super.root()}}Ce({Container:{nested:Je(function(){return this.put(new ol)})}});Oe(ol,"Svg",!0);let ll=class extends ci{constructor(e,t=e){super(et("symbol",e),t)}};Ce({Container:{symbol:Je(function(){return this.put(new ll)})}});Oe(ll,"Symbol");function Tf(i){return this._build===!1&&this.clear(),this.node.appendChild(Fe.document.createTextNode(i)),this}function Ef(){return this.node.getComputedTextLength()}function Mf(i,e=this.bbox()){return i==null?e.x:this.attr("x",this.attr("x")+i-e.x)}function Sf(i,e=this.bbox()){return i==null?e.y:this.attr("y",this.attr("y")+i-e.y)}function zf(i,e,t=this.bbox()){return this.x(i,t).y(e,t)}function Cf(i,e=this.bbox()){return i==null?e.cx:this.attr("x",this.attr("x")+i-e.cx)}function Nf(i,e=this.bbox()){return i==null?e.cy:this.attr("y",this.attr("y")+i-e.cy)}function Lf(i,e,t=this.bbox()){return this.cx(i,t).cy(e,t)}function Af(i){return this.attr("x",i)}function _f(i){return this.attr("y",i)}function Rf(i,e){return this.ax(i).ay(e)}function Df(i){return this._build=!!i,this}var hd={__proto__:null,plain:Tf,length:Ef,x:Mf,y:Sf,move:zf,cx:Cf,cy:Nf,center:Lf,ax:Af,ay:_f,amove:Rf,build:Df};class Dt extends vi{constructor(e,t=e){super(et("text",e),t),this.dom.leading=new ke(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new ke(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const t=this;let n=0;const r=this.dom.leading;this.each(function(s){const a=Fe.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=r*new ke(a);this.dom.newLined&&(this.attr("x",t.attr("x")),this.text()===`
196
+ `?n+=o:(this.attr("dy",s?o+n:0),n=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new ke(e.leading||1.3),this}text(e){if(e===void 0){const t=this.node.childNodes;let n=0;e="";for(let r=0,s=t.length;r<s;++r){if(t[r].nodeName==="textPath"){r===0&&(n=1);continue}r!==n&&t[r].nodeType!==3&&Ci(t[r]).dom.newLined===!0&&(e+=`
197
+ `),e+=t[r].textContent}return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else{e=(e+"").split(`
198
+ `);for(let t=0,n=e.length;t<n;t++)this.newLine(e[t])}return this.build(!1).rebuild()}}Re(Dt,hd);Ce({Container:{text:Je(function(i=""){return this.put(new Dt).text(i)}),plain:Je(function(i=""){return this.put(new Dt).plain(i)})}});Oe(Dt,"Text");class $a extends vi{constructor(e,t=e){super(et("tspan",e),t),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Dt))return this;const t=e.index(this),n=Fe.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=e.dom.leading*new ke(n);return this.dy(t?r:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
199
+ `:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}Re($a,hd);Ce({Tspan:{tspan:Je(function(i=""){const e=new $a;return this._build||this.clear(),this.put(e).text(i)})},Text:{newLine:function(i=""){return this.tspan(i).newLine()}}});Oe($a,"Tspan");class jr extends vi{constructor(e,t=e){super(et("circle",e),t)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new ke(e).divide(2))}}Re(jr,{x:jc,y:Kc,cx:Zc,cy:Qc,width:Jc,height:ed});Ce({Container:{circle:Je(function(i=0){return this.put(new jr).size(i).move(0,0)})}});Oe(jr,"Circle");class a0 extends ci{constructor(e,t=e){super(et("clipPath",e),t)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Vr("svg [clip-path*="+this.id()+"]")}}Ce({Container:{clip:Je(function(){return this.defs().put(new a0)})},Element:{clipper(){return this.reference("clip-path")},clipWith(i){const e=i instanceof a0?i:this.parent().clip().add(i);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}});Oe(a0,"ClipPath");class hl extends Xi{constructor(e,t=e){super(et("foreignObject",e),t)}}Ce({Container:{foreignObject:Je(function(i,e){return this.put(new hl).size(i,e)})}});Oe(hl,"ForeignObject");function If(i,e){return this.children().forEach((t,n)=>{let r;try{r=t.bbox()}catch{return}const s=new pe(t),a=s.translate(i,e).transform(s.inverse()),o=new xt(r.x,r.y).transform(a);t.move(o.x,o.y)}),this}function Of(i){return this.dmove(i,0)}function Bf(i){return this.dmove(0,i)}function Pf(i,e=this.bbox()){return i==null?e.height:this.size(e.width,i,e)}function Ff(i=0,e=0,t=this.bbox()){const n=i-t.x,r=e-t.y;return this.dmove(n,r)}function Hf(i,e,t=this.bbox()){const n=Xr(this,i,e,t),r=n.width/t.width,s=n.height/t.height;return this.children().forEach((a,o)=>{const l=new xt(t).transform(new pe(a).inverse());a.scale(r,s,l.x,l.y)}),this}function Uf(i,e=this.bbox()){return i==null?e.width:this.size(i,e.height,e)}function $f(i,e=this.bbox()){return i==null?e.x:this.move(i,e.y,e)}function Gf(i,e=this.bbox()){return i==null?e.y:this.move(e.x,i,e)}var cd={__proto__:null,dmove:If,dx:Of,dy:Bf,height:Pf,move:Ff,size:Hf,width:Uf,x:$f,y:Gf};class Ut extends ci{constructor(e,t=e){super(et("g",e),t)}}Re(Ut,cd);Ce({Container:{group:Je(function(){return this.put(new Ut)})}});Oe(Ut,"G");class zs extends ci{constructor(e,t=e){super(et("a",e),t)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,_s)}}Re(zs,cd);Ce({Container:{link:Je(function(i){return this.put(new zs).to(i)})},Element:{unlink(){const i=this.linker();if(!i)return this;const e=i.parent();if(!e)return this.remove();const t=e.index(i);return e.add(this,t),i.remove(),this},linkTo(i){let e=this.linker();return e||(e=new zs,this.wrap(e)),typeof i=="function"?i.call(e,e):e.to(i),this},linker(){const i=this.parent();return i&&i.node.nodeName.toLowerCase()==="a"?i:null}}});Oe(zs,"A");class o0 extends ci{constructor(e,t=e){super(et("mask",e),t)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Vr("svg [mask*="+this.id()+"]")}}Ce({Container:{mask:Je(function(){return this.defs().put(new o0)})},Element:{masker(){return this.reference("mask")},maskWith(i){const e=i instanceof o0?i:this.parent().mask().add(i);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}});Oe(o0,"Mask");class dd extends Xi{constructor(e,t=e){super(et("stop",e),t)}update(e){return(typeof e=="number"||e instanceof ke)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new ke(e.offset)),this}}Ce({Gradient:{stop:function(i,e,t){return this.put(new dd).update(i,e,t)}}});Oe(dd,"Stop");function qf(i,e){if(!i)return"";if(!e)return i;let t=i+"{";for(const n in e)t+=Pu(n)+":"+e[n]+";";return t+="}",t}let l0=class extends Xi{constructor(e,t=e){super(et("style",e),t)}addText(e=""){return this.node.textContent+=e,this}font(e,t,n={}){return this.rule("@font-face",{fontFamily:e,src:t,...n})}rule(e,t){return this.addText(qf(e,t))}};Ce("Dom",{style(i,e){return this.put(new l0).rule(i,e)},fontface(i,e,t){return this.put(new l0).font(i,e,t)}});Oe(l0,"Style");class cl extends Dt{constructor(e,t=e){super(et("textPath",e),t)}array(){const e=this.track();return e?e.array():null}plot(e){const t=this.track();let n=null;return t&&(n=t.plot(e)),e==null?n:this}track(){return this.reference("href")}}Ce({Container:{textPath:Je(function(i,e){return i instanceof Dt||(i=this.text(i)),i.path(e)})},Text:{path:Je(function(i,e=!0){const t=new cl;i instanceof yr||(i=this.defs().path(i)),t.attr("href","#"+i,_s);let n;if(e)for(;n=this.node.firstChild;)t.node.appendChild(n);return this.put(t)}),textPath(){return this.findOne("textPath")}},Path:{text:Je(function(i){return i instanceof Dt||(i=new Dt().addTo(this.parent()).text(i)),i.path(this)}),targets(){return Vr("svg textPath").filter(i=>(i.attr("href")||"").includes(this.id()))}}});cl.prototype.MorphArray=gr;Oe(cl,"TextPath");class ud extends vi{constructor(e,t=e){super(et("use",e),t)}use(e,t){return this.attr("href",(t||"")+"#"+e,_s)}}Ce({Container:{use:Je(function(i,e){return this.put(new ud).use(i,e)})}});Oe(ud,"Use");const mt=Qt;Re([ol,ll,xr,Es,za],hi("viewbox"));Re([Ms,Os,wr,yr],hi("marker"));Re(Dt,hi("Text"));Re(yr,hi("Path"));Re(tl,hi("Defs"));Re([Dt,$a],hi("Tspan"));Re([mi,Ua,Ds,fi],hi("radius"));Re(Rs,hi("EventTarget"));Re(_n,hi("Dom"));Re(Xi,hi("Element"));Re(vi,hi("Shape"));Re([ci,td],hi("Container"));Re(Ds,hi("Gradient"));Re(fi,hi("Runner"));mr.extend(Ou());df([ke,Ve,Xt,pe,Gr,Rn,gr,xt]);uf();const fd={paddingX:15,paddingY:5,imgMaxWidth:200,imgMaxHeight:100,iconSize:20,lineWidth:1,lineColor:"#549688",lineDasharray:"none",lineFlow:!1,lineFlowDuration:1,lineFlowForward:!0,lineStyle:"straight",rootLineKeepSameInCurve:!0,rootLineStartPositionKeepSameInCurve:!1,lineRadius:5,showLineMarker:!1,generalizationLineWidth:1,generalizationLineColor:"#549688",generalizationLineMargin:0,generalizationNodeMargin:20,associativeLineWidth:2,associativeLineColor:"rgb(51, 51, 51)",associativeLineActiveWidth:8,associativeLineActiveColor:"rgba(2, 167, 240, 1)",associativeLineDasharray:"6,4",associativeLineTextColor:"rgb(51, 51, 51)",associativeLineTextFontSize:14,associativeLineTextLineHeight:1.2,associativeLineTextFontFamily:"微软雅黑, Microsoft YaHei",backgroundColor:"#fafafa",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#549688",fontFamily:"微软雅黑, Microsoft YaHei",color:"#fff",fontSize:16,fontWeight:"bold",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#6a6d6c",fontSize:14,fontWeight:"normal",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderRadius:5,borderDasharray:"none",textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"}},Wf=["lineWidth","lineColor","lineDasharray","lineStyle","generalizationLineWidth","generalizationLineColor","associativeLineWidth","associativeLineColor","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextColor","associativeLineTextFontSize","associativeLineTextLineHeight","associativeLineTextFontFamily","backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","rootLineKeepSameInCurve","rootLineStartPositionKeepSameInCurve","showLineMarker","lineRadius","hoverRectColor","hoverRectRadius","lineFlow","lineFlowDuration","lineFlowForward","textAlign"],Yf=i=>{let e=Object.keys(i);for(let t=0;t<e.length;t++)if(!Wf.find(n=>n===e[t]))return!1;return!0},h0=["lineColor","lineDasharray","lineWidth","lineMarkerDir","lineFlow","lineFlowDuration","lineFlowForward"],Pe=(i,e,t,n,r,s=0,a=0,o=[])=>{let l=!1;if(t&&(l=t(i,e,r,s,a,o)),!l&&i.children&&i.children.length>0){let h=s+1;i.children.forEach((c,d)=>{Pe(c,i,t,n,!1,h,d,[...o,i])})}n&&n(i,e,r,s,a,o)},Fr=(i,e)=>{let t=[i],n=!1;for(e(i,null)==="stop"&&(n=!0);t.length&&!n;){let r=t.shift();r.children&&r.children.length&&r.children.forEach(s=>{n||(t.push(s),e(s,r)==="stop"&&(n=!0))})}},pd=(i,e,t,n)=>{let r=i/e,s=[];if(t&&n)if(i<=t&&e<=n)s=[i,e];else{let a=t/n;r>a?s=[t,t/r]:s=[r*n,n]}else t?i<=t?s=[i,e]:s=[t,t/r]:n&&(e<=n?s=[i,e]:s=[r*n,n]);return s},Xf=i=>{i=i.replace(/<br>/gim,`
200
+ `);let e=document.createElement("div");return e.innerHTML=i,i=e.textContent,i},Oi=i=>{try{return JSON.parse(JSON.stringify(i))}catch{return null}},md=(i,e,t=!1)=>(i.data=Oi(e.data),t&&(i.data.isActive=!1,Ns(i.data).forEach(r=>{r.isActive=!1})),i.children=[],e.children&&e.children.length>0&&e.children.forEach((n,r)=>{i.children[r]=md({},n,t)}),Object.keys(e).forEach(n=>{!["data","children"].includes(n)&&!/^_/.test(n)&&(i[n]=e[n])}),i),Cs=(i,e,t=!1,n=!0)=>{const r=e.nodeData?e.nodeData:e;return i.data=Oi(r.data),n?delete i.data.uid:i.data.uid||(i.data.uid=Wi()),t&&(i.data.isActive=!1),i.children=[],e.children&&e.children.length>0?e.children.forEach((s,a)=>{i.children[a]=Cs({},s,t,n)}):e.nodeData&&e.nodeData.children&&e.nodeData.children.length>0&&e.nodeData.children.forEach((s,a)=>{i.children[a]=Cs({},s,t,n)}),Object.keys(r).forEach(s=>{!["data","children"].includes(s)&&!/^_/.test(s)&&(i[s]=r[s])}),i},Zl=(i,e=!1)=>new Promise((t,n)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{try{let s=document.createElement("canvas");s.width=r.width,s.height=r.height,s.getContext("2d").drawImage(r,0,0,r.width,r.height),e?s.toBlob(o=>{t(o)}):t(s.toDataURL())}catch(s){n(s)}},r.onerror=s=>{n(s)},r.src=i}),Vf=(i,e)=>{let t=document.createElement("a");t.href=i,t.download=e,t.click()},Ga=(i,e=300,t)=>{let n=null;return(...r)=>{n||(n=setTimeout(()=>{i.call(t,...r),n=null},e))}},jf=(i,e=300,t)=>{let n=null;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,i.apply(t,r)},e)}},br=(i,e=()=>{})=>{let t=0,n=i.length;if(n<=0)return e();let r=()=>{if(t>=n){e();return}i[t](),setTimeout(()=>{t++,r()},0)};r()},Br=i=>i*(Math.PI/180),Kf=i=>i.replace(/([a-z])([A-Z])/g,(...e)=>e[1]+"-"+e[2].toLowerCase()),Zf=function(i,e){let t=!1,n=null,r=()=>{t=!1,e?i.call(e):i()};if(typeof MutationObserver<"u"){let s=1,a=new MutationObserver(r),o=document.createTextNode(s);a.observe(o,{characterData:!0}),n=function(){s=(s+1)%2,o.data=s}}else n=setTimeout;return function(){t||(t=!0,n(r,0))}},Qf=(i,e,t=0,n=0)=>{let r=i.elRect,{scaleX:s,scaleY:a,translateX:o,translateY:l}=i.draw.transform(),{left:h,top:c,width:d,height:f}=e,m=(h+d)*s+o,v=(c+f)*a+l;h=h*s+o,c=c*a+l;let g=0,x=0;return h<0+t&&(g=-h+t),m>r.width-t&&(g=-(m-r.width)-t),c<0+n&&(x=-c+n),v>r.height-n&&(x=-(v-r.height)-n),{isOuter:g!==0||x!==0,offsetLeft:g,offsetTop:x}};let Qs=null;const gd=i=>(Qs||(Qs=document.createElement("div")),Qs.innerHTML=i,Qs.textContent),hs=i=>new Promise((e,t)=>{let n=new FileReader;n.onload=r=>{e(r.target.result)},n.onerror=r=>{t(r)},n.readAsDataURL(i)}),Jf=i=>new Promise(e=>{let t=new Image;t.src=i,t.onload=()=>{e({width:t.width,height:t.height})},t.onerror=()=>{e({width:0,height:0})}}),Wi=()=>Iu(),e2=i=>new Promise((e,t)=>{let n=new FileReader;n.readAsDataURL(i),n.onload=async r=>{let s=r.target.result,a=await Jf(s);e({url:s,size:a})},n.onerror=r=>{t(r)}}),t2=i=>([["&nbsp;","&#160;"]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),cr=i=>Object.prototype.toString.call(i).slice(8,-1),Dn=i=>i==null||i==="";let Js=null;const i2=i=>{Js||(Js=document.createElement("div")),Js.innerHTML=i;for(let e=Js.childNodes,t=e.length;t--;)if(e[t].nodeType==1)return!0;return!1},vd=i=>(i=String(i).replace(/\s+/g,""),["#fff","#ffffff","#FFF","#FFFFFF","rgb(255,255,255)"].includes(i)||/rgba\(255,255,255,[^)]+\)/.test(i)),n2=i=>(i=String(i).replace(/\s+/g,""),["","transparent"].includes(i)||/rgba\(\d+,\d+,\d+,0\)/.test(i)),r2=i=>{let{lineColor:e,root:t,second:n,node:r}=i,s=[e,t.fillColor,t.color,n.fillColor,n.color,r.fillColor,r.color,t.borderColor,n.borderColor,r.borderColor];for(let a=0;a<s.length;a++){let o=s[a];if(!n2(o)&&!vd(o))return o}},s2=i=>{const e=t=>{t.childNodes.forEach(r=>{r.nodeType===1&&(r.classList.contains("ql-formula")?r.parentNode.removeChild(r):e(r))})};e(i)};let ea=null;const xd=i=>{ea||(ea=document.createElement("div")),ea.innerHTML=i;const e=ea.childNodes;let t="";for(let n=0;n<e.length;n++){const r=e[n];r.nodeType===1?(s2(r),r.tagName.toLowerCase()==="p"?t+=r.textContent+`
201
+ `:t+=r.textContent):r.nodeType===3&&(t+=r.nodeValue)}return t.replace(/\n$/,"")};let Sn=null;const a2=i=>{Sn||(Sn=document.createElement("div")),Sn.innerHTML=i;const e=Sn.querySelectorAll(".ql-formula");Array.from(e).forEach(r=>{const s=document.createTextNode("$smmformula$");r.parentNode.replaceChild(s,r)});const t=Sn.childNodes;let n=[];for(let r=0;r<t.length;r++){const s=t[r];s.nodeType===1?n.push(s.textContent):s.nodeType===3&&n.push(s.nodeValue)}if(i=n.map(r=>`<p><span>${qa(r)}</span></p>`).join(""),e.length>0){i=i.replace(/\$smmformula\$/g,'<span class="smmformula"></span>'),Sn.innerHTML=i;const r=Sn.querySelectorAll(".smmformula");Array.from(r).forEach((s,a)=>{s.parentNode.replaceChild(e[a],s)}),i=Sn.innerHTML}return i},o2=(i,e)=>{const t={};return Object.keys(e).forEach(n=>{const r=i[n],s=e[n];if(cr(r)!==cr(s)){t[n]=s;return}if(cr(r)==="Object"){if(JSON.stringify(r)!==JSON.stringify(s)){t[n]=s;return}}else if(r!==s){t[n]=s;return}}),t},c0=i=>/^_/.test(i)?!1:!Ta.includes(i),l2=i=>{const e=[...h0],t=Object.keys(i);for(let n=0;n<t.length;n++)if(!e.includes(t[n]))return!1;return!0},h2=i=>i.reduce((e,t)=>{const n=e.find(r=>r.type===t.type);return n?t.list.forEach(r=>{const s=n.list.find(a=>a.name===r.name);s?s.icon=r.icon:n.list.push(r)}):e.push({...t}),e},[]),d0=i=>{let e=[];return i.forEach(t=>{i.find(n=>n.uid!==t.uid&&n.isAncestor(t))||e.push(t)}),e},c2=i=>{const e={},t={};i.forEach(r=>{const s=r.parent;if(s){const a=s.uid;t[a]=s;const o=r.getIndexInBrothers(),l={node:r,index:o};e[a]?e[a].find(h=>h.index===l.index)||e[a].push(l):e[a]=[l]}});const n=[];return Object.keys(e).forEach(r=>{if(e[r].length>1){const s=e[r].map(a=>a.index).sort((a,o)=>a-o);n.push({node:t[r],range:[s[0],s[s.length-1]]})}else n.push({node:e[r][0].node})}),n},d2=(i,e,t,n,r,s,a,o)=>e>r&&s>i&&n>a&&o>t,u2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),t.collapse(),e.removeAllRanges(),e.addRange(t)},f2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)},ta=(i,e={})=>{e={...e},e&&e.richText&&e.resetRichText&&delete e.resetRichText;const n=r=>{r.forEach(s=>{s.data={...s.data,...e},s.children&&s.children.length>0&&n(s.children)})};return n(i),i},vs=(i,e=!1,t=null,n=!1)=>{const r=s=>{s.forEach(a=>{a.data||(a.data={}),(e||Dn(a.data.uid))&&(a.data.uid=Wi()),n&&Ns(a.data).forEach(l=>{(e||Dn(l.uid))&&(l.uid=Wi())}),t&&t(a),a.children&&a.children.length>0&&r(a.children)})};return r(i),i},Si=i=>i?Array.isArray(i)?i:[i]:[],xs=i=>i.parent?i.parent.nodeData.children.findIndex(e=>e.data.uid===i.uid):0,_t=(i,e)=>e.findIndex(t=>t.uid===i.uid),yd=i=>{let e=0;for(let r=0;r<i.length;r++)e=i.charCodeAt(r)+((e<<5)-e);return"hsla("+new V0(e).genrand_int32()%360+", 50%, 50%, 1)"},qa=i=>([["&","&amp;"],["<","&lt;"],[">","&gt;"]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),u0=(i,e)=>{const t=cr(i);if(t!==cr(e))return!1;if(t==="Object"){const n=Object.keys(i),r=Object.keys(e);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){const a=n[s];if(!r.includes(a)||!u0(i[a],e[a]))return!1}return!0}else if(t==="Array"){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++){const r=i[n],s=e[n],a=cr(r),o=cr(s);if(a!==o||!u0(r,s))return!1}return!0}else return i===e},wd=()=>navigator.clipboard&&typeof navigator.clipboard.read=="function",Ql=i=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(i))},p2=async()=>{let i=null,e=null;if(wd()){const t=await navigator.clipboard.read();if(t&&t.length>0)for(const n of t)for(const r of n.types)/^image\//.test(r)?e=await n.getType(r):r==="text/plain"&&(i=await(await n.getType(r)).text())}return{text:i,img:e}},xo=i=>{if(!i||!i.parent)return;const e=xs(i);e!==-1&&i.parent.nodeData.children.splice(e,1)},m2=i=>(gu.forEach(e=>{i=i.replace(new RegExp(`<${e}([^>]*)>`,"g"),`<${e} $1 />`)}),i),g2=(i,e)=>{if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!e.find(n=>n.uid===i[t].uid))return!1;return!0},Jl=i=>({simpleMindMap:!0,data:i}),f0=i=>{let e=null;if(typeof i=="string")try{const n=JSON.parse(i);typeof n=="object"&&n.simpleMindMap&&(e=n.data)}catch{}else typeof i=="object"&&i.simpleMindMap&&(e=i.data);const t=!!e;return{isSmm:t,data:t?e:String(i)}},eh=(i,e)=>{i.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument(),e=e||i.clipboardData.getData("text"),e=qa(e),e=gd(e);const n=e.split(/\n/g),r=document.createDocumentFragment();n.forEach((s,a)=>{const o=document.createTextNode(s);if(r.appendChild(o),a<n.length-1){const l=document.createElement("br");r.appendChild(l)}}),t.getRangeAt(0).insertNode(r),t.collapseToEnd()},th=i=>{const e={},t=(n,r)=>{const s=n.data.uid;r&&r.children.push(s),e[s]={isRoot:!r,data:{...n.data},children:[]},n.children&&n.children.length>0&&n.children.forEach(a=>{t(a,e[s])})};return t(i,null),e},v2=({addContentToHeader:i,addContentToFooter:e})=>{const t=[];let n=null,r=0,s=null,a=0;const o=(l,h)=>{if(typeof l=="function"){const c=l();if(!c)return;const{el:d,cssText:f,height:m}=c;if(d instanceof HTMLElement){dr(d);const v=Pr({el:d,height:m});h(v,m)}f&&t.push(f)}};return o(i,(l,h)=>{n=l,r=h}),o(e,(l,h)=>{s=l,a=h}),{cssTextList:t,header:n,headerHeight:r,footer:s,footerHeight:a}},p0=(i,e=0,t=0,n=0,r=0,s=!1,a=!1)=>{let o=1/0,l=-1/0,h=1/0,c=-1/0;const d=(f,m)=>{if(!(m&&s)&&f.group)try{const{x:v,y:g,width:x,height:b}=f.group.findOne(".smm-node-shape").rbox();v<o&&(o=v),v+x>l&&(l=v+x),g<h&&(h=g),g+b>c&&(c=g+b)}catch{}!a&&f._generalizationList.length>0&&f._generalizationList.forEach(v=>{d(v.generalizationNode)}),f.children&&f.children.forEach(v=>{d(v)})};return d(i,!0),o=o-e+n,h=h-t+r,l=l-e+n,c=c-t+r,{left:o,top:h,width:l-o,height:c-h}},x2=()=>{if(document.documentElement.requestFullScreen)return"fullscreenchange";if(document.documentElement.webkitRequestFullScreen)return"webkitfullscreenchange";if(document.documentElement.mozRequestFullScreen)return"mozfullscreenchange";if(document.documentElement.msRequestFullscreen)return"msfullscreenchange"},ih=x2(),y2=i=>{i.requestFullScreen?i.requestFullScreen():i.webkitRequestFullScreen?i.webkitRequestFullScreen():i.mozRequestFullScreen&&i.mozRequestFullScreen()},w2=()=>{document.fullscreenElement&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen&&document.mozCancelFullScreen())},Pr=({el:i,width:e,height:t})=>{const n=new hl;return e!==void 0&&n.width(e),t!==void 0&&n.height(t),n.add(i),n},Ns=i=>{const e=i.generalization;return e?Array.isArray(e)?e:[e]:[]},dr=i=>{i.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},m0=i=>(i=[...i],i.sort((e,t)=>e.sortIndex-t.sortIndex),i),bd=(i,e)=>Sa(i,e,{arrayMerge:(t,n)=>n}),b2=i=>{const e={};return vu.forEach(t=>{let n=i.style.merge(t);t==="fontSize"&&(n=n+"px"),e[t]=n}),e},nh=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"],kd=["gradientStyle","startColor","endColor","startDir","endDir","fillColor","borderColor","borderWidth","borderDasharray"];let La=class or{static setBackgroundStyle(e,t){if(!e)return;if(!or.cacheStyle){or.cacheStyle={};let l=window.getComputedStyle(e);nh.forEach(h=>{or.cacheStyle[h]=l[h]})}let{backgroundColor:n,backgroundImage:r,backgroundRepeat:s,backgroundPosition:a,backgroundSize:o}=t;e.style.backgroundColor=n,r&&r!=="none"?(e.style.backgroundImage=`url(${r})`,e.style.backgroundRepeat=s,e.style.backgroundPosition=a,e.style.backgroundSize=o):e.style.backgroundImage="none"}static removeBackgroundStyle(e){or.cacheStyle&&(nh.forEach(t=>{e.style[t]=or.cacheStyle[t]}),or.cacheStyle=null)}constructor(e){this.ctx=e,this._markerPath=null,this._marker=null,this._gradient=null}merge(e,t){let n=this.ctx.mindMap.themeConfig,r=null,s=!1;t?(s=!0,r=n):this.ctx.isGeneralization?r=n.generalization:this.ctx.layerIndex===0?r=n.root:this.ctx.layerIndex===1?r=n.second:r=n.node;let a="";return this.getSelfStyle(e)!==void 0?a=this.getSelfStyle(e):r[e]!==void 0?a=r[e]:a=n[e],s||this.addToEffectiveStyles({[e]:a}),a}getStyle(e,t){return this.merge(e,t)}getSelfStyle(e){return this.ctx.getData(e)}addToEffectiveStyles(e){this.ctx.mindMap.painter&&(this.ctx.effectiveStyles={...this.ctx.effectiveStyles,...e})}rect(e){this.shape(e),e.radius(this.merge("borderRadius"))}shape(e){const t={};kd.forEach(n=>{t[n]=this.merge(n)}),t.gradientStyle?(this._gradient||(this._gradient=this.ctx.nodeDraw.gradient("linear")),this._gradient.update(n=>{n.stop(0,t.startColor),n.stop(1,t.endColor)}),this._gradient.from(...t.startDir).to(...t.endDir),e.fill(this._gradient)):e.fill({color:t.fillColor}),e.stroke({color:t.borderColor,width:t.borderWidth,dasharray:t.borderDasharray})}text(e){const t={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration")};e.fill({color:t.color}).css({"font-family":t.fontFamily,"font-size":t.fontSize+"px","font-weight":t.fontWeight,"font-style":t.fontStyle,"text-decoration":t.textDecoration})}domText(e,t=1){const n={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration"),textAlign:this.merge("textAlign")};e.style.color=n.color,e.style.textDecoration=n.textDecoration,e.style.fontFamily=n.fontFamily,e.style.fontSize=n.fontSize*t+"px",e.style.fontWeight=n.fontWeight||"normal",e.style.fontStyle=n.fontStyle,e.style.textAlign=n.textAlign}tagText(e,t){e.fill({color:"#fff"}).css({"font-size":t.fontSize+"px"})}tagRect(e,t){e.fill({color:t.fill}),t.radius&&e.radius(t.radius)}iconNode(e,t){e.attr({fill:t||this.merge("color")})}line(e,{width:t,color:n,dasharray:r}={},s,a){const{customHandleLine:o}=this.ctx.mindMap.opt;if(typeof o=="function"&&o(this.ctx,e,{width:t,color:n,dasharray:r}),e.stroke({color:n,dasharray:r,width:t}).fill({color:"none"}),s){const l=this.merge("showLineMarker",!0),h=a.style;if(l){h._marker=h._marker||h.createMarker(),h._markerPath.stroke({color:n}).fill({color:n}),e.attr("marker-start",""),e.attr("marker-end","");const c=h.merge("lineMarkerDir");e.marker(c,h._marker)}else h._marker&&(e.attr("marker-start",""),e.attr("marker-end",""),h._marker.remove(),h._marker=null)}}createMarker(){return this.ctx.lineDraw.marker(20,20,e=>{e.ref(8,5),e.size(20,20),e.attr("markerUnits","userSpaceOnUse"),e.attr("orient","auto-start-reverse"),this._markerPath=e.path("M0,0 L2,5 L0,10 L10,5 Z")})}generalizationLine(e){e.stroke({width:this.merge("generalizationLineWidth",!0),color:this.merge("generalizationLineColor",!0)}).fill({color:"none"})}iconBtn(e,t,n){let{color:r,fill:s,fontSize:a,fontColor:o}=this.ctx.mindMap.opt.expandBtnStyle||{color:"#808080",fill:"#fff",fontSize:12,fontColor:"#333333"};e.fill({color:r}),t.fill({color:r}),n.fill({color:s}),this.ctx.mindMap.opt.isShowExpandNum&&e.attr({"font-size":a+"px","font-color":o})}hasCustomStyle(){let e=!1;return Object.keys(this.ctx.getData()).forEach(t=>{c0(t)&&(e=!0)}),e}getCustomStyle(){const e={};return Object.keys(this.ctx.getData()).forEach(t=>{c0(t)&&(e[t]=this.ctx.getData(t))}),e}hoverNode(e){const t=this.merge("hoverRectColor")||this.ctx.mindMap.opt.hoverRectColor,n=this.merge("hoverRectRadius");e.radius(n).fill("none").stroke({color:t})}onRemove(){this._marker&&(this._marker.remove(),this._marker=null),this._markerPath&&(this._markerPath.remove(),this._markerPath=null),this._gradient&&(this._gradient.remove(),this._gradient=null)}};La.cacheStyle=null;class k2{constructor(e){this.node=e,this.mindMap=e.mindMap}getShapePadding(e,t,n,r){const s=this.node.getShape(),a=15,o=5,l=e+n*2,h=t+r*2,c=Math.abs(l-h);switch(s){case _.SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case _.SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case _.SHAPE.PARALLELOGRAM:return{paddingX:n<=0?a:0,paddingY:0};case _.SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case _.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case _.SHAPE.ELLIPSE:return{paddingX:n<=0?a:0,paddingY:r<=0?o:0};case _.SHAPE.CIRCLE:return{paddingX:h>l?c/2:0,paddingY:h<l?c/2:0}}const d=this.getShapeFromExtendList(s);return d?d.getPadding({node:this.node,width:e,height:t,paddingX:n,paddingY:r})||{paddingX:0,paddingY:0}:{paddingX:0,paddingY:0}}getShapeFromExtendList(e){return this.mindMap.extendShapeList.find(t=>t.name===e)}createShape(){const e=this.node.getShape();let t=null;if(e===_.SHAPE.RECTANGLE?t=this.createRect():e===_.SHAPE.DIAMOND?t=this.createDiamond():e===_.SHAPE.PARALLELOGRAM?t=this.createParallelogram():e===_.SHAPE.ROUNDED_RECTANGLE?t=this.createRoundedRectangle():e===_.SHAPE.OCTAGONAL_RECTANGLE?t=this.createOctagonalRectangle():e===_.SHAPE.OUTER_TRIANGULAR_RECTANGLE?t=this.createOuterTriangularRectangle():e===_.SHAPE.INNER_TRIANGULAR_RECTANGLE?t=this.createInnerTriangularRectangle():e===_.SHAPE.ELLIPSE?t=this.createEllipse():e===_.SHAPE.CIRCLE&&(t=this.createCircle()),!t){const n=this.getShapeFromExtendList(e);n&&(t=n.createShape(this.node))}return t||this.createRect()}getNodeSize(){const e=this.node.getBorderWidth();let{width:t,height:n}=this.node;return t-=e,n-=e,{width:t,height:n}}createPath(e){const{customCreateNodePath:t}=this.mindMap.opt;return t?mt(t(e)):new yr().plot(e)}createPolygon(e){const{customCreateNodePolygon:t}=this.mindMap.opt;return t?mt(t(e)):new wr().plot(e)}createRect(){let{width:e,height:t}=this.getNodeSize(),n=this.node.style.merge("borderRadius");const r=`
202
+ M${n},0
203
+ L${e-n},0
204
+ C${e-n},0 ${e},0 ${e},${n}
205
+ L${e},${t-n}
206
+ C${e},${t-n} ${e},${t} ${e-n},${t}
207
+ L${n},${t}
208
+ C${n},${t} 0,${t} 0,${t-n}
209
+ L0,${n}
210
+ C0,${n} 0,0 ${n},0
211
+ Z
212
+ `;return this.createPath(r)}createDiamond(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2;const m=[[n,0],[e,r],[n,t],[0,r]];return this.createPolygon(m)}createParallelogram(){let{paddingX:e}=this.node.getPaddingVale();e=e||this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize();const r=[[e,0],[t,0],[t-e,n],[0,n]];return this.createPolygon(r)}createRoundedRectangle(){let{width:e,height:t}=this.getNodeSize(),n=t/2;const r=`
213
+ M${n},0
214
+ L${e-n},0
215
+ A${t/2},${t/2} 0 0,1 ${e-n},${t}
216
+ L${n},${t}
217
+ A${t/2},${t/2} 0 0,1 ${n},0
218
+ `;return this.createPath(r)}createOctagonalRectangle(){let e=5,{width:t,height:n}=this.getNodeSize();const r=[[0,e],[e,0],[t-e,0],[t,e],[t,n-e],[t-e,n],[e,n],[0,n-e]];return this.createPolygon(r)}createOuterTriangularRectangle(){let{paddingX:e}=this.node.getPaddingVale();e=e||this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize();const r=[[e,0],[t-e,0],[t,n/2],[t-e,n],[e,n],[0,n/2]];return this.createPolygon(r)}createInnerTriangularRectangle(){let{paddingX:e}=this.node.getPaddingVale();e=e||this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize();const r=[[0,0],[t,0],[t-e/2,n/2],[t,n],[0,n],[e/2,n/2]];return this.createPolygon(r)}createEllipse(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2;const s=`
219
+ M${n},0
220
+ A${n},${r} 0 0,1 ${n},${t}
221
+ M${n},${t}
222
+ A${n},${r} 0 0,1 ${n},0
223
+ `;return this.createPath(s)}createCircle(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2;const s=`
224
+ M${n},0
225
+ A${n},${r} 0 0,1 ${n},${t}
226
+ M${n},${t}
227
+ A${n},${r} 0 0,1 ${n},0
228
+ `;return this.createPath(s)}}const T2=[_.SHAPE.RECTANGLE,_.SHAPE.DIAMOND,_.SHAPE.PARALLELOGRAM,_.SHAPE.ROUNDED_RECTANGLE,_.SHAPE.OCTAGONAL_RECTANGLE,_.SHAPE.OUTER_TRIANGULAR_RECTANGLE,_.SHAPE.INNER_TRIANGULAR_RECTANGLE,_.SHAPE.ELLIPSE,_.SHAPE.CIRCLE];function E2(){const i=this.getData("generalization");return Array.isArray(i)?i:i?[i]:[]}function M2(){return this.formatGetGeneralization().length>0}function S2(){return!!this.formatGetGeneralization().find(e=>!e.range||e.range.length<=0)}function z2(i){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===i.uid)}function C2(){if(this.isGeneralization||!this.checkHasGeneralization())return;let i=0,e=0;this.formatGetGeneralization().forEach((n,r)=>{let s=this._generalizationList[r];s||(s=this._generalizationList[r]={}),s.node=this,s.range=n.range,s.generalizationLine||(s.generalizationLine=this.lineDraw.path()),s.generalizationNode||(s.generalizationNode=new Ya({data:{inserting:n.inserting,data:n},uid:Wi(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),delete n.inserting,s.generalizationNode.generalizationBelongNode=this,s.generalizationNode.width>i&&(i=s.generalizationNode.width),s.generalizationNode.height>e&&(e=s.generalizationNode.height),n.isActive&&this.renderer.addNodeToActiveList(s.generalizationNode)}),this._generalizationNodeWidth=i,this._generalizationNodeHeight=e}function N2(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function L2(i){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();if(e.length<=0||this.getData("expand")===!1){this.removeGeneralization();return}e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode(),this.renderer.layout.renderGeneralization(this._generalizationList),this._generalizationList.forEach(t=>{this.style.generalizationLine(t.generalizationLine),t.generalizationNode.render(()=>{},i)})}function A2(){const i=this.getChildrenLength(),e=this.formatGetGeneralization(),t=[];e.forEach(n=>{if(!n.range){t.push(n);return}n.range.length>0&&n.range[0]<=i-1&&n.range[1]<=i-1&&t.push(n)}),t.length!==e.length&&this.setData({generalization:t})}function _2(){this.isGeneralization||(this._generalizationList.forEach(i=>{i.generalizationNode.style.onRemove(),i.generalizationLine&&(i.generalizationLine.remove(),i.generalizationLine=null),i.generalizationNode&&(this.renderer.removeNodeFromActiveList(i.generalizationNode),i.generalizationNode.remove(),i.generalizationNode=null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(".generalization_"+this.generalizationBelongNode.uid).remove())}function R2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.hide(),i.generalizationNode&&i.generalizationNode.hide()})}function D2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.show(),i.generalizationNode&&i.generalizationNode.show()})}function I2(i){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(i),e.generalizationNode.group.opacity(i)})}function O2(){const i=this.generalizationBelongNode,e=i.formatGetGeneralization(),t=i.getGeneralizationNodeIndex(this),n=e[t],s=this.getStyle("hoverRectColor")||this.mindMap.opt.hoverRectColor,a=s?{stroke:s}:null;Array.isArray(n.range)&&n.range.length>0?this.mindMap.renderer.highlightNode(i,n.range,a):this.mindMap.renderer.highlightNode(i,null,a)}function B2(){this.mindMap.renderer.closeHighlightNode()}const rh={formatGetGeneralization:E2,checkHasGeneralization:M2,checkHasSelfGeneralization:S2,getGeneralizationNodeIndex:z2,createGeneralizationNode:C2,updateGeneralization:N2,updateGeneralizationData:A2,renderGeneralization:L2,removeGeneralization:_2,hideGeneralization:R2,showGeneralization:D2,setGeneralizationOpacity:I2,handleGeneralizationMouseenter:O2,handleGeneralizationMouseleave:B2},P2='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M475.136 327.168v147.968h-147.968v74.24h147.968v147.968h74.24v-147.968h147.968v-74.24h-147.968v-147.968h-74.24z m36.864-222.208c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path></svg>',F2='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path><path d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>',H2='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M514.048 62.464q93.184 0 175.616 35.328t143.872 96.768 96.768 143.872 35.328 175.616q0 94.208-35.328 176.128t-96.768 143.36-143.872 96.768-175.616 35.328q-94.208 0-176.64-35.328t-143.872-96.768-96.768-143.36-35.328-176.128q0-93.184 35.328-175.616t96.768-143.872 143.872-96.768 176.64-35.328zM772.096 576.512q26.624 0 45.056-18.944t18.432-45.568-18.432-45.056-45.056-18.432l-192.512 0 0-192.512q0-26.624-18.944-45.568t-45.568-18.944-45.056 18.944-18.432 45.568l0 192.512-192.512 0q-26.624 0-45.056 18.432t-18.432 45.056 18.432 45.568 45.056 18.944l192.512 0 0 191.488q0 26.624 18.432 45.568t45.056 18.944 45.568-18.944 18.944-45.568l0-191.488 192.512 0z"></path></svg>',g0={open:P2,close:F2,quickCreateChild:H2};function U2(){if(this._openExpandNode)return;const{expandBtnSize:i,expandBtnIcon:e,isShowExpandNum:t}=this.mindMap.opt;let{close:n,open:r}=e||{};t?(this._openExpandNode=new Dt,this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:i/2,y:2})):(this._openExpandNode=mt(r||g0.open).size(i,i),this._openExpandNode.x(0).y(-i/2)),this._closeExpandNode=mt(n||g0.close).size(i,i),this._closeExpandNode.x(0).y(-i/2),this._fillExpandNode=new jr().size(i),this._fillExpandNode.x(0).y(-i/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function $2(i=[]){return i.reduce((e,t)=>e+this.sumNode(t.children||[]),i.length)}function G2(){let{expand:i}=this.getData();if(i===this._lastExpandBtnType)return;this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent();let e;if(i===!1?(e=this._openExpandNode,this._lastExpandBtnType=!1):(e=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn){let{isShowExpandNum:t,expandBtnStyle:n,expandBtnNumHandler:r}=this.mindMap.opt;if(t)if(i)this._fillExpandNode.stroke("none");else{this._fillExpandNode.stroke({color:n.strokeColor});let s=this.sumNode(this.nodeData.children||[]);if(typeof r=="function"){const a=r(s,this);Dn(a)||(s=a)}e.text(String(s))}this._expandBtn.add(this._fillExpandNode).add(e)}}function q2(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function W2(){this.getChildrenLength()<=0||this.isRoot||(this._expandBtn?this.group.add(this._expandBtn):(this._expandBtn=new Ut,this._expandBtn.on("mouseover",i=>{i.stopPropagation(),this._expandBtn.css({cursor:"pointer"})}),this._expandBtn.on("mouseout",i=>{i.stopPropagation(),this._expandBtn.css({cursor:"auto"})}),this._expandBtn.on("click",i=>{i.stopPropagation(),this.mindMap.execCommand("SET_NODE_EXPAND",this,!this.getData("expand")),this.mindMap.emit("expand_btn_click",this)}),this._expandBtn.on("dblclick",i=>{i.stopPropagation()}),this._expandBtn.addClass("smm-expand-btn"),this.group.add(this._expandBtn)),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())}function Y2(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function X2(){const{alwaysShowExpandBtn:i,notShowExpandBtn:e}=this.mindMap.opt;i||e||setTimeout(()=>{this.renderExpandBtn()},0)}function V2(){const{alwaysShowExpandBtn:i,notShowExpandBtn:e}=this.mindMap.opt;if(i||this._isMouseenter||e)return;let{isActive:t,expand:n}=this.getData();!t&&n&&setTimeout(()=>{this.removeExpandBtn()},0)}const sh={createExpandNodeContent:U2,updateExpandBtnNode:G2,updateExpandBtnPos:q2,renderExpandBtn:W2,removeExpandBtn:Y2,showExpandBtn:X2,hideExpandBtn:V2,sumNode:$2};function j2(i={}){this.mindMap.execCommand("SET_NODE_DATA",this,i)}function K2(i,e,t){this.mindMap.execCommand("SET_NODE_TEXT",this,i,e,t)}function Z2(i){this.mindMap.execCommand("SET_NODE_IMAGE",this,i)}function Q2(i){this.mindMap.execCommand("SET_NODE_ICON",this,i)}function J2(i,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,i,e)}function e6(i){this.mindMap.execCommand("SET_NODE_NOTE",this,i)}function t6(i,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,i,e)}function i6(i){this.mindMap.execCommand("SET_NODE_TAG",this,i)}function n6(i){this.mindMap.execCommand("SET_NODE_SHAPE",this,i)}function r6(i,e){this.mindMap.execCommand("SET_NODE_STYLE",this,i,e)}function s6(i){this.mindMap.execCommand("SET_NODE_STYLES",this,i)}const ah={setData:j2,setText:K2,setImage:Z2,setIcon:Q2,setHyperlink:J2,setNote:e6,setAttachment:t6,setTag:i6,setShape:n6,setStyle:r6,setStyles:s6},a6='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M435.484444 251.733333v68.892445L295.822222 320.682667a168.504889 168.504889 0 0 0-2.844444 336.952889h142.506666v68.892444H295.822222a237.397333 237.397333 0 0 1 0-474.794667h139.662222z m248.945778 0a237.397333 237.397333 0 0 1 0 474.851556H544.654222v-69.006222l139.776 0.056889a168.504889 168.504889 0 0 0 2.844445-336.952889H544.597333V251.676444h139.776z m-25.827555 203.946667a34.474667 34.474667 0 0 1 0 68.892444H321.649778a34.474667 34.474667 0 0 1 0-68.892444h336.952889z" ></path></svg>',o6='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M152.768 985.984 152.768 49.856l434.56 0 66.816 0 234.048 267.392 0 66.816 0 601.92L152.768 985.984 152.768 985.984zM654.144 193.088l0 124.16 108.736 0L654.144 193.088 654.144 193.088zM821.312 384.064l-167.168 0L587.328 384.064 587.328 317.312 587.328 116.736 219.584 116.736 219.584 919.04l601.728 0L821.312 384.064 821.312 384.064zM386.688 517.888 319.808 517.888 319.808 450.944l66.816 0L386.624 517.888 386.688 517.888zM386.688 651.584 319.808 651.584 319.808 584.704l66.816 0L386.624 651.584 386.688 651.584zM386.688 785.344 319.808 785.344l0-66.88 66.816 0L386.624 785.344 386.688 785.344zM721.024 517.888 453.632 517.888 453.632 450.944l267.392 0L721.024 517.888 721.024 517.888zM654.144 651.584 453.632 651.584 453.632 584.704l200.512 0L654.144 651.584 654.144 651.584zM620.672 785.344l-167.04 0 0-66.88 167.04 0L620.672 785.344 620.672 785.344z" ></path></svg>',l6='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" width="128" height="128"><path d="M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z" ></path></svg>',Td=[{name:"优先级图标",type:"priority",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#E93B30"></path><path d="M580.309333 256h-75.52c-10.666667 29.824-30.165333 55.765333-58.709333 78.165333-28.416 22.314667-54.869333 37.418667-79.146667 45.397334v84.608a320 320 0 0 0 120.234667-70.698667v352.085333H580.266667V256z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.957333 1024C229.248 1024 0 794.752 0 512S229.248 0 511.957333 0C794.752 0 1024 229.248 1024 512s-229.248 512-512.042667 512z" fill="#FA8D2E"></path><path d="M667.946667 658.602667h-185.301334c4.864-8.533333 11.178667-17.066667 19.072-25.984 7.808-8.874667 26.453333-26.837333 55.936-53.888 29.525333-27.008 49.877333-47.786667 61.226667-62.165334 16.981333-21.717333 29.44-42.453333 37.290667-62.293333 7.808-19.84 11.776-40.746667 11.776-62.677333 0-38.570667-13.738667-70.741333-41.088-96.725334C599.466667 268.928 561.706667 256 513.834667 256c-43.690667 0-80.128 11.136-109.354667 33.578667-29.098667 22.4-46.506667 59.306667-52.010667 110.805333l93.184 9.301333c1.792-27.349333 8.405333-46.890667 19.754667-58.624 11.434667-11.776 26.837333-17.664 46.165333-17.664 19.541333 0 34.858667 5.589333 45.909334 16.768 11.136 11.264 16.682667 27.221333 16.682666 48.042667 0 18.858667-6.4 37.930667-19.242666 57.258667-9.472 14.037333-35.157333 40.533333-77.098667 79.872-52.096 48.554667-87.04 87.509333-104.704 116.821333A226.688 226.688 0 0 0 341.333333 745.429333h326.613334v-86.826666z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#2E66FA"></path><path d="M627.754667 731.733333c-29.354667 25.088-66.901333 37.632-112.725334 37.632-44.928 0-81.792-11.52-110.592-34.773333-33.066667-26.538667-49.877333-64.469333-50.304-114.133333h92.16c0.426667 21.76 7.552 38.314667 21.333334 49.664 12.288 10.88 28.117333 16.341333 47.402666 16.341333 20.309333 0 36.778667-6.101333 49.322667-18.432 12.544-12.330667 18.773333-29.568 18.773333-51.797333 0-21.290667-6.229333-38.186667-18.773333-50.773334-12.544-12.501333-29.866667-18.773333-52.138667-18.773333h-13.525333v-80.042667H512c42.112 0 63.274667-21.034667 63.274667-63.146666 0-20.309333-5.888-36.096-17.706667-47.445334a60.757333 60.757333 0 0 0-43.818667-17.066666c-17.493333 0-32 5.504-43.434666 16.298666-11.562667 10.88-17.792 25.728-18.773334 44.714667H359.68c0.981333-43.946667 16.042667-78.976 45.397333-104.96 29.354667-25.941333 65.706667-39.04 109.226667-39.04 44.928 0 81.792 13.525333 110.592 40.490667 28.8 26.922667 43.306667 61.610667 43.306667 104.149333 0 48.213333-19.413333 82.688-58.154667 103.552 43.52 23.125333 65.28 61.44 65.28 114.858667 0 48.128-15.957333 85.76-47.573333 112.682666z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M600.96 256v309.802667h60.117333v81.536h-60.16v98.218666h-90.154666v-98.218666H311.466667v-81.237334L522.666667 256h78.293333zM510.72 399.104l-112.042667 166.698667h112.042667V399.104z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M470.912 343.552h175.786667V256H400.256l-47.786667 253.952 75.434667 10.837333c21.205333-23.552 45.269333-35.413333 72.021333-35.413333 21.546667 0 38.997333 7.509333 52.437334 22.4 13.312 15.018667 20.053333 37.418667 20.053333 67.328 0 31.872-6.741333 55.765333-20.181333 71.552-13.397333 15.872-29.866667 23.765333-49.237334 23.765333-17.066667 0-32.085333-6.186667-45.013333-18.432-13.013333-12.373333-20.821333-29.013333-23.466667-50.133333L341.333333 611.498667c5.546667 40.874667 22.485333 73.429333 50.730667 97.621333 28.330667 24.32 64.938667 36.437333 109.866667 36.437333 56.149333 0 100.053333-21.546667 131.754666-64.554666a176.64 176.64 0 0 0 34.816-107.52c0-48.042667-14.378667-87.210667-43.221333-117.333334-28.8-30.208-63.957333-45.312-105.514667-45.312-21.674667 0-42.922667 5.248-63.829333 15.616l14.976-82.901333z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512 0c282.88 0 512 229.205333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M519.210667 256c36.992 0 67.626667 10.368 91.776 31.189333 24.192 20.821333 39.68 51.029333 46.293333 90.709334l-90.197333 9.984c-2.176-18.56-7.978667-32.298667-17.28-41.173334-9.258667-8.874667-21.418667-13.226667-36.224-13.226666-19.754667 0-36.437333 8.789333-50.048 26.453333-13.696 17.664-22.314667 54.613333-25.856 110.549333 23.296-27.52 52.138667-41.258667 86.656-41.258666 38.997333 0 72.362667 14.805333 100.181333 44.544 27.733333 29.696 41.685333 68.010667 41.685333 114.858666 0 49.877333-14.634667 89.856-43.818666 119.936-29.226667 30.208-66.730667 45.226667-112.554667 45.226667-49.066667 0-89.429333-19.072-121.130667-57.344C357.12 658.218667 341.333333 595.541333 341.333333 508.416c0-89.344 16.469333-153.813333 49.493334-193.194667C423.722667 275.754667 466.56 256 519.168 256z m-9.472 241.834667c-17.962667 0-33.066667 6.997333-45.525334 21.12-12.330667 14.037333-18.56 34.858667-18.56 62.293333 0 30.421333 6.912 53.76 20.906667 70.4 13.952 16.469333 29.866667 24.746667 47.786667 24.746667 17.28 0 31.701333-6.826667 43.178666-20.309334 11.52-13.525333 17.237333-35.669333 17.237334-66.56 0-31.658667-6.186667-54.869333-18.517334-69.546666a58.197333 58.197333 0 0 0-46.506666-22.144z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.752 0 512S229.248 0 512.042667 0C794.752 0 1024 229.248 1024 512s-229.248 512-511.957333 512z" fill="#6D768D"></path><path d="M673.024 273.066667H354.133333v86.869333h212.224a691.2 691.2 0 0 0-104.746666 187.989333c-26.026667 70.101333-39.978667 138.88-41.429334 206.293334h89.6c-0.298667-42.922667 6.698667-91.776 21.034667-146.474667a654.72 654.72 0 0 1 62.08-154.965333c27.136-48.554667 53.888-85.76 80.128-111.701334V273.066667z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z" fill="#6D768D"></path><path d="M512.426667 256c46.208 0 82.048 11.861333 107.605333 35.541333 25.6 23.68 38.314667 53.674667 38.314667 89.898667 0 22.613333-5.802667 42.666667-17.578667 60.330667a111.445333 111.445333 0 0 1-49.450667 40.277333c26.965333 10.837333 47.36 26.752 61.312 47.658667 13.994667 20.906667 21.034667 45.013333 21.034667 72.362666 0 45.098667-14.336 81.834667-42.965333 109.952-28.586667 28.245333-66.602667 42.368-114.090667 42.368-44.245333 0-81.066667-11.648-110.464-34.986666-34.645333-27.52-52.010667-65.28-52.010667-113.365334 0-26.368 6.528-50.645333 19.626667-72.746666 13.056-22.144 33.578667-39.210667 61.696-51.242667-24.064-10.154667-41.557333-24.192-52.48-41.941333a109.824 109.824 0 0 1-16.512-58.666667c0-36.224 12.757333-66.218667 37.973333-89.898667 25.386667-23.68 61.354667-35.541333 108.032-35.541333z m1.28 265.429333c-22.784 0-39.722667 7.978667-50.901334 23.893334-11.136 15.786667-16.64 33.066667-16.64 51.498666 0 25.984 6.485333 46.208 19.712 60.714667 13.098667 14.506667 29.525333 21.802667 49.152 21.802667 19.242667 0 35.157333-6.997333 47.786667-20.992 12.629333-13.909333 18.858667-34.048 18.858667-60.416 0-23.082667-6.314667-41.557333-19.2-55.466667a63.274667 63.274667 0 0 0-48.725334-21.034667z m-0.341334-191.488c-17.792 0-32 5.333333-42.581333 16-10.538667 10.666667-15.872 24.746667-15.872 42.325334 0 18.645333 5.248 33.152 15.701333 43.648 10.453333 10.453333 24.362667 15.658667 41.770667 15.658666 17.664 0 31.658667-5.290667 42.24-15.872 10.538667-10.581333 15.872-25.173333 15.872-43.818666 0-17.493333-5.248-31.573333-15.701333-42.154667s-24.277333-15.786667-41.429334-15.786667z" fill="#FFFFFF"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.333333 229.248 0 512 0c282.88 0 512 229.333333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M497.28 256c49.365333 0 89.856 19.157333 121.429333 57.429333 31.701333 38.229333 47.488 101.205333 47.488 188.842667 0 89.173333-16.384 153.386667-49.365333 192.853333-32.853333 39.594667-75.605333 59.264-128.426667 59.264-37.888 0-68.608-10.154667-91.989333-30.506666s-38.4-50.816-45.013333-91.306667l90.112-9.984c2.261333 18.474667 8.021333 32.085333 17.28 41.088 9.173333 8.874667 21.418667 13.312 36.608 13.312 19.2 0 35.541333-8.874667 48.981333-26.752 13.44-17.749333 22.016-54.613333 25.770667-110.549333-23.466667 27.264-52.821333 40.874667-88.064 40.874666-38.314667 0-71.253333-14.72-99.114667-44.330666C355.242667 506.709333 341.333333 468.224 341.333333 420.864c0-49.493333 14.592-89.258667 43.946667-119.466667C414.549333 271.104 451.925333 256 497.237333 256z m-4.352 77.482667c-17.237333 0-31.658667 6.826667-43.008 20.437333-11.477333 13.653333-17.194667 35.84-17.194667 66.816 0 31.402667 6.229333 54.485333 18.645334 69.205333 12.458667 14.72 27.946667 22.101333 46.592 22.101334 18.005333 0 33.066667-7.082667 45.44-21.205334 12.330667-14.208 18.432-35.029333 18.432-62.506666 0-29.994667-6.912-53.376-20.821334-69.973334-13.824-16.597333-29.866667-24.874667-48.085333-24.874666z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M619.946667 273.066667c46.976 0 83.754667 16.042667 110.250666 48.042666 31.573333 37.973333 47.36 100.864 47.36 188.672 0 87.722667-15.829333 150.698667-47.658666 189.056-26.325333 31.616-62.976 47.36-109.952 47.36-47.274667 0-85.418667-17.237333-114.346667-51.968-28.885333-34.602667-43.392-96.426667-43.392-185.386666 0-87.168 15.872-150.016 47.701333-188.416 26.282667-31.488 62.933333-47.36 110.037334-47.36z m-207.488 12.8v452.266666H325.504V411.690667A299.904 299.904 0 0 1 213.333333 476.373333V398.933333c22.656-7.296 47.36-21.12 73.856-41.514666 26.624-20.522667 44.842667-44.288 54.784-71.552h70.485334z m207.488 60.842666c-11.306667 0-21.461333 3.413333-30.336 10.24-8.874667 6.826667-15.786667 19.157333-20.693334 36.864-6.4 22.997333-9.642667 61.653333-9.642666 115.968 0 54.442667 2.944 91.733333 8.661333 112.128 5.802667 20.352 13.098667 33.877333 21.845333 40.618667 8.789333 6.741333 18.858667 10.154667 30.165334 10.154667 11.349333 0 21.376-3.498667 30.250666-10.325334 8.874667-6.826667 15.786667-19.157333 20.693334-36.778666 6.4-22.826667 9.642667-61.354667 9.642666-115.797334 0-54.314667-2.858667-91.648-8.661333-112.042666-5.802667-20.352-13.013333-33.962667-21.76-40.789334a47.616 47.616 0 0 0-30.165333-10.24z" fill="#FFFFFF"></path></svg>'}]},{name:"进度图标",type:"progress",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144-294.144A414.72 414.72 0 0 1 928 512c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512h416c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144 294.144A414.72 414.72 0 0 1 512 928z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96v832z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512l-294.144 294.144A414.72 414.72 0 0 1 96 512c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512H96c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512L217.856 217.856A414.72 414.72 0 0 1 512 96V512z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#12BB37"></path><path d="M716.629333 341.333333h-51.328a35.072 35.072 0 0 0-28.330666 14.293334l-171.989334 233.984-77.909333-106.026667a35.2 35.2 0 0 0-28.330667-14.293333H307.413333c-7.082667 0-11.264 7.936-7.082666 13.653333l136.32 185.472a35.2 35.2 0 0 0 56.533333 0l230.4-313.429333a8.533333 8.533333 0 0 0-6.954667-13.653334z" fill="#FFFFFF"></path></svg>'}]},{name:"表情图标",type:"expression",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024"><path d="M1.097856 1.097642h1021.804717v1021.804716H1.097856z" fill="#F09495" ></path><path d="M1024.000214 1024H0.000214V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.195498v1019.609432z" fill="#FFFFFF" ></path><path d="M234.695985 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M234.695985 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115s28.339115 12.772559 28.339115 28.339115c0.099786 15.666342-12.672773 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617-11.774703-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M776.232528 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M776.232528 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115 15.666342 0 28.339115 12.772559 28.339115 28.339115 0 15.666342-12.772559 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617c-0.099786-14.468914-11.874488-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M512.000214 671.656987c-52.58702 0-105.872539-17.961411-105.872539-52.387449S459.413194 566.882089 512.000214 566.882089s105.872539 17.961411 105.87254 52.387449S564.587234 671.656987 512.000214 671.656987z m0-74.240499c-21.952836 0-43.207172 3.592282-58.2748 9.77899-13.870201 5.68778-17.06334 11.275775-17.06334 12.07406s3.19314 6.386279 17.06334 12.07406c15.067628 6.186708 36.321965 9.77899 58.2748 9.77899s43.207172-3.592282 58.274801-9.77899c13.870201-5.68778 17.06334-11.275775 17.06334-12.07406s-3.19314-6.386279-17.06334-12.07406c-15.067628-6.286494-36.321965-9.77899-58.274801-9.77899z" fill="#040000" ></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#E6A6C9" ></path><path d="M315.1 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM738.7 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM293.5 698.8l-14.5-1.3c0.1-0.6 1.5-14.6 15.1-27.9 17.2-16.7 45-24.8 82.7-24 4.9-0.1 10.9-10.5 16.1-19.6 8.4-14.7 19-33.1 37.9-34.3 19.4-1.2 42.2 16.4 71.5 55.4 9.9 5.2 16.5 11.2 21.8 16.1 8.4 7.7 13.1 11.9 25.1 10.8 14.9-1.4 38.9-11.1 77.5-31.4 26.8-28.4 56.4-41.4 83.5-36.6 27.9 4.9 50.6 27.6 67.5 67.5l-13.4 5.7c-14.7-34.5-34.3-54.9-56.7-58.8-22.3-3.9-47.6 7.8-71.2 33.1l-0.8 0.9-1.1 0.6c-85.6 45.1-99.4 38-120.2 19.1-5.5-5-11.2-10.2-20.1-14.7l-1.5-0.8-1-1.4c-32.2-43.2-50.4-51.6-60-51-11.1 0.7-18.8 14-26.2 27-7.6 13.2-15.4 26.9-28.8 26.9h-0.2c-78.4-1.6-83 38.3-83 38.7z" fill="#040000" ></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#F7E983" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M329.174412 344.491728a38.118106 10.277919 57.6 1 0 17.355867-11.014369 38.118106 10.277919 57.6 1 0-17.355867 11.014369Z" fill="#040000" ></path><path d="M644.769475 355.956059a11.175989 36.321965 30 1 0 36.321965-62.911488 11.175989 36.321965 30 1 0-36.321965 62.911488Z" fill="#040000" ></path><path d="M569.678445 671.158059c-26.343403 0-51.190021-5.288638-70.049503-14.967843-20.755408-10.577275-32.230754-25.445332-32.230755-41.710388 0-16.265056 11.475346-31.133112 32.230755-41.710387 18.859482-9.579419 43.805886-14.967843 70.049503-14.967843s51.190021 5.288638 70.049503 14.967843c20.755408 10.577275 32.230754 25.445332 32.230754 41.710387 0 16.265056-11.475346 31.133112-32.230754 41.710388-18.859482 9.679205-43.805886 14.967843-70.049503 14.967843z m0-95.095693c-49.693237 0-84.318846 20.356266-84.318846 38.517248s34.625609 38.517248 84.318846 38.517248 84.318846-20.356266 84.318846-38.517248-34.725395-38.517248-84.318846-38.517248z" fill="#040000" ></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#A6D9E2" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M376.194134 348.950302m-23.44962 0a23.44962 23.44962 0 1 0 46.89924 0 23.44962 23.44962 0 1 0-46.89924 0Z" fill="#040000" ></path><path d="M629.150672 348.950302m-24.647047 0a24.647047 24.647047 0 1 0 49.294095 0 24.647047 24.647047 0 1 0-49.294095 0Z" fill="#040000" ></path><path d="M397.847613 603.503411c13.471058 8.282206 28.738258 14.468914 43.7061 19.458195 29.835899 9.978562 62.266225 14.169558 93.299551 7.483921 21.054765-4.490353 40.213604-14.369129 56.778016-28.039758 6.785422-5.587995-2.893783-15.167414-9.579419-9.579419-46.999026 38.916391-112.258819 31.033327-163.847983 6.086922-4.590138-2.195284-9.080491-4.490353-13.371272-7.184564-7.583707-4.590138-14.468914 7.184564-6.984993 11.774703z" fill="#040000" ></path><path d="M627.753674 534.052621c-31.033327 24.048334-58.474371 68.253362-37.419607 106.970182 10.577275 19.35841 29.835899 32.629897 48.795167 42.708244 7.982849 4.190996 15.067628-7.883064 7.084779-12.07406-25.245761-13.271487-53.485091-35.324108-49.094524-66.557006 2.793997-20.156695 15.766127-37.319821 29.736114-51.190022 3.392711-3.392711 6.984993-6.785422 10.776847-9.77899 2.993569-2.295069 2.394855-7.483921 0-9.878776-2.893783-3.19314-6.885208-2.49464-9.878776-0.199572z" fill="#040000" ></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#AD6F59" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M411.829832 330.730879a38.118106 10.277919 57.6 1 0 17.355867-11.014368 38.118106 10.277919 57.6 1 0-17.355867 11.014368Z" fill="#040000" ></path><path d="M480.669675 609.989476c11.774703-25.844475 27.740401-51.788735 44.60417-73.342429 13.770415-17.462483 29.237186-33.92711 47.897096-44.803742 17.262912-10.078347 35.324108-13.67063 54.283376-6.58585 11.974274 4.390567 23.948548 14.468914 33.128825 24.547261 14.369129 15.865913 25.145975 34.625609 34.725394 53.684662 4.290782 8.581563 17.262912 0.997856 12.972131-7.583707-15.167414-30.334828-35.224323-63.763009-66.157864-80.327421-21.054765-11.37556-44.504385-11.475346-66.157864-1.895927-21.054765 9.280062-38.617034 25.644904-53.485091 42.907815-14.468914 16.863769-27.041902 35.324108-38.217891 54.582733-5.887351 10.178133-11.674917 20.555837-16.464627 31.232898-1.696355 3.692068-0.997856 7.982849 2.694212 10.277918 3.19314 1.895927 8.581563 0.898071 10.178133-2.694211z" fill="#040000" ></path><path d="M663.863649 338.091735a14.468914 33.727538 30 1 0 33.727538-58.417811 14.468914 33.727538 30 1 0-33.727538 58.417811Z" fill="#040000" ></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#83CEE3" ></path><path d="M369 375.8m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M369 411.7c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.1 36-36 36z m0-69.1c-18.3 0-33.2 14.9-33.2 33.2S350.7 409 369 409s33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M672.2 333.6c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.3-7.6-13zM578.2 720.9c-12.5-96.7-33.3-154.7-55.6-155.6-8.8 3.9-22.3 17.5-37.7 60.1-10.8 29.8-18.4 62.2-23 81.6-1.2 5.1-2.1 9.1-2.9 11.8l-9.3-2.4c0.7-2.6 1.6-6.6 2.8-11.6 14.9-63 36-136.8 67.5-148.8l0.8-0.3h0.8c18.2-0.4 33.2 19.5 45.8 60.8 10.2 33.3 16.7 74.6 20.5 103.3l-9.7 1.1z" fill="#040000" ></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#8CC66D" ></path><path d="M375.778679 404.47473a14.5 33.8 30 1 0 33.8-58.543317 14.5 33.8 30 1 0-33.8 58.543317Z" fill="#040000" ></path><path d="M627.220263 374.211388a43.1 11.6 57.6 1 0 19.588408-12.431182 43.1 11.6 57.6 1 0-19.588408 12.431182Z" fill="#040000" ></path><path d="M451.1 548.5c17.6-9.3 63.9-30 105.3-16.2 17 20.3 32.7 98.8 28.8 138.1-27.5 10.2-82.5 10.2-106.1 5.8-8.3-10.5-32.7-81.8-35.3-114.6-0.4-5.5 2.5-10.6 7.3-13.1z" fill="#040000" ></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#5A74B8" ></path><path d="M357.7 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M357.7 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2 33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M676 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M676 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2c18.3 0 33.2-14.9 33.2-33.2s-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M347.6 684.1c0.3-0.9 0.6-1.7 0.9-2.6 0.2-0.5 1.4-3.2 0.3-0.8 0.6-1.4 1.3-2.9 2-4.3 3.2-6.3 6-10.7 10.9-15.3 4.3-4 10.8-7.5 17.1-6.1 3.9 0.9 7.9 4.9 11.1 7.2 3.1 2.2 6.3 4.5 9.7 6.2 7.5 3.8 15.3 4.4 23.4 1.9 4.7-1.5 9.2-3.6 13.6-5.9 5-2.6 10.7-5 14.2-9.5 4.5-5.7 6.1-8.5 11.4-14.1 1-1 2-2 3.1-3 0.2-0.2 2.2-1.7 0.6-0.5 0.6-0.4 1.2-0.9 1.8-1.3 1-0.6 2.1-1.3 3.2-1.7-2 0.8 0.2 0 0.6-0.1 2.3-0.7-0.3-0.2 1.2-0.3 2.8-0.1 3.6 0 5.5 1 3.8 1.9 6.6 4.7 9.5 7.8 4.5 5 7.5 11.1 11.7 16.2 1.8 2.2 3.7 4.3 5.4 6.5 8.1 10.3 17.7 22.2 32.2 22 8.8-0.1 16.6-5.2 22.6-11.2 4.2-4.1 7.7-8.9 11-13.7 2.9-4.2 4.6-9.9 6.2-13.5 3.2-7.1 7.2-13.1 13-18.1 4.8-4.2 11.1-6.5 16.7-5.3 10.5 2.4 17.2 12.1 23.1 20.2 4.7 6.5 9.8 13 16 18.2 7.8 6.4 17.1 11.4 27.5 11.1 14.1-0.4 25.5-9.5 34.2-19.9 3-3.6 3.6-8.8 0-12.4-3.1-3.1-9.4-3.7-12.4 0-6.3 7.6-14.7 15.9-24.9 14.7-2.2-0.3-5.3-1.5-7.9-3.1-3.5-2.1-6.1-4.4-9.1-7.5-4.9-5.1-6.8-8.1-10.9-13.8-7.3-10.1-16.1-19.6-28.2-23.7-18.5-6.3-35.7 5.6-46 20.1-2.4 3.3-4.4 6.9-6.1 10.6-1.8 3.9-2.7 8.5-5.2 11.9-3.1 4.4-6.2 8.8-10.2 12.5-3 2.8-5.7 4.4-8.6 5.1-0.4 0.1-1.7 0.1 0.1 0h-2.2c2.1 0.1 0 0-0.5-0.1-0.7-0.2-1.4-0.4-2-0.6 1.8 0.7-1.8-1.1-2.4-1.5l-1.2-0.9c1.5 1.2-0.9-0.9-1.2-1.1-4.7-4.3-8.4-9.5-12.3-14.4-10.9-13.6-20.9-34-41-34.9-14.2-0.6-24.5 10.6-32.4 20.8-1.2 1.6-2.5 3.2-3.7 4.8-1.5 1.9 1.1-1.4-0.4 0.5-0.4 0.5-0.8 1.2-1.3 1.6-1.7 1.4-4.6 2.6-6.6 3.6-2.9 1.6-5.9 3.2-9 4.5-1.6 0.7-3.4 1.2-5.1 1.7-2.2 0.6-0.7 0.5-2.8 0.4-2.8 0-3.9-0.4-6.6-1.9-3.9-2.2-7.5-4.9-11.1-7.5-5.6-4-10-6.9-17-7.5-10.5-0.9-20.3 3.2-28.2 9.9-9.4 8.1-16.4 20.2-20.1 32-3.6 11.2 13.3 15.8 16.8 5.1z" fill="#040000" ></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F0884F" ></path><path d="M287.2 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM598 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM505.9 527.1c3.4 0.7 6.8 1.7 10.2 2.8 6.7 2.2 10.4 3.5 16.6 7.7 1.6 1.1-0.5-0.5 0.6 0.5 0.6 0.5 1.1 1.1 1.7 1.6 1.5 1.4-0.1-0.4 0.5 0.6 0.4 0.6 0.7 1.2 1 1.8-1-2 0.1 0 0 0.5 0.1-2-0.1 0-0.1 0-0.1 0.8 0 0.7 0.1-0.5-0.1 0.4-0.1 0.7-0.3 1.1-0.6 1 0.7-0.9-0.4 1-1.6 2.5-4.6 5.4-8.1 7.8-6.8 4.6-14.4 8.2-22 11.4-7 3-7.4 11.9 0 14.8 7.4 2.8 15 5.3 22.4 8.1 3.1 1.1 4.2 1.5 6.9 2.9 1.1 0.6 2.1 1.2 3.2 1.8 1.2 0.8-0.7-0.5 0.1 0 0.4 0.3 0.8 0.7 1.1 1.1 0.6 0.8-1.1-1.2-0.2-0.2 0.8 0.9-0.3-1.4-0.1-0.2 0.1 0.9 0.2-1.9 0-0.9-0.1 0.5-0.8 1.8 0 0.2-0.2 0.5-0.5 1-0.8 1.4-0.3 0.3-0.9 1.3-0.3 0.5-0.5 0.7-1.1 1.3-1.7 1.9-6.9 7.3-15.9 12.8-24.4 18.1-8.3 5.3-0.6 18.5 7.7 13.2 9.9-6.3 20.9-12.8 28.6-21.8 4.8-5.5 8.1-12.9 4.2-19.9-3.4-6-10.5-8.9-16.6-11.4-8.6-3.5-17.5-6.2-26.2-9.5v14.8c14.4-6.1 47.2-18.8 41.2-40.3-3.5-12.9-19.4-18.9-30.8-22.6-3.4-1.1-6.9-2.1-10.5-2.9-9.1-2.2-13.3 12.5-3.6 14.6z" fill="#040000" ></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F6F180" ></path><path d="M342.9 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M342.9 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.7 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.6-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M702 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M702 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.8 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.7-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M358.7 519.9c20 22 45.5 40.4 71.3 54.8 51.2 28.5 111.7 39.9 168 19.5 44.3-16.1 80.7-47.8 110.2-83.9 3-3.7 3.6-8.9 0-12.5-3.1-3.1-9.5-3.7-12.5 0-25.5 31.4-56.2 59.7-93.7 76-27.1 11.7-56.6 15.7-85.8 12.2-24.7-2.9-49.5-11.8-71.5-23.4-18.7-9.8-36.6-22.2-51.1-34.3-7.8-6.5-15.5-13.3-22.4-20.9-7.7-8.5-20.1 4.1-12.5 12.5z" ></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M48.2 844.9c-68.5-210.6 186-782.1 409.1-795.4 6.3-0.4 12.5 0.2 18.6 1.6C665.1 94.6 985.4 515 987.1 821.3c0.1 20-12.9 37.9-22.4 43.1-162.7 89.8-605.8 179.7-884.4 30.9-15-7.9-24.2-26.1-32.1-50.4z" fill="#F0884F" ></path><path d="M401 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M408.7 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M527.5 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M527.5 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M450.7 517c1.1-8.2 3.2-16.4 6.1-24.1 0.1-0.3 1-2.5 0.5-1.4s0.3-0.7 0.5-1c0.7-1.4 1.4-2.8 2.2-4.1 0.4-0.8 2.8-3.9 1.3-2.1 0.8-1 1.7-1.9 2.6-2.8 1-1-1.5 1 0.1 0 0.5-0.3 1-0.6 1.5-0.8-1.3 0.7-1.2 0.3 0 0.1 1.9-0.3-1.8 0.3 0.1 0 1.2-0.2 1.5 0.3 0-0.1 0.6 0.2 1.3 0.3 1.9 0.5 0.3 0.1-1.3-0.7 0.2 0.1 0.8 0.5 1.6 0.9 2.4 1.4 1.4 1 0-0.1 1.4 1.1 0.9 0.8 1.8 1.7 2.6 2.6 1.8 1.9 3.5 3.9 5 6.1 5.1 7.1 9.3 14.8 13.2 22.6 3.5 6.9 13.7 4.7 15.8-2.1 2.6-8.7 4.8-17.4 7.4-26.1 0.9-3.2 1.9-6.4 3.2-9.4-0.7 1.6 0.8-1.6 1.2-2.2l0.9-1.5c0.7-1.2-1.4 0.7 0.1-0.1 1.7-0.9-1.2 0.3-0.3 0.1 0.8-0.2 1-1.2 0.3-0.3-0.6 0.8 0.6 0-0.5 0.2-2 0.3 2.4 0.5-1.1 0 0.5 0.1 1.2 0.2 1.6 0.4-1.1-0.8-0.8-0.4 0.2 0.2 0.7 0.4 3.4 2.3 2.7 1.8 8.9 7.1 15.9 16.9 22.5 26 2.8 3.8 7.5 5.6 11.8 3.1 3.7-2.2 5.9-8 3.1-11.8-8.2-11.1-16.6-23-27.7-31.4-6.3-4.7-14.5-7.6-21.7-3-6.7 4.2-9.6 12.5-11.9 19.6-3.2 9.9-5.5 20-8.6 29.9 5.3-0.7 10.5-1.4 15.8-2.1-7.8-15.5-24.8-50.1-48-41.7-14.1 5.1-19.7 23-22.9 36.2-0.9 3.8-1.8 7.7-2.3 11.6-0.6 4.6 1.1 9.3 6 10.6 4.2 1 10.2-1.5 10.8-6.1z" fill="#040000" ></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M485.538528 993.072489a362.00362 481.804818 3.149 1 0 52.933731-962.15464 362.00362 481.804818 3.149 1 0-52.933731 962.15464Z" fill="#AADCF0" ></path><path d="M688.2 334.1c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.4-7.6-13zM375.8 347c13.4 6.8 26.7 14 39.5 21.9 1.8 1.2 3.7 2.3 5.5 3.5 0.9 0.6 1.7 1.2 2.6 1.8 0.9 0.6 1.9 1.4 1.6 1.1 1.1 0.9 2.1 1.9 3.1 2.8 1.2 1 0-0.3 0.1 0 0-0.2-0.8-2.4-0.3-4.1 1.5-5.5 2.3-2.7 0.8-2-0.4 0.2-0.9 0.8-1.3 1.1 1.7-1.4-1.6 1.1-2.3 1.6-3.4 2.3-6.9 4.4-10.4 6.4-14.9 8.6-30.3 16.4-45.6 24.3-8.6 4.4-1 17.4 7.6 13 15-7.7 30.1-15.4 44.8-23.8 6.2-3.6 13.8-7.3 18.7-12.7 7.6-8.3-3.8-16.6-9.9-20.9-8.7-6.1-18-11.3-27.3-16.4-6.5-3.6-13-7.1-19.6-10.4-8.6-4.5-16.3 8.5-7.6 12.8zM412.8 570.9c13.5 7.7 28.5 13.3 43.3 17.9 29.8 9.2 61.7 13.1 92.6 7.3 20.6-3.9 40-12.5 56.6-25.2 2.8-2.2 4.3-5.6 2.3-9-1.6-2.8-6.2-4.5-9-2.3-48.3 36.9-113.3 30-165.6 6.7-4.6-2.1-9.2-4.2-13.7-6.7-7.3-4.2-13.9 7.2-6.5 11.3z" fill="#040000" ></path><path d="M644.6 505.2c-30.1 21.5-60.6 62.5-39.1 99.8 10.7 18.6 30.3 30.9 49.1 40.1 7.8 3.8 14.6-7.9 6.8-11.7-23.6-11.5-53.7-31.4-49.4-60.9 2.8-18.9 15.8-34.6 29.5-47.2 2.5-2.3 5.1-4.6 7.8-6.7 0.5-0.4 0.9-0.7 1.4-1.1-0.4 0.3-1.2 0.9-0.1 0.1l0.9-0.6c6.9-5.1 0.2-16.8-6.9-11.8z" fill="#040000" ></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M235.1 76.9c75.6-26.5 297.3-90.1 514.2-16.6 16.3 5.5 29.8 17.4 37.1 33 57.5 122.4 127.1 602.1 62.1 785.6a62.58 62.58 0 0 1-32.5 35.8c-109.5 51.8-428.1 136.7-609.3 37.2-14.4-7.9-25-21.3-29.7-37.1-41.9-140.6-37-627.7 19.1-798 6.1-18.7 20.5-33.4 39-39.9z" fill="#F9DABD" ></path><path d="M392.2 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M618.6 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M512 562.6c-36 0-65.3-29.3-65.3-65.3S476 432 512 432s65.3 29.3 65.3 65.3-29.3 65.3-65.3 65.3z m0-122.9c-31.7 0-57.6 25.8-57.6 57.6s25.8 57.6 57.6 57.6c31.7 0 57.6-25.8 57.6-57.6s-25.9-57.6-57.6-57.6z" fill="#040000" ></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M178.1 971.5c38.1 15.9 98.7 26.6 171.3-12.3 3.7-2 8.4-1.6 11.6 1.1 43.3 35.9 123.3 80.8 236 10.9 3.8-2.4 8.7-2.4 12.6-0.2 41.8 23.9 191.6 58.2 246.6 14.2 4.4-3.5 9.1-6.6 14.5-8.5C1065 909.5 678.2-652 194.3 351c-37.5 77.8-38.4 94.1-71.9 211.3-27.6 96.3-29.1 231.3 1.4 348.1 7.2 27.3 27.3 49.9 54.3 61.1z" fill="#ABAAAA" ></path><path d="M468.9 349H418c-6.1 0-11.1-5-11.1-11.1V336c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.1-5 11.1-11.1 11.1zM643 471.9H390c-6.6 0-12-5.4-12-12s5.4-12 12-12h253c6.6 0 12 5.4 12 12s-5.4 12-12 12zM609 349h-61.2c-6 0-11-4.9-11-11v-2.1c0-6 4.9-11 11-11H609c6 0 11 4.9 11 11v2.1c0 6.1-4.9 11-11 11z" fill="#040000" ></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M673.1 318.7c3.7-17.5 5.6-35.7 5.6-54.4 0-137.9-105.5-249.7-235.6-249.7S207.4 126.4 207.4 264.3c0 55.4 17.1 106.7 45.9 148.1-55.2 63.3-88.6 145.9-88.6 236.3 0 199.2 162.1 360.6 362.1 360.6 200 0 362.1-161.5 362.1-360.6 0.1-147.3-88.7-274-215.8-330z" fill="#4F8A54" ></path><path d="M392 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M386 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M505.6 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M501.4 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M474.3 364.8h-50.9c-6.1 0-11.1-5-11.1-11.1v-1.9c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.2-5 11.1-11.1 11.1z" fill="#040000" ></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M246.4 227.6c-166.9 101.1-461.9 344 87 564.1 1.5 0.6 2.9 1.1 4.4 1.6 80.7 27.7 392.8 165.4 641-198.1 40-58.6 38.5-136.2-3.7-193.3C892 289.5 727 201.1 429.1 182.7c-64.1-4-127.8 11.6-182.7 44.9z" fill="#CF92BE" ></path><path d="M617.1 393.4c-17.4 8.8-34.9 18.1-51.2 28.9-6.9 4.6-20.3 12.3-17.4 22.6 1.2 4.3 5.6 7 9 9.5 3.7 2.7 7.6 5 11.5 7.3 18.2 10.8 37.1 20.3 55.9 30 10 5.1 18.9-10 8.8-15.1-16.4-8.4-32.9-16.9-49-26-4.5-2.6-9.1-5.2-13.5-8l-4.5-3c-0.7-0.5-1.3-1-2-1.5 1.6 1.2 0.7 0.4-0.2-0.2-1.3-0.9-0.3-0.9-0.5-0.3 0.2 0.2 0.4 0.5 0.6 0.7 1 1.9 1.3 3.7 0.8 5.7 0.1-0.6 0.7-1.4-0.6 1.3 0.7-1.5-0.1 0-0.2 0.1 0.6-0.6 1.2-1.3 1.9-1.9l1.8-1.5c1.8-1.6-0.6 0.3 1.2-0.9 2-1.5 4.1-2.9 6.2-4.3 10-6.5 20.4-12.4 30.9-18 6.5-3.5 13.1-7 19.7-10.4 9.6-5 0.8-20.1-9.2-15zM323.1 408.5c15.9 8.1 31.7 16.5 46.8 26 2.2 1.4 4.3 2.8 6.5 4.2 1 0.7 1.9 1.3 2.8 2 0.5 0.3 1 0.7 1.4 1.1-1.1-0.9-0.3-0.3 0.3 0.3 1.1 1 2.2 2.2 3.3 3.1 1.4 1.1-1-1.7-0.1-0.1-0.6-1.1-0.9-4.1 0.3-6.7 2.2-4.8 0.7 0.1 0-0.5 0 0-1.1 0.9-1.3 1 2.3-1.9 0 0-0.5 0.4-0.8 0.5-1.5 1.1-2.3 1.6-4 2.7-8.1 5.1-12.3 7.5-17.3 10-35.1 19.1-52.8 28.2-10 5.1-1.2 20.2 8.8 15.1 17.5-9 35-17.9 52-27.7 7.3-4.2 15.9-8.6 21.8-14.7 9.3-9.7-4.3-19.7-11.5-24.7-10.1-7.1-20.9-13.1-31.7-19-7.6-4.2-15.2-8.2-22.9-12.1-9.7-5.2-18.6 9.9-8.6 15zM513 592.1c-12.2 0-24.6-1.4-36.3-4.3-8-2-13.9-8.2-15.4-16.2s1.7-15.8 8.4-20.5c23.2-16.3 60.5-31.9 106.2-13 6.4 2.6 11 8.3 12.3 15.1 1.3 6.7-0.8 13.6-5.7 18.3-13.5 13.1-40.9 20.6-69.5 20.6z m-37.4-32.5c-3.4 2.4-4.9 6.2-4.2 10.2 0.8 4.1 3.6 7.1 7.7 8.1 39.1 9.7 81.2 0.7 96.1-13.7 2.4-2.3 3.4-5.6 2.7-8.9-0.7-3.4-2.9-6.2-6.1-7.5-41.2-17.2-75.1-3.1-96.2 11.8z" fill="#040000" ></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M1008.6 465.7c0-124.9-95.5-226.2-213.4-226.2-12 0-23.8 1.1-35.2 3.1v-3.1c0-124.9-95.5-226.2-213.4-226.2S333.4 114.6 333.4 239.5c0 2.4 0 4.8 0.1 7.2-17.1-4.7-35-7.2-53.4-7.2-117.8 0-213.4 101.3-213.4 226.2 0 92.1 51.9 171.3 126.3 206.6-13.7 29.9-21.4 63.4-21.4 98.8 0 124.9 95.5 226.2 213.4 226.2 68.8 0 130-34.5 169-88.1 39 53.6 100.2 88.1 169 88.1 117.8 0 213.4-101.3 213.4-226.2 0-41.2-10.4-79.9-28.6-113.1 60.5-39.9 100.8-111.1 100.8-192.3z" fill="#8CC66D" ></path><path d="M437.8 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M649.7 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M527.3 625.9c6.3-14.2 13.1-28.3 17.9-43 6.2-19 8.3-38.6 10.5-58.3l2.1-19.2c0.7-6.2-9-6.1-9.7 0-1.7 16.3-2.8 32.8-5.7 48.9-4.2 23.7-13.8 45-23.5 66.7-2.5 5.6 5.9 10.5 8.4 4.9z" fill="#252525" ></path><path d="M447.7 522.3c20.3-0.1 40.6-0.2 61-0.4l96.6-0.6c7.5 0 14.9-0.1 22.4-0.1 16.6-0.1 16.7-25.9 0-25.8-20.3 0.1-40.6 0.2-61 0.4l-96.6 0.6c-7.5 0-14.9 0.1-22.4 0.1-16.6 0.1-16.7 25.9 0 25.8z" fill="#040000" ></path><path d="M495.4 508.2c-10.3 3.8-9.2 20.9-9.2 29.5 0.1 16 2.1 32.3 6.1 47.8 3.5 13.7 8.7 29.9 20.6 38.7 12.9 9.5 27.6 2.1 37.6-7.9 10.2-10.3 17.8-23 24.7-35.6 11.6-21.3 20.9-43.8 29.7-66.4 3-7.8-9.5-11.1-12.5-3.4-7.4 19.1-15.3 38.1-24.7 56.4-5.9 11.5-12.2 23-20.3 33.1-2.8 3.5-5.8 6.9-9.2 9.8-1.9 1.7-1.4 1.3-3.3 2.5-1.3 0.8-2.6 1.6-3.9 2.2-0.7 0.3 1-0.2-0.8 0.3-0.6 0.2-1.2 0.3-1.8 0.5-1.1 0.3-1.2 0.2-0.5 0.1-0.6 0-1.3 0-1.9 0.1-2.2 0.1 0.6 0.5-1.8-0.2l-1.8-0.6c1.5 0.5 0.2 0.1-0.5-0.3-0.8-0.5-2.9-2.1-1.7-1.1-1-0.9-2-1.7-2.8-2.7-0.4-0.5-0.9-1-1.3-1.5 0.4 0.5 0.1 0.2-0.5-0.7-0.8-1.3-1.7-2.5-2.4-3.9-0.7-1.3-1.4-2.5-2-3.8-0.4-0.8-0.8-1.6-1.1-2.4-0.1-0.2-0.5-1.1 0 0l-0.6-1.5a86.8 86.8 0 0 1-3.3-9.8c-4.4-14.9-6.2-27.9-6.8-42.8-0.3-6.6-0.3-13.1 0.4-19.7 0.2-1.5-0.3 1.5 0.1-0.5l0.3-1.8c0.2-0.9 0.5-1.8 0.7-2.8 0.4-1.9-0.7 1.1 0.3-0.7 0.5-1-1.3 1.2-0.3 0.5-0.3 0.3-1.1 0.8-2 1.1 7.7-2.9 4.3-15.4-3.5-12.5z" fill="#040000" ></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M75.4 739.8c-78.7-134.4-194-455.7 401.4-579.6 9.8-2 19.2-6.2 29.2-7.5C656.8 133 947.3 205 1000.1 578.4c42.6 223.8 29.7 392.1-822 233.6-43.1-8-80.6-34.4-102.7-72.2z" fill="#F09495" ></path><path d="M704.6 875.4c-129 0-301.8-20.5-526.6-62.3-43.5-8.1-81.2-34.6-103.5-72.7-19.3-32.9-44.8-84.3-57.1-142.5-13.9-65.1-8.8-125.3 15.1-179.2 54.3-122.3 203.7-209.6 444-259.6 4.1-0.9 8.3-2.1 12.3-3.4 5.5-1.7 11.1-3.4 16.9-4.2 29-3.8 75.7-5.9 133.8 5.7 54.5 10.9 105.3 31 150.8 59.9C843.7 251 888.2 296 922.7 351c39.7 63.1 66.1 139.6 78.5 227.3 8.1 42.4 15.2 87.3 12.5 127.9-2.8 42.6-16.4 75.5-41.5 100.7-42.5 42.7-120.3 65-237.8 68.1-9.6 0.2-19.6 0.4-29.8 0.4zM76.3 739.3c22 37.6 59.2 63.7 102.1 71.7 242.5 45.1 424.4 65.3 556.1 61.9 116.9-3.1 194.1-25.2 236.3-67.5 55.4-55.6 44.4-142.5 28.3-226.7C976 415.8 903.4 291.5 789.2 219c-124-78.7-248.1-69.9-283.2-65.3-5.6 0.7-11.2 2.4-16.6 4.1-4.1 1.2-8.3 2.5-12.5 3.4C237.3 211.1 88.5 298 34.5 419.6c-54.6 122.8 2.8 253 41.8 319.7z" fill="#FFFFFF" ></path><path d="M424.1 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M635.9 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M426.2 543.3c17.1 7.9 36.6 26 25.5 46.1-6.9 12.5-19.8 21.2-31.7 28.4-4.5 2.7-0.4 9.8 4.1 7.1 17.4-10.5 41.6-27.6 39-51.1-1.6-14-12.4-24.8-23.5-32.3-3-2-6.1-3.9-9.3-5.4-4.8-2.1-8.9 5-4.1 7.2zM629.5 535.4c-21.8 11.7-40.6 37-25.7 61.3 8.2 13.4 22.2 22.7 35.7 30.3 4.7 2.7 8.9-4.6 4.2-7.2-15.5-8.7-39.9-23.9-36.9-45.2 1.6-11.4 10.7-20.7 19.6-27.2 2.4-1.7 4.8-3.4 7.4-4.8 4.7-2.5 0.4-9.8-4.3-7.2z" fill="#040000" ></path><path d="M457.2 584.6c25.6 25.6 66.7 41 101.8 28.3 18.2-6.6 33.2-19.1 45.5-33.8 4.2-5.1-3-12.4-7.3-7.3-18.5 22-43.3 38.1-73 35-18.6-1.9-36.2-10.8-50.9-22-2.9-2.2-6.1-4.8-8.8-7.5-4.7-4.7-12 2.6-7.3 7.3z" fill="#040000" ></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M915.9 510.5c8.4-19 13.1-39.8 13.1-61.7 0-90-78.9-162.9-176.2-162.9-3.2 0-6.3 0.1-9.5 0.2v-0.2c0-94.8-116.2-171.6-259.6-171.6S224 191.2 224 286v2c-96.2 0-174.1 72-174.1 160.9 0 38 14.3 73 38.2 100.5-41.8 29.4-68.8 75.9-68.8 128.2 0 88.9 78 160.9 174.1 160.9 17.1 0 33.6-2.3 49.3-6.5 28.9 46.1 88.7 77.7 157.6 77.7 49.4 0 94-16.2 126-42.3 32 26.1 76.6 42.3 126 42.3 77.3 0 143-39.7 166.7-95 3.1 0.2 6.3 0.2 9.5 0.2 97.3 0 176.2-72.9 176.2-162.9 0-60.6-35.7-113.4-88.8-141.5z" fill="#5A74B8" ></path><path d="M357.6 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M357.5 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M531.3 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M531.2 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M426.7 574.6c20.9 29.9 59.7 52.2 96.2 38.6 19.2-7.2 34.7-21.2 47.6-36.9 2.8-3.5 3.4-8.3 0-11.7-2.9-2.9-8.9-3.5-11.7 0-16.5 20.2-40.9 40.9-68.1 35.5-17.3-3.4-31-13.2-42.9-25.9-2-2.2-3.9-4.4-5.8-6.7-1.6-1.9 1.1 1.5-0.4-0.6-0.2-0.2-0.3-0.5-0.5-0.7-6.2-8.7-20.6-0.4-14.4 8.4z" fill="#040000" ></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M792.8 301.4c-8.2 0-16.2 0.4-24.2 1.3-12.3-81.8-129.2-145.9-271.8-145.9-137.1 0-250.5 59.3-269.9 136.6C105.3 295.5 7.4 391.2 7.4 508.9c0 119.1 100.2 215.6 223.7 215.6 5.3 0 10.6-0.2 15.8-0.5 14.4 80.5 130.4 143.2 271.3 143.2 135.9 0 248.6-58.3 269.4-134.6 1.7 0 3.4 0.1 5.1 0.1 123.6 0 223.7-96.5 223.7-215.6s-100-215.7-223.6-215.7z" fill="#F6CD50" ></path><path d="M435.9 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M588.1 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M435.9 431.5m-27.8 0a27.8 27.8 0 1 0 55.6 0 27.8 27.8 0 1 0-55.6 0Z" fill="#040000" ></path><path d="M601.9 407.4c-5.7 2.9-11.3 5.9-16.9 9-6.8 3.8-15.3 7.8-20.5 13.8-5.6 6.5 1.6 11.1 6.7 14.4 11.2 7.1 23.3 13 35.1 19 5.7 2.9 10.8-5.7 5.1-8.6-10.9-5.6-21.9-11.1-32.4-17.4-2.4-1.4-4.6-3.1-7-4.6 1 0.6-0.4-0.4-0.4-0.4-1.9-0.3-0.5 4.2 0.5 4.1-0.1 0-0.6 0.3 0.3-0.3 0.5-0.3 1-0.9 1.5-1.3 9.7-7.9 21.9-13.5 33.1-19.2 5.7-2.7 0.6-11.4-5.1-8.5zM406.6 547.6c11.5 14.4 27 26.7 42.7 36.3 32.2 19.8 71.2 27.2 107.6 15.4 29.5-9.6 54.6-29.1 75.5-51.6 10.8-11.6-6.6-29.1-17.5-17.5-9.4 10.1-19.5 19.7-30.8 27.7-4.6 3.2-9.3 6.2-14.2 8.9-5 2.8-9.9 5.1-14.1 6.7-4.6 1.7-9.3 3.2-14.1 4.4-2.2 0.5-4.4 1-6.6 1.4-1 0.2-2 0.3-2.9 0.5 2.6-0.4-2.1 0.2-2.5 0.3-4.1 0.4-8.3 0.5-12.5 0.4-2.2-0.1-4.4-0.2-6.6-0.4-1.1-0.1-2.2-0.2-3.2-0.3-1.5-0.2-1.4-0.2 0.1 0l-2.1-0.3c-7.8-1.3-15.4-3.4-22.8-6.2-0.9-0.4-1.8-0.7-2.8-1.1-3.1-1.2 2.3 1.1-0.7-0.3-1.5-0.7-2.9-1.3-4.4-2-3.7-1.8-7.2-3.7-10.8-5.8-5.7-3.4-11.1-7.1-16.4-11.1 3 2.3-1.1-0.9-1.8-1.5-1.1-0.9-2.1-1.7-3.1-2.6-2.1-1.8-4.2-3.7-6.3-5.6-4.4-4.1-8.7-8.4-12.4-13.1-4.2-5.2-13.1-4.3-17.5 0-5 5.1-4 12.2 0.2 17.4z" fill="#040000" ></path></svg>'}]},{name:"标记图标",type:"sign",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M809.728 429.696a18.901333 18.901333 0 0 0-15.274667-12.885333l-183.466666-26.624-81.92-166.272a18.901333 18.901333 0 0 0-34.005334 0l-81.92 166.272-183.594666 26.624a19.029333 19.029333 0 0 0-10.496 32.298666l132.693333 129.536-31.274667 182.741334a18.816 18.816 0 0 0 27.477334 19.84l164.138666-86.186667 164.096 86.058667a18.773333 18.773333 0 1 0 27.434667-19.84l-31.36-182.741334 132.693333-129.408a18.901333 18.901333 0 0 0 4.778667-19.413333z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M644.565333 306.901333c32.128 0 65.834667-5.76 101.077334-17.237333a17.066667 17.066667 0 0 1 22.357333 16.213333v328.32c-1.109333 0.768 10.325333 27.093333-99.370667 19.84-109.653333-7.210667-181.76-45.098667-246.869333-45.098666-65.152 0-49.322667 2.688-74.154667 8.405333v168.064a24.746667 24.746667 0 0 1-24.490666 25.258667 22.528 22.528 0 0 1-17.28-7.253334 24.149333 24.149333 0 0 1-7.168-18.005333V281.258667C299.776 280.490667 328.106667 256 421.76 256s164.437333 50.901333 222.805333 50.901333z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M524.074667 225.408l274.517333 274.517333a17.066667 17.066667 0 0 1 0 24.149334l-274.517333 274.517333a17.066667 17.066667 0 0 1-24.149334 0l-274.517333-274.517333a17.066667 17.066667 0 0 1 0-24.149334l274.517333-274.517333a17.066667 17.066667 0 0 1 24.149334 0z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M317.866667 300.8h388.266666c9.386667 0 17.066667 7.68 17.066667 17.066667v388.266666a17.066667 17.066667 0 0 1-17.066667 17.066667h-388.266666a17.066667 17.066667 0 0 1-17.066667-17.066667v-388.266666c0-9.386667 7.68-17.066667 17.066667-17.066667z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M498.346667 279.082667L248.789333 701.44a15.829333 15.829333 0 0 0 13.653334 23.893333h499.114666a15.829333 15.829333 0 0 0 13.653334-23.893333l-249.6-422.357333a15.829333 15.829333 0 0 0-27.264 0z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path><path d="M634.538667 487.808L555.050667 426.24 507.306667 256a201.002667 201.002667 0 0 0-23.594667 20.394667l-0.256-0.256L525.653333 426.666667l-133.290666 59.946666a14.08 14.08 0 0 0-8.021334 15.957334l28.757334 126.378666a14.208 14.208 0 0 0 27.733333-6.229333l-26.24-115.114667 126.037333-56.704 76.416 59.136a14.250667 14.250667 0 0 0 19.968-2.474666 14.08 14.08 0 0 0-2.474666-19.797334z" fill="#6D768D"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M374.656 273.194667c5.973333 4.48 12.117333 9.6 18.346667 15.36 6.272 5.717333 11.904 12.373333 16.896 19.84 2.517333 4.010667 5.504 8.490667 9.002666 13.482666a529.493333 529.493333 0 0 1 20.266667 32.213334h155.221333a169.813333 169.813333 0 0 0 9.770667-15.744c2.474667-4.48 5.248-8.96 8.234667-13.482667a460.842667 460.842667 0 0 1 23.253333-31.829333c4.992-6.229333 12.245333-12.373333 21.76-18.346667a34.261333 34.261333 0 0 0 10.112-9.728 31.274667 31.274667 0 0 0 5.248-11.989333 18.56 18.56 0 0 0-1.536-11.605334 17.664 17.664 0 0 0-10.112-8.618666c-4.48-1.493333-8.362667-2.005333-11.605333-1.493334a46.933333 46.933333 0 0 0-9.770667 2.602667c-3.242667 1.28-6.613333 2.645333-10.112 4.138667a32.426667 32.426667 0 0 1-12.757333 2.261333 26.026667 26.026667 0 0 1-12.373334-2.645333 45.653333 45.653333 0 0 1-8.96-6.357334l-8.661333-7.850666a30.336 30.336 0 0 0-11.989333-6.4c-9.984-3.968-18.005333-4.693333-24.021334-2.218667-5.973333 2.474667-11.946667 6.485333-17.962666 11.946667a88.618667 88.618667 0 0 1-11.989334 10.496 7.338667 7.338667 0 0 1-3.754666 1.493333 46.165333 46.165333 0 0 1-8.277334-5.205333 71.808 71.808 0 0 1-7.125333-4.906667 37.973333 37.973333 0 0 1-6.4-6.357333c-3.968-3.968-9.941333-6.613333-17.92-7.850667a31.061333 31.061333 0 0 0-21.76 4.138667c-8.533333 5.461333-14.506667 10.069333-18.048 13.824a29.354667 29.354667 0 0 1-15.744 7.893333 23.978667 23.978667 0 0 1-13.098667-0.768 987.733333 987.733333 0 0 0-14.634666-4.48 80.725333 80.725333 0 0 0-14.250667-2.986667 16.768 16.768 0 0 0-11.989333 2.986667c-6.997333 5.461333-9.258667 12.074667-6.741334 19.84a34.56 34.56 0 0 0 13.482667 18.346667z" fill="#FFFFFF"></path><path d="M780.757333 545.152a219.306667 219.306667 0 0 0-19.882666-65.536 224.981333 224.981333 0 0 0-33.365334-49.792 430.336 430.336 0 0 0-37.12-37.12c-14.506667-11.946667-27.264-23.296-38.272-34.048a544.512 544.512 0 0 1-27.733333-28.842667 305.28 305.28 0 0 1-22.485333-26.197333h-168.746667c-6.485333 8.490667-13.994667 17.493333-22.485333 26.965333a360.96 360.96 0 0 1-26.24 28.074667c-10.538667 10.24-22.272 21.12-35.285334 32.597333a305.493333 305.493333 0 0 0-41.6 44.16 250.026667 250.026667 0 0 0-49.493333 117.589334 216.106667 216.106667 0 0 0 1.877333 70.4 220.586667 220.586667 0 0 0 75.349334 126.549333c21.248 18.005333 47.146667 32.597333 77.653333 43.818667 30.464 11.264 65.493333 16.853333 104.96 16.853333 38.528 0 72.874667-4.864 103.125333-14.592a265.045333 265.045333 0 0 0 78.378667-39.338667c21.973333-16.469333 39.594667-35.797333 52.864-58.026666 13.226667-22.186667 22.101333-45.824 26.624-70.784 4.992-30.421333 5.632-58.026667 1.877333-82.773334z" fill="#FFFFFF"></path><path d="M593.322667 647.509333a20.48 20.48 0 0 1-11.861334 3.2h-50.133333v14.165334c0 4.266667-1.792 8.362667-5.376 12.373333a15.914667 15.914667 0 0 1-13.952 5.333333 24.917333 24.917333 0 0 1-14.336-3.882666c-3.84-2.602667-5.973333-7.210667-6.4-13.824v-14.165334h-48.725333a17.792 17.792 0 0 1-11.818667-3.882666 10.24 10.24 0 0 1-3.968-9.6c0-4.266667 1.578667-7.68 4.693333-10.24a16.768 16.768 0 0 1 11.093334-3.925334h48.682666v-24.789333h-48.682666a15.573333 15.573333 0 0 1-11.52-4.266667 13.525333 13.525333 0 0 1-4.266667-9.941333 15.36 15.36 0 0 1 4.693333-10.624 14.72 14.72 0 0 1 11.093334-4.949333h48.682666l0.725334-14.890667a1053.568 1053.568 0 0 1-40.832-42.538667l-10.752-9.898666a41.216 41.216 0 0 1-6.442667-11.690667c-1.92-4.992-0.938667-10.069333 2.858667-15.274667a13.653333 13.653333 0 0 1 15.786666-3.84c6.186667 2.090667 11.221333 4.821333 15.018667 8.106667 1.92 2.389333 5.248 5.888 10.026667 10.666667l15.061333 14.848 19.328 19.157333 22.186667-20.565333a987.605333 987.605333 0 0 1 29.397333-25.514667 21.162667 21.162667 0 0 1 14.293333-5.674667c5.290667 0 9.557333 2.133333 12.928 6.4 6.186667 7.082667 3.84 15.36-7.168 24.789334a179.072 179.072 0 0 0-12.885333 12.373333c-5.76 5.973333-11.52 11.733333-17.194667 17.408-6.698667 7.082667-14.08 14.378667-22.186666 21.973333v13.44h46.506666c6.698667 0 11.605333 1.536 14.72 4.608a14.165333 14.165333 0 0 1 4.650667 10.282667c0 4.266667-1.450667 7.936-4.309333 11.008-2.858667 3.029333-7.637333 4.352-14.336 3.84l-46.506667 0.768-0.768 24.064h45.866667c13.354667 0 20.053333 4.992 20.053333 14.933333 0.469333 4.693333-0.853333 8.106667-3.925333 10.24z" fill="#6D768D"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M512 213.333333l234.666667 341.333334h-128v213.333333h-213.333334v-213.333333h-128L512 213.333333z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M533.333333 810.666667L298.666667 469.333333h128V256h213.333333v213.333333h128l-234.666667 341.333334z" fill="#FFFFFF"></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M213.333333 533.333333L554.666667 298.666667v128h213.333333v213.333333h-213.333333v128l-341.333334-234.666667z" fill="#FFFFFF"></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M810.666667 533.333333L469.333333 768v-128H256v-213.333333h213.333333V298.666667l341.333334 234.666666z" fill="#FFFFFF"></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#6D768D"></path><path d="M571.349333 508.586667l162.389334-162.346667a44.330667 44.330667 0 1 0-62.72-62.72l-162.389334 162.389333-162.517333-162.389333a44.330667 44.330667 0 1 0-62.72 62.72l162.389333 162.389333-162.389333 162.474667a44.330667 44.330667 0 1 0 62.72 62.72l162.389333-162.346667 162.389334 162.389334a44.330667 44.330667 0 1 0 62.72-62.72l-162.261334-162.56z" fill="#FFFFFF"></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C233.386667 0 0 225.877333 0 512s225.877333 512 512 512 512-225.877333 512-512S790.613333 0 512 0z" fill="#6D768D"></path><path d="M726.144 311.210667l-277.333333 305.066666-124.8-124.8c-13.866667-13.866667-41.6-13.866667-55.466667 0-13.866667 13.866667-13.866667 41.6 0 55.466667l159.445333 152.533333c13.866667 13.866667 41.6 13.866667 55.466667 0l305.066667-332.8c13.866667-13.866667 13.866667-41.6 0-55.466666-20.778667-13.866667-48.512-13.866667-62.378667 0z" fill="#FFFFFF"></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M541.952 755.626667a40.618667 40.618667 0 0 1-29.824 12.373333 41.344 41.344 0 0 1-30.122667-12.373333 40.106667 40.106667 0 0 1-12.672-30.122667c0-11.605333 4.096-21.845333 12.672-30.122667a40.405333 40.405333 0 0 1 30.122667-12.714666c11.605333 0 21.546667 4.138667 29.824 12.714666a40.32 40.32 0 0 1 12.714667 30.122667c0 11.861333-4.096 21.76-12.714667 30.122667zM450.986667 241.28A77.866667 77.866667 0 0 1 512.256 213.333333c24.874667 0 45.354667 8.917333 61.354667 27.946667 15.488 18.432 23.722667 41.685333 23.722666 69.674667 0 23.765333-33.152 200.533333-44.672 329.045333h-80.128C463.146667 511.402667 426.666667 334.677333 426.666667 310.954667c0-27.392 8.277333-50.645333 24.32-69.674667z" fill="#FFFFFF"></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.794667 0 512 0z" fill="#6D768D"></path><path d="M490.666667 682.666667a64 64 0 1 1 0 128 64 64 0 0 1 0-128z m13.994666-490.752c61.397333 0 112.341333 14.634667 153.002667 43.946666 40.533333 29.269333 60.885333 72.618667 60.885333 130.133334 0 35.242667-12.373333 64.938667-29.952 89.045333-10.282667 14.677333-33.664 33.408-62.890666 56.192l-32.426667 22.357333c-15.701333 12.202667-29.696 26.453333-34.858667 42.666667-1.706667 5.546667-3.072 14.677333-3.968 24.533333-0.426667 4.949333-4.864 15.018667-15.232 15.018667h-83.328c-13.568 0-15.957333-10.581333-15.744-15.786667 1.493333-34.005333 4.608-64.213333 18.474667-80.469333 28.074667-32.896 91.904-73.813333 91.904-73.813333a104.106667 104.106667 0 0 0 23.552-24.021334c10.837333-14.933333 19.797333-31.317333 19.797333-49.237333 0-20.565333-6.016-39.338667-18.090666-56.32-12.032-16.938667-34.090667-25.386667-66.005334-25.386667-31.445333 0-53.76 10.410667-66.901333 31.274667-9.685333 15.445333-15.786667 29.610667-18.346667 45.013333-0.853333 5.461333-4.394667 16.981333-16.042666 16.981334H327.210667c-17.322667 0-21.12-11.221333-20.650667-16.64 6.272-68.138667 32.896-114.688 80-144.597334 32-20.565333 71.381333-30.890667 118.101333-30.890666z" fill="#FFFFFF"></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M336.256 410.026667H253.312a40.021333 40.021333 0 0 0-39.850667 43.264l23.296 278.101333c1.706667 20.693333 19.072 36.608 39.850667 36.608h59.648c11.050667 0 20.010667-8.96 20.010667-19.968v-318.037333a19.968 19.968 0 0 0-20.010667-19.968z m434.432 0h-178.944C653.312 182.314667 548.949333 170.666667 548.949333 170.666667c-44.288 0-35.114667 34.986667-38.442666 40.832 0 84.48-68.010667 155.093333-101.034667 184.362666a39.552 39.552 0 0 0-13.226667 29.653334v322.56c0 11.008 8.96 19.925333 20.010667 19.925333h233.728c30.378667 0 58.154667-17.152 71.68-44.373333 18.176-36.736 40.448-90.112 54.656-133.973334 13.781333-42.410667 26.24-94.976 33.578667-131.968a39.850667 39.850667 0 0 0-39.253334-47.658666z" fill="#FFFFFF"></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M796.16 413.909333c-31.146667-0.298667-115.626667-0.085333-146.858667-0.085333h-158.464c8.533333-7.68 15.914667-14.506667 23.594667-20.906667 29.781333-24.874667 25.813333-71.082667-14.208-88.874666-22.954667-10.24-44.970667-5.632-64 11.52-34.944 31.274667-69.632 62.677333-104.277333 93.994666a15.488 15.488 0 0 1-11.178667 4.437334c-11.221333-0.085333-26.88-0.128-46.933333-0.170667a17.066667 17.066667 0 0 0-17.109334 17.066667L256 719.701333a17.066667 17.066667 0 0 0 17.066667 17.152l49.578666-0.085333c3.968 0 7.466667 0.768 10.88 2.602667 15.829333 8.832 31.701333 17.493333 47.616 26.24a18.133333 18.133333 0 0 0 9.301334 2.346666h168.405333c6.186667 0 11.946667-0.981333 17.834667-2.56 29.44-7.253333 40.021333-30.293333 38.528-52.565333-0.768-9.728-4.266667-18.346667-9.984-26.24 19.626667-5.76 35.114667-16.213333 42.112-36.096 7.125333-20.394667 1.621333-38.4-12.672-53.333333 28.16-19.754667 34.858667-44.672 18.645333-75.648h140.458667c6.570667 0 13.013333-0.597333 19.370666-2.645334 31.957333-9.813333 48.810667-42.88 35.626667-71.552-10.154667-22.186667-28.629333-33.152-52.608-33.450666z" fill="#FFFFFF"></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M270.506667 413.909333c31.146667-0.298667 115.626667-0.085333 146.858666-0.085333h158.464c-8.533333-7.68-15.914667-14.506667-23.594666-20.906667-29.781333-24.874667-25.813333-71.082667 14.208-88.874666 22.954667-10.24 44.970667-5.632 64 11.52 34.944 31.274667 69.632 62.677333 104.277333 93.994666 3.413333 2.986667 6.528 4.437333 11.178667 4.437334 11.221333-0.085333 26.88-0.128 46.933333-0.170667a17.066667 17.066667 0 0 1 17.109333 17.066667l0.682667 288.853333a17.066667 17.066667 0 0 1-17.066667 17.152l-49.578666-0.085333a22.101333 22.101333 0 0 0-10.88 2.602666c-15.829333 8.832-31.701333 17.493333-47.616 26.24a18.133333 18.133333 0 0 1-9.301334 2.346667h-168.405333a68.693333 68.693333 0 0 1-17.834667-2.56c-29.44-7.253333-40.021333-30.293333-38.528-52.565333 0.768-9.728 4.266667-18.346667 9.984-26.24-19.626667-5.76-35.114667-16.213333-42.112-36.096-7.125333-20.394667-1.621333-38.4 12.672-53.333334-28.16-19.754667-34.858667-44.672-18.645333-75.648H272.853333c-6.570667 0-13.013333-0.597333-19.370666-2.645333-31.957333-9.813333-48.810667-42.88-35.626667-71.552 10.154667-22.186667 28.629333-33.152 52.608-33.450667z" fill="#FFFFFF"></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M667.733333 480.128H400v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 213.333333a155.605333 155.605333 0 0 0-155.392 155.434667v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 509.013333v292.010667a28.885333 28.885333 0 0 0 28.885333 28.885333h340.138667a28.885333 28.885333 0 0 0 28.928-28.885333V509.013333a28.885333 28.885333 0 0 0-28.928-28.885333z" fill="#FFFFFF"></path></svg>'},{name:"21",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M400.042667 437.461333v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 170.666667a155.605333 155.605333 0 0 0-155.392 155.434666v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 466.346667v292.010666a28.885333 28.885333 0 0 0 28.885333 28.885334h340.138667a28.885333 28.885333 0 0 0 28.928-28.885334V466.346667a28.885333 28.885333 0 0 0-28.928-28.885334H400.042667z" fill="#FFFFFF"></path><path d="M595.242667 437.461333v-111.36a97.706667 97.706667 0 0 0-97.621334-97.621333 97.706667 97.706667 0 0 0-97.578666 97.621333 28.885333 28.885333 0 0 1-57.813334 0A155.605333 155.605333 0 0 1 497.621333 170.666667a155.605333 155.605333 0 0 1 155.434667 155.434666v111.36h14.634667c16 0 28.928 12.928 28.928 28.885334v292.010666a28.885333 28.885333 0 0 1-28.928 28.885334H327.552A28.885333 28.885333 0 0 1 298.666667 758.357333V466.346667c0-15.957333 12.928-28.885333 28.885333-28.885334h267.690667z" fill="#FFFFFF"></path></svg>'},{name:"22",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.999787 512.000213m-511.999787 0a511.999787 511.999787 0 1 0 1023.999573 0 511.999787 511.999787 0 1 0-1023.999573 0Z" fill="#6D768D"></path><path d="M381.354508 364.586941c0 54.015977 29.013321 103.935957 75.946635 130.986613a152.53327 152.53327 0 0 0 151.935936 0 151.12527 151.12527 0 0 0 75.946636-130.986613A151.594604 151.594604 0 0 0 533.333111 213.333671a151.594604 151.594604 0 0 0-151.89327 151.25327zM660.479725 498.901552a185.258589 185.258589 0 0 1-127.146614 50.346646c-49.066646 0-93.866628-19.199992-127.06128-50.346646C317.141201 544.853533 255.999893 637.440161 255.999893 744.106783c0 13.183995 10.709329 23.850657 23.978657 23.850657h506.709122a23.893323 23.893323 0 0 0 23.978657-23.893323c0-106.538622-61.098641-199.25325-150.186604-245.205232z" fill="#FFFFFF"></path></svg>'},{name:"23",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M445.610667 401.578667a129.322667 129.322667 0 1 0 258.645333 0 129.322667 129.322667 0 0 0-258.645333 0z m237.568 114.901333a157.354667 157.354667 0 0 1-216.362667 0 236.373333 236.373333 0 0 0-127.957333 209.706667c0 11.264 9.130667 20.394667 20.394666 20.394666h431.402667a20.394667 20.394667 0 0 0 20.394667-20.394666 236.373333 236.373333 0 0 0-127.872-209.706667zM409.813333 401.578667c0-40.362667 14.592-77.397333 38.698667-106.112a112.725333 112.725333 0 0 0-29.013333-3.925334 112.64 112.64 0 0 0-112.426667 112.469334 112.64 112.64 0 0 0 144.853333 107.648 164.693333 164.693333 0 0 1-42.112-110.08z m-18.602666 136.704a136.533333 136.533333 0 0 1-65.706667-34.474667 205.44 205.44 0 0 0-111.232 182.4c0 9.813333 7.936 17.706667 17.706667 17.706667H303.36a273.621333 273.621333 0 0 1 87.893333-165.632z" fill="#FFFFFF"></path></svg>'}]}],h6=(i,e=[])=>{let t=i.split("_"),r=h2([...Td,...e]).find(s=>s.type===t[0]);if(r){let s=r.list.find(a=>a.name===t[1]);return s?s.icon:""}else return""},Wa={hyperlink:a6,note:o6,attachment:l6,nodeIconList:Td,getNodeIconListIcon:h6},c6=(i,e)=>{const t=new Ut,n=new Dt().text(i);return e.text(n),t.add(n),t.bbox()},oh={radius:3,fontSize:12,fill:"",height:20,paddingX:8};function d6(){let i=this.getData("image");if(!i)return;i=(this.mindMap.renderer.renderTree.data.imgMap||{})[i]||i;const e=this.getImgShowSize(),t=new xr().load(i).size(...e),{defaultNodeImage:n}=this.mindMap.opt;if(n){const r=new Image;r.onerror=()=>{t.load(n)},r.src=i}return this.getData("imageTitle")&&t.attr("title",this.getData("imageTitle")),t.on("click",r=>{this.mindMap.emit("node_img_click",this,t,r)}),t.on("dblclick",r=>{this.mindMap.emit("node_img_dblclick",this,r,t)}),t.on("mouseenter",r=>{this.mindMap.emit("node_img_mouseenter",this,t,r)}),t.on("mouseleave",r=>{this.mindMap.emit("node_img_mouseleave",this,t,r)}),t.on("mousemove",r=>{this.mindMap.emit("node_img_mousemove",this,t,r)}),{node:t,width:e[0],height:e[1]}}function u6(){const{custom:i,width:e,height:t}=this.getData("imageSize");return i?[e,t]:pd(e,t,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function f6(){let i=this.getData();if(!i.icon||i.icon.length<=0)return[];let e=this.mindMap.themeConfig.iconSize;return i.icon.map(t=>{let n=Wa.getNodeIconListIcon(t,this.mindMap.opt.iconList||[]),r=null;return/^<svg/.test(n)?r=mt(n):r=new xr().load(n),r.size(e,e),r.on("click",s=>{this.mindMap.emit("node_icon_click",this,t,s,r)}),r.on("mouseenter",s=>{this.mindMap.emit("node_icon_mouseenter",this,t,s,r)}),r.on("mouseleave",s=>{this.mindMap.emit("node_icon_mouseleave",this,t,s,r)}),{node:r,width:e,height:e}})}function p6(i){const e=this.hasCustomWidth();let t=typeof i=="string"?i:this.getData("text"),{textAutoWrapWidth:n,emptyTextMeasureHeightText:r}=this.mindMap.opt;n=e?this.customTextWidth:n;const s=new Ut;let a=!1;this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,a=!0),a&&!Dn(t)&&(i2(t)?t=a2(t):t=`<p>${t}</p>`,this.setData({text:t}));const o=[],l=b2(this);Object.keys(l).forEach(x=>{o.push([x,l[x]])}),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl||(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.position="fixed",this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.left="-999999px",this.mindMap.el.appendChild(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl));const h=this.mindMap.commonCaches.measureRichtextNodeTextSizeEl;o.forEach(([x,b])=>{h.style[x]=b}),h.style.lineHeight=1.2;const c=`<div>${t}</div>`;h.innerHTML=c;const d=h.children[0];d.classList.add("smm-richtext-node-wrap"),dr(d),d.style.maxWidth=n+"px",e?d.style.width=this.customTextWidth+"px":d.style.width="";let{width:f,height:m}=d.getBoundingClientRect();if(m<=0){h.innerHTML=`<p>${r}</p>`;let x=h.children[0];x.classList.add("smm-richtext-node-wrap"),m=x.getBoundingClientRect().height,h.innerHTML=c}f=Math.min(Math.ceil(f)+1,n),m=Math.ceil(m),s.attr("data-width",f),s.attr("data-height",m);const v=Pr({el:h.children[0],width:f,height:m}),g={"line-height":1.2};return o.forEach(([x,b])=>{g[Kf(x)]=b}),v.css(g),s.add(v),{node:s,nodeContent:v,width:f,height:m}}function m6(i){if(this.getData("needUpdate")&&delete this.nodeData.data.needUpdate,this.getData("richText"))return this.createRichTextNode(i);const e=typeof i=="string"?i:this.getData("text");this.getData("resetRichText")&&delete this.nodeData.data.resetRichText;const t=new Ut,n=this.getStyle("fontSize",!1),r=this.getStyle("textAlign",!1);let s=[];Dn(e)||(s=String(e).split(/\n/gim));const{textAutoWrapWidth:a,emptyTextMeasureHeightText:o}=this.mindMap.opt;let l=s.length>1;s.forEach((d,f)=>{let m=d.split(""),v=[],g=[];for(;m.length;){let x=m.shift(),b=[...g,x].join("");c6(b,this.style).width<=a?g.push(x):(v.push(g.join("")),g=[x])}g.length>0&&v.push(g.join("")),v.length>1&&(l=!0),s[f]=v.join(`
229
+ `)}),s=s.join(`
230
+ `).replace(/\n$/g,"").split(/\n/gim),s.forEach((d,f)=>{d===""&&(d="\uFEFF");const m=new Dt().text(d);m.addClass("smm-text-node-wrap"),m.attr("text-anchor",{left:"start",center:"middle",right:"end"}[r]||"start"),this.style.text(m),m.y(n*Ea*f+(Ea-1)*n/2),t.add(m)});let{width:h,height:c}=t.bbox();if(c<=0){const d=new Dt().text(o);this.style.text(d),c=d.bbox().height}return h=Math.min(Math.ceil(h),a),c=Math.ceil(c),t.attr("data-width",h),t.attr("data-height",c),t.attr("data-ismultiLine",l||s.length>1),{node:t,width:h,height:c}}function g6(){const{hyperlink:i,hyperlinkTitle:e}=this.getData();if(!i)return;const{customHyperlinkJump:t,hyperlinkIcon:n}=this.mindMap.opt,{icon:r,style:s}=n,a=this.getNodeIconSize("hyperlinkIcon"),o=new mt().size(a,a),l=new zs().to(i).target("_blank");l.node.addEventListener("click",c=>{typeof t=="function"&&(c.preventDefault(),t(i,this))}),e&&o.add(mt(`<title>${e}</title>`)),l.rect(a,a).fill({color:"transparent"});const h=mt(r||Wa.hyperlink).size(a,a);return this.style.iconNode(h,s.color),l.add(h),o.add(l),{node:o,width:a,height:a}}function v6(){const i=this.getData("tag");if(!i||i.length<=0)return[];let{maxTag:e,tagsColorMap:t}=this.mindMap.opt;t=t||{};const n=[];return i.slice(0,e).forEach((r,s)=>{let a="",o={...oh};typeof r=="string"?a=r:(a=r.text,o={...oh,...r.style});const l=typeof o.width<"u",h=new Ut;h.on("click",()=>{this.mindMap.emit("node_tag_click",this,r,s,h)});const c=new Dt().text(a);this.style.tagText(c,o);const{width:d,height:f}=c.bbox(),m=l?o.width:d+o.paddingX*2,v=l?Math.max(m,d):m,g=Math.max(o.height,f);l?c.x((v-d)/2):c.x(l?0:o.paddingX),c.cy(-g/2);const x=new mi().size(m,o.height).cy(-g/2);l&&x.x((v-m)/2),this.style.tagRect(x,{...o,fill:o.fill||t[c.node.textContent]||yd(c.node.textContent)}),h.add(x).add(c),n.push({node:h,width:v,height:g})}),n}function x6(){if(!this.getData("note"))return null;const{icon:i,style:e}=this.mindMap.opt.noteIcon,t=this.getNodeIconSize("noteIcon"),n=new mt().attr("cursor","pointer").addClass("smm-node-note").size(t,t);n.add(new mi().size(t,t).fill({color:"transparent"}));const r=mt(i||Wa.note).size(t,t);return this.style.iconNode(r,e.color),n.add(r),this.mindMap.opt.customNoteContentShow||(this.noteEl||(this.noteEl=document.createElement("div"),this.noteEl.style.cssText=`
231
+ position: fixed;
232
+ padding: 10px;
233
+ border-radius: 5px;
234
+ box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
235
+ display: none;
236
+ background-color: #fff;
237
+ z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}
238
+ `,(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.noteEl)),this.noteEl.innerText=this.getData("note")),n.on("mouseover",()=>{const{left:s,top:a}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData("note"),s,a,this):(this.noteEl.style.left=s+"px",this.noteEl.style.top=a+"px",this.noteEl.style.display="block")}),n.on("mouseout",()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display="none"}),n.on("click",s=>{this.mindMap.emit("node_note_click",this,s,n)}),n.on("dblclick",s=>{this.mindMap.emit("node_note_dblclick",this,s,n)}),{node:n,width:t,height:t}}function y6(){const{attachmentUrl:i,attachmentName:e}=this.getData();if(!i)return;const t=this.getNodeIconSize("attachmentIcon"),{icon:n,style:r}=this.mindMap.opt.attachmentIcon,s=new mt().attr("cursor","pointer").size(t,t);e&&s.add(mt(`<title>${e}</title>`)),s.add(new mi().size(t,t).fill({color:"transparent"}));const a=mt(n||Wa.attachment).size(t,t);return this.style.iconNode(a,r.color),s.add(a),s.on("click",o=>{this.mindMap.emit("node_attachmentClick",this,o,s)}),s.on("contextmenu",o=>{this.mindMap.emit("node_attachmentContextmenu",this,o,s)}),{node:s,width:t,height:t}}function w6(i){const{style:e}=this.mindMap.opt[i];return Dn(e.size)?this.mindMap.themeConfig.iconSize:e.size}function b6(){const i=this.getNodeIconSize("noteIcon"),{scaleY:e}=this.mindMap.view.getTransformData().transform,t=i*e;let{left:n,top:r}=this._noteData.node.node.getBoundingClientRect();return r+=t,{left:n,top:r}}function k6(i){this.mindMap.commonCaches.measureCustomNodeContentSizeEl||(this.mindMap.commonCaches.measureCustomNodeContentSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.style.cssText=`
239
+ position: fixed;
240
+ left: -99999px;
241
+ top: -99999px;
242
+ `,this.mindMap.el.appendChild(this.mindMap.commonCaches.measureCustomNodeContentSizeEl)),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.innerHTML="",this.mindMap.commonCaches.measureCustomNodeContentSizeEl.appendChild(i);let e=this.mindMap.commonCaches.measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:e.width,height:e.height}}function T6(){return!!this._customNodeContent}const lh={createImgNode:d6,getImgShowSize:u6,createIconNode:f6,createRichTextNode:p6,createTextNode:m6,createHyperlinkNode:g6,createTagNode:v6,createNoteNode:x6,createAttachmentNode:y6,getNoteContentPosition:b6,getNodeIconSize:w6,measureCustomNodeContentSize:k6,isUseCustomNodeContent:T6};function E6(){if(this.getChildrenLength()<=0||this.isRoot)return;const{alwaysShowExpandBtn:i,notShowExpandBtn:e,expandBtnSize:t}=this.mindMap.opt;if(!i&&!e){let{width:n,height:r}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new mi,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,t,n,r,this)}}function M6(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function S6(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}const hh={renderExpandBtnPlaceholderRect:E6,clearExpandBtnPlaceholderRect:M6,updateExpandBtnPlaceholderRect:S6};function z6(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes=null,this.dragHandleWidth=4,this.dragHandleMousedownX=0,this.isDragHandleMousedown=!1,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.dragHandleMousedownBodyCursor="",this.dragHandleMousedownLeft=0,this.onDragMousemoveHandle=this.onDragMousemoveHandle.bind(this),window.addEventListener("mousemove",this.onDragMousemoveHandle),this.onDragMouseupHandle=this.onDragMouseupHandle.bind(this),window.addEventListener("mouseup",this.onDragMouseupHandle),this.mindMap.on("node_mouseup",this.onDragMouseupHandle))}function C6(i){if(!this.isDragHandleMousedown)return;i.stopPropagation(),i.preventDefault();let{minNodeTextModifyWidth:e,maxNodeTextModifyWidth:t,isUseCustomNodeContent:n,customCreateNodeContent:r}=this.mindMap.opt;const s=n&&r&&this._customNodeContent;document.body.style.cursor="ew-resize",this.group.css({cursor:"ew-resize"});const{scaleX:a}=this.mindMap.draw.transform(),o=i.clientX-this.dragHandleMousedownX;let l=this.dragHandleMousedownCustomTextWidth+(this.dragHandleIndex===0?-o:o)/a;if(l=Math.max(l,e),t!==-1&&(l=Math.min(l,t)),!s&&this.getData("image")){const h=this.getImgShowSize();this._rectInfo.textContentWidth-this.customTextWidth+l<=h[0]&&(l=h[0]+this.customTextWidth-this._rectInfo.textContentWidth)}this.customTextWidth=l,this.dragHandleIndex===0&&(this.left=this.dragHandleMousedownLeft+o/a),this.reRender(s?[]:["text"],{ignoreUpdateCustomTextWidth:!0})}function N6(){this.isDragHandleMousedown&&(document.body.style.cursor=this.dragHandleMousedownBodyCursor,this.group.css({cursor:"default"}),this.isDragHandleMousedown=!1,this.dragHandleMousedownX=0,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.setData({customTextWidth:this.customTextWidth}),this.mindMap.render(),this.mindMap.emit("dragModifyNodeWidthEnd",this))}function L6(){const i=[new mi,new mi];return i.forEach((e,t)=>{e.size(this.dragHandleWidth,this.height).fill({color:"transparent"}).css({cursor:"ew-resize"}),e.on("mousedown",n=>{n.stopPropagation(),n.preventDefault(),this.dragHandleMousedownX=n.clientX,this.dragHandleIndex=t,this.dragHandleMousedownCustomTextWidth=this.customTextWidth===void 0?this._textData?this._textData.width:this.width:this.customTextWidth,this.dragHandleMousedownBodyCursor=document.body.style.cursor,this.dragHandleMousedownLeft=this.left,this.isDragHandleMousedown=!0})}),i}function A6(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes||(this._dragHandleNodes=this.createDragHandleNode()),this.getData("isActive")?(this._dragHandleNodes.forEach(i=>{i.height(this.height),this.group.add(i)}),this._dragHandleNodes[1].x(this.width-this.dragHandleWidth)):this._dragHandleNodes.forEach(i=>{i.remove()}))}const ch={initDragHandle:z6,onDragMousemoveHandle:C6,onDragMouseupHandle:N6,createDragHandleNode:L6,updateDragHandle:A6};function _6(){this.mindMap.cooperate&&(this._userListGroup=new Ut,this.group.add(this._userListGroup))}function R6(i){const{avatarSize:e,fontSize:t}=this.mindMap.opt.cooperateStyle,n=new Ut,r=i.isMore?i.name:String(i.name)[0],s=new jr().size(e,e);s.fill({color:i.color||yd(r)});const a=new Dt().text(r).fill({color:"#fff"}).css({"font-size":t+"px"}).dx(-t/2).dy((e-t)/2);return n.add(s).add(a),n}function D6(i){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return new xr().load(i.avatar).size(e,e)}function I6(){if(!this._userListGroup)return;const{avatarSize:i}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();const e=this.userList.length,t=Math.floor(this.width/i),n=[];e>t?n.push(...this.userList.slice(0,t-1),{isMore:!0,name:"+"+(e-t+1)}):n.push(...this.userList),n.forEach((r,s)=>{let a=null;r.avatar?a=this.createImageAvatar(r):a=this.createTextAvatar(r),a.on("click",o=>{this.mindMap.emit("node_cooperate_avatar_click",r,this,a,o)}),a.on("mouseenter",o=>{this.mindMap.emit("node_cooperate_avatar_mouseenter",r,this,a,o)}),a.on("mouseleave",o=>{this.mindMap.emit("node_cooperate_avatar_mouseleave",r,this,a,o)}),a.x(s*i).cy(-i/2),this._userListGroup.add(a)})}function O6(i){this.userList.find(e=>e.id==i.id)||(this.userList.push(i),this.updateUserListNode())}function B6(i){const e=this.userList.findIndex(t=>t.id==i.id);e!==-1&&(this.userList.splice(e,1),this.updateUserListNode())}function P6(){this.userList=[],this.updateUserListNode()}const dh={createUserListNode:_6,updateUserListNode:I6,createTextAvatar:R6,createImageAvatar:D6,addUser:O6,removeUser:B6,emptyUser:P6};function F6(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function H6(){if(!(this.isGeneralization||this.getChildrenLength()>0)){if(this._quickCreateChildBtn)this.group.add(this._quickCreateChildBtn);else{const{quickCreateChildBtnIcon:i,expandBtnStyle:e,expandBtnSize:t}=this.mindMap.opt,{icon:n,style:r}=i;let{color:s,fill:a}=e||{color:"#808080",fill:"#fff"};s=r.color||s;const o=mt(n||g0.quickCreateChild).size(t,t);o.css({cursor:"pointer"}),o.x(0).y(-t/2),this.style.iconNode(o,s);const l=new jr().size(t);l.x(0).y(-t/2),l.fill({color:a}).css({cursor:"pointer"}),this._quickCreateChildBtn=new Ut,this._quickCreateChildBtn.add(l).add(o),this._quickCreateChildBtn.on("click",h=>{h.stopPropagation(),this.mindMap.emit("quick_create_btn_click",this);const{customQuickCreateChildBtnClick:c}=this.mindMap.opt;if(typeof c=="function"){c(this);return}this.mindMap.execCommand("INSERT_CHILD_NODE",!0,[this])}),this._quickCreateChildBtn.on("dblclick",h=>{h.stopPropagation()}),this._quickCreateChildBtn.addClass("smm-quick-create-child-btn"),this.group.add(this._quickCreateChildBtn)}this._showQuickCreateChildBtn=!0,this.renderer.layout.renderExpandBtn(this,this._quickCreateChildBtn)}}function U6(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function $6(){if(this.isGeneralization)return;const{isActive:i}=this.getData();i||this.removeQuickCreateChildBtn()}const uh={initQuickCreateChildBtn:F6,showQuickCreateChildBtn:H6,removeQuickCreateChildBtn:U6,hideQuickCreateChildBtn:$6};function G6(i,e,t,n,r){const{imgTextMargin:s}=this.mindMap.opt;return i==="v"?n>0&&r>0?s:0:e>0&&t>0?s:0}function q6(i){let e=0,t=this._tagData.reduce((n,r)=>(e=Math.max(e,r.height),n+=r.width),0);return t+=(this._tagData.length-1)*i,{width:t,height:e}}function W6(){if(this.isUseCustomNodeContent()){const z=this.measureCustomNodeContentSize(this._customNodeContent);return{width:this.hasCustomWidth()?this.customTextWidth:z.width,height:z.height}}const{TAG_PLACEMENT:i,IMG_PLACEMENT:e}=_,{textContentMargin:t}=this.mindMap.opt,r=(this.getStyle("tagPlacement")||i.RIGHT)===i.BOTTOM,s=this.getStyle("imgPlacement")||e.TOP;let a=0,o=0,l=0,h=0,c=0,d=0,f=0;if(this._imgData&&(a=this._imgData.width,o=this._imgData.height),this.mindMap.nodeInnerPrefixList.forEach(z=>{const R=this[`_${z.name}Data`];R&&(l+=R.width,h=Math.max(h,R.height),f++)}),this._prefixData&&(l+=this._prefixData.width,h=Math.max(h,this._prefixData.height),f++),this._iconData.length>0&&(l+=this._iconData.reduce((z,R)=>(h=Math.max(h,R.height),z+=R.width),0)+(this._iconData.length-1)*t,f++),this._textData&&(l+=this._textData.width,h=Math.max(h,this._textData.height),f++),this._hyperlinkData&&(l+=this._hyperlinkData.width,h=Math.max(h,this._hyperlinkData.height),f++),this._tagData.length>0){const{width:z,height:R}=this.getTagContentSize(t);r?(c=z,d=R):(l+=z,h=Math.max(h,R),f++)}this._noteData&&(l+=this._noteData.width,h=Math.max(h,this._noteData.height),f++),this._attachmentData&&(l+=this._attachmentData.width,h=Math.max(h,this._attachmentData.height),f++),this._postfixData&&(l+=this._postfixData.width,h=Math.max(h,this._postfixData.height),f++),this.mindMap.nodeInnerPostfixList.forEach(z=>{const R=this[`_${z.name}Data`];R&&(l+=R.width,h=Math.max(h,R.height),f++)}),l+=(f-1)*t,r&&l>0&&d>0&&(this._rectInfo.textContentWidthWithoutTag=l,l=Math.max(l,c),h=h+t+d),this._rectInfo.textContentWidth=l,this._rectInfo.textContentHeight=h;let m=0,v=0;[e.TOP,e.BOTTOM].includes(s)?(m=Math.max(a,l),v=o+h+this.getImgTextMarin("v",0,0,o,h)):(m=a+l+this.getImgTextMarin("h",a,l),v=Math.max(o,h));const{paddingX:g,paddingY:x}=this.getPaddingVale(),{paddingX:b,paddingY:E}=this.shapeInstance.getShapePadding(m,v,g,x);this.shapePadding.paddingX=b,this.shapePadding.paddingY=E;const M=this.getBorderWidth();return{width:m+g*2+b*2+M,height:v+x*2+E*2+M}}function Y6(){if(!this.group)return;this.group.clear();const{hoverRectPadding:i,openRealtimeRenderOnNodeTextEdit:e,textContentMargin:t,addCustomContentToNode:n}=this.mindMap.opt,{width:r,height:s}=this;let{paddingX:a,paddingY:o}=this.getPaddingVale();const l=this.getBorderWidth()/2;a+=this.shapePadding.paddingX+l,o+=this.shapePadding.paddingY+l,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(l,l),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.createUserListNode&&this.createUserListNode(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid);const h=()=>{this.hoverNode=new mi().size(r+i*2,s+i*2).x(-i).y(-i),this.hoverNode.addClass("smm-hover-node"),this.style.hoverNode(this.hoverNode,r,s),this.group.add(this.hoverNode)};if(this.isUseCustomNodeContent()){const de=Pr({el:this._customNodeContent,width:r,height:s});this.group.add(de),h();return}const{IMG_PLACEMENT:c,TAG_PLACEMENT:d}=_,f=this.getStyle("imgPlacement")||c.TOP,v=(this.getStyle("tagPlacement")||d.RIGHT)===d.BOTTOM;let{textContentWidth:g,textContentHeight:x,textContentWidthWithoutTag:b}=this._rectInfo;const E=x;let M=0,z=0;const R=this._tagData&&this._tagData.length>0;if(R){const de=this.getTagContentSize(t);M=de.width,z=de.height,v&&(x-=z+t)}let O=0,B=0;if(this._imgData)switch(O=this._imgData.width,B=this._imgData.height,this.group.add(this._imgData.node),f){case c.TOP:this._imgData.node.cx(r/2).y(o);break;case c.BOTTOM:this._imgData.node.cx(r/2).y(s-o-B);break;case c.LEFT:this._imgData.node.x(a).cy(s/2);break;case c.RIGHT:this._imgData.node.x(r-a-O).cy(s/2);break}let F=new Ut,P=0;if(R&&v&&(P=b<g?(g-b)/2:0),this.mindMap.nodeInnerPrefixList.forEach(de=>{const ge=this[`_${de.name}Data`];ge&&(ge.node.x(P).y((x-ge.height)/2),F.add(ge.node),P+=ge.width+t)}),this._prefixData){const de=Pr({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});de.x(P).y((x-this._prefixData.height)/2),F.add(de),P+=this._prefixData.width+t}let ee=new Ut;if(this._iconData&&this._iconData.length>0){let de=0;this._iconData.forEach(ge=>{ge.node.x(P+de).y((x-ge.height)/2),ee.add(ge.node),de+=ge.width+t}),F.add(ee),P+=de}if(this._textData){const de=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",P),(this._textData.nodeContent||this._textData.node).x(-de).x(P).y((x-this._textData.height)/2),e&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),F.add(this._textData.node),P+=this._textData.width+t}this._hyperlinkData&&(this._hyperlinkData.node.x(P).y((x-this._hyperlinkData.height)/2),F.add(this._hyperlinkData.node),P+=this._hyperlinkData.width+t);let V=new Ut;if(R)if(v){let de=0;this._tagData.forEach(ge=>{ge.node.x(de).y((z-ge.height)/2),V.add(ge.node),de+=ge.width+t}),V.x((g-M)/2).y(E-z),F.add(V)}else{let de=0;this._tagData.forEach(ge=>{ge.node.x(P+de).y((x-ge.height)/2),V.add(ge.node),de+=ge.width+t}),F.add(V),P+=de}if(this._noteData&&(this._noteData.node.x(P).y((x-this._noteData.height)/2),F.add(this._noteData.node),P+=this._noteData.width+t),this._attachmentData&&(this._attachmentData.node.x(P).y((x-this._attachmentData.height)/2),F.add(this._attachmentData.node),P+=this._attachmentData.width+t),this._postfixData){const de=Pr({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});de.x(P).y((x-this._postfixData.height)/2),F.add(de),P+=this._postfixData.width+t}this.mindMap.nodeInnerPostfixList.forEach(de=>{const ge=this[`_${de.name}Data`];ge&&(ge.node.x(P).y((x-ge.height)/2),F.add(ge.node),P+=ge.width+t)}),this.group.add(F);const{width:Y,height:ie}=F.bbox();let Q=0,oe=0;switch(f){case c.TOP:Q=r/2-Y/2,oe=o+B+this.getImgTextMarin("v",0,0,B,E);break;case c.BOTTOM:Q=r/2-Y/2,oe=o;break;case c.LEFT:Q=O+a+this.getImgTextMarin("h",O,g),oe=s/2-ie/2;break;case c.RIGHT:Q=a,oe=s/2-ie/2;break}if(F.translate(Q,oe),h(),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const de=Pr(this._customContentAddToNodeAdd);this.group.add(de),n&&typeof n.handle=="function"&&n.handle({content:this._customContentAddToNodeAdd,element:de,node:this})}this.mindMap.emit("node_layout_end",this)}const fh={getImgTextMarin:G6,getTagContentSize:q6,getNodeRect:W6,layout:Y6};class Ya{constructor(e={}){this.opt=e,this.nodeData=this.handleData(e.data||{}),this.nodeDataSnapshot="",this.uid=e.uid,this.mindMap=e.mindMap,this.renderer=e.renderer,this.draw=this.mindMap.draw,this.nodeDraw=this.mindMap.nodeDraw,this.lineDraw=this.mindMap.lineDraw,this.style=new La(this),this.effectiveStyles={},this.shapeInstance=new k2(this),this.shapePadding={paddingX:0,paddingY:0},this.isRoot=e.isRoot===void 0?!1:e.isRoot,this.isGeneralization=e.isGeneralization===void 0?!1:e.isGeneralization,this.generalizationBelongNode=null,this.layerIndex=e.layerIndex===void 0?0:e.layerIndex,this.width=e.width||0,this.height=e.height||0,this.customTextWidth=e.data.data.customTextWidth||void 0,this._left=e.left||0,this._top=e.top||0,this.customLeft=e.data.data.customLeft||void 0,this.customTop=e.data.data.customTop||void 0,this.isDrag=!1,this.parent=e.parent||null,this.children=e.children||[],this.userList=[],this.group=null,this.shapeNode=null,this.hoverNode=null,this._customNodeContent=null,this._imgData=null,this._iconData=null,this._textData=null,this._hyperlinkData=null,this._tagData=null,this._noteData=null,this.noteEl=null,this.noteContentIsShow=!1,this._attachmentData=null,this._prefixData=null,this._postfixData=null,this._expandBtn=null,this._lastExpandBtnType=null,this._showExpandBtn=!1,this._openExpandNode=null,this._closeExpandNode=null,this._fillExpandNode=null,this._userListGroup=null,this._lines=[],this._generalizationList=[],this._unVisibleRectRegionNode=null,this._isMouseenter=!1,this._customContentAddToNodeAdd=null,this._rectInfo={textContentWidth:0,textContentHeight:0,textContentWidthWithoutTag:0},this._generalizationNodeWidth=0,this._generalizationNodeHeight=0,this.expandBtnSize=this.mindMap.opt.expandBtnSize,this.isMultipleChoice=!1,this.needLayout=!1,this.isHide=!1;const t=Object.getPrototypeOf(this);t.bindEvent||(Object.keys(fh).forEach(n=>{t[n]=fh[n]}),Object.keys(rh).forEach(n=>{t[n]=rh[n]}),Object.keys(sh).forEach(n=>{t[n]=sh[n]}),Object.keys(hh).forEach(n=>{t[n]=hh[n]}),Object.keys(ah).forEach(n=>{t[n]=ah[n]}),Object.keys(lh).forEach(n=>{t[n]=lh[n]}),this.mindMap.cooperate&&Object.keys(dh).forEach(n=>{t[n]=dh[n]}),Object.keys(ch).forEach(n=>{t[n]=ch[n]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(uh).forEach(n=>{t[n]=uh[n]}),this.initQuickCreateChildBtn()),t.bindEvent=!0),this.getSize(),this.updateGeneralization(),this.initDragHandle()}get left(){return this.customLeft||this._left}set left(e){this._left=e}get top(){return this.customTop||this._top}set top(e){this._top=e}reset(){this.children=[],this.parent=null,this.isRoot=!1,this.layerIndex=0,this.left=0,this.top=0}resetWhenDelete(){this._isMouseenter=!1}handleData(e){return e.data.expand=e.data.expand!==!1,e.data.isActive=e.data.isActive===!0,e.children=e.children||[],e}createNodeData(e){const{isUseCustomNodeContent:t,customCreateNodeContent:n,createNodePrefixContent:r,createNodePostfixContent:s,addCustomContentToNode:a}=this.mindMap.opt,o=["custom","image","icon","text","hyperlink","tag","note","attachment","prefix","postfix",...this.mindMap.nodeInnerPrefixList.map(h=>h.name),...this.mindMap.nodeInnerPostfixList.map(h=>h.name)],l={};if(Array.isArray(e)?o.forEach(h=>{e.includes(h)&&(l[h]=!0)}):o.forEach(h=>{l[h]=!0}),t&&n&&l.custom&&(this._customNodeContent=n(this)),this._customNodeContent){dr(this._customNodeContent);return}l.image&&(this._imgData=this.createImgNode()),l.icon&&(this._iconData=this.createIconNode()),l.text&&(this._textData=this.createTextNode()),l.hyperlink&&(this._hyperlinkData=this.createHyperlinkNode()),l.tag&&(this._tagData=this.createTagNode()),l.note&&(this._noteData=this.createNoteNode()),l.attachment&&(this._attachmentData=this.createAttachmentNode()),this.mindMap.nodeInnerPrefixList.forEach(h=>{l[h.name]&&(this[`_${h.name}Data`]=h.createContent(this))}),l.prefix&&(this._prefixData=r?r(this):null,this._prefixData&&this._prefixData.el&&dr(this._prefixData.el)),l.postfix&&(this._postfixData=s?s(this):null,this._postfixData&&this._postfixData.el&&dr(this._postfixData.el)),this.mindMap.nodeInnerPostfixList.forEach(h=>{l[h.name]&&(this[`_${h.name}Data`]=h.createContent(this))}),a&&typeof a.create=="function"&&(this._customContentAddToNodeAdd=a.create(this),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el&&dr(this._customContentAddToNodeAdd.el))}getSize(e,t={}){t.ignoreUpdateCustomTextWidth||!1||(this.customTextWidth=this.getData("customTextWidth")||void 0),this.customLeft=this.getData("customLeft")||void 0,this.customTop=this.getData("customTop")||void 0,this.createNodeData(e);const{width:r,height:s}=this.getNodeRect(),a=this.width!==r||this.height!==s;return this.width=r,this.height=s,a}bindGroupEvent(){this.group.on("click",e=>{if(this.mindMap.emit("node_click",this,e),this.isMultipleChoice){e.stopPropagation(),this.isMultipleChoice=!1;return}this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&this.userList.length>0||this.active(e)}),this.group.on("mousedown",e=>{const{readonly:t,enableCtrlKeyNodeSelection:n,useLeftKeySelectionRightKeyDrag:r,mousedownEventPreventDefault:s}=this.mindMap.opt;if(s&&e.preventDefault(),t||(this.isRoot?e.which===3&&!r&&e.stopPropagation():e.which!==2&&e.stopPropagation()),!t&&(e.ctrlKey||e.metaKey)&&n){this.isMultipleChoice=!0;const a=this.getData("isActive");a||this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.mindMap.renderer[a?"removeNodeFromActiveList":"addNodeToActiveList"](this,!0),this.renderer.emitNodeActiveEvent(a?null:this)}this.mindMap.emit("node_mousedown",this,e)}),this.group.on("mouseup",e=>{!this.isRoot&&e.which!==2&&!this.mindMap.opt.readonly&&e.stopPropagation(),this.mindMap.emit("node_mouseup",this,e)}),this.group.on("mouseenter",e=>{this.isDrag||(this._isMouseenter=!0,this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,e))}),this.group.on("mouseleave",e=>{this._isMouseenter&&(this._isMouseenter=!1,this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,e))}),this.group.on("dblclick",e=>{const{readonly:t,onlyOneEnableActiveNodeOnCooperate:n}=this.mindMap.opt;t||e.ctrlKey||e.metaKey||(e.stopPropagation(),!(n&&this.userList.length>0)&&this.mindMap.emit("node_dblclick",this,e))}),this.group.on("contextmenu",e=>{const{readonly:t,useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;t||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),!(this.mindMap.select&&!n&&this.mindMap.select.hasSelectRange())&&(this.getData("isActive")&&this.renderer.activeNodeList.length===1||(this.renderer.clearActiveNodeList(),this.active(e)),this.mindMap.emit("node_contextmenu",e,this)))})}active(e){this.mindMap.opt.readonly||(e&&e.stopPropagation(),!this.getData("isActive")&&(this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.renderer.clearActiveNodeList(),this.renderer.addNodeToActiveList(this,!0),this.renderer.emitNodeActiveEvent(this)))}deactivate(){this.mindMap.renderer.removeNodeFromActiveList(this),this.mindMap.renderer.emitNodeActiveEvent()}update(e){if(!this.group)return;this.updateNodeActiveClass();const{alwaysShowExpandBtn:t,notShowExpandBtn:n,isShowCreateChildBtnIcon:r,readonly:s}=this.mindMap.opt,a=this.getChildrenLength();if(!n)if(t)this._expandBtn&&a<=0?this.removeExpandBtn():this.renderExpandBtn();else{const{isActive:l,expand:h}=this.getData();a<=0?this.removeExpandBtn():h&&!l&&!this._isMouseenter?this.hideExpandBtn():this.showExpandBtn()}if(r)if(a>0)this.removeQuickCreateChildBtn();else{const{isActive:l}=this.getData();l?this.showQuickCreateChildBtn():this.hideQuickCreateChildBtn()}this.updateDragHandle(),this.renderGeneralization(e),this.updateUserListNode&&this.updateUserListNode();const o=this.group.transform();this.nodeDataSnapshot=s?"":JSON.stringify(this.getData()),(this.left!==o.translateX||this.top!==o.translateY)&&this.group.translate(this.left-o.translateX,this.top-o.translateY)}getNodePosInClient(e,t){const n=this.mindMap.draw.transform(),{scaleX:r,scaleY:s,translateX:a,translateY:o}=n,l=e*r+a,h=t*s+o;return{left:l,top:h}}checkIsInClient(e=0){const{left:t,top:n}=this.getNodePosInClient(this.left,this.top);return t+this.width>0-e&&n+this.height>0-e&&t<this.mindMap.width+e&&n<this.mindMap.height+e}reRender(e,t){const n=this.getSize(e,t);return this.layout(),this.update(),n}updateNodeActiveClass(){if(!this.group)return;const e=this.getData("isActive");this.group[e?"addClass":"removeClass"]("active")}updateNodeByActive(e){if(this.group){const{isShowCreateChildBtnIcon:t}=this.mindMap.opt;e?(this.showExpandBtn(),t&&this.showQuickCreateChildBtn()):(this.hideExpandBtn(),t&&this.hideQuickCreateChildBtn()),this.updateNodeActiveClass(),this.updateDragHandle()}}render(e=()=>{},t=!1,n=!1){this.renderLine();const{openPerformance:r,performanceConfig:s}=this.mindMap.opt;if(t||!r||this.checkIsInClient(s.padding)||this.isRoot?this.group?(this.nodeDraw.has(this.group)||this.nodeDraw.add(this.group),this.needLayout&&(this.needLayout=!1,this.layout()),this.updateExpandBtnPlaceholderRect(),this.update(t)):(this.group=new Ut,this.group.addClass("smm-node"),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update(t)):r&&s.removeNodeWhenOutCanvas&&this.removeSelf(),this.children&&this.children.length&&this.getData("expand")!==!1){let a=0;this.children.forEach(o=>{const l=()=>{o.render(()=>{a++,a>=this.children.length&&e()},t,n)};n?setTimeout(l,0):l()})}else e();this.nodeData.inserting&&(delete this.nodeData.inserting,this.active(),this.mindMap.emit("node_dblclick",this,null,!0))}removeSelf(){this.group&&(this.group.remove(),this.removeGeneralization())}remove(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.children&&this.children.length&&this.children.forEach(e=>{e.remove()}))}destroy(){this.removeLine(),this.parent&&this.parent.removeLine(),this.group&&(this.emptyUser&&this.emptyUser(),this.resetWhenDelete(),this.group.remove(),this.removeGeneralization(),this.group=null,this.style.onRemove())}hide(){if(this.group&&this.group.hide(),this.hideGeneralization(),this.parent){const e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].hide(),this._lines.forEach(t=>{t.hide()})}this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){const e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].show(),this._lines.forEach(t=>{t.show()})}this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}}setOpacity(e){this.group&&this.group.opacity(e),this._lines.forEach(t=>{t.opacity(e)}),this.children.forEach(t=>{t.setOpacity(e)}),this.setGeneralizationOpacity(e)}hideChildren(){this._lines.forEach(e=>{e.hide()}),this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}showChildren(){this._lines.forEach(e=>{e.show()}),this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}startDrag(){this.isDrag=!0,this.group&&this.group.addClass("smm-node-dragging")}endDrag(){this.isDrag=!1,this.group&&this.group.removeClass("smm-node-dragging")}renderLine(e=!1){if(this.getData("expand")===!1)return;let t=this.getChildrenLength();this.mindMap.renderer.layout.nodeIsRemoveAllLines&&this.mindMap.renderer.layout.nodeIsRemoveAllLines(this)&&(t=0),t>this._lines.length?new Array(t-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):t<this._lines.length&&(this._lines.slice(t).forEach(n=>{n.remove()}),this._lines=this._lines.slice(0,t)),this.renderer.layout.renderLine(this,this._lines,(...n)=>{this.styleLine(...n)},this.style.getStyle("lineStyle",!0)),e&&this.children&&this.children.length>0&&this.children.forEach(n=>{n.renderLine(e)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?_.SHAPE.RECTANGLE:this.style.getStyle("shape",!1,!1)}hasCustomPosition(){return this.customLeft!==void 0&&this.customTop!==void 0}ancestorHasCustomPosition(){let e=this;for(;e;){if(e.hasCustomPosition())return!0;e=e.parent}return!1}ancestorHasGeneralization(){let e=this.parent;for(;e;){if(e.checkHasGeneralization())return!0;e=e.parent}return!1}addChildren(e){this.children.push(e)}styleLine(e,t,n){const{enableInheritAncestorLineStyle:r}=this.mindMap.opt,s=r?"getSelfInhertStyle":"getSelfStyle",a=t[s]("lineWidth")||t.getStyle("lineWidth",!0),o=t[s]("lineColor")||this.getRainbowLineColor(t)||t.getStyle("lineColor",!0),l=t[s]("lineDasharray")||t.getStyle("lineDasharray",!0);this.style.line(e,{width:a,color:o,dasharray:l},n,t)}getRainbowLineColor(e){return this.mindMap.rainbowLines?this.mindMap.rainbowLines.getNodeColor(e):""}removeLine(){this._lines.forEach(e=>{e.remove()}),this._lines=[]}isAncestor(e){if(this.uid===e.uid)return!1;let t=e.parent;for(;t;){if(this.uid===t.uid)return!0;t=t.parent}return!1}isParent(e){if(this.uid===e.uid)return!1;const t=e.parent;return!!(t&&this.uid===t.uid)}isBrother(e){return!this.parent||this.uid===e.uid?!1:this.parent.children.find(t=>t.uid===e.uid)}getIndexInBrothers(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.uid===this.uid):-1}getPaddingVale(){return{paddingX:this.getStyle("paddingX"),paddingY:this.getStyle("paddingY")}}getStyle(e,t){const n=this.style.merge(e,t);return n===void 0?"":n}getSelfStyle(e){return this.style.getSelfStyle(e)}getParentSelfStyle(e){return this.parent?this.parent.getSelfStyle(e)||this.parent.getParentSelfStyle(e):null}getSelfInhertStyle(e){return this.getSelfStyle(e)||this.getParentSelfStyle(e)}getBorderWidth(){return this.style.merge("borderWidth",!1)||0}getData(e){return e?this.nodeData.data[e]:this.nodeData.data}getPureData(e=!0,t=!1){return Cs({},this,e,t)}getAncestorNodes(){const e=[];let t=this.parent;for(;t;)e.unshift(t),t=t.parent;return e}hasCustomStyle(){return this.style.hasCustomStyle()}getRect(){return this.group?this.group.rbox():null}getRectInSvg(){const{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform();let{left:s,top:a,width:o,height:l}=this;const h=(s+o)*e+n,c=(a+l)*t+r;return s=s*e+n,a=a*t+r,{left:s,right:h,top:a,bottom:c,width:o*e,height:l*t}}highlight(){this.group&&this.group.addClass("smm-node-highlight")}closeHighlight(){this.group&&this.group.removeClass("smm-node-highlight")}fakeClone(){const e=new Ya({...this.opt,uid:Wi()});return Object.keys(this).forEach(t=>{e[t]=this[t]}),e}createSvgTextNode(e=""){return new Dt().text(e)}getSvgObjects(){return{SVG:mt,G:Ut,Rect:mi}}checkEnableDragModifyNodeWidth(){const{enableDragModifyNodeWidth:e,isUseCustomNodeContent:t,customCreateNodeContent:n}=this.mindMap.opt;return e&&(this.mindMap.richText||t&&n)}hasCustomWidth(){return this.checkEnableDragModifyNodeWidth()&&this.customTextWidth!==void 0}getChildrenLength(){return this.nodeData.children?this.nodeData.children.length:0}}class X6{constructor(e){this.max=e||1e3,this.size=0,this.pool=new Map}add(e,t){return!this.has(e)&&this.size>=this.max?!1:(this.delete(e),this.pool.set(e,t),this.size++,!0)}delete(e){this.pool.has(e)&&(this.pool.delete(e),this.size--)}has(e){return this.pool.has(e)}get(e){if(this.pool.has(e))return this.pool.get(e)}clear(){this.size=0,this.pool=new Map}}class Fn{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.draw=this.mindMap.draw,this.lineDraw=this.mindMap.lineDraw,this.root=null,this.lru=new X6(this.mindMap.opt.maxNodeCacheCount),this.rootNodeCenterOffset=null}doLayout(){throw new Error("【computed】方法为必要方法,需要子类进行重写!")}renderLine(){throw new Error("【renderLine】方法为必要方法,需要子类进行重写!")}renderExpandBtn(){throw new Error("【renderExpandBtn】方法为必要方法,需要子类进行重写!")}renderGeneralization(){}cacheNode(e,t){this.renderer.nodeCache[e]=t,this.lru.add(e,t)}checkIsNeedResizeSources(){return this.renderer.checkHasRenderSource(_.CHANGE_THEME)}checkIsLayerTypeChange(e,t){if(e>=2&&t>=2)return!1;if(e>=2&&t<2||e<2&&t>=2)return!0}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(e){this.renderer.checkHasRenderSource(_.CHANGE_LAYOUT)&&(e.needRerenderExpandBtnPlaceholderRect=!0)}checkIsNodeDataChange(e,t){if(e)e=typeof e=="string"?JSON.parse(e):e,e.isActive=t.isActive,e.expand=t.expand,e=JSON.stringify(e);else return!1;return e!==JSON.stringify(t)}checkNodeFixChange(e,t,n){let r=!1;this.mindMap.nodeInnerPrefixList.forEach(a=>{if(a.updateNodeData){const o=a.updateNodeData(e,t);o&&(r=o)}});let s=!1;return this.mindMap.nodeInnerPostfixList.forEach(a=>{if(a.updateNodeData){const o=a.updateNodeData(e,n);o&&(s=o)}}),r||s}createNode(e,t,n,r,s,a){const o={};this.mindMap.nodeInnerPrefixList.forEach(d=>{if(d.createNodeData){const[f,m]=d.createNodeData({data:e,parent:t,ancestors:a,layerIndex:r,index:s});o[f]=m}});const l={};this.mindMap.nodeInnerPostfixList.forEach(d=>{if(d.createNodeData){const[f,m]=d.createNodeData({data:e,parent:t,ancestors:a,layerIndex:r,index:s});l[f]=m}});const h=e.data.uid;let c=null;if(e&&e._node&&!this.renderer.reRender){c=e._node;const d=this.checkIsLayerTypeChange(c.layerIndex,r);c.reset(),c.layerIndex=r,n?c.isRoot=!0:c.parent=t._node,this.cacheNode(e._node.uid,c),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(c);const f=this.checkNodeFixChange(c,o,l),m=this.checkIsNeedResizeSources(),v=this.checkIsNodeDataChange(e._node.nodeDataSnapshot,e.data);(m||v||d||c.getData("resetRichText")||c.getData("needUpdate")||f)&&(c.getSize(),c.needLayout=!0),this.checkGetGeneralizationChange(c,m)}else if((this.lru.has(h)||this.renderer.lastNodeCache[h])&&!this.renderer.reRender){c=this.lru.get(h)||this.renderer.lastNodeCache[h];const d=JSON.stringify(c.getData()),f=this.checkIsLayerTypeChange(c.layerIndex,r);c.reset(),c.nodeData=c.handleData(e||{}),c.layerIndex=r,n?c.isRoot=!0:c.parent=t._node,this.cacheNode(h,c),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(c),e._node=c;const m=this.checkIsNeedResizeSources(),v=this.checkIsNodeDataChange(d,e.data),g=this.checkNodeFixChange(c,o,l);(m||v||f||c.getData("resetRichText")||c.getData("needUpdate")||g)&&(c.getSize(),c.needLayout=!0),this.checkGetGeneralizationChange(c,m)}else{const d=h||Wi();c=new Ya({data:e,uid:d,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:r,isRoot:n,parent:n?null:t._node,...o}),e.data.uid=d,this.cacheNode(d,c),e._node=c}return e.data.isActive&&this.renderer.addNodeToActiveList(c),this.mindMap.renderer.findActiveNodeIndex(c)!==-1&&c.setData({isActive:!0}),n?this.root=c:t._node.addChildren(c),c}checkGetGeneralizationChange(e,t){const n=e.getData("generalization");n&&e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach((r,s)=>{const a=r.generalizationNode,o=a.getData(),l=n[s];(t||l&&JSON.stringify(o)!==JSON.stringify(l))&&(l&&(a.nodeData.data=l),a.getSize(),a.needLayout=!0)})}formatPosition(e,t,n){return typeof e=="number"?e:Hl[e]!==void 0?t*Hl[e]:/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2}formatInitRootNodePosition(e){const{CENTER:t}=_.INIT_ROOT_NODE_POSITION;return(!e||!Array.isArray(e)||e.length<2)&&(e=[t,t]),e}setNodeCenter(e,t){let{initRootNodePosition:n}=this.mindMap.opt;n=this.formatInitRootNodePosition(t||n),e.left=this.formatPosition(n[0],this.mindMap.width,e.width),e.top=this.formatPosition(n[1],this.mindMap.height,e.height)}getRootCenterOffset(e,t){if(this.rootNodeCenterOffset)return this.rootNodeCenterOffset;let{initRootNodePosition:n}=this.mindMap.opt;const{CENTER:r}=_.INIT_ROOT_NODE_POSITION;if(n=this.formatInitRootNodePosition(n),n[0]===r&&n[1]===r)this.rootNodeCenterOffset={x:0,y:0};else{const s={width:e,height:t},a={width:e,height:t};this.setNodeCenter(s,[r,r]),this.setNodeCenter(a),this.rootNodeCenterOffset={x:a.left-s.left,y:a.top-s.top}}return this.rootNodeCenterOffset}updateChildren(e,t,n){e.forEach(r=>{r[t]+=n,r.children&&r.children.length&&!r.hasCustomPosition()&&this.updateChildren(r.children,t,n)})}updateChildrenPro(e,t){e.forEach(n=>{Object.keys(t).forEach(r=>{n[r]+=t[r]}),n.children&&n.children.length&&!n.hasCustomPosition()&&this.updateChildrenPro(n.children,t)})}getNodeAreaWidth(e,t=!1){let n=[],r=0,s=(a,o)=>{t&&a.checkHasGeneralization()&&(r+=a._generalizationNodeWidth),a.children.length?(o+=a.width/2,a.children.forEach(l=>{s(l,o)})):(o+=a.width,n.push(o))};return s(e,0),Math.max(...n)+r}quadraticCurvePath(e,t,n,r,s=!1){let a,o;return s?(a=e+(n-e)*.8,o=t+(r-t)*.2):(a=e+(n-e)*.2,o=t+(r-t)*.8),`M ${e},${t} Q ${a},${o} ${n},${r}`}cubicBezierPath(e,t,n,r,s=!1){let a,o,l,h;return s?(a=e,o=t+(r-t)/2,l=n,h=o):(a=e+(n-e)/2,o=t,l=a,h=r),`M ${e},${t} C ${a},${o} ${l},${h} ${n},${r}`}computeNewPoint(e,t,n=0){if(e[0]===t[0])return t[1]>e[1]?[t[0],t[1]-n]:[t[0],t[1]+n];if(e[1]===t[1])return t[0]>e[0]?[t[0]-n,t[1]]:[t[0]+n,t[1]]}createFoldLine(e){const{lineRadius:t}=this.mindMap.themeConfig,n=e.length;let r="",s="";if(n>=3&&t>0){const a=e[n-3],o=e[n-2],l=e[n-1];if(!(a[0].toFixed(0)===o[0].toFixed(0)&&o[0].toFixed(0)===l[0].toFixed(0)||a[1].toFixed(0)===o[1].toFixed(0)&&o[1].toFixed(0)===l[1].toFixed(0))){const c=this.computeNewPoint(a,o,t),d=this.computeNewPoint(l,o,t);s=`Q ${o[0]},${o[1]} ${d[0]},${d[1]}`,e.splice(n-2,1,c,s)}}return e.forEach((a,o)=>{if(typeof a=="string")r+=a;else{const[l,h]=a;o===0?r+=`M ${l},${h}`:r+=`L ${l},${h}`}}),r}getMarginX(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:s}=t,a=n.hoverRectPadding*2;return e===1?r.marginX+a:s.marginX+a}getMarginY(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:s}=t,a=n.hoverRectPadding*2;return e===1?r.marginY+a:s.marginY+a}getNodeWidthWithGeneralization(e){return Math.max(e.width,e.checkHasGeneralization()?e._generalizationNodeWidth:0)}getNodeHeightWithGeneralization(e){return Math.max(e.height,e.checkHasGeneralization()?e._generalizationNodeHeight:0)}getNodeBoundaries(e,t){let{generalizationLineMargin:n,generalizationNodeMargin:r}=this.mindMap.themeConfig,s=c=>{let d=1/0,f=-1/0,m=1/0,v=-1/0;c.children&&c.children.length>0&&c.children.forEach(x=>{let{left:b,right:E,top:M,bottom:z}=s(x),R=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeWidth+r:0,O=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeHeight+r:0;b-(t==="h"?R:0)<d&&(d=b-(t==="h"?R:0)),E+(t==="h"?R:0)>f&&(f=E+(t==="h"?R:0)),M<m&&(m=M),z+(t==="v"?O:0)>v&&(v=z+(t==="v"?O:0))});let g={left:c.left,right:c.left+c.width,top:c.top,bottom:c.top+c.height};return{left:g.left<d?g.left:d,right:g.right>f?g.right:f,top:g.top<m?g.top:m,bottom:g.bottom>v?g.bottom:v}},{left:a,right:o,top:l,bottom:h}=s(e);return{left:a,right:o,top:l,bottom:h,generalizationLineMargin:n,generalizationNodeMargin:r}}getChildrenBoundaries(e,t,n=0,r){let{generalizationLineMargin:s,generalizationNodeMargin:a}=this.mindMap.themeConfig;const o=e.children.slice(n,r+1);let l=1/0,h=-1/0,c=1/0,d=-1/0;return o.forEach(f=>{const m=this.getNodeBoundaries(f,t);l=m.left<l?m.left:l,h=m.right>h?m.right:h,c=m.top<c?m.top:c,d=m.bottom>d?m.bottom:d}),{left:l,right:h,top:c,bottom:d,generalizationLineMargin:s,generalizationNodeMargin:a}}getNodeGeneralizationRenderBoundaries(e,t){let n=null;return e.range?n=this.getChildrenBoundaries(e.node,t,e.range[0],e.range[1]):n=this.getNodeBoundaries(e.node,t),n}getNodeActChildrenLength(e){return e.nodeData.children&&e.nodeData.children.length}setLineStyle(e,t,n,r){t.plot(this.transformPath(n)),e&&e(t,r,!0)}transformPath(e){const{customTransformNodeLinePath:t}=this.mindMap.opt;return t?t(e):e}}class ph extends Fn{constructor(e={},t){super(e),this.isUseLeft=t===_.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(e){br([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){let e=0;Pe(this.renderer.renderTree,null,(t,n,r,s,a,o)=>{let l=this.createNode(t,n,r,s,a,o);if(l.sortIndex=e,e++,r?this.setNodeCenter(l):this.isUseLeft?l.left=n._node.left-l.width-this.getMarginX(s):l.left=n._node.left+n._node.width+this.getMarginX(s),!t.data.expand)return!0},(t,n,r,s)=>{let a=t.data.expand===!1?0:t._node.children.length;t._node.childrenAreaHeight=a?t._node.children.reduce((l,h)=>l+h.height,0)+(a+1)*this.getMarginY(s+1):0;let o=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(s+1):0;t._node.childrenAreaHeight2=Math.max(t._node.childrenAreaHeight,o)},!0,0)}computedTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginY(r+1),o=e.top+e.height/2-e.childrenAreaHeight/2+s;e.children.forEach(l=>{l.top=o,o+=l.height+s})}},null,!0)}adjustTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s=e.childrenAreaHeight2-this.getMarginY(r+1)*2-e.height;s>0&&this.updateBrothers(e,s/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.uid===e.uid||s.hasCustomPosition())return;let o=0;a<r?o=-t:a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let f=(this.getMarginX(e.layerIndex+1)-l)*.6;this.isUseLeft&&(f*=-1);let m=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((v,g)=>{let x;this.isUseLeft?x=e.layerIndex===0?r:r-l:x=e.layerIndex===0?r+a:r+a+l;let b=s+o/2,E=this.isUseLeft?v.left+v.width:v.left,M=v.top+v.height/2,z=m?v.width*(this.isUseLeft?-1:1):0;b=m&&!e.isRoot?b+o/2:b,M=m?M+v.height/2:M;let R=this.createFoldLine([[x,b],[x+f,b],[x+f,M],[E+z,M]]);this.setLineStyle(n,t[g],R,v)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d}=this.mindMap.themeConfig;e.children.forEach((f,m)=>{e.layerIndex===0&&(l=0);let v=this.isUseLeft?r-l:r+a+l,g=s+o/2,x=this.isUseLeft?f.left+f.width:f.left,b=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,b=d?b+f.height/2:b;let E=d?` L ${this.isUseLeft?f.left:f.left+f.width},${b}`:"",M=`M ${v},${g} L ${x},${b}`+E;this.setLineStyle(n,t[m],M,f)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d,rootLineStartPositionKeepSameInCurve:f,rootLineKeepSameInCurve:m}=this.mindMap.themeConfig;e.children.forEach((v,g)=>{e.layerIndex===0&&(l=0);let x;this.isUseLeft?x=e.layerIndex===0&&!f?r+a/2:r-l:x=e.layerIndex===0&&!f?r+a/2:r+a+l;let b=s+o/2,E=this.isUseLeft?v.left+v.width:v.left,M=v.top+v.height/2,z="";b=d&&!e.isRoot?b+o/2:b,M=d?M+v.height/2:M;let R;this.isUseLeft?R=d?` L ${v.left},${M}`:"":R=d?` L ${v.left+v.width},${M}`:"",e.isRoot&&!m?z=this.quadraticCurvePath(x,b,E,M)+R:z=this.cubicBezierPath(x,b,E,M)+R,this.setLineStyle(n,t[g],z,v)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,layerIndex:a}=e;a===0&&(s=0);let{translateX:o,translateY:l}=t.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,c=this.isUseLeft?0-s:n,d=r/2+h;c===o&&d===l||t.translate(c-o,d-l)}renderGeneralization(e){e.forEach(t=>{let{left:n,top:r,bottom:s,right:a,generalizationLineMargin:o,generalizationNodeMargin:l}=this.getNodeGeneralizationRenderBoundaries(t,"h"),h=this.isUseLeft?n-o:a+o,c=h,d=r,f=h,m=s,v=c+(this.isUseLeft?-20:20),g=d+(m-d)/2,x=`M ${c},${d} Q ${v},${g} ${f},${m}`;t.generalizationLine.plot(x),t.generalizationNode.left=h+(this.isUseLeft?-l:l)-(this.isUseLeft?t.generalizationNode.width:0),t.generalizationNode.top=r+(s-r-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r){this.isUseLeft?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}let V6=class extends Fn{constructor(e={}){super(e)}doLayout(e){br([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){Pe(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=o.getData("dir")||(s%2===0?_.LAYOUT_GROW_DIR.RIGHT:_.LAYOUT_GROW_DIR.LEFT),o.left=o.dir===_.LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(!e.data.expand){e._node.leftChildrenAreaHeight=0,e._node.rightChildrenAreaHeight=0;return}let s=0,a=0,o=0,l=0;e._node.children.forEach(c=>{c.dir===_.LAYOUT_GROW_DIR.LEFT?(s++,o+=c.height):(a++,l+=c.height)}),e._node.leftChildrenAreaHeight=o+(s+1)*this.getMarginY(r+1),e._node.rightChildrenAreaHeight=l+(a+1)*this.getMarginY(r+1);let h=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.leftChildrenAreaHeight2=Math.max(e._node.leftChildrenAreaHeight,h),e._node.rightChildrenAreaHeight2=Math.max(e._node.rightChildrenAreaHeight,h)},!0,0)}computedTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginY(r+1),a=e.top+e.height/2+s,o=a-e.leftChildrenAreaHeight/2,l=a-e.rightChildrenAreaHeight/2;e.children.forEach(h=>{h.dir===_.LAYOUT_GROW_DIR.LEFT?(h.top=o,o+=h.height+s):(h.top=l,l+=h.height+s)})}},null,!0)}adjustTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s=this.getMarginY(r+1)*2+e.height,a=e.leftChildrenAreaHeight2-s,o=e.rightChildrenAreaHeight2-s;(a>0||o>0)&&this.updateBrothers(e,a/2,o/2)},null,!0)}updateBrothers(e,t,n){if(e.parent){let r=e.parent.children.filter(a=>a.dir===e.dir),s=_t(e,r);r.forEach((a,o)=>{if(a.hasCustomPosition())return;let l=0,h=a.dir===_.LAYOUT_GROW_DIR.LEFT?t:n;o<s?l=-h:o>s&&(l=h),a.top+=l,a.children&&a.children.length&&this.updateChildren(a.children,"top",l)}),this.updateBrothers(e.parent,t,n)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let f=(this.getMarginX(e.layerIndex+1)-l)*.6,m=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((v,g)=>{let x=0,b=0,E=m?v.width:0;v.dir===_.LAYOUT_GROW_DIR.LEFT?(b=-f,x=e.layerIndex===0?r:r-l,E=-E):(b=f,x=e.layerIndex===0?r+a:r+a+l);let M=s+o/2,z=v.dir===_.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,R=v.top+v.height/2;M=m&&!e.isRoot?M+o/2:M,R=m?R+v.height/2:R;let O=this.createFoldLine([[x,M],[x+b,M],[x+b,R],[z+E,R]]);this.setLineStyle(n,t[g],O,v)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d}=this.mindMap.themeConfig;e.children.forEach((f,m)=>{e.layerIndex===0&&(l=0);let v=f.dir===_.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,g=s+o/2,x=f.dir===_.LAYOUT_GROW_DIR.LEFT?f.left+f.width:f.left,b=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,b=d?b+f.height/2:b;let E="";d&&(f.dir===_.LAYOUT_GROW_DIR.LEFT?E=` L ${f.left},${b}`:E=` L ${f.left+f.width},${b}`);let M=`M ${v},${g} L ${x},${b}`+E;this.setLineStyle(n,t[m],M,f)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d,rootLineKeepSameInCurve:f,rootLineStartPositionKeepSameInCurve:m}=this.mindMap.themeConfig;e.children.forEach((v,g)=>{e.layerIndex===0&&(l=0);let x=e.layerIndex===0&&!m?r+a/2:v.dir===_.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,b=s+o/2,E=v.dir===_.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,M=v.top+v.height/2,z="";b=d&&!e.isRoot?b+o/2:b,M=d?M+v.height/2:M;let R="";d&&(v.dir===_.LAYOUT_GROW_DIR.LEFT?R=` L ${v.left},${M}`:R=` L ${v.left+v.width},${M}`),e.isRoot&&!f?z=this.quadraticCurvePath(x,b,E,M)+R:z=this.cubicBezierPath(x,b,E,M)+R,this.setLineStyle(n,t[g],z,v)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s}=e,{translateX:a,translateY:o}=t.transform(),l=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,h=e.dir===_.LAYOUT_GROW_DIR.LEFT?0-s:n,c=r/2+l;if(h===a&&c===o)return;let d=h-a,f=c-o;t.translate(d,f)}renderGeneralization(e){e.forEach(t=>{let n=t.node.dir===_.LAYOUT_GROW_DIR.LEFT,{top:r,bottom:s,left:a,right:o,generalizationLineMargin:l,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),c=n?a-l:o+l,d=c,f=r,m=c,v=s,g=d+(n?-20:20),x=f+(v-f)/2,b=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(b),t.generalizationNode.left=c+(n?-h:h)-(n?t.generalizationNode.width:0),t.generalizationNode.top=r+(s-r-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){s.dir===_.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}};class j6 extends Fn{constructor(e={}){super(e)}doLayout(e){br([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Pe(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):t._node.isRoot&&(o.top=t._node.top+t._node.height+this.getMarginX(r)),!e.data.expand)return!0},(e,t,n,r)=>{if(n){let s=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaWidth=s?e._node.children.reduce((a,o)=>a+o.width,0)+(s+1)*this.getMarginX(r+1):0}},!0,0)}computedLeftTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginX(r+1),a=this.getMarginY(r+1);if(n){let l=e.left+e.width/2-e.childrenAreaWidth/2+s;e.children.forEach(h=>{h.left=l,l+=h.width+s})}else{let o=e.top+this.getNodeHeightWithGeneralization(e)+a+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(l=>{l.left=e.left+e.width*.5,l.top=o,o+=this.getNodeHeightWithGeneralization(l)+a+(this.getNodeActChildrenLength(l)>0?l.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;if(t&&t.isRoot){let o=this.getNodeAreaWidth(e,!0)-e.width;o>0&&this.updateBrothersLeft(e,o)}let s=e.children.length;if(t&&!t.isRoot&&s>0){let a=this.getMarginY(r+1),o=e.children.reduce((l,h)=>l+this.getNodeHeightWithGeneralization(h)+(this.getNodeActChildrenLength(h)>0?h.expandBtnSize:0),0)+s*a;this.updateBrothersTop(e,o)}},(e,t,n)=>{if(n){let{right:r,left:s}=this.getNodeBoundaries(e,"h"),a=r-s,o=e.left-s-(a-e.width)/2;this.updateChildren(e.children,"left",o)}},!0)}updateBrothersLeft(e,t){if(e.parent){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{s.hasCustomPosition()||a<=r||(s.left+=t,s.children&&s.children.length&&this.updateChildren(s.children,"left",t))}),this.updateBrothersLeft(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let d=e.children.length,f=this.getMarginX(e.layerIndex+1);if(e.isRoot){let m=r+a/2,v=s+o,g=f*.7,x=1/0,b=-1/0;e.children.forEach((M,z)=>{let R=M.left+M.width/2,O=M.top;R<x&&(x=R),R>b&&(b=R);let B=this.mindMap.themeConfig.nodeUseLineStyle?` L ${M.left},${O} L ${M.left+M.width},${O}`:"",F=`M ${R},${v+g} L ${R},${v+g>O?O+M.height:O}`+B;this.setLineStyle(n,t[z],F,M)}),x=Math.min(x,m),b=Math.max(b,m);let E=this.lineDraw.path();if(e.style.line(E),E.plot(this.transformPath(`M ${m},${v} L ${m},${v+g}`)),e._lines.push(E),n&&n(E,e),d>0){let M=this.lineDraw.path();e.style.line(M),M.plot(this.transformPath(`M ${x},${v+g} L ${b},${v+g}`)),e._lines.push(M),n&&n(M,e)}}else{let m=s+o,v=-1/0,g=e.left+e.width*.3;if(e.children.forEach((x,b)=>{let E=x.top+x.height/2;E>v&&(v=E);let M="",z=x.left,R=x.left+x.width<g,O=!1;R?z=x.left+x.width:x.left<g&&x.left+x.width>g&&(O=!0,E=x.top,v=E),E>s&&E<m?M=`M ${R?e.left:e.left+e.width},${E} L ${z},${E}`:E<m?(O&&(E=x.top+x.height,z=g),M=`M ${g},${s} L ${g},${E} L ${z},${E}`):(O&&(z=g),M=`M ${g},${E} L ${z},${E}`);let B=this.mindMap.themeConfig.nodeUseLineStyle?` L ${z},${E-x.height/2} L ${z},${E+x.height/2}`:"";M+=B,this.setLineStyle(n,t[b],M,x)}),d>0){let x=this.lineDraw.path();l=d>0?l:0,e.style.line(x),v<m+l?x.hide():(x.plot(this.transformPath(`M ${g},${m+l} L ${g},${v}`)),x.show()),e._lines.push(x),n&&n(x,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform();t.translate(n*.3-s/2-o,r+s/2-l)}}renderGeneralization(e){e.forEach(t=>{let{top:n,bottom:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=s+a,h=n,c=s+a,d=r,f=l+20,m=h+(d-h)/2,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.left=s+o,t.generalizationNode.top=n+(r-n-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){e.size(n,t).x(0).y(r)}}class K6 extends Fn{constructor(e={}){super(e)}doLayout(e){br([()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}])}computedBaseValue(){Pe(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):o.top=t._node.top+t._node.height+this.getMarginX(r),!e.data.expand)return!0},(e,t,n,r)=>{let s=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaWidth=s?e._node.children.reduce((o,l)=>o+l.width,0)+(s+1)*this.getMarginY(r+1):0;let a=e._node.checkHasGeneralization()?e._node._generalizationNodeWidth+this.getMarginY(r+1):0;e._node.childrenAreaWidth2=Math.max(e._node.childrenAreaWidth,a)},!0,0)}computedLeftValue(){Pe(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginY(r+1),o=e.left+e.width/2-e.childrenAreaWidth/2+s;e.children.forEach(l=>{l.left=o,o+=l.width+s})}},null,!0)}adjustLeftValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s=e.childrenAreaWidth2-this.getMarginY(r+1)*2-e.width;s>0&&this.updateBrothers(e,s/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a<r?o=-t:a>r&&(o=t),s.left+=o,s.children&&s.children.length&&this.updateChildren(s.children,"left",o)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d,rootLineStartPositionKeepSameInCurve:f,rootLineKeepSameInCurve:m}=this.mindMap.themeConfig;e.children.forEach((v,g)=>{e.layerIndex===0&&(l=0);let x=r+a/2,b=e.layerIndex===0&&!f?s+o/2:s+o+l,E=v.left+v.width/2,M=v.top,z="",R=d?` L ${v.left},${M} L ${v.left+v.width},${M}`:"";e.isRoot&&!m?z=this.quadraticCurvePath(x,b,E,M,!0)+R:z=this.cubicBezierPath(x,b,E,M,!0)+R,this.setLineStyle(n,t[g],z,v)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o}=e;const{nodeUseLineStyle:l}=this.mindMap.themeConfig;let h=r+a/2,c=s+o;e.children.forEach((d,f)=>{let m=d.left+d.width/2,v=d.top,g=l?` L ${d.left},${v} L ${d.left+d.width},${v}`:"",x=`M ${h},${c} L ${m},${v}`+g;this.setLineStyle(n,t[f],x,d)})}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l,isRoot:h}=e;const{alwaysShowExpandBtn:c,notShowExpandBtn:d}=this.mindMap.opt;(!c||d)&&(l=0);let f=r+a/2,m=s+o,g=this.getMarginX(e.layerIndex+1)*.7,x=1/0,b=-1/0,E=e.children.length;e.children.forEach((z,R)=>{let O=z.left+z.width/2,B=m+g>z.top?z.top+z.height:z.top;O<x&&(x=O),O>b&&(b=O);let F=this.mindMap.themeConfig.nodeUseLineStyle?` L ${z.left},${B} L ${z.left+z.width},${B}`:"",P=`M ${O},${m+g} L ${O},${B}`+F;this.setLineStyle(n,t[R],P,z)}),x=Math.min(f,x),b=Math.max(f,b);let M=this.lineDraw.path();if(e.style.line(M),l=E>0&&!h?l:0,M.plot(this.transformPath(`M ${f},${m+l} L ${f},${m+g}`)),e._lines.push(M),n&&n(M,e),E>0){let z=this.lineDraw.path();e.style.line(z),z.plot(this.transformPath(`M ${x},${m+g} L ${b},${m+g}`)),e._lines.push(z),n&&n(z,e)}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s}=e,{translateX:a,translateY:o}=t.transform();t.translate(n/2-s/2-a,r+s/2-o)}renderGeneralization(e){e.forEach(t=>{let{bottom:n,left:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"v"),l=r,h=n+a,c=s,d=n+a,f=l+(c-l)/2,m=h+20,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.top=n+o,t.generalizationNode.left=r+(s-r-t.generalizationNode.width)/2})}renderExpandBtnRect(e,t,n,r,s){e.size(n,t).x(0).y(r)}}class mh extends Fn{constructor(e={},t){super(e),this.layout=t}doLayout(e){br([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Pe(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):(this.layout===_.LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=s%2===0?_.LAYOUT_GROW_DIR.BOTTOM:_.LAYOUT_GROW_DIR.TOP:o.dir="",t._node.isRoot&&(o.top=t._node.top+(e._node.height>t._node.height?-(e._node.height-t._node.height)/2:(t._node.height-e._node.height)/2))),!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Pe(this.root,null,(e,t,n,r,s)=>{if(e.getData("expand")&&e.children&&e.children.length){let a=this.getMarginX(r+1),o=this.getMarginY(r+1);if(n){let h=e.left+e.width+a;e.children.forEach(c=>{c.left=h,h+=c.width+a})}else{let l=e.top+e.height+o+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(h=>{h.left=e.left+e.width*.5,h.top=l,l+=h.height+o+(this.getNodeActChildrenLength(h)>0?h.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;e.isRoot&&this.updateBrothersLeft(e);let s=e.children.length;if(t&&!t.isRoot&&s>0){let a=this.getMarginY(r+1),o=e.children.reduce((l,h)=>l+h.height+(this.getNodeActChildrenLength(h)>0?h.expandBtnSize:0),0)+s*a;this.updateBrothersTop(e,o)}},(e,t,n,r)=>{t&&t.isRoot&&e.dir===_.LAYOUT_GROW_DIR.TOP&&e.children.forEach(s=>{let a=this.getNodeAreaHeight(s),o=s.top;s.top=e.top-(s.top-e.top)-a+e.height,this.updateChildren(s.children,"top",s.top-o)})},!0)}getNodeAreaHeight(e){let t=0,n=r=>{t+=r.height+(this.getNodeActChildrenLength(r)>0?r.expandBtnSize:0)+this.getMarginY(r.layerIndex),r.children.length&&r.children.forEach(s=>{n(s)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(r=>{r.left+=n,r.children&&r.children.length&&this.updateChildren(r.children,"left",n);let{left:s,right:a}=this.getNodeBoundaries(r,"h"),l=a-s-r.width;l>0&&(n+=l)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let d=e.children.length;if(e.isRoot){let f=e;e.children.forEach((m,v)=>{let g=f.left+f.width,x=m.left,b=e.top+e.height/2,E=`M ${g},${b} L ${x},${b}`;this.setLineStyle(n,t[v],E,m),f=m})}else{let f=-1/0,m=1/0,v=e.left+e.width*.3;if(e.children.forEach((g,x)=>{let b=g.top+g.height/2;b>f&&(f=b),b<m&&(m=b);let E=`M ${v},${b} L ${g.left},${b}`;this.setLineStyle(n,t[x],E,g)}),d>0){let g=this.lineDraw.path();l=d>0?l:0,e.parent&&e.parent.isRoot&&e.dir===_.LAYOUT_GROW_DIR.TOP?g.plot(this.transformPath(`M ${v},${s} L ${v},${m}`)):g.plot(this.transformPath(`M ${v},${s+o+l} L ${v},${f}`)),e.style.line(g),e._lines.push(g),n&&n(g,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform();e.parent&&e.parent.isRoot&&e.dir===_.LAYOUT_GROW_DIR.TOP?t.translate(n*.3-s/2-o,-s/2-l):t.translate(n*.3-s/2-o,r+s/2-l)}}renderGeneralization(e){e.forEach(t=>{let{top:n,bottom:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=s+a,h=n,c=s+a,d=r,f=l+20,m=h+(d-h)/2,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.left=s+o,t.generalizationNode.top=n+(r-n-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){if(this.layout===_.LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let a="";s.dir===_.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?_.LAYOUT_GROW_DIR.TOP:_.LAYOUT_GROW_DIR.BOTTOM:a=_.LAYOUT_GROW_DIR.BOTTOM,a===_.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}class yo extends Fn{constructor(e={},t){super(e),this.layout=t}doLayout(e){br([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Pe(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:this.layout===_.LAYOUT.VERTICAL_TIMELINE2?o.dir=_.LAYOUT_GROW_DIR.LEFT:this.layout===_.LAYOUT.VERTICAL_TIMELINE3?o.dir=_.LAYOUT_GROW_DIR.RIGHT:o.dir=s%2===0?_.LAYOUT_GROW_DIR.RIGHT:_.LAYOUT_GROW_DIR.LEFT,t._node.isRoot?o.left=t._node.left+(e._node.width>t._node.width?-(e._node.width-t._node.width)/2:(t._node.width-e._node.width)/2):o.left=o.dir===_.LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(n)return;let s=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaHeight=s?e._node.children.reduce((a,o)=>a+o.height,0)+(s+1)*this.getMarginY(r+1):0},!0,0)}computedTopValue(){Pe(this.root,null,(e,t,n,r,s)=>{if(e.getData("expand")&&e.children&&e.children.length){let a=this.getMarginY(r+1);if(n){let l=e.top+e.height+a;e.children.forEach(h=>{h.top=l,l+=h.height+a})}else{let o=this.getMarginY(r+1),h=e.top+e.height/2+o-e.childrenAreaHeight/2;e.children.forEach(c=>{c.top=h,h+=c.height+o})}}},null,!0)}adjustLeftTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand")||n)return;let s=this.getMarginY(r+1)*2+e.height,a=e.childrenAreaHeight-s;a>0&&this.updateBrothers(e,a/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition()||!e.parent.isRoot&&s.uid===e.uid)return;let o=0;e.parent.isRoot?a<r?o=0:a>r?o=t*2:o=t:a<r?o=-t:a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothers(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{expandBtnSize:r}=e;const{alwaysShowExpandBtn:s,notShowExpandBtn:a}=this.mindMap.opt;if((!s||a)&&(r=0),e.isRoot){let o=e;e.children.forEach((l,h)=>{let c=o.top+o.height,d=l.top,f=e.left+e.width/2,m=`M ${f},${c} L ${f},${d}`;this.setLineStyle(n,t[h],m,l),o=l})}else if(e.dir===_.LAYOUT_GROW_DIR.RIGHT){let o=e.left+e.width,l=e.top+e.height/2,c=(this.getMarginX(e.layerIndex+1)-r)*.6;e.children.forEach((d,f)=>{let m=d.left,v=d.top+d.height/2,g=this.createFoldLine([[o,l],[o+c,l],[o+c,v],[m,v]]);this.setLineStyle(n,t[f],g,d)})}else{let o=e.left,l=e.top+e.height/2,c=(this.getMarginX(e.layerIndex+1)-r)*.6;e.children.forEach((d,f)=>{let m=d.left+d.width,v=d.top+d.height/2,g=this.createFoldLine([[o,l],[o-c,l],[o-c,v],[m,v]]);this.setLineStyle(n,t[f],g,d)})}}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0),e.children.forEach((d,f)=>{if(e.isRoot){let m=e;e.children.forEach((v,g)=>{let x=m.top+m.height,b=v.top,E=e.left+e.width/2,M=`M ${E},${x} L ${E},${b}`;this.setLineStyle(n,t[g],M,v),m=v})}else{let m=d.dir===_.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===_.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,b=`M ${m},${v} L ${g},${x}`;this.setLineStyle(n,t[f],b,d)}})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0),e.children.forEach((d,f)=>{if(e.isRoot){let m=e;e.children.forEach((v,g)=>{let x=m.top+m.height,b=v.top,E=e.left+e.width/2,M=`M ${E},${x} L ${E},${b}`;this.setLineStyle(n,t[g],M,v),m=v})}else{let m=d.dir===_.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===_.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,b=this.cubicBezierPath(m,v,g,x);this.setLineStyle(n,t[f],b,d)}})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform();e.dir===_.LAYOUT_GROW_DIR.RIGHT?t.translate(n-o,r/2-l):t.translate(-s-o,r/2-l)}}renderGeneralization(e){e.forEach(t=>{let n=t.node.dir===_.LAYOUT_GROW_DIR.LEFT,{top:r,bottom:s,left:a,right:o,generalizationLineMargin:l,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),c=n?a-l:o+l,d=c,f=r,m=c,v=s,g=d+(n?-20:20),x=f+(v-f)/2,b=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(this.transformPath(b)),t.generalizationNode.left=c+(n?-h:h)-(n?t.generalizationNode.width:0),t.generalizationNode.top=r+(s-r-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){s.dir===_.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}const Ui={top:{renderExpandBtn({node:i,btn:e,expandBtnSize:t,translateX:n,translateY:r,width:s,height:a}){i.parent&&i.parent.isRoot?e.translate(s*.3-t/2-n,-t/2-r):e.translate(s*.3-t/2-n,a+t/2-r)},renderLine({node:i,line:e,top:t,x:n,lineLength:r,height:s,expandBtnSize:a,maxy:o,ctx:l}){i.parent&&i.parent.isRoot?e.plot(l.transformPath(`M ${n},${t} L ${n+r},${t-Math.tan(Br(l.mindMap.opt.fishboneDeg))*r}`)):e.plot(l.transformPath(`M ${n},${t+s+a} L ${n},${o}`))},computedLeftTopValue({layerIndex:i,node:e,ctx:t}){if(i>=1&&e.children){let n=t.getMarginY(i+1),r=e.left+e.width*t.childIndent,s=e.top+e.height+(t.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(a=>{a.left=r,a.top+=s,s+=a.height+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:i,parent:e,ctx:t,layerIndex:n}){let r=i.children.length,s=t.getMarginY(n+1);if(e&&!e.isRoot&&r>0){let a=i.children.reduce((o,l)=>o+l.height+(t.getNodeActChildrenLength(l)>0?l.expandBtnSize:0)+s,0);t.updateBrothersTop(i,a)}},adjustLeftTopValueAfter({parent:i,node:e,ctx:t}){if(i&&i.isRoot){let n=t.getMarginY(e.layerIndex+1),r=e.expandBtnSize+n;e.children.forEach(s=>{let a=t.getNodeAreaHeight(s),o=s.top,l=s.left;s.top=e.top-(s.top-e.top)-a+e.height,s.left=e.left+e.width*t.indent+(a+r)/Math.tan(Br(t.mindMap.opt.fishboneDeg)),r+=a,t.updateChildrenPro(s.children,{top:s.top-o,left:s.left-l})})}}},bottom:{renderExpandBtn({node:i,btn:e,expandBtnSize:t,translateX:n,translateY:r,width:s,height:a}){i.parent&&i.parent.isRoot?e.translate(s*.3-t/2-n,a+t/2-r):e.translate(s*.3-t/2-n,-t/2-r)},renderLine({node:i,line:e,top:t,x:n,lineLength:r,height:s,miny:a,ctx:o}){i.parent&&i.parent.isRoot?e.plot(o.transformPath(`M ${n},${t+s} L ${n+r},${t+s+Math.tan(Br(o.mindMap.opt.fishboneDeg))*r}`)):e.plot(o.transformPath(`M ${n},${t} L ${n},${a}`))},computedLeftTopValue({layerIndex:i,node:e,ctx:t}){let n=t.getMarginY(i+1);if(i===1&&e.children){let r=e.left+e.width*t.childIndent,s=e.top+e.height+(t.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(a=>{a.left=r,a.top=s+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0),s+=a.height+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0)+n})}if(i>1&&e.children){let r=e.left+e.width*t.childIndent,s=e.top-(t.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)-n;e.children.forEach(a=>{a.left=r,a.top=s-a.height,s-=a.height+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:i,ctx:e,layerIndex:t}){let n=e.getMarginY(t+1),r=i.children.length;if(t>2&&r>0){let s=i.children.reduce((a,o)=>a+o.height+(e.getNodeActChildrenLength(o)>0?o.expandBtnSize:0)+n,0);e.updateBrothersTop(i,-s)}},adjustLeftTopValueAfter({parent:i,node:e,ctx:t}){if(i&&i.isRoot){let n=t.getMarginY(e.layerIndex+1),r=0,s=e.expandBtnSize;e.children.forEach(a=>{let o=t.getNodeActChildrenLength(a)>0,l=t.getNodeAreaHeight(a),h=o?l-a.height-(o?a.expandBtnSize:0):0;h-=o?n:0;let c=r+h,d=a.left;a.top+=c,a.left=e.left+e.width*t.indent+(l+s)/Math.tan(Br(t.mindMap.opt.fishboneDeg)),r+=h,s+=l,t.updateChildrenPro(a.children,{top:c,left:a.left-d})})}}}};class gh extends Fn{constructor(e={},t){super(e),this.layout=t,this.indent=.3,this.childIndent=.5,this.fishTail=null,this.maxx=0,this.headRatio=1,this.tailRatio=.6,this.paddingXRatio=.3,this.fishHeadPathStr="M4,181 C4,181, 0,177, 4,173 Q 96.09523809523809,0, 288.2857142857143,0 L 288.2857142857143,354 Q 48.047619047619044,354, 8,218.18367346938777 C8,218.18367346938777, 6,214.18367346938777, 8,214.18367346938777 L 41.183673469387756,214.18367346938777 Z",this.fishTailPathStr="M 606.9342905223708 0 Q 713.1342905223709 -177 819.3342905223708 -177 L 766.2342905223709 0 L 819.3342905223708 177 Q 713.1342905223709 177 606.9342905223708 0 z",this.bindEvent(),this.extendShape(),this.beforeChange=this.beforeChange.bind(this)}nodeIsRemoveAllLines(e){return e.isRoot||e.layerIndex===1}isFishbone2(){return this.layout===_.LAYOUT.FISHBONE2}bindEvent(){this.isFishbone2()&&(this.onCheckUpdateFishTail=this.onCheckUpdateFishTail.bind(this),this.mindMap.on("afterExecCommand",this.onCheckUpdateFishTail))}unBindEvent(){this.mindMap.off("afterExecCommand",this.onCheckUpdateFishTail)}extendShape(){this.isFishbone2()&&this.mindMap.addShape({name:"fishHead",createShape:e=>{const t=mt(`<path d="${this.fishHeadPathStr}"></path>`),{width:n,height:r}=e.shapeInstance.getNodeSize();return t.size(n,r),t},getPadding:({width:e,height:t,paddingX:n,paddingY:r})=>{e+=n*2,t+=r*2;let s=this.paddingXRatio*e,a=0;return e+=s*2,a=(e/this.headRatio-t)/2,{paddingX:s,paddingY:a}}})}doLayout(e){br([()=>{this.computedBaseValue(),this.addFishTail()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue(),this.updateFishTailPosition()},()=>{e(this.root)}])}addFishTail(){if(!this.isFishbone2())return;const e=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");e?this.fishTail=e:(this.fishTail=mt(`<path d="${this.fishTailPathStr}"></path>`),this.fishTail.addClass("smm-layout-fishbone-tail"));const t=this.root.height,n=t*this.tailRatio;this.fishTail.size(n,t),this.styleFishTail(),this.mindMap.lineDraw.add(this.fishTail)}onCheckUpdateFishTail(e,t,n){if(e==="SET_NODE_DATA"){let r=!1;Object.keys(n).forEach(s=>{kd.includes(s)&&(r=!0)}),r&&this.styleFishTail()}}styleFishTail(){this.root.style.shape(this.fishTail)}removeFishTail(){const e=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");e&&e.remove()}updateFishTailPosition(){this.isFishbone2()&&this.fishTail.x(this.maxx).cy(this.root.top+this.root.height/2)}computedBaseValue(){Pe(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{n&&this.isFishbone2()&&(e.data.shape="fishHead");let o=this.createNode(e,t,n,r,s,a);if(n)this.setNodeCenter(o);else if(t._node.dir?o.dir=t._node.dir:o.dir=s%2===0?_.LAYOUT_GROW_DIR.TOP:_.LAYOUT_GROW_DIR.BOTTOM,t._node.isRoot){let l=this.getMarginY(r);const h=this.isFishbone2()?t._node.height/4:0;this.checkIsTop(o)?o.top=t._node.top-o.height-l+h:o.top=t._node.top+t._node.height+l-h}if(!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(e.isRoot){let a=this.getMarginX(r+1);const o=this.isFishbone2()?2:1;let l=e.left+e.width+e.height/o+a,h=e.left+e.width+e.height/o+a;e.children.forEach(c=>{this.checkIsTop(c)?(c.left=l,l+=c.width+a):(c.left=h+20,h+=c.width+a)})}let s={layerIndex:r,node:e,ctx:this};this.checkIsTop(e)?Ui.top.computedLeftTopValue(s):Ui.bottom.computedLeftTopValue(s)},null,!0)}adjustLeftTopValue(){Pe(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s={node:e,parent:t,layerIndex:r,ctx:this};this.checkIsTop(e)?Ui.top.adjustLeftTopValueBefore(s):Ui.bottom.adjustLeftTopValueBefore(s)},(e,t)=>{let n={parent:t,node:e,ctx:this};if(this.checkIsTop(e)?Ui.top.adjustLeftTopValueAfter(n):Ui.bottom.adjustLeftTopValueAfter(n),e.isRoot){let r=0,s=0,a=-1/0;e.children.forEach(o=>{if(this.checkIsTop(o)){o.left+=r,this.updateChildren(o.children,"left",r);let{left:l,right:h}=this.getNodeBoundaries(o,"h");h>a&&(a=h),r+=h-l}else{o.left+=s,this.updateChildren(o.children,"left",s);let{left:l,right:h}=this.getNodeBoundaries(o,"h");h>a&&(a=h),s+=h-l}}),this.maxx=a}},!0)}getNodeAreaHeight(e){let t=0,n=r=>{let s=this.getMarginY(r.layerIndex);t+=r.height+(this.getNodeActChildrenLength(r)>0?r.expandBtnSize:0)+s,r.children.length&&r.children.forEach(a=>{n(a)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(r=>{r.left+=n,r.children&&r.children.length&&this.updateChildren(r.children,"left",n);let{left:s,right:a}=this.getNodeBoundaries(r,"h"),l=a-s-r.width;l>0&&(n+=l)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=_t(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.checkIsTop(e)?this.updateBrothersTop(e.parent,t):this.updateBrothersTop(e.parent,e.layerIndex===3?0:t)}}checkIsTop(e){return e.dir===_.LAYOUT_GROW_DIR.TOP}renderLine(e,t,n){if(e.layerIndex!==1&&e.children.length<=0)return[];let{top:r,height:s,expandBtnSize:a}=e;const{alwaysShowExpandBtn:o,notShowExpandBtn:l}=this.mindMap.opt;(!o||l)&&(a=0);let h=e.children.length;if(e.isRoot){let c=-1/0;e.children.forEach(g=>{g.left>c&&(c=g.left);let x=this.getMarginY(g.layerIndex),b=g.left,E=e.height/2+x-(this.isFishbone2()?e.height/4:0),M=E/Math.tan(Br(this.mindMap.opt.fishboneDeg)),z=this.lineDraw.path();this.checkIsTop(g)?z.plot(this.transformPath(`M ${b-M},${g.top+g.height+E} L ${g.left},${g.top+g.height}`)):z.plot(this.transformPath(`M ${b-M},${g.top-E} L ${b},${g.top}`)),e.style.line(z),e._lines.push(z),n&&n(z,e)});let d=e.top+e.height/2,f=e.height/2+this.getMarginY(e.layerIndex+1),m=this.lineDraw.path();const v=this.isFishbone2()?this.maxx:c-f/Math.tan(Br(this.mindMap.opt.fishboneDeg));m.plot(this.transformPath(`M ${e.left+e.width},${d} L ${v},${d}`)),e.style.line(m),e._lines.push(m),n&&n(m,e)}else{let c=-1/0,d=1/0,f=-1/0,m=e.left+e.width*this.indent;if(e.children.forEach((v,g)=>{v.left>f&&(f=v.left);let x=v.top+v.height/2;if(x>c&&(c=x),x<d&&(d=x),e.layerIndex>1){let b=`M ${m},${x} L ${v.left},${x}`;this.setLineStyle(n,t[g],b,v)}}),h>=0){let v=this.lineDraw.path();a=h>0?a:0;let g=f-e.left-e.width*this.indent;g=Math.max(g,0);let x={node:e,line:v,top:r,x:m,lineLength:g,height:s,expandBtnSize:a,maxy:c,miny:d,ctx:this};this.checkIsTop(e)?Ui.top.renderLine(x):Ui.bottom.renderLine(x),e.style.line(v),e._lines.push(v),n&&n(v,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform(),h={node:e,btn:t,expandBtnSize:s,translateX:o,translateY:l,width:n,height:r};this.checkIsTop(e)?Ui.top.renderExpandBtn(h):Ui.bottom.renderExpandBtn(h)}}renderGeneralization(e){e.forEach(t=>{let{top:n,bottom:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=s+a,h=n,c=s+a,d=r,f=l+20,m=h+(d-h)/2,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.left=s+o,t.generalizationNode.top=n+(r-n-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){let a="";s.dir===_.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?_.LAYOUT_GROW_DIR.TOP:_.LAYOUT_GROW_DIR.BOTTOM:a=s.layerIndex===1?_.LAYOUT_GROW_DIR.BOTTOM:_.LAYOUT_GROW_DIR.TOP,a===_.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}beforeChange(){this.isFishbone2()&&(this.root.nodeData.data.shape=_.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape("fishHead"))}}const vh="smm-node-edit-wrap";class Z6{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.currentNode=null,this.textEditNode=null,this.showTextEdit=!1,this.cacheEditingText="",this.hasBodyMousedown=!1,this.textNodePaddingX=5,this.textNodePaddingY=3,this.isNeedUpdateTextEditNode=!1,this.mindMap.addEditNodeClass(vh),this.bindEvent()}bindEvent(){this.show=this.show.bind(this),this.onScale=this.onScale.bind(this),this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("node_dblclick",(e,t,n)=>{this.show({node:e,e:t,isInserting:n})}),this.mindMap.on("draw_click",()=>{this.hideEditTextBox()}),this.mindMap.on("body_mousedown",()=>{this.hasBodyMousedown=!0}),this.mindMap.on("body_click",()=>{this.hasBodyMousedown&&(this.hasBodyMousedown=!1,this.mindMap.opt.isEndNodeTextEditOnClickOuter&&this.hideEditTextBox())}),this.mindMap.on("svg_mousedown",()=>{this.hideEditTextBox()}),this.mindMap.on("expand_btn_click",()=>{this.hideEditTextBox()}),this.mindMap.on("before_node_active",()=>{this.hideEditTextBox()}),this.mindMap.on("mousewheel",()=>{this.mindMap.opt.mousewheelAction===_.MOUSE_WHEEL_ACTION.MOVE&&this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("F2",()=>{this.renderer.activeNodeList.length<=0||this.show({node:this.renderer.activeNodeList[0]})}),this.mindMap.on("scale",this.onScale),this.mindMap.opt.enableAutoEnterTextEditWhenKeydown&&window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()}),this.mindMap.on("after_update_config",(e,t)=>{e.openRealtimeRenderOnNodeTextEdit!==t.openRealtimeRenderOnNodeTextEdit&&(this.mindMap.richText?this.mindMap.richText.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(e.openRealtimeRenderOnNodeTextEdit):this.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(e.openRealtimeRenderOnNodeTextEdit)),e.enableAutoEnterTextEditWhenKeydown!==t.enableAutoEnterTextEditWhenKeydown&&window[e.enableAutoEnterTextEditWhenKeydown?"addEventListener":"removeEventListener"]("keydown",this.onKeydown)}),this.mindMap.on("afterExecCommand",()=>{this.isShowTextEdit()&&(this.isNeedUpdateTextEditNode=!0)}),this.mindMap.on("node_tree_render_end",()=>{this.isShowTextEdit()&&this.isNeedUpdateTextEditNode&&(this.isNeedUpdateTextEditNode=!1,this.updateTextEditNode())})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(e){if(e.target!==document.body)return;const t=this.mindMap.renderer.activeNodeList;if(t.length<=0||t.length>1)return;const n=t[0];n&&this.checkIsAutoEnterTextEditKey(e)&&(e.preventDefault(),this.show({node:n,e,isInserting:!1,isFromKeyDown:!0}))}checkIsAutoEnterTextEditKey(e){const t=e.keyCode;return(t===229||t>=65&&t<=90||t>=48&&t<=57)&&!this.mindMap.keyCommand.hasCombinationKey(e)}registerTmpShortcut(){this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("Tab",()=>{this.hideEditTextBox()})}isShowTextEdit(){return this.mindMap.richText?this.mindMap.richText.showTextEdit:this.showTextEdit}setIsShowTextEdit(e){this.showTextEdit=e,e?this.mindMap.keyCommand.stopCheckInSvg():this.mindMap.keyCommand.recoveryCheckInSvg()}async show({node:e,isInserting:t=!1,isFromKeyDown:n=!1,isFromScale:r=!1}){if(e.isUseCustomNodeContent())return;this.getCurrentEditNode()&&this.hideEditTextBox();const{beforeTextEdit:a,openRealtimeRenderOnNodeTextEdit:o}=this.mindMap.opt;if(typeof a=="function"){let m=!1;try{m=await a(e,t)}catch(v){m=!1,this.mindMap.opt.errorHandler(ur.BEFORE_TEXT_EDIT_ERROR,v)}if(!m)return}const{offsetLeft:l,offsetTop:h}=Qf(this.mindMap,e);this.mindMap.view.translateXY(l,h);const c=e._textData.node;o&&c.show();const d=c.node.getBoundingClientRect();o&&c.hide();const f={node:e,rect:d,isInserting:t,isFromKeyDown:n,isFromScale:r};if(this.mindMap.richText){this.mindMap.richText.showEditText(f);return}this.currentNode=e,this.showEditTextBox(f)}onOpenRealtimeRenderOnNodeTextEditConfigUpdate(e){this.textEditNode&&(this.textEditNode.style.background=e?"transparent":this.currentNode?this.getBackground(this.currentNode):"",this.textEditNode.style.boxShadow=e?"none":"0 0 20px rgba(0,0,0,.5)")}onScale(){const e=this.getCurrentEditNode();e&&(this.mindMap.richText?(this.mindMap.richText.cacheEditingText=this.mindMap.richText.getEditText(),this.mindMap.richText.showTextEdit=!1):(this.cacheEditingText=this.getEditText(),this.setIsShowTextEdit(!1)),this.show({node:e,isFromScale:!0}))}showEditTextBox({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:s}){if(this.showTextEdit)return;const{nodeTextEditZIndex:a,textAutoWrapWidth:o,selectTextOnEnterEditText:l,openRealtimeRenderOnNodeTextEdit:h,autoEmptyTextWhenKeydownEnterEdit:c}=this.mindMap.opt;s||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),this.textEditNode||(this.textEditNode=document.createElement("div"),this.textEditNode.classList.add(vh),this.textEditNode.style.cssText=`
243
+ position: fixed;
244
+ box-sizing: border-box;
245
+ ${h?"":"box-shadow: 0 0 20px rgba(0,0,0,.5);"}
246
+ padding: ${this.textNodePaddingY}px ${this.textNodePaddingX}px;
247
+ margin-left: -${this.textNodePaddingX}px;
248
+ margin-top: -${this.textNodePaddingY}px;
249
+ outline: none;
250
+ word-break: break-all;
251
+ line-break: anywhere;
252
+ `,this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",x=>{x.stopPropagation()}),this.textEditNode.addEventListener("click",x=>{x.stopPropagation()}),this.textEditNode.addEventListener("mousedown",x=>{x.stopPropagation()}),this.textEditNode.addEventListener("keydown",x=>{this.checkIsAutoEnterTextEditKey(x)&&x.stopPropagation()}),this.textEditNode.addEventListener("paste",x=>{const b=x.clipboardData.getData("text"),{isSmm:E,data:M}=f0(b);E&&M[0]&&M[0].data?eh(x,gd(M[0].data.text)):eh(x),this.emitTextChangeEvent()}),this.textEditNode.addEventListener("input",()=>{this.emitTextChangeEvent()}),(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.textEditNode));const d=this.mindMap.view.scale,f=e.style.merge("fontSize"),m=(this.cacheEditingText||e.getData("text")).split(/\n/gim).map(g=>qa(g)),v=e._textData.node.attr("data-ismultiLine")==="true";e.style.domText(this.textEditNode,d),h||(this.textEditNode.style.background=this.getBackground(e)),this.textEditNode.style.zIndex=a,r&&c?this.textEditNode.innerHTML="":this.textEditNode.innerHTML=m.join("<br>"),this.textEditNode.style.minWidth=t.width+this.textNodePaddingX*2+"px",this.textEditNode.style.minHeight=t.height+"px",this.textEditNode.style.left=Math.floor(t.left)+"px",this.textEditNode.style.top=Math.floor(t.top)+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=o*d+"px",v?(this.textEditNode.style.lineHeight=Ea,this.textEditNode.style.transform=`translateY(${(Ea-1)*f/2*d}px)`):this.textEditNode.style.lineHeight="normal",this.setIsShowTextEdit(!0),n||l&&!r?f2(this.textEditNode):u2(this.textEditNode),this.cacheEditingText=""}emitTextChangeEvent(){this.mindMap.emit("node_text_edit_change",{node:this.currentNode,text:this.getEditText(),richText:!1})}updateTextEditNode(){if(this.mindMap.richText){this.mindMap.richText.updateTextEditNode();return}if(!this.showTextEdit||!this.currentNode)return;const e=this.currentNode._textData.node.node.getBoundingClientRect();this.textEditNode.style.minWidth=e.width+this.textNodePaddingX*2+"px",this.textEditNode.style.minHeight=e.height+this.textNodePaddingY*2+"px",this.textEditNode.style.left=Math.floor(e.left)+"px",this.textEditNode.style.top=Math.floor(e.top)+"px"}getBackground(e){if(e.style.merge("gradientStyle")){const n=e.style.merge("startColor"),r=e.style.merge("endColor");return`linear-gradient(to right, ${n}, ${r})`}else{const n=e.style.merge("fillColor"),r=e.style.merge("color");return n==="transparent"?vd(r)?r2(this.mindMap.themeConfig):"#fff":n}}removeTextEditEl(){if(this.mindMap.richText){this.mindMap.richText.removeTextEditEl();return}if(!this.textEditNode)return;(this.mindMap.opt.customInnerElsAppendTo||document.body).removeChild(this.textEditNode)}getEditText(){return Xf(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.mindMap.richText)return this.mindMap.richText.hideEditText();if(!this.showTextEdit)return;const e=this.currentNode,t=this.getEditText();this.currentNode=null,this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.textEditNode.style.fontFamily="inherit",this.textEditNode.style.fontSize="inherit",this.textEditNode.style.fontWeight="normal",this.textEditNode.style.transform="translateY(0)",this.setIsShowTextEdit(!1),this.mindMap.execCommand("SET_NODE_TEXT",e,t),this.mindMap.render(),this.mindMap.emit("hide_text_edit",this.textEditNode,this.renderer.activeNodeList,e)}getCurrentEditNode(){return this.mindMap.richText?this.mindMap.richText.node:this.currentNode}}const xh={[_.LAYOUT.LOGICAL_STRUCTURE]:ph,[_.LAYOUT.LOGICAL_STRUCTURE_LEFT]:ph,[_.LAYOUT.MIND_MAP]:V6,[_.LAYOUT.CATALOG_ORGANIZATION]:j6,[_.LAYOUT.ORGANIZATION_STRUCTURE]:K6,[_.LAYOUT.TIMELINE]:mh,[_.LAYOUT.TIMELINE2]:mh,[_.LAYOUT.VERTICAL_TIMELINE]:yo,[_.LAYOUT.VERTICAL_TIMELINE2]:yo,[_.LAYOUT.VERTICAL_TIMELINE3]:yo,[_.LAYOUT.FISHBONE]:gh,[_.LAYOUT.FISHBONE2]:gh};class Q6{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?Sa({},this.mindMap.opt.data):null,this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.nodeCache={},this.lastNodeCache={},this.renderSourceList=[],this.renderCallbackList=[],this.activeNodeList=[],this.emitNodeActiveEventTimer=null,this.renderTimer=null,this.root=null,this.textEdit=new Z6(this),this.beingCopyData=null,this.highlightBoxNode=null,this.highlightBoxNodeStyle=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){this.layout&&this.layout.beforeChange&&this.layout.beforeChange();const{layout:e}=this.mindMap.opt;let t=xh[e]||this.mindMap[e];t||(t=xh[_.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=_.LAYOUT.LOGICAL_STRUCTURE),this.layout=new t(this,e)}setData(e){this.renderTree=e||null}bindEvent(){const{openPerformance:e,performanceConfig:t,openRealtimeRenderOnNodeTextEdit:n}=this.mindMap.opt;this.mindMap.on("draw_click",s=>{this.clearActiveNodeListOnDrawClick(s,"click")}),this.mindMap.on("contextmenu",s=>{this.clearActiveNodeListOnDrawClick(s,"contextmenu")}),this.mindMap.svg.on("dblclick",()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()});const r=Ga(()=>{this.renderTree&&this.root&&(this.mindMap.emit("node_tree_render_start"),this.root.render(()=>{this.mindMap.emit("node_tree_render_end")},!1,!0))},t.time);e&&this.mindMap.on("view_data_change",r),this.onNodeTextEditChange=jf(this.onNodeTextEditChange,100,this),n&&this.mindMap.on("node_text_edit_change",this.onNodeTextEditChange),this.mindMap.on("after_update_config",(s,a)=>{s.openPerformance!==a.openPerformance&&(this.mindMap[s.openPerformance?"on":"off"]("view_data_change",r),this.forceLoadNode()),s.openRealtimeRenderOnNodeTextEdit!==a.openRealtimeRenderOnNodeTextEdit&&this.mindMap[s.openRealtimeRenderOnNodeTextEdit?"on":"off"]("node_text_edit_change",this.onNodeTextEditChange)})}onNodeTextEditChange({node:e,text:t}){e._textData=e.createTextNode(t);const{width:n,height:r}=e.getNodeRect();e.width=n,e.height=r,e.layout(),this.mindMap.render(()=>{this.textEdit.updateTextEditNode()})}forceLoadNode(e){e=e||this.root,e&&(this.mindMap.emit("node_tree_render_start"),e.render(()=>{this.mindMap.emit("node_tree_render_end")},!0))}registerCommands(){this.selectAll=this.selectAll.bind(this),this.mindMap.command.add("SELECT_ALL",this.selectAll),this.back=this.back.bind(this),this.mindMap.command.add("BACK",this.back),this.forward=this.forward.bind(this),this.mindMap.command.add("FORWARD",this.forward),this.insertNode=this.insertNode.bind(this),this.mindMap.command.add("INSERT_NODE",this.insertNode),this.insertMultiNode=this.insertMultiNode.bind(this),this.mindMap.command.add("INSERT_MULTI_NODE",this.insertMultiNode),this.insertChildNode=this.insertChildNode.bind(this),this.mindMap.command.add("INSERT_CHILD_NODE",this.insertChildNode),this.insertMultiChildNode=this.insertMultiChildNode.bind(this),this.mindMap.command.add("INSERT_MULTI_CHILD_NODE",this.insertMultiChildNode),this.insertParentNode=this.insertParentNode.bind(this),this.mindMap.command.add("INSERT_PARENT_NODE",this.insertParentNode),this.upNode=this.upNode.bind(this),this.mindMap.command.add("UP_NODE",this.upNode),this.downNode=this.downNode.bind(this),this.mindMap.command.add("DOWN_NODE",this.downNode),this.moveUpOneLevel=this.moveUpOneLevel.bind(this),this.mindMap.command.add("MOVE_UP_ONE_LEVEL",this.moveUpOneLevel),this.insertAfter=this.insertAfter.bind(this),this.mindMap.command.add("INSERT_AFTER",this.insertAfter),this.insertBefore=this.insertBefore.bind(this),this.mindMap.command.add("INSERT_BEFORE",this.insertBefore),this.moveNodeTo=this.moveNodeTo.bind(this),this.mindMap.command.add("MOVE_NODE_TO",this.moveNodeTo),this.removeNode=this.removeNode.bind(this),this.mindMap.command.add("REMOVE_NODE",this.removeNode),this.removeCurrentNode=this.removeCurrentNode.bind(this),this.mindMap.command.add("REMOVE_CURRENT_NODE",this.removeCurrentNode),this.pasteNode=this.pasteNode.bind(this),this.mindMap.command.add("PASTE_NODE",this.pasteNode),this.cutNode=this.cutNode.bind(this),this.mindMap.command.add("CUT_NODE",this.cutNode),this.setNodeStyle=this.setNodeStyle.bind(this),this.mindMap.command.add("SET_NODE_STYLE",this.setNodeStyle),this.setNodeStyles=this.setNodeStyles.bind(this),this.mindMap.command.add("SET_NODE_STYLES",this.setNodeStyles),this.setNodeActive=this.setNodeActive.bind(this),this.mindMap.command.add("SET_NODE_ACTIVE",this.setNodeActive),this.clearActiveNode=this.clearActiveNode.bind(this),this.mindMap.command.add("CLEAR_ACTIVE_NODE",this.clearActiveNode),this.setNodeExpand=this.setNodeExpand.bind(this),this.mindMap.command.add("SET_NODE_EXPAND",this.setNodeExpand),this.expandAllNode=this.expandAllNode.bind(this),this.mindMap.command.add("EXPAND_ALL",this.expandAllNode),this.unexpandAllNode=this.unexpandAllNode.bind(this),this.mindMap.command.add("UNEXPAND_ALL",this.unexpandAllNode),this.expandToLevel=this.expandToLevel.bind(this),this.mindMap.command.add("UNEXPAND_TO_LEVEL",this.expandToLevel),this.setNodeData=this.setNodeData.bind(this),this.mindMap.command.add("SET_NODE_DATA",this.setNodeData),this.setNodeText=this.setNodeText.bind(this),this.mindMap.command.add("SET_NODE_TEXT",this.setNodeText),this.setNodeImage=this.setNodeImage.bind(this),this.mindMap.command.add("SET_NODE_IMAGE",this.setNodeImage),this.setNodeIcon=this.setNodeIcon.bind(this),this.mindMap.command.add("SET_NODE_ICON",this.setNodeIcon),this.setNodeHyperlink=this.setNodeHyperlink.bind(this),this.mindMap.command.add("SET_NODE_HYPERLINK",this.setNodeHyperlink),this.setNodeNote=this.setNodeNote.bind(this),this.mindMap.command.add("SET_NODE_NOTE",this.setNodeNote),this.setNodeAttachment=this.setNodeAttachment.bind(this),this.mindMap.command.add("SET_NODE_ATTACHMENT",this.setNodeAttachment),this.setNodeTag=this.setNodeTag.bind(this),this.mindMap.command.add("SET_NODE_TAG",this.setNodeTag),this.insertFormula=this.insertFormula.bind(this),this.mindMap.command.add("INSERT_FORMULA",this.insertFormula),this.addGeneralization=this.addGeneralization.bind(this),this.mindMap.command.add("ADD_GENERALIZATION",this.addGeneralization),this.removeGeneralization=this.removeGeneralization.bind(this),this.mindMap.command.add("REMOVE_GENERALIZATION",this.removeGeneralization),this.setNodeCustomPosition=this.setNodeCustomPosition.bind(this),this.mindMap.command.add("SET_NODE_CUSTOM_POSITION",this.setNodeCustomPosition),this.resetLayout=this.resetLayout.bind(this),this.mindMap.command.add("RESET_LAYOUT",this.resetLayout),this.setNodeShape=this.setNodeShape.bind(this),this.mindMap.command.add("SET_NODE_SHAPE",this.setNodeShape),this.goTargetNode=this.goTargetNode.bind(this),this.mindMap.command.add("GO_TARGET_NODE",this.goTargetNode),this.removeCustomStyles=this.removeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_CUSTOM_STYLES",this.removeCustomStyles),this.removeAllNodeCustomStyles=this.removeAllNodeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_ALL_NODE_CUSTOM_STYLES",this.removeAllNodeCustomStyles)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Tab",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Insert",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.mindMap.execCommand("INSERT_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Tab",()=>{this.mindMap.execCommand("INSERT_PARENT_NODE")}),this.mindMap.keyCommand.addShortcut("Control+g",()=>{this.mindMap.execCommand("ADD_GENERALIZATION")}),this.toggleActiveExpand=this.toggleActiveExpand.bind(this),this.mindMap.keyCommand.addShortcut("/",this.toggleActiveExpand),this.mindMap.keyCommand.addShortcut("Del|Backspace",()=>{this.mindMap.execCommand("REMOVE_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Backspace",()=>{this.mindMap.execCommand("REMOVE_CURRENT_NODE")}),this.mindMap.on("before_show_text_edit",()=>{this.startTextEdit()}),this.mindMap.on("hide_text_edit",()=>{this.endTextEdit()}),this.mindMap.keyCommand.addShortcut("Control+a",()=>{this.mindMap.execCommand("SELECT_ALL")}),this.mindMap.keyCommand.addShortcut("Control+l",()=>{this.mindMap.execCommand("RESET_LAYOUT")}),this.mindMap.keyCommand.addShortcut("Control+Up",()=>{this.mindMap.execCommand("UP_NODE")}),this.mindMap.keyCommand.addShortcut("Control+Down",()=>{this.mindMap.execCommand("DOWN_NODE")}),this.mindMap.keyCommand.addShortcut("Control+c",()=>{this.copy()}),this.mindMap.keyCommand.addShortcut("Control+x",()=>{this.cut()}),this.mindMap.keyCommand.addShortcut("Control+v",()=>{this.paste()}),this.mindMap.keyCommand.addShortcut("Control+Enter",()=>{this.setRootNodeCenter()})}emitNodeActiveEvent(e=null,t=[...this.activeNodeList]){g2(this.lastActiveNodeList,t)||(this.lastActiveNodeList=[...t],clearTimeout(this.emitNodeActiveEventTimer),this.emitNodeActiveEventTimer=setTimeout(()=>{this.mindMap.emit("node_active",e,t)},0))}clearActiveNodeListOnDrawClick(e,t){if(this.activeNodeList.length<=0)return;let n=!0;const{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(t==="contextmenu"?!r:r){const s=this.mindMap.event.mousedownPos;n=Math.abs(e.clientX-s.x)<=5&&Math.abs(e.clientY-s.y)<=5}n&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}startTextEdit(){this.mindMap.keyCommand.save()}endTextEdit(){this.mindMap.keyCommand.restore()}clearCache(){this.layout.lru.clear(),this.nodeCache={},this.lastNodeCache={}}addRenderParams(e,t){e&&this.renderCallbackList.findIndex(r=>r===e)===-1&&this.renderCallbackList.push(e),t&&this.renderSourceList.findIndex(r=>r===t)===-1&&this.renderSourceList.push(t)}checkHasRenderSource(e){e=Array.isArray(e)?e:[e];for(let t=0;t<this.renderSourceList.length;t++)if(e.includes(this.renderSourceList[t]))return!0;return!1}onRenderEnd(){this.renderCallbackList.forEach(e=>{e()}),this.isRendering=!1,this.reRender=!1,this.renderCallbackList=[],this.renderSourceList=[],this.mindMap.emit("node_tree_render_end")}render(e,t){this.addRenderParams(e,t),clearTimeout(this.renderTimer),this.renderTimer=setTimeout(()=>{this._render()},0)}_render(){if(this.checkHasRenderSource(_.CHANGE_THEME)&&this.resetUnExpandNodeStyle(),this.isRendering){this.hasWaitRendering=!0;return}if(this.isRendering=!0,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),!this.renderTree){this.onRenderEnd();return}this.mindMap.emit("node_tree_render_start"),this.root=null,this.layout.doLayout(e=>{Object.keys(this.lastNodeCache).forEach(t=>{this.nodeCache[t]||(this.removeNodeFromActiveList(this.lastNodeCache[t]),this.emitNodeActiveEvent(),this.lastNodeCache[t].destroy())}),this.root=e,this.root.render(()=>{if(this.isRendering=!1,this.hasWaitRendering){this.hasWaitRendering=!1,this.render();return}this.onRenderEnd()})}),this.emitNodeActiveEvent()}resetUnExpandNodeStyle(){this.renderTree&&Pe(this.renderTree,null,e=>{if(!e.data.expand)return Pe(e,null,t=>{t.data.needUpdate=!0}),!0})}clearActiveNode(){this.activeNodeList.length<=0||(this.clearActiveNodeList(),this.emitNodeActiveEvent(null,[]))}clearActiveNodeList(){this.activeNodeList.forEach(e=>{this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1)}),this.activeNodeList=[]}addNodeToActiveList(e,t=!1){if(this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&e.userList.length>0)return;this.findActiveNodeIndex(e)===-1&&(t||this.mindMap.emit("before_node_active",e,this.activeNodeList),this.mindMap.execCommand("SET_NODE_ACTIVE",e,!0),this.activeNodeList.push(e))}removeNodeFromActiveList(e){let t=this.findActiveNodeIndex(e);t!==-1&&(this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1),this.activeNodeList.splice(t,1))}activeMultiNode(e=[]){e.forEach(t=>{this.mindMap.emit("before_node_active",t,this.activeNodeList),this.addNodeToActiveList(t,!0),this.emitNodeActiveEvent(t)})}cancelActiveMultiNode(e=[]){e.forEach(t=>{this.removeNodeFromActiveList(t),this.emitNodeActiveEvent(null)})}findActiveNodeIndex(e){return _t(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Pe(this.root,null,e=>{e.getData("isActive")||this.addNodeToActiveList(e),e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach(t=>{const n=t.generalizationNode;n.getData("isActive")||this.addNodeToActiveList(n)})},null,!0,0,0),this.emitNodeActiveEvent())}back(e){this.backForward("back",e)}forward(e){this.backForward("forward",e)}backForward(e,t){this.mindMap.execCommand("CLEAR_ACTIVE_NODE");const n=this.mindMap.command[e](t);n&&(this.renderTree=n,this.mindMap.render()),this.mindMap.emit("data_change",n)}getNewNodeBehavior(e=!1,t=!1){const{createNewNodeBehavior:n}=this.mindMap.opt;let r=!1,s=!1;switch(n){case _.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,s=t?!1:e;break;case _.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,s=!1;break;case _.CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:r=!0,s=!1;break}return{focusNewNode:r,inserting:s}}insertNode(e=!0,t=[],n=null,r=[]){if(t=Si(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:a}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,l=o.length>1,h=this.hasRichTextPlugin(),{focusNewNode:c,inserting:d}=this.getNewNodeBehavior(e,l),f={expand:!0,richText:h,isActive:c};h&&(f.resetRichText=!0),r=ta(r,f);const m=n&&n.richText;let v=!1;o.forEach(g=>{if(g.isGeneralization||g.isRoot)return;r=Oi(r);const x=g.parent,E=g.layerIndex===1?s:a,M=xs(g);m&&f.resetRichText&&delete f.resetRichText;const z={inserting:d,data:{text:E,...f,uid:Wi(),...n||{}},children:[...vs(r,v)]};v=!0,x.nodeData.children.splice(M+1,0,z)}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0||(e=Si(e),this.activeNodeList.length<=0&&e.length<=0))return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),a={expand:!0,richText:r,isActive:s};r&&(a.resetRichText=!0),t=ta(t,a);let o=!1;n.forEach(l=>{if(l.isGeneralization||l.isRoot)return;t=Oi(t);const h=l.parent,c=xs(l),d=vs(t,o);o=!0,h.nodeData.children.splice(c+1,0,...d)}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(e=!0,t=[],n=null,r=[]){if(t=Si(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:a}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,l=o.length>1,h=this.hasRichTextPlugin(),{focusNewNode:c,inserting:d}=this.getNewNodeBehavior(e,l),f={expand:!0,richText:h,isActive:c};h&&(f.resetRichText=!0),r=ta(r,f);const m=n&&n.richText;let v=!1;o.forEach(g=>{if(g.isGeneralization)return;r=Oi(r),g.nodeData.children||(g.nodeData.children=[]);const x=g.isRoot?s:a;m&&f.resetRichText&&delete f.resetRichText;const b={inserting:d,data:{text:x,uid:Wi(),...f,...n||{}},children:[...vs(r,v)]};v=!0,g.nodeData.children.push(b),g.setData({expand:!0})}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0||(e=Si(e),this.activeNodeList.length<=0&&e.length<=0))return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),a={expand:!0,richText:r,isActive:s};r&&(a.resetRichText=!0),t=ta(t,a);let o=!1;n.forEach(l=>{l.isGeneralization||(t=Oi(t),l.nodeData.children||(l.nodeData.children=[]),t=vs(t,o),o=!0,l.nodeData.children.push(...t),l.setData({expand:!0}))}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(e=!0,t,n){if(t=Si(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:r,defaultInsertBelowSecondLevelNodeText:s}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,o=a.length>1,l=this.hasRichTextPlugin(),{focusNewNode:h,inserting:c}=this.getNewNodeBehavior(e,o),d={expand:!0,richText:l,isActive:h};l&&(d.resetRichText=!0);const f=n&&n.richText;a.forEach(m=>{if(m.isGeneralization||m.isRoot)return;const v=m.layerIndex===1?r:s;f&&d.resetRichText&&delete d.resetRichText;const g={inserting:c,data:{text:v,uid:Wi(),...d,...n||{}},children:[m.nodeData]},x=m.parent,b=xs(m);x.nodeData.children.splice(b,1,g)}),h&&this.clearActiveNodeList(),this.mindMap.render()}upNode(e){if(this.activeNodeList.length<=0&&!e)return;const n=(e?[e]:this.activeNodeList)[0];if(n.isRoot)return;let r=n.parent,s=r.children,a=_t(n,s);if(a===-1||a===0)return;let o=a-1;s.splice(a,1),s.splice(o,0,n),r.nodeData.children.splice(a,1),r.nodeData.children.splice(o,0,n.nodeData),this.mindMap.render()}downNode(e){if(this.activeNodeList.length<=0&&!e)return;const n=(e?[e]:this.activeNodeList)[0];if(n.isRoot)return;let r=n.parent,s=r.children,a=_t(n,s);if(a===-1||a===s.length-1)return;let o=a+1;s.splice(a,1),s.splice(o,0,n),r.nodeData.children.splice(a,1),r.nodeData.children.splice(o,0,n.nodeData),this.mindMap.render()}moveUpOneLevel(e){if(e=e||this.activeNodeList[0],!e||e.isRoot||e.layerIndex<=1)return;const t=e.parent,n=t.parent,r=_t(e,t.children),s=_t(t,n.children);t.nodeData.children.splice(r,1),n.nodeData.children.splice(s+1,0,e.nodeData),this.mindMap.render()}_handleRemoveCustomStyles(e){let t=!1;return Object.keys(e).forEach(n=>{c0(n)&&(t=!0,delete e[n])}),this.hasRichTextPlugin()&&(t=!0,e.resetRichText=!0),t}removeCustomStyles(e){if(e=e||this.activeNodeList[0],!e)return;this._handleRemoveCustomStyles(e.getData())&&this.reRenderNodeCheckChange(e)}removeAllNodeCustomStyles(e){e=Si(e);let t=!1;if(e.length>0)e.forEach(n=>{this._handleRemoveCustomStyles(n.getData())&&(t=!0)});else{if(!this.renderTree)return;Pe(this.renderTree,null,n=>{this._handleRemoveCustomStyles(n.data)&&(t=!0);const s=Ns(n.data);s.length>0&&s.forEach(a=>{this._handleRemoveCustomStyles(a)&&(t=!0)})})}t&&this.mindMap.reRender()}copy(){this.beingCopyData=this.copyNode(),this.beingCopyData&&(this.mindMap.opt.disabledClipboard||Ql(Jl(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",e=>{this.beingCopyData=e,this.mindMap.opt.disabledClipboard||Ql(Jl(e))})}handlePaste(e){const{disabledClipboard:t}=this.mindMap.opt;if(t)return;const n=e.clipboardData||e.originalEvent.clipboardData,r=n.items;Array.from(r).forEach(s=>{s.type.indexOf("image")>-1&&s.getAsFile(),s.type.indexOf("text")>-1&&n.getData("text")}),this.paste()}async paste(){const{errorHandler:e,handleIsSplitByWrapOnPasteCreateNewNode:t,handleNodePasteImg:n,disabledClipboard:r,onlyPasteTextWhenHasImgAndText:s}=this.mindMap.opt;if(!r&&wd())try{const a=await p2();let o=a.text||"",l=a.img||null;if(o){let h=null,c=!0;if(this.mindMap.opt.customHandleClipboardText)try{const d=await this.mindMap.opt.customHandleClipboardText(o);if(!Dn(d)){c=!1;const f=f0(d);f.isSmm?h=f.data:o=f.data}}catch(d){e(ur.CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,d)}if(c){const d=f0(o);d.isSmm?h=d.data:o=d.data}if(h)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(h)?h:[h]);else{this.hasRichTextPlugin()&&(o=qa(o));const d=o.split(new RegExp(`\r?
253
+ |(?<!
254
+ )\r`,"g")).filter(f=>!!f);d.length>1&&t?t().then(()=>{this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],d.map(f=>({data:{text:f},children:[]})))}).catch(()=>{this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}}if(l&&(!o||!s))try{let h=null;n&&typeof n=="function"?h=await n(l):h=await e2(l),this.activeNodeList.length>0&&this.activeNodeList.forEach(c=>{this.mindMap.execCommand("SET_NODE_IMAGE",c,{url:h.url,title:"",width:h.size.width,height:h.size.height})})}catch(h){e(ur.LOAD_CLIPBOARD_IMAGE_ERROR,h)}}catch(a){e(ur.READ_CLIPBOARD_ERROR,a)}else this.beingCopyData&&this.mindMap.execCommand("PASTE_NODE",this.beingCopyData)}insertBefore(e,t){this.insertTo(e,t,"before")}insertAfter(e,t){this.insertTo(e,t,"after")}insertTo(e,t,n="before"){let r=Si(e);r=r.filter(s=>!s.isRoot),n==="after"&&r.reverse(),r.forEach(s=>{let a=s.parent,o=a.children,l=_t(s,o);if(l===-1)return;o.splice(l,1),a.nodeData.children.splice(l,1);let h=t.parent,c=h.children,d=_t(t,c);d!==-1&&(n==="after"&&d++,c.splice(d,0,s),h.nodeData.children.splice(d,0,s.nodeData))}),this.mindMap.render()}removeNode(e=[]){if(e=Si(e),this.activeNodeList.length<=0&&e.length<=0)return;let t=null,n=e.length>0,r=n?e:this.activeNodeList,s=r.find(a=>a.isRoot);if(s)this.clearActiveNodeList(),s.children=[],s.nodeData.children=[];else{t=this.getNextActiveNode(r);for(let a=0;a<r.length;a++){const o=r[a],l=this.textEdit.getCurrentEditNode();l&&l.getData("uid")===o.getData("uid")&&this.textEdit.hideEditTextBox(),n&&r.splice(a,1),o.isGeneralization?(this.deleteNodeGeneralization(o),this.removeNodeFromActiveList(o),a--):(this.removeNodeFromActiveList(o),xo(o),a--)}}this.activeNodeList=[],t&&this.addNodeToActiveList(t),this.emitNodeActiveEvent(),this.mindMap.render()}deleteNodeGeneralization(e){const t=e.generalizationBelongNode,n=t.getGeneralizationNodeIndex(e);let r=t.getData("generalization");Array.isArray(r)?r.splice(n,1):r=null,this.mindMap.execCommand("SET_NODE_DATA",t,{generalization:r}),this.closeHighlightNode()}removeCurrentNode(e=[]){if(e=Si(e),this.activeNodeList.length<=0&&e.length<=0)return;let n=e.length>0?e:this.activeNodeList;n=n.filter(s=>!s.isRoot);let r=this.getNextActiveNode(n);for(let s=0;s<n.length;s++){let a=n[s];if(a.isGeneralization)this.deleteNodeGeneralization(a);else{const o=a.parent,l=xs(a);o.nodeData.children.splice(l,1,...a.nodeData.children||[])}}this.activeNodeList=[],r&&this.addNodeToActiveList(r),this.emitNodeActiveEvent(),this.mindMap.render()}getNextActiveNode(e){if(e.length!==1||this.findActiveNodeIndex(e[0])===-1)return null;let t=null;if(this.activeNodeList.length===1&&!this.activeNodeList[0].isGeneralization&&this.mindMap.opt.deleteNodeActive){const n=this.activeNodeList[0],r=n.parent.children,s=_t(n,r);s<r.length-1?t=r[s+1]:s>0?t=r[s-1]:t=n.parent}return t}copyNode(){if(this.activeNodeList.length<=0)return null;let e=d0(this.activeNodeList);return e=m0(e),e.map(t=>Cs({},t,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;let t=d0(this.activeNodeList).filter(r=>!r.isRoot);t=m0(t);const n=t.map(r=>Cs({},r,!0));t.forEach(r=>{xo(r)}),this.clearActiveNodeList(),this.mindMap.render(),e&&typeof e=="function"&&e(n)}moveNodeTo(e,t){let n=Si(e);n=n.filter(r=>!r.isRoot),n.forEach(r=>{this.removeNodeFromActiveList(r),xo(r),t.setData({expand:!0}),t.nodeData.children.push(r.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=Si(e),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],e)}setNodeStyle(e,t,n){const r={[t]:n};this.setNodeDataRender(e,r),h0.includes(t)&&(e.parent||e).renderLine(!0)}setNodeStyles(e,t){const n={...t};this.setNodeDataRender(e,n);let r=Object.keys(t),s=!1;r.forEach(a=>{h0.includes(a)&&(s=!0)}),s&&(e.parent||e).renderLine(!0)}setNodeActive(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{isActive:t}),e.updateNodeByActive(t)}setNodeExpand(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{expand:t}),this.mindMap.render()}expandAllNode(e=""){if(!this.renderTree)return;const t=(n,r)=>{!r&&n.data.uid===e&&(r=!0),r&&!n.data.expand&&(n.data.expand=!0),n.children&&n.children.length>0&&n.children.forEach(s=>{t(s,r)})};t(this.renderTree,!e),this.mindMap.render()}unexpandAllNode(e=!0,t=""){if(!this.renderTree)return;const n=(r,s,a)=>{!a&&r.data.uid===t&&(a=!0),a&&!s&&r.children&&r.children.length>0&&(r.data.expand=!1),r.children&&r.children.length>0&&r.children.forEach(o=>{n(o,!1,a)})};n(this.renderTree,!0,!t),this.mindMap.render(()=>{e&&this.setRootNodeCenter()})}expandToLevel(e){this.renderTree&&(Pe(this.renderTree,null,(t,n,r,s)=>{s<e?t.data.expand=!0:!r&&t.children&&t.children.length>0&&(t.data.expand=!1)},null,!0,0,0),this.mindMap.render())}toggleActiveExpand(){this.activeNodeList.forEach(e=>{e.nodeData.children.length<=0||e.isRoot||this.toggleNodeExpand(e)})}toggleNodeExpand(e){this.mindMap.execCommand("SET_NODE_EXPAND",e,!e.getData("expand"))}setNodeText(e,t,n,r){n=n===void 0?e.getData("richText"):n,this.setNodeDataRender(e,{text:t,richText:n,resetRichText:r})}setNodeImage(e,t){const{url:n,title:r,width:s,height:a,custom:o=!1}=t||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(e,{image:n,imageTitle:r||"",imageSize:{width:s,height:a,custom:o}})}setNodeIcon(e,t){this.setNodeDataRender(e,{icon:t})}setNodeHyperlink(e,t,n=""){this.setNodeDataRender(e,{hyperlink:t,hyperlinkTitle:n})}setNodeNote(e,t){this.setNodeDataRender(e,{note:t})}setNodeAttachment(e,t,n=""){this.setNodeDataRender(e,{attachmentUrl:t,attachmentName:n})}setNodeTag(e,t){this.setNodeDataRender(e,{tag:t})}insertFormula(e,t=[]){if(!this.hasRichTextPlugin()||!this.mindMap.formula)return;t=Si(t),(t.length>0?t:this.activeNodeList).forEach(r=>{this.mindMap.formula.insertFormulaToNode(r,e)})}addGeneralization(e,t=!0){if(this.activeNodeList.length<=0)return;const n=this.activeNodeList.filter(c=>!c.isRoot&&!c.isGeneralization&&!c.checkHasSelfGeneralization()),r=c2(n);if(r.length<=0)return;const s=this.hasRichTextPlugin(),{focusNewNode:a,inserting:o}=this.getNewNodeBehavior(t,r.length>1);let l=!1;const h=e&&e.richText;r.forEach(c=>{const d={inserting:o,...e||{text:this.mindMap.opt.defaultGeneralizationText},range:c.range||null,uid:Wi(),richText:s,isActive:a};s&&!h&&(d.resetRichText=s);let f=c.node.getData("generalization");if(f=f?Array.isArray(f)?f:[f]:[],c.range){if(!!f.find(v=>v.range&&v.range[0]===c.range[0]&&v.range[1]===c.range[1]))return;f.push(d)}else f.push(d);l=!0,this.mindMap.execCommand("SET_NODE_DATA",c.node,{generalization:f}),c.node.setData({expand:!0})}),l&&(a&&this.clearActiveNodeList(),this.mindMap.render(()=>{this.mindMap.render()}))}removeGeneralization(){this.activeNodeList.length<=0||(this.activeNodeList.forEach(e=>{e.checkHasGeneralization()&&this.mindMap.execCommand("SET_NODE_DATA",e,{generalization:null})}),this.mindMap.render(),this.closeHighlightNode())}setNodeCustomPosition(e,t=void 0,n=void 0){[e].forEach(s=>{this.mindMap.execCommand("SET_NODE_DATA",s,{customLeft:t,customTop:n})})}resetLayout(){Pe(this.root,null,e=>{e.customLeft=void 0,e.customTop=void 0,this.mindMap.execCommand("SET_NODE_DATA",e,{customLeft:void 0,customTop:void 0}),this.mindMap.render()},null,!0,0,0)}setNodeShape(e,t){if(!t||!T2.includes(t))return;[e].forEach(r=>{this.setNodeStyle(r,"shape",t)})}goTargetNode(e,t=()=>{}){let n=typeof e=="string"?e:e.getData("uid");n&&this.expandToNodeUid(n,()=>{let r=this.findNodeByUid(n);r&&(r.active(),this.moveNodeToCenter(r),t(r))})}setNodeData(e,t){Object.keys(t).forEach(n=>{e.nodeData.data[n]=t[n]})}setNodeDataRender(e,t,n=!1){if(this.mindMap.execCommand("SET_NODE_DATA",e,t),l2(t)){this.mindMap.emit("node_tree_render_end");return}this.reRenderNodeCheckChange(e,n)}reRenderNodeCheckChange(e,t){e.reRender()?t||this.mindMap.render():this.mindMap.emit("node_tree_render_end")}moveNodeToCenter(e,t){let{resetScaleOnMoveNodeToCenter:n}=this.mindMap.opt;t!==void 0&&(n=t);let{transform:r,state:s}=this.mindMap.view.getTransformData(),{left:a,top:o,width:l,height:h}=e;n||(a*=r.scaleX,o*=r.scaleY,l*=r.scaleX,h*=r.scaleY);let c=this.mindMap.width/2,d=this.mindMap.height/2,f=a+l/2,m=o+h/2,v=c-s.x,g=d-s.y,x=v-f,b=g-m;this.mindMap.view.translateX(x),this.mindMap.view.translateY(b),n&&this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(e,t=()=>{}){if(!this.renderTree){t();return}let n=[],r=!1;const s={};Fr(this.renderTree,(o,l)=>{if(o.data.uid===e)return n=l?[...s[l.data.uid],l]:[],"stop";if(Ns(o.data).forEach(c=>{c.uid===e&&(n=l?[...s[l.data.uid],l,o]:[],r=!0)}),r)return"stop";s[o.data.uid]=l?[...s[l.data.uid],l]:[]});let a=!1;if(n.forEach(o=>{o.data.expand||(a=!0,o.data.expand=!0)}),r){const o=n[n.length-1];o&&Pe(o,null,l=>{l.data.expand||(a=!0,l.data.expand=!0)})}a?this.mindMap.render(t):t()}findNodeByUid(e){if(!this.root)return;let t=null;return Pe(this.root,null,n=>{if(n.getData("uid")===e)return t=n,!0;let r=!1;if((n._generalizationList||[]).forEach(s=>{s.generalizationNode.getData("uid")===e&&(t=s.generalizationNode,r=!0)}),r)return!0}),t}highlightNode(e,t,n){if(this.isRendering)return;n={stroke:"rgb(94, 200, 248)",fill:"transparent",...n||{}},this.highlightBoxNode?this.highlightBoxNodeStyle&&(this.highlightBoxNodeStyle.stroke!==n.stroke||this.highlightBoxNodeStyle.fill!==n.fill)&&this.highlightBoxNode.stroke({color:n.stroke||"transparent"}).fill({color:n.fill||"transparent"}):this.highlightBoxNode=new wr().stroke({color:n.stroke||"transparent"}).fill({color:n.fill||"transparent"}),this.highlightBoxNodeStyle={...n};let r=1/0,s=1/0,a=-1/0,o=-1/0;t?e.children.slice(t[0],t[1]+1).forEach(h=>{h.left<r&&(r=h.left),h.top<s&&(s=h.top);const c=h.left+h.width,d=h.top+h.height;c>a&&(a=c),d>o&&(o=d)}):(r=e.left,s=e.top,a=e.left+e.width,o=e.top+e.height),this.highlightBoxNode.plot([[r,s],[a,s],[a,o],[r,o]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode&&this.highlightBoxNode.remove()}hasRichTextPlugin(){return!!this.mindMap.richText}}const pr={default:fd},dl={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Left:37,Up:38,Right:39,Down:40,Del:46,NumLock:144,Cmd:91,CmdFF:224,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"`":192,"=":187,"-":189,"/":191,".":190};for(let i=0;i<=9;i++)dl[i]=i+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((i,e)=>{dl[i]=e+65});const Di=dl;class J6{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.isStopCheckInSvg=!1,this.defaultEnableCheck=this.defaultEnableCheck.bind(this),this.bindEvent()}extendKeyMap(e,t){Di[e]=t}removeKeyMap(e){typeof Di[e]<"u"&&delete Di[e]}pause(){this.isPause=!0}recovery(){this.isPause=!1}save(){Object.keys(this.shortcutMapCache).length>0||(this.shortcutMapCache=this.shortcutMap,this.shortcutMap={})}restore(){Object.keys(this.shortcutMapCache).length<=0||(this.shortcutMap=this.shortcutMapCache,this.shortcutMapCache={})}stopCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:e}=this.mindMap.opt;e&&(this.isStopCheckInSvg=!0)}recoveryCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:e}=this.mindMap.opt;e&&(this.isStopCheckInSvg=!0)}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0}),this.mindMap.on("svg_mouseleave",()=>{this.isInSvg=!1}),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}defaultEnableCheck(e){const t=e.target;if(t===document.body)return!0;for(let n=0;n<this.mindMap.editNodeClassList.length;n++){const r=this.mindMap.editNodeClassList[n];if(t.classList.contains(r))return!0}return!1}onKeydown(e){const{enableShortcutOnlyWhenMouseInSvg:t,beforeShortcutRun:n,customCheckEnableShortcut:r}=this.mindMap.opt;(typeof r=="function"?r:this.defaultEnableCheck)(e)&&(this.isPause||t&&!this.isStopCheckInSvg&&!this.isInSvg||Object.keys(this.shortcutMap).forEach(a=>{if(this.checkKey(e,a)){if(this.checkKey(e,"Control+v")||(e.stopPropagation(),e.preventDefault()),typeof n=="function"&&n(a,[...this.mindMap.renderer.activeNodeList]))return;this.shortcutMap[a].forEach(o=>{o()})}}))}checkKey(e,t){let n=this.getOriginEventCodeArr(e),r=this.getKeyCodeArr(t);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){let a=r.findIndex(o=>o===n[s]);if(a===-1)return!1;r.splice(a,1)}return!0}getOriginEventCodeArr(e){let t=[];return(e.ctrlKey||e.metaKey)&&t.push(Di.Control),e.altKey&&t.push(Di.Alt),e.shiftKey&&t.push(Di.Shift),t.includes(e.keyCode)||t.push(e.keyCode),t}hasCombinationKey(e){return e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}getKeyCodeArr(e){let t=e.split(/\s*\+\s*/),n=[];return t.forEach(r=>{n.push(Di[r])}),n}addShortcut(e,t){e.split(/\s*\|\s*/).forEach(n=>{this.shortcutMap[n]?this.shortcutMap[n].push(t):this.shortcutMap[n]=[t]})}removeShortcut(e,t){e.split(/\s*\|\s*/).forEach(n=>{if(this.shortcutMap[n])if(t){let r=this.shortcutMap[n].findIndex(s=>s===t);r!==-1&&this.shortcutMap[n].splice(r,1)}else this.shortcutMap[n]=[],delete this.shortcutMap[n]})}getShortcutFn(e){let t=[];return e.split(/\s*\|\s*/).forEach(n=>{t=this.shortcutMap[n]||[]}),t}}const e4="0.14.0",t4={version:e4};class i4{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.commands={},this.history=[],this.activeHistoryIndex=0,this.registerShortcutKeys(),this.originAddHistory=this.addHistory.bind(this),this.addHistory=Ga(this.addHistory,this.mindMap.opt.addHistoryTime,this),this.isPause=!1}pause(){this.isPause=!0}recovery(){this.isPause=!1}clearHistory(){this.history=[],this.activeHistoryIndex=0,this.mindMap.emit("back_forward",0,0)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Control+z",()=>{this.mindMap.execCommand("BACK")}),this.mindMap.keyCommand.addShortcut("Control+y",()=>{this.mindMap.execCommand("FORWARD")})}exec(e,...t){if(this.commands[e]){if(this.commands[e].forEach(n=>{n(...t)}),this.mindMap.emit("afterExecCommand",e,...t),["BACK","FORWARD","SET_NODE_ACTIVE","CLEAR_ACTIVE_NODE"].includes(e))return;this.addHistory()}}add(e,t){this.commands[e]?this.commands[e].push(t):this.commands[e]=[t]}remove(e,t){if(this.commands[e])if(!t)this.commands[e]=[],delete this.commands[e];else{let n=this.commands[e].find(r=>r===t);n!==-1&&this.commands[e].splice(n,1)}}addHistory(){if(this.mindMap.opt.readonly||this.isPause)return;this.mindMap.emit("beforeAddHistory");const e=this.history.length>0?this.history[this.activeHistoryIndex]:null,t=this.getCopyData(),n=JSON.stringify(t);e&&e===n||(this.emitDataUpdatesEvent(e,n),this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(n),this.history.length>this.mindMap.opt.maxHistoryCount&&this.history.shift(),this.activeHistoryIndex=this.history.length-1,this.mindMap.emit("data_change",t),this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length))}back(e=1){if(!this.mindMap.opt.readonly&&this.activeHistoryIndex-e>=0){const t=this.history[this.activeHistoryIndex];this.activeHistoryIndex-=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const n=this.history[this.activeHistoryIndex],r=JSON.parse(n);return this.emitDataUpdatesEvent(t,n),r}}forward(e=1){if(this.mindMap.opt.readonly)return;let t=this.history.length;if(this.activeHistoryIndex+e<=t-1){const n=this.history[this.activeHistoryIndex];this.activeHistoryIndex+=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const r=this.history[this.activeHistoryIndex],s=JSON.parse(r);return this.emitDataUpdatesEvent(n,r),s}}getCopyData(){if(!this.mindMap.renderer.renderTree)return null;const e=md({},this.mindMap.renderer.renderTree,!0);return e.smmVersion=t4.version,e}removeDataUid(e){e=Oi(e);let t=n=>{delete n.data.uid,n.children&&n.children.length>0&&n.children.forEach(r=>{t(r)})};return t(e),e}emitDataUpdatesEvent(e,t){try{const n="data_change_detail";if(this.mindMap.event.listenerCount(n)>0&&e&&t){const s=JSON.parse(e),a=JSON.parse(t),o=Oi(th(s)),l=Oi(th(a)),h=[],c=(d,f)=>(d.children&&d.children.length>0&&d.children.forEach((m,v)=>{d.children[v]=typeof m=="string"?f[m]:f[m.data.uid],c(d.children[v],f)}),d);Object.keys(l).forEach(d=>{o[d]?u0(o[d],l[d])||h.push({action:"update",oldData:c(o[d],o),data:c(l[d],l)}):h.push({action:"create",data:c(l[d],l)})}),Object.keys(o).forEach(d=>{l[d]||h.push({action:"delete",data:c(o[d],o)})}),this.mindMap.emit(n,h)}}catch(n){this.mindMap.opt.errorHandler(ur.DATA_CHANGE_DETAIL_EVENT_ERROR,n)}}}class n4{constructor(){this.has={},this.queue=[],this.nextTick=Zf(this.flush,this)}push(e,t){if(this.has[e]){this.replaceTask(e,t);return}this.has[e]=!0,this.queue.push({name:e,fn:t}),this.nextTick()}replaceTask(e,t){const n=this.queue.findIndex(r=>r.name===e);n!==-1&&(this.queue[n]={name:e,fn:t})}flush(){let e=this.queue.slice(0);this.queue=[],e.forEach(({name:t,fn:n})=>{this.has[t]=!1,n()})}}const yh={el:null,data:null,viewData:null,readonly:!1,layout:_.LAYOUT.LOGICAL_STRUCTURE,fishboneDeg:45,theme:"default",themeConfig:{},scaleRatio:.2,translateRatio:1,minZoomRatio:20,maxZoomRatio:400,customCheckIsTouchPad:null,mouseScaleCenterUseMousePosition:!0,maxTag:5,expandBtnSize:20,imgTextMargin:5,textContentMargin:2,customNoteContentShow:null,textAutoWrapWidth:500,customHandleMousewheel:null,mousewheelAction:_.MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",expandBtnStyle:{color:"#808080",fill:"#fff",fontSize:13,strokeColor:"#333333"},expandBtnIcon:{open:"",close:""},expandBtnNumHandler:null,isShowExpandNum:!0,enableShortcutOnlyWhenMouseInSvg:!0,customCheckEnableShortcut:null,initRootNodePosition:null,nodeTextEditZIndex:3e3,nodeNoteTooltipZIndex:3e3,isEndNodeTextEditOnClickOuter:!0,maxHistoryCount:500,alwaysShowExpandBtn:!1,notShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!1,autoEmptyTextWhenKeydownEnterEdit:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,errorHandler:(i,e)=>{console.error(i,e)},enableDblclickBackToRootNode:!1,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,fit:!1,tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},onlyOneEnableActiveNodeOnCooperate:!1,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,createNewNodeBehavior:_.CREATE_NEW_NODE_BEHAVIOR.DEFAULT,defaultNodeImage:"",isLimitMindMapInCanvas:!1,handleNodePasteImg:null,customCreateNodePath:null,customCreateNodePolygon:null,customTransformNodeLinePath:null,beforeShortcutRun:null,resetScaleOnMoveNodeToCenter:!1,createNodePrefixContent:null,createNodePostfixContent:null,disabledClipboard:!1,customHyperlinkJump:null,openPerformance:!1,performanceConfig:{time:250,padding:100,removeNodeWhenOutCanvas:!0},emptyTextMeasureHeightText:"abc123我和你",openRealtimeRenderOnNodeTextEdit:!1,mousedownEventPreventDefault:!1,onlyPasteTextWhenHasImgAndText:!0,enableDragModifyNodeWidth:!0,minNodeTextModifyWidth:20,maxNodeTextModifyWidth:-1,customHandleLine:null,addHistoryOnInit:!0,noteIcon:{icon:"",style:{}},hyperlinkIcon:{icon:"",style:{}},attachmentIcon:{icon:"",style:{}},isShowCreateChildBtnIcon:!0,quickCreateChildBtnIcon:{icon:"",style:{}},customQuickCreateChildBtnClick:null,addCustomContentToNode:null,enableInheritAncestorLineStyle:!0,selectTranslateStep:3,selectTranslateLimit:20,enableFreeDrag:!1,autoMoveWhenMouseInEdgeOnDrag:!0,dragMultiNodeRectConfig:{width:40,height:20,fill:"rgb(94, 200, 248)"},dragPlaceholderRectFill:"rgb(94, 200, 248)",dragPlaceholderLineConfig:{color:"rgb(94, 200, 248)",width:2},dragOpacityConfig:{cloneNodeOpacity:.5,beingDragNodeOpacity:.3},handleDragCloneNode:null,beforeDragEnd:null,beforeDragStart:null,watermarkConfig:{onlyExport:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"#999",opacity:.5,fontSize:14},belowNode:!1},exportPaddingX:10,exportPaddingY:10,resetCss:`
255
+ * {
256
+ margin: 0;
257
+ padding: 0;
258
+ box-sizing: border-box;
259
+ }
260
+ `,minExportImgCanvasScale:2,addContentToHeader:null,addContentToFooter:null,handleBeingExportSvg:null,maxCanvasSize:16384,defaultAssociativeLineText:"关联",associativeLineIsAlwaysAboveNode:!0,associativeLineInitPointsPosition:{from:"",to:""},enableAdjustAssociativeLinePoints:!0,beforeAssociativeLineConnection:null,disableTouchZoom:!1,minTouchZoomScale:20,maxTouchZoomScale:-1,isLimitMindMapInCanvasWhenHasScrollbar:!0,isOnlySearchCurrentRenderNodes:!1,beforeCooperateUpdate:null,rainbowLinesConfig:{open:!1,colorsList:[]},demonstrateConfig:null,enableEditFormulaInRichTextEdit:!0,katexFontPath:"https://unpkg.com/katex@0.16.11/dist/",getKatexOutputType:null,transformRichTextOnEnterEdit:null,beforeHideRichTextEdit:null,outerFramePaddingX:10,outerFramePaddingY:10,defaultOuterFrameText:"外框",onlyPainterNodeCustomStyles:!1,beforeDeleteNodeImg:null,imgResizeBtnSize:25,minImgResizeWidth:50,minImgResizeHeight:50,maxImgResizeWidthInheritTheme:!1,maxImgResizeWidth:1/0,maxImgResizeHeight:1/0,customDeleteBtnInnerHTML:"",customResizeBtnInnerHTML:""};let li=class $i{constructor(e={}){if($i.instanceCount++,this.opt=this.handleOpt(Sa(yh,e)),this.opt.data=this.handleData(this.opt.data),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this.getElRectInfo(),this.initWidth=this.width,this.initHeight=this.height,this.cssEl=null,this.cssTextMap={},this.nodeInnerPrefixList=[],this.nodeInnerPostfixList=[],this.editNodeClassList=[],this.extendShapeList=[],this.initContainer(),this.initTheme(),this.initCache(),$i.pluginList.filter(t=>t.preload).forEach(t=>{this.initPlugin(t)}),this.event=new Tu({mindMap:this}),this.keyCommand=new J6({mindMap:this}),this.command=new i4({mindMap:this}),this.renderer=new Q6({mindMap:this}),this.view=new xu({mindMap:this}),this.batchExecution=new n4,$i.pluginList.filter(t=>!t.preload).forEach(t=>{this.initPlugin(t)}),this.addCss(),this.render(this.opt.fit?()=>this.view.fit():()=>{}),this.opt.addHistoryOnInit&&this.opt.data&&this.command.addHistory()}handleOpt(e){return Ul.includes(e.layout)||(e.layout=_.LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&pr[e.theme]?e.theme:"default",e}handleData(e){return Dn(e)||Object.keys(e).length<=0?null:(e=Oi(e||{}),e.data&&!e.data.expand&&(e.data.expand=!0),vs([e],!1,null,!0),e)}initContainer(){const{associativeLineIsAlwaysAboveNode:e}=this.opt;this.el.classList.add("smm-mind-map-container");const t=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass("smm-associative-line-container")};this.svg=mt().addTo(this.el).size(this.width,this.height),this.draw=this.svg.group(),this.draw.addClass("smm-container"),this.lineDraw=this.draw.group(),this.lineDraw.addClass("smm-line-container"),e||t(),this.nodeDraw=this.draw.group(),this.nodeDraw.addClass("smm-node-container"),e&&t(),this.otherDraw=this.draw.group(),this.otherDraw.addClass("smm-other-container")}clearDraw(){this.lineDraw.clear(),this.associativeLineDraw.clear(),this.nodeDraw.clear(),this.otherDraw.clear()}appendCss(e,t){this.cssTextMap[e]=t,this.removeCss(),this.addCss()}removeAppendCss(e){this.cssTextMap[e]&&(delete this.cssTextMap[e],this.removeCss(),this.addCss())}joinCss(){return mu+Object.keys(this.cssTextMap).map(e=>this.cssTextMap[e]).join(`
261
+ `)}addCss(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=this.joinCss(),document.head.appendChild(this.cssEl)}removeCss(){this.cssEl&&document.head.removeChild(this.cssEl)}checkEditNodeClassIndex(e){return this.editNodeClassList.findIndex(t=>t===e)}addEditNodeClass(e){this.checkEditNodeClassIndex(e)===-1&&this.editNodeClassList.push(e)}deleteEditNodeClass(e){const t=this.checkEditNodeClassIndex(e);t!==-1&&this.editNodeClassList.splice(t,1)}render(e,t=""){this.initTheme(),this.renderer.render(e,t)}reRender(e,t=""){this.renderer.reRender=!0,this.renderer.clearCache(),this.clearDraw(),this.render(e,t)}getElRectInfo(){if(this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width<=0||this.height<=0)throw new Error("容器元素el的宽高不能为0")}resize(){const e=this.width,t=this.height;this.getElRectInfo(),this.svg.size(this.width,this.height),(e!==this.width||t!==this.height)&&(this.demonstrate?this.demonstrate.isInDemonstrate||this.render():this.render()),this.emit("resize")}on(e,t){this.event.on(e,t)}emit(e,...t){this.event.emit(e,...t)}off(e,t){this.event.off(e,t)}initCache(){this.commonCaches={measureCustomNodeContentSizeEl:null,measureRichtextNodeTextSizeEl:null}}initTheme(){this.themeConfig=bd(pr[this.opt.theme]||pr.default,this.opt.themeConfig),La.setBackgroundStyle(this.el,this.themeConfig)}setTheme(e,t=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=e,t||this.render(null,_.CHANGE_THEME),this.emit("view_theme_change",e)}getTheme(){return this.opt.theme}setThemeConfig(e,t=!1){const n=o2(this.themeConfig,e);if(this.opt.themeConfig=e,!t){const r=Yf(n);this.render(null,r?"":_.CHANGE_THEME)}}getCustomThemeConfig(){return this.opt.themeConfig}getThemeConfig(e){return e===void 0?this.themeConfig:this.themeConfig[e]}getConfig(e){return e===void 0?this.opt:this.opt[e]}updateConfig(e={}){this.emit("before_update_config",this.opt);const t={...this.opt};this.opt=this.handleOpt(Sa.all([yh,this.opt,e])),this.emit("after_update_config",this.opt,t)}getLayout(){return this.opt.layout}setLayout(e,t=!1){Ul.includes(e)||(e=_.LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=e,this.view.reset(),this.renderer.setLayout(),t||this.render(null,_.CHANGE_LAYOUT),this.emit("layout_change",e)}execCommand(...e){this.command.exec(...e)}updateData(e){e=this.handleData(e),this.emit("before_update_data",e),this.renderer.setData(e),this.render(),this.command.addHistory(),this.emit("update_data",e)}setData(e){e=this.handleData(e),this.emit("before_set_data",e),this.opt.data=e,this.execCommand("CLEAR_ACTIVE_NODE"),this.command.clearHistory(),this.command.addHistory(),this.renderer.setData(e),this.reRender(),this.emit("set_data",e)}setFullData(e){e.root&&this.setData(e.root),e.layout&&this.setLayout(e.layout),e.theme&&(e.theme.template&&this.setTheme(e.theme.template),e.theme.config&&this.setThemeConfig(e.theme.config)),e.view&&this.view.setTransformData(e.view)}getData(e){let t=this.command.getCopyData(),n={};return e?n={layout:this.getLayout(),root:t,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:n=t,Oi(n)}async export(...e){try{if(!this.doExport)throw new Error("请注册Export插件!");return await this.doExport.export(...e)}catch(t){this.opt.errorHandler(ur.EXPORT_ERROR,t)}}toPos(e,t){return{x:e-this.elRect.left,y:t-this.elRect.top}}setMode(e){if(![_.MODE.READONLY,_.MODE.EDIT].includes(e))return;const t=e===_.MODE.READONLY;t!==this.opt.readonly&&(t&&(this.renderer.textEdit.isShowTextEdit()&&(this.renderer.textEdit.hideEditTextBox(),this.command.originAddHistory()),this.execCommand("CLEAR_ACTIVE_NODE")),this.opt.readonly=t,!t&&this.command.history.length<=0&&this.command.originAddHistory(),this.emit("mode_change",e))}getSvgData({paddingX:e=0,paddingY:t=0,ignoreWatermark:n=!1,addContentToHeader:r,addContentToFooter:s,node:a}={}){const{watermarkConfig:o,openPerformance:l}=this.opt;l&&this.renderer.forceLoadNode(a);const{cssTextList:h,header:c,headerHeight:d,footer:f,footerHeight:m}=v2({addContentToHeader:r,addContentToFooter:s}),v=this.svg,g=this.draw,x=v.width(),b=v.height(),E=g.transform(),M=this.elRect;g.scale(1/E.scaleX,1/E.scaleY);const z=g.rbox();let R=null;a&&(R=p0(a,z.x,z.y,e,t));const O=0;z.width+=e*2,z.height+=t*2+O+d+m,g.translate(e,t),v.size(z.width,z.height),g.translate(-z.x+M.left,-z.y+M.top);let B=v.clone();const F=this.watermark&&this.watermark.hasWatermark();if(!n&&F){this.watermark.isInExport=!0;const{onlyExport:V}=o;z.width>x||z.height>b?(this.width=z.width,this.height=z.height,this.watermark.onResize(),B=v.clone(),this.width=x,this.height=b,this.watermark.onResize()):V&&(this.watermark.onResize(),B=v.clone()),V&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...h].forEach(V=>{B.add(mt(`<style>${V}</style>`))}),c&&d>0&&(B.findOne(".smm-container").translate(0,d),c.width(z.width),c.y(t),B.add(c,0)),f&&m>0&&(f.width(z.width),f.y(z.height-t-m),B.add(f));const P=v.find("defs"),ee=B.find("defs");return P.forEach((V,Y)=>{const ie=ee[Y];if(!ie)return;const Q=V.children(),oe=ie.children();for(let de=0;de<Q.length;de++){const ge=Q[de],Qe=oe[de];ge&&Qe&&Qe.attr("id",ge.attr("id"))}}),v.size(x,b),g.transform(E),{svg:B,svgHTML:B.svg(),clipData:R,rect:{...z,ratio:z.width/z.height},origWidth:x,origHeight:b,scaleX:E.scaleX,scaleY:E.scaleY}}addShape(e){!e||this.extendShapeList.find(n=>n.name===e.name)||this.extendShapeList.push(e)}removeShape(e){const t=this.extendShapeList.findIndex(n=>n.name===e);t!==-1&&this.extendShapeList.splice(t,1)}getSvgObjects(){return{SVG:mt,G:Ut,Rect:mi}}addPlugin(e,t){$i.hasPlugin(e)===-1&&$i.usePlugin(e,t),this.initPlugin(e)}removePlugin(e){let t=$i.hasPlugin(e);t!==-1&&($i.pluginList.splice(t,1),this[e.instanceName]&&(this[e.instanceName].beforePluginRemove&&this[e.instanceName].beforePluginRemove(),delete this[e.instanceName]))}initPlugin(e){this[e.instanceName]||(this[e.instanceName]=new e({mindMap:this,pluginOpt:e.pluginOpt}))}destroy(){this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.renderer.textEdit.removeTextEditEl(),[...$i.pluginList].forEach(e=>{this[e.instanceName]&&this[e.instanceName].beforePluginDestroy&&this[e.instanceName].beforePluginDestroy(),this[e.instanceName]=null}),this.event.unbind(),this.svg.remove(),La.removeBackgroundStyle(this.el),this.el.classList.remove("smm-mind-map-container"),this.el.innerHTML="",this.el=null,this.removeCss(),$i.instanceCount--}},v0=[];li.extendNodeDataNoStylePropList=(i=[])=>{v0.push(...i),Ta.push(...i)};li.resetNodeDataNoStylePropList=()=>{v0.forEach(i=>{const e=Ta.findIndex(t=>t===i);e!==-1&&Ta.splice(e,1)}),v0=[]};li.pluginList=[];li.usePlugin=(i,e={})=>(li.hasPlugin(i)!==-1||(i.pluginOpt=e,li.pluginList.push(i)),li);li.hasPlugin=i=>li.pluginList.findIndex(e=>e===i);li.instanceCount=0;li.defineTheme=(i,e={})=>{if(pr[i])return new Error("该主题名称已存在");pr[i]=bd(fd,e)};li.removeTheme=i=>{pr[i]&&(pr[i]=null)};const r4={boxShadowColor:"rgba(0, 0, 0, 0.8)",borderRadius:"5px",transition:"all 0.3s ease-out",zIndex:9999,padding:20,margin:50,openBlankMode:!0};class Ed{constructor(e){this.mindMap=e.mindMap,this.isInDemonstrate=!1,this.stepList=[],this.currentStepIndex=0,this.currentStepNode=null,this.currentUnderlineTextData=null,this.tmpStyleEl=null,this.highlightEl=null,this.transformState=null,this.renderTree=null,this.config=Object.assign({...r4},this.mindMap.opt.demonstrateConfig||{}),this.needRestorePerformanceMode=!1}enter(){this.bindFullscreenEvent(),document.fullscreenElement===this.mindMap.el?this._enter():y2(this.mindMap.el)}_enter(){this.isInDemonstrate=!0,this.pausePerformanceMode(),this.addTmpStyles(),this.transformState=this.mindMap.view.getTransformData(),this.renderTree=this.mindMap.getData(),this.mindMap.command.pause(),this.mindMap.keyCommand.pause(),this.createHighlightEl(),this.getStepList();let e=!1;this.mindMap.renderer.isRendering&&(e=!0),this.mindMap.execCommand("UNEXPAND_ALL",!1);const t=()=>{if(e){e=!1;return}this.mindMap.off("node_tree_render_end",t),this.jump(this.currentStepIndex),this.bindEvent()};this.mindMap.on("node_tree_render_end",t)}exit(){w2(this.mindMap.el),this.mindMap.updateData(this.renderTree),this.mindMap.view.setTransformData(this.transformState),this.renderTree=null,this.transformState=null,this.stepList=[],this.currentStepIndex=0,this.currentStepNode=null,this.currentUnderlineTextData=null,this.unBindEvent(),this.removeTmpStyles(),this.removeHighlightEl(),this.mindMap.command.recovery(),this.mindMap.keyCommand.recovery(),this.restorePerformanceMode(),this.mindMap.emit("exit_demonstrate"),this.isInDemonstrate=!1}pausePerformanceMode(){const{openPerformance:e}=this.mindMap.opt;e&&(this.needRestorePerformanceMode=!0,this.mindMap.opt.openPerformance=!1,this.mindMap.renderer.forceLoadNode())}restorePerformanceMode(){this.needRestorePerformanceMode&&(this.mindMap.opt.openPerformance=!0,this.mindMap.renderer.forceLoadNode())}addTmpStyles(){this.tmpStyleEl=document.createElement("style");let e=`
262
+ /* 画布所有元素禁止响应鼠标事件 */
263
+ .smm-mind-map-container {
264
+ pointer-events: none;
265
+ }
266
+ /* 超链接图标允许响应鼠标事件 */
267
+ .smm-node a {
268
+ pointer-events: all;
269
+ }
270
+ /* 备注图标允许响应鼠标事件 */
271
+ .smm-node .smm-node-note {
272
+ pointer-events: all;
273
+ }
274
+ `;this.config.openBlankMode&&(e+=`
275
+ /* 带下划线的文本内容全部隐藏 */
276
+ .smm-richtext-node-wrap u {
277
+ opacity: 0;
278
+ }
279
+ `),this.tmpStyleEl.innerText=e,document.head.appendChild(this.tmpStyleEl)}removeTmpStyles(){this.tmpStyleEl&&document.head.removeChild(this.tmpStyleEl)}createHighlightEl(){this.highlightEl||(this.highlightEl=document.createElement("div"),this.highlightEl.style.cssText=`
280
+ position: absolute;
281
+ box-shadow: 0 0 0 5000px ${this.config.boxShadowColor};
282
+ border-radius: ${this.config.borderRadius};
283
+ transition: ${this.config.transition};
284
+ z-index: ${this.config.zIndex+1};
285
+ pointer-events: none;
286
+ `,this.mindMap.el.appendChild(this.highlightEl))}removeHighlightEl(){this.highlightEl&&(this.mindMap.el.removeChild(this.highlightEl),this.highlightEl=null)}updateHighlightEl({left:e,top:t,width:n,height:r}){const s=this.config.padding;e&&(this.highlightEl.style.left=e-s+"px"),t&&(this.highlightEl.style.top=t-s+"px"),n&&(this.highlightEl.style.width=n+s*2+"px"),r&&(this.highlightEl.style.height=r+s*2+"px")}bindEvent(){this.onKeydown=this.onKeydown.bind(this),window.addEventListener("keydown",this.onKeydown)}bindFullscreenEvent(){this.onFullscreenChange=this.onFullscreenChange.bind(this),document.addEventListener(ih,this.onFullscreenChange)}unBindEvent(){window.removeEventListener("keydown",this.onKeydown),document.removeEventListener(ih,this.onFullscreenChange)}onFullscreenChange(){document.fullscreenElement?document.fullscreenElement===this.mindMap.el&&this._enter():this.exit()}onKeydown(e){e.keyCode===Di.Left?this.prev():e.keyCode===Di.Right?this.next():e.keyCode===Di.Esc?this.exit():e.keyCode===Di.Enter&&this.showNextUnderlineText()}prev(){this.currentStepIndex>0&&this.jump(this.currentStepIndex-1)}next(){const e=this.stepList.length;this.currentStepIndex<e-1&&this.jump(this.currentStepIndex+1)}showNextUnderlineText(){if(!this.config.openBlankMode||!this.currentStepNode||!this.currentUnderlineTextData)return;const{index:e,list:t,length:n}=this.currentUnderlineTextData;if(e>=n)return;const r=t[e];this.currentUnderlineTextData.index++,r.node.style.opacity=1}jump(e){this.currentUnderlineTextData&&(this.currentUnderlineTextData.list.forEach(a=>{a.node.style.opacity=""}),this.currentUnderlineTextData=null),this.currentStepNode=null,this.currentStepIndex=e,this.mindMap.emit("demonstrate_jump",this.currentStepIndex,this.stepList.length);const t=this.stepList[e],n=t.node,r=n.data.uid,s=this.mindMap.renderer.findNodeByUid(r);if(!s){this.mindMap.renderer.expandToNodeUid(r,()=>{this.mindMap.renderer.findNodeByUid(r)&&this.jump(e)});return}if(t.type==="node"){this.currentStepNode=s;const a=this.config.openBlankMode?s.group.find("u"):null;a&&a.length>0&&(this.currentUnderlineTextData={index:0,list:a,length:a.length}),this.mindMap.view.fit(()=>s.group.rbox(),!0,this.config.padding+this.config.margin);const o=s.group.rbox();this.updateHighlightEl({left:o.x,top:o.y,width:o.width,height:o.height})}else{const a=()=>{n.children.forEach(o=>{o.data.expand=!1}),this.mindMap.render(()=>{this.mindMap.view.fit(()=>{const l=p0(s,0,0,0,0,!0);return{...l,x:l.left,y:l.top}},!0,this.config.padding+this.config.margin);const o=p0(s,0,0,0,0,!0);this.updateHighlightEl(o)})};if(n.data.expand)a();else{this.mindMap.execCommand("SET_NODE_EXPAND",s,!0);const o=()=>{this.mindMap.off("node_tree_render_end",o),a()};this.mindMap.on("node_tree_render_end",o)}}}getStepList(){Pe(this.mindMap.renderer.renderTree,null,e=>{this.stepList.push({type:"node",node:e}),Ns(e.data).forEach(n=>{n.uid&&this.stepList.push({type:"node",node:{data:n}})}),e.children.length>1&&this.stepList.push({type:"children",node:e})})}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Ed.instanceName="demonstrate";class Md{constructor(e){this.mindMap=e,this.autoMoveTimer=null}onMove(e,t,n=()=>{},r=()=>{}){n();let s=this.mindMap.opt.selectTranslateStep,a=this.mindMap.opt.selectTranslateLimit,o=0;e<=this.mindMap.elRect.left+a&&(r("left",s),this.mindMap.view.translateX(s),o++),e>=this.mindMap.elRect.right-a&&(r("right",s),this.mindMap.view.translateX(-s),o++),t<=this.mindMap.elRect.top+a&&(r("top",s),this.mindMap.view.translateY(s),o++),t>=this.mindMap.elRect.bottom-a&&(r("bottom",s),this.mindMap.view.translateY(-s),o++),o>0&&this.startAutoMove(e,t,n,r)}startAutoMove(e,t,n,r){this.autoMoveTimer=setTimeout(()=>{this.onMove(e,t,n,r)},20)}clearAutoMoveTimer(){clearTimeout(this.autoMoveTimer)}}class Sd extends Fn{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.autoMove=new Md(e),this.reset(),this.bindEvent()}reset(){this.isDragging=!1,this.mousedownNode=null,this.beingDragNodeList=[],this.nodeList=[],this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.drawTransform=null,this.clone=null,this.placeholder=null,this.placeholderWidth=50,this.placeholderHeight=10,this.placeHolderLine=null,this.placeHolderExtraLines=[],this.offsetX=0,this.offsetY=0,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.checkDragOffset=10,this.minOffset=10}bindEvent(){this.onNodeMousedown=this.onNodeMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkOverlapNode=Ga(this.checkOverlapNode,300,this),this.mindMap.on("node_mousedown",this.onNodeMousedown),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("mouseup",this.onMouseup)}unBindEvent(){this.mindMap.off("node_mousedown",this.onNodeMousedown),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("node_mouseup",this.onMouseup),this.mindMap.off("mouseup",this.onMouseup)}onNodeMousedown(e,t){if(this.mindMap.opt.readonly||t.which!==1||e.isGeneralization||e.isRoot)return;this.isMousedown=!0,this.mousedownNode=e;const{x:n,y:r}=this.mindMap.toPos(t.clientX,t.clientY);this.mouseDownX=n,this.mouseDownY=r}onMousemove(e){if(this.mindMap.opt.readonly||!this.isMousedown)return;e.preventDefault();const{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,!(!this.isDragging&&Math.abs(t-this.mouseDownX)<=this.checkDragOffset&&Math.abs(n-this.mouseDownY)<=this.checkDragOffset)&&(this.mindMap.emit("node_dragging",this.mousedownNode),this.handleStartMove(),this.onMove(t,n,e))}async onMouseup(e){if(!this.isMousedown)return;const{autoMoveWhenMouseInEdgeOnDrag:t,enableFreeDrag:n,beforeDragEnd:r}=this.mindMap.opt;t&&this.mindMap.select&&this.autoMove.clearAutoMoveTimer(),this.isMousedown=!1,this.beingDragNodeList.forEach(l=>{l.setOpacity(1),l.showChildren(),l.endDrag()}),this.removeCloneNode();let s=this.overlapNode?this.overlapNode.getData("uid"):"",a=this.prevNode?this.prevNode.getData("uid"):"",o=this.nextNode?this.nextNode.getData("uid"):"";if(this.isDragging&&typeof r=="function"&&await r({overlapNodeUid:s,prevNodeUid:a,nextNodeUid:o,beingDragNodeList:[...this.beingDragNodeList]})){this.reset();return}if(this.overlapNode)this.removeNodeActive(this.overlapNode),this.mindMap.execCommand("MOVE_NODE_TO",this.beingDragNodeList,this.overlapNode);else if(this.prevNode)this.removeNodeActive(this.prevNode),this.mindMap.execCommand("INSERT_AFTER",this.beingDragNodeList,this.prevNode);else if(this.nextNode)this.removeNodeActive(this.nextNode),this.mindMap.execCommand("INSERT_BEFORE",this.beingDragNodeList,this.nextNode);else if(this.clone&&n&&this.beingDragNodeList.length===1){let{x:l,y:h}=this.mindMap.toPos(e.clientX-this.offsetX,e.clientY-this.offsetY),{scaleX:c,scaleY:d,translateX:f,translateY:m}=this.drawTransform;l=(l-f)/c,h=(h-m)/d,this.mousedownNode.left=l,this.mousedownNode.top=h,this.mousedownNode.customLeft=l,this.mousedownNode.customTop=h,this.mindMap.execCommand("SET_NODE_CUSTOM_POSITION",this.mousedownNode,l,h),this.mindMap.render()}this.isDragging&&this.mindMap.emit("node_dragend",{overlapNodeUid:s,prevNodeUid:a,nextNodeUid:o}),this.reset()}removeNodeActive(e){e.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1)}onMove(e,t,n){if(!this.isMousedown||!this.isDragging)return;let{scaleX:r,scaleY:s,translateX:a,translateY:o}=this.drawTransform,l=e-this.offsetX,h=t-this.offsetY;e=(l-a)/r,t=(h-o)/s;let c=this.clone.transform();this.clone.translate(e-c.translateX,t-c.translateY),this.checkOverlapNode(),this.drawTransform=this.mindMap.draw.transform(),this.autoMove.clearAutoMoveTimer(),this.autoMove.onMove(n.clientX,n.clientY)}async handleStartMove(){if(!this.isDragging){let e=this.mousedownNode;this.drawTransform=this.mindMap.draw.transform();let{scaleX:t,scaleY:n,translateX:r,translateY:s}=this.drawTransform;this.offsetX=this.mouseDownX-(e.left*t+r),this.offsetY=this.mouseDownY-(e.top*n+s),e.getData("isActive")?this.beingDragNodeList=m0(d0(this.mindMap.renderer.activeNodeList.filter(o=>!o.isRoot&&!o.isGeneralization))):this.beingDragNodeList=[e];const{beforeDragStart:a}=this.mindMap.opt;if(typeof a=="function"&&await a([...this.beingDragNodeList]))return;this.nodeTreeToList(),this.createCloneNode(),this.mindMap.execCommand("CLEAR_ACTIVE_NODE"),this.isDragging=!0}}nodeTreeToList(){const e=[];Fr(this.mindMap.renderer.root,t=>{this.checkIsInBeingDragNodeList(t)||(e[t.layerIndex]||(e[t.layerIndex]=[]),e[t.layerIndex].push(t))}),this.nodeList=e.reduceRight((t,n)=>[...t,...n],[])}createCloneNode(){if(!this.clone){const{dragMultiNodeRectConfig:e,dragPlaceholderRectFill:t,dragPlaceholderLineConfig:n,dragOpacityConfig:r,handleDragCloneNode:s}=this.mindMap.opt,{width:a,height:o,fill:l}=e,h=this.beingDragNodeList[0],c=h.style.merge("lineColor",!0);if(this.beingDragNodeList.length>1)this.clone=this.mindMap.otherDraw.rect().size(a,o).radius(o/2).fill({color:l||c}),this.offsetX=a/2,this.offsetY=o/2;else{this.clone=h.group.clone();const d=this.clone.findOne(".smm-expand-btn");d&&d.remove(),this.mindMap.otherDraw.add(this.clone),typeof s=="function"&&s(this.clone)}this.clone.opacity(r.cloneNodeOpacity),this.clone.css("z-index",99999),this.placeholder=this.mindMap.otherDraw.rect().fill({color:t||c}).radius(5),this.placeHolderLine=this.mindMap.otherDraw.path().stroke({color:n.color||c,width:n.width}).fill({color:"none"}),this.beingDragNodeList.forEach(d=>{d.setOpacity(r.beingDragNodeOpacity),d.hideChildren(),d.startDrag()})}}removeCloneNode(){this.clone&&(this.clone.remove(),this.placeholder.remove(),this.placeHolderLine.remove(),this.removeExtraLines())}removeExtraLines(){this.placeHolderExtraLines.forEach(e=>{e.remove()}),this.placeHolderExtraLines=[]}checkOverlapNode(){if(!this.drawTransform||!this.placeholder)return;const{LOGICAL_STRUCTURE:e,LOGICAL_STRUCTURE_LEFT:t,MIND_MAP:n,ORGANIZATION_STRUCTURE:r,CATALOG_ORGANIZATION:s,TIMELINE:a,TIMELINE2:o,VERTICAL_TIMELINE:l,VERTICAL_TIMELINE2:h,VERTICAL_TIMELINE3:c,FISHBONE:d,FISHBONE2:f,RIGHT_FISHBONE:m,RIGHT_FISHBONE2:v}=_.LAYOUT;this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.placeholder.size(0,0),this.placeHolderLine.hide(),this.removeExtraLines(),this.nodeList.forEach(g=>{if(g.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",g,!1),!(this.overlapNode||this.prevNode&&this.nextNode))switch(this.mindMap.opt.layout){case e:case t:this.handleLogicalStructure(g);break;case n:this.handleMindMap(g);break;case r:this.handleOrganizationStructure(g);break;case s:this.handleCatalogOrganization(g);break;case a:this.handleTimeLine(g);break;case o:this.handleTimeLine2(g);break;case l:case h:case c:this.handleLogicalStructure(g);break;case d:case f:case m:case v:this.handleFishbone(g);break;default:this.handleLogicalStructure(g)}}),this.overlapNode&&this.handleOverlapNode()}handleOverlapNode(){const{LOGICAL_STRUCTURE:e,LOGICAL_STRUCTURE_LEFT:t,MIND_MAP:n,ORGANIZATION_STRUCTURE:r,CATALOG_ORGANIZATION:s,TIMELINE:a,TIMELINE2:o,VERTICAL_TIMELINE:l,VERTICAL_TIMELINE2:h,VERTICAL_TIMELINE3:c,FISHBONE:d,FISHBONE2:f,RIGHT_FISHBONE:m,RIGHT_FISHBONE2:v}=_.LAYOUT,{LEFT:g,TOP:x,RIGHT:b,BOTTOM:E}=_.LAYOUT_GROW_DIR,M=this.overlapNode.layerIndex,z=this.overlapNode.children,R=this.mindMap.renderer.layout.getMarginX(M+1),O=this.mindMap.renderer.layout.getMarginY(M+1),B=this.placeholderWidth/2,F=this.placeholderHeight/2;let P="",ee="",V="",Y=!1,ie=!1;if(z.length>0){const Q=z[z.length-1],oe=this.getNodeRect(Q);switch(P=this.getNewChildNodeDir(Q),this.mindMap.opt.layout){case e:case n:ee=P===g?oe.originRight-this.placeholderWidth:oe.originLeft,V=oe.originBottom+this.minOffset-F;break;case t:ee=oe.originRight-this.placeholderWidth,V=oe.originBottom+this.minOffset-F;break;case r:Y=!0,ee=oe.originRight+this.minOffset-F,V=oe.originTop;break;case s:M===0?(Y=!0,ee=oe.originRight+this.minOffset-F,V=oe.originTop):(ee=oe.originLeft,V=oe.originBottom+this.minOffset-F);break;case a:M===0?(Y=!0,ee=oe.originRight+this.minOffset-F,V=oe.originTop+oe.originHeight/2-B):(ee=oe.originLeft,V=oe.originBottom+this.minOffset-F);break;case o:M===0?(Y=!0,ee=oe.originRight+this.minOffset-F,V=oe.originTop+oe.originHeight/2-B):(ee=oe.originLeft,M===1?V=P===x?oe.originTop-this.placeholderHeight-this.minOffset+F:oe.originBottom+this.minOffset-F:V=oe.originBottom+this.minOffset-F);break;case l:case h:case c:M===0?(ee=oe.originLeft+oe.originWidth/2-B,V=oe.originBottom+this.minOffset-F):(ee=P===b?oe.originLeft:oe.originRight-this.placeholderWidth,V=oe.originBottom+this.minOffset-F);break;case d:case f:case m:case v:M<=1?(ie=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ee=oe.originLeft,V=P===x?oe.originBottom+this.minOffset-F:oe.originTop-this.placeholderHeight-this.minOffset+F);break}}else{const Q=this.getNodeRect(this.overlapNode);switch(P=this.getNewChildNodeDir(this.overlapNode),this.mindMap.opt.layout){case e:case n:ee=P===b?Q.originRight+R:Q.originLeft-this.placeholderWidth-R,V=Q.originTop+(Q.originHeight-this.placeholderHeight)/2;break;case t:ee=Q.originLeft-this.placeholderWidth-R,V=Q.originTop+(Q.originHeight-this.placeholderHeight)/2;break;case r:Y=!0,ee=Q.originLeft+(Q.originWidth-this.placeholderHeight)/2,V=Q.originBottom+R;break;case s:M===0&&(Y=!0),ee=Q.originLeft+Q.originWidth*.5,V=Q.originBottom+R;break;case a:M===0&&(Y=!0),ee=Q.originLeft+Q.originWidth*.5,V=Q.originBottom+O;break;case o:M===0&&(Y=!0),ee=Q.originLeft+Q.originWidth*.5,M===1?V=P===x?Q.originTop-this.placeholderHeight-R:Q.originBottom+R:V=Q.originBottom+R;break;case l:case h:case c:M===0&&(Y=!0),ee=P===b?Q.originRight+R:Q.originLeft-this.placeholderWidth-R,V=Q.originTop+Q.originHeight/2-F;break;case d:case f:case m:case v:M<=1?(ie=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ee=Q.originLeft+Q.originWidth*.5,V=P===E?Q.originTop-this.placeholderHeight-this.minOffset+F:Q.originBottom+this.minOffset-F);break}}ie||this.setPlaceholderRect({x:ee,y:V,dir:P,rotate:Y})}getNewChildNodeDir(e){const{LOGICAL_STRUCTURE:t,LOGICAL_STRUCTURE_LEFT:n,MIND_MAP:r,TIMELINE2:s,VERTICAL_TIMELINE:a,VERTICAL_TIMELINE2:o,VERTICAL_TIMELINE3:l,FISHBONE:h,FISHBONE2:c,RIGHT_FISHBONE:d,RIGHT_FISHBONE2:f}=_.LAYOUT;switch(this.mindMap.opt.layout){case t:return _.LAYOUT_GROW_DIR.RIGHT;case n:return _.LAYOUT_GROW_DIR.LEFT;case r:case s:case a:case o:case l:case h:case c:case d:case f:return e.dir;default:return""}}handleVerticalCheck(e,t,n=!1){const{layout:r}=this.mindMap.opt,{LAYOUT:s,LAYOUT_GROW_DIR:a}=_,{VERTICAL_TIMELINE:o,VERTICAL_TIMELINE2:l,VERTICAL_TIMELINE3:h,FISHBONE:c,FISHBONE2:d,RIGHT_FISHBONE:f,RIGHT_FISHBONE2:m}=s,{LEFT:v}=a,g=this.mouseMoveX,x=this.mouseMoveY,b=this.getNodeRect(e),E=this.getNewChildNodeDir(e),M=e.layerIndex;n&&(t=t.reverse());let z=b.originHeight/4,{prevBrotherOffset:R,nextBrotherOffset:O}=this.getNodeDistanceToSiblingNode(t,e,b,"v");if(b.left<=g&&b.right>=g){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let B=O>0?x>b.bottom&&x<=b.bottom+O:x>=b.bottom-z&&x<=b.bottom,F=R>0?x<b.top&&x>=b.top-R:x>=b.top&&x<=b.top+z;const{scaleY:P}=this.drawTransform;let ee=E===v?b.originRight-this.placeholderWidth:b.originLeft,V=!1;switch(r){case o:case l:case h:M===1&&(ee=b.originLeft+b.originWidth/2-this.placeholderWidth/2);break;case f:case m:ee=b.originLeft+b.originWidth-this.placeholderWidth;break}if(B){n?this.nextNode=e:this.prevNode=e;let Y=b.originBottom+O/P-this.placeholderHeight/2;switch(r){case c:case d:case f:case m:M===2&&(V=!0,Y=b.originBottom+this.minOffset-this.placeholderHeight/2);break}this.setPlaceholderRect({x:ee,y:Y,dir:E,notRenderLine:V})}else if(F){n?this.prevNode=e:this.nextNode=e;let Y=b.originTop-this.placeholderHeight-R/P+this.placeholderHeight/2;switch(r){case c:case d:case f:case m:M===2&&(V=!0,Y=b.originTop-this.placeholderHeight-this.minOffset+this.placeholderHeight/2);break}this.setPlaceholderRect({x:ee,y:Y,dir:E,notRenderLine:V})}}this.checkIsOverlap({node:e,dir:"v",prevBrotherOffset:R,nextBrotherOffset:O,size:z,pos:x,nodeRect:b})}}handleHorizontalCheck(e,t){const{layout:n}=this.mindMap.opt,{LAYOUT:r}=_,{FISHBONE:s,FISHBONE2:a,RIGHT_FISHBONE:o,RIGHT_FISHBONE2:l,TIMELINE:h,TIMELINE2:c}=r;let d=this.mouseMoveX,f=this.mouseMoveY,m=this.getNodeRect(e),v=m.originWidth/4,{prevBrotherOffset:g,nextBrotherOffset:x}=this.getNodeDistanceToSiblingNode(t,e,m,"h");if(m.top<=f&&m.bottom>=f){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let b=x>0?d<m.right+x&&d>=m.right:d<=m.right&&d>=m.right-v,E=g>0?d>m.left-g&&d<=m.left:d<=m.left+v&&d>=m.left;const{scaleX:M}=this.drawTransform,z=e.layerIndex;let R=m.originTop,O=!1;switch(n){case h:case c:R=m.originTop+m.originHeight/2-this.placeholderWidth/2;break;case s:case a:case o:case l:z===1&&(O=!0,R=m.originTop+m.originHeight/2-this.placeholderWidth/2);break}b?([o,l].includes(n)?this.nextNode=e:this.prevNode=e,this.setPlaceholderRect({x:m.originRight+x/M-this.placeholderHeight/2,y:R,rotate:!0,notRenderLine:O})):E&&([o,l].includes(n)?this.prevNode=e:this.nextNode=e,this.setPlaceholderRect({x:m.originLeft-this.placeholderHeight-g/M+this.placeholderHeight/2,y:R,rotate:!0,notRenderLine:O}))}this.checkIsOverlap({node:e,dir:"h",prevBrotherOffset:g,nextBrotherOffset:x,size:v,pos:d,nodeRect:m})}}getNodeDistanceToSiblingNode(e,t,n,r){const{TOP:s,LEFT:a,BOTTOM:o,RIGHT:l}=_.LAYOUT_GROW_DIR;let{scaleX:h,scaleY:c}=this.drawTransform,d=r==="v"?s:a,f=r==="v"?o:l,m=r==="v"?c:h,v=this.minOffset*m,g=_t(t,e),x=null,b=null;g!==-1&&(g-1>=0&&(x=e[g-1]),g+1<=e.length-1&&(b=e[g+1]));let E=0;if(x){let z=this.getNodeRect(x);E=n[d]-z[f],E=E>=v?E/2:0}else E=v;let M=0;return b?(M=this.getNodeRect(b)[d]-n[f],M=M>=v?M/2:0):M=v,{prevBrother:x,prevBrotherOffset:E,nextBrother:b,nextBrotherOffset:M}}setPlaceholderRect({x:e,y:t,dir:n,rotate:r,notRenderLine:s}){let a=this.placeholderWidth,o=this.placeholderHeight;if(r){const f=a;a=o,o=f}if(this.placeholder.size(a,o).move(e,t),s)return;const{dragPlaceholderLineConfig:l}=this.mindMap.opt;let h=null,c=null;this.overlapNode?(h=this.overlapNode,c=this.overlapNode):(h=this.prevNode||this.nextNode,c=h.parent),c=c.fakeClone(),h=h.fakeClone();const d=this.beingDragNodeList[0].fakeClone();d.dir=n,d.left=e,d.top=t,d.width=a,d.height=o,c.children=[d],c._lines=[],this.placeHolderLine.show(),this.mindMap.renderer.layout.renderLine(c,[this.placeHolderLine],(...f)=>{},h.style.getStyle("lineStyle",!0)),this.placeHolderExtraLines=[...c._lines],this.placeHolderExtraLines.forEach(f=>{this.mindMap.otherDraw.add(f),f.stroke({color:l.color,width:l.width}).fill({color:"none"})})}checkIsOverlap({node:e,dir:t,prevBrotherOffset:n,nextBrotherOffset:r,size:s,pos:a,nodeRect:o}){const{TOP:l,LEFT:h,BOTTOM:c,RIGHT:d}=_.LAYOUT_GROW_DIR;let f=t==="v"?l:h,m=t==="v"?c:d;!this.overlapNode&&!this.prevNode&&!this.nextNode&&o[f]+(n>0?0:s)<=a&&o[m]-(r>0?0:s)>=a&&(this.overlapNode=e)}handleLogicalStructure(e){const t=this.commonGetNodeCheckList(e);this.handleVerticalCheck(e,t)}handleMindMap(e){const t=e.parent?e.parent.children.filter(n=>{let r=!0;return e.layerIndex===1&&(r=n.dir===e.dir),r&&!this.checkIsInBeingDragNodeList(n)}):[];this.handleVerticalCheck(e,t)}handleOrganizationStructure(e){const t=this.commonGetNodeCheckList(e);this.handleHorizontalCheck(e,t)}handleCatalogOrganization(e){const t=this.commonGetNodeCheckList(e);e.layerIndex===1?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine(e){let t=this.commonGetNodeCheckList(e);e.layerIndex===1?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine2(e){let t=this.commonGetNodeCheckList(e);e.layerIndex===1?this.handleHorizontalCheck(e,t):e.dir===_.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}handleFishbone(e){let t=e.parent?e.parent.children.filter(n=>n.layerIndex>1&&!this.checkIsInBeingDragNodeList(n)):[];if(e.layerIndex===1)this.handleHorizontalCheck(e,t);else{const n=e.dir===_.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2,r=e.dir===_.LAYOUT_GROW_DIR.BOTTOM&&e.layerIndex>=3;n||r?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}}commonGetNodeCheckList(e){return e.parent?[...e.parent.children].filter(t=>!this.checkIsInBeingDragNodeList(t)):[]}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:s}=this.drawTransform,{left:a,top:o,width:l,height:h}=e,c=l,d=h,f=a,m=o,v=o+h,g=a+l,x=(a+l)*t+r,b=(o+h)*n+s;return a=a*t+r,o=o*n+s,{left:a,top:o,right:x,bottom:b,originWidth:c,originHeight:d,originLeft:f,originTop:m,originBottom:v,originRight:g}}checkIsInBeingDragNodeList(e){return!!this.beingDragNodeList.find(t=>t.uid===e.uid||t.isAncestor(e))}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Sd.instanceName="drag";const ul=i=>String(i).split(/\s+/).map(t=>{if(/^[\d.]+/.test(t)){let n=/^([\d.]+)(.*)$/.exec(t);return[Number(n[1]),n[2]]}else return t}),ia=(i,e)=>i*e,wo=(i,e)=>e/i,wh={left:0,top:0,center:50,bottom:100,right:100},s4=({backgroundSize:i,drawOpt:e,imageRatio:t,canvasWidth:n,canvasHeight:r,canvasRatio:s})=>{if(i){let a=ul(i);if(a[0]==="auto"&&a[1]==="auto")return;if(a[0]==="cover"){t>s?(e.height=r,e.width=ia(t,r)):(e.width=n,e.height=wo(t,n));return}if(a[0]==="contain"){t>s?(e.width=n,e.height=wo(t,n)):(e.height=r,e.width=ia(t,r));return}let o=-1;a[0]&&(Array.isArray(a[0])?a[0][1]==="%"?(e.width=a[0][0]/100*n,o=e.width):(e.width=a[0][0],o=a[0][0]):a[0]==="auto"&&a[1]&&(a[1][1]==="%"?e.width=ia(t,a[1][0]/100*r):e.width=ia(t,a[1][0]))),a[1]&&Array.isArray(a[1])?a[1][1]==="%"?e.height=a[1][0]/100*r:e.height=a[1][0]:o!==-1&&(e.height=wo(t,o))}},a4=({backgroundPosition:i,drawOpt:e,imgWidth:t,imgHeight:n,canvasWidth:r,canvasHeight:s})=>{if(i){let a=ul(i);if(a=a.map(o=>typeof o=="string"&&wh[o]!==void 0?[wh[o],"%"]:o),Array.isArray(a[0])){if(a.length===1&&a.push([50,"%"]),a[0][1]==="%"){let o=a[0][0]/100*r,l=a[0][0]/100*t;e.x=o-l}else e.x=a[0][0];if(a[1][1]==="%"){let o=a[1][0]/100*s,l=a[1][0]/100*n;e.y=o-l}else e.y=a[1][0]}}},o4=({ctx:i,image:e,backgroundRepeat:t,drawOpt:n,imgWidth:r,imgHeight:s,canvasWidth:a,canvasHeight:o})=>{if(t){let l=n.x,h=n.y,c=Math.ceil(l/r),d=Math.ceil(h/s),f=l-c*r,m=h-d*s,v=ul(t);if(v[0]==="no-repeat"||r>=a&&s>=o)return;if(v[0]==="repeat-x"&&a>r){let g=f;for(;g<a;)ga(i,e,{...n,x:g}),g+=r;return!0}if(v[0]==="repeat-y"&&o>s){let g=m;for(;g<o;)ga(i,e,{...n,y:g}),g+=s;return!0}if(v[0]==="repeat"){let g=f;for(;g<a;){if(o>s){let x=m;for(;x<o;)ga(i,e,{...n,x:g,y:x}),x+=s}g+=r}return!0}}},ga=(i,e,t)=>{i.drawImage(e,t.sx,t.sy,t.swidth,t.sheight,t.x,t.y,t.width,t.height)},l4=(i,e,t,n,{backgroundSize:r,backgroundPosition:s,backgroundRepeat:a},o=()=>{})=>{let l=e/t,h=new Image;h.src=n,h.onload=()=>{let c=h.width,d=h.height,f=c/d,m={sx:0,sy:0,swidth:c,sheight:d,x:0,y:0,width:c,height:d};s4({backgroundSize:r,drawOpt:m,imageRatio:f,canvasWidth:e,canvasHeight:t,canvasRatio:l}),a4({backgroundPosition:s,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t}),o4({ctx:i,image:h,backgroundRepeat:a,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t})||ga(i,h,m),o()},h.onerror=c=>{o(c)}},bo=i=>i.richText?xd(i.text):i.text,h4=i=>new Array(i).fill("#").join(""),c4=i=>new Array(i-6).fill(" ").join("")+"*",d4=i=>{let e="";return Pe(i,null,(t,n,r,s)=>{const a=s+1;a<=6?e+=h4(a):e+=c4(a),e+=" "+bo(t.data);const o=t.data.generalization;if(Array.isArray(o))e+=o.map(l=>` [${bo(l)}]`);else if(o&&o.text){const l=bo(o);e+=` [${l}]`}e+=`
287
+
288
+ `,t.data.note&&(e+=t.data.note+`
289
+
290
+ `)},()=>{},!0),e},ko=i=>i.richText?xd(i.text):i.text,u4=i=>new Array(i).fill(" ").join(""),f4=i=>{let e="";return Pe(i,null,(t,n,r,s)=>{e+=u4(s),e+=" "+ko(t.data);const a=t.data.generalization;Array.isArray(a)?e+=a.map(o=>` [${ko(o)}]`):a&&a.text&&(e+=` [${ko(a)}]`),e+=`
291
+
292
+ `},()=>{},!0),e};class zd{constructor(e){this.mindMap=e.mindMap}async export(e,t=!0,n="思维导图",...r){if(this[e]){const s=await this[e](n,...r);return t&&Vf(s,n+"."+e),s}else return null}createTransformImgTaskList(e,t,n,r){return e.find(t).map(async a=>{const o=r(a);if(/^data:/.test(o)||o==="none")return;const l=await Zl(o);a.attr(n,l)})}async getSvgData(e){let{exportPaddingX:t,exportPaddingY:n,errorHandler:r,resetCss:s,addContentToHeader:a,addContentToFooter:o,handleBeingExportSvg:l}=this.mindMap.opt,{svg:h,svgHTML:c,clipData:d}=this.mindMap.getSvgData({paddingX:t,paddingY:n,addContentToHeader:a,addContentToFooter:o,node:e});d&&(d.paddingX=t,d.paddingY=n);let f=!1;const m=this.createTransformImgTaskList(h,"image","href",x=>x.attr("href")||x.attr("xlink:href")),v=this.createTransformImgTaskList(h,"img","src",x=>x.attr("src")),g=[...m,...v];try{await Promise.all(g)}catch(x){r(ur.EXPORT_LOAD_IMAGE_ERROR,x)}if(this.mindMap.richText){const x=h.find("foreignObject");if(x.length>0&&(x[0].add(mt(`<style>${s}</style>`)),f=!0),this.mindMap.formula&&h.find(".ql-formula").length>0){const E=this.mindMap.formula.getStyleText();if(E){const M=document.createElement("style");M.innerHTML=E,dr(M),x[0].add(M),f=!0}}}return typeof l=="function"&&(f=!0,h=l(h)),(g.length>0||f)&&(c=h.svg()),{node:h,str:c,clipData:d}}svgToPng(e,t,n=null,r=!1,s="image/png"){const{maxCanvasSize:a,minExportImgCanvasScale:o}=this.mindMap.opt;return new Promise((l,h)=>{const c=new Image;c.setAttribute("crossOrigin","anonymous"),c.onload=async()=>{try{const d=document.createElement("canvas"),f=Math.max(window.devicePixelRatio,o);let m=c.width,v=c.height,g=0,x=0;n&&(g=n.paddingX,x=n.paddingY,m=n.width+g*2,v=n.height+x*2);let b=0,E=0;const{backgroundImage:M}=this.mindMap.themeConfig;if(r&&M&&!t){const V=await new Promise(Y=>{const ie=new Image;ie.onload=()=>{Y([ie.width,ie.height])},ie.onerror=()=>{Y(null)},ie.src=M});if(V){const Y=m/v,ie=V[0]/V[1];Y>ie?(b=m,E=m/ie):(E=v,b=v*ie)}}let z=(b||m)*f,R=(E||v)*f;if(z>a||R>a){let V=null,Y=null;z>a?V=a:R>a&&(Y=a);const ie=pd(z,R,V,Y);z=ie[0],R=ie[1]}d.width=z,d.height=R;const O=z/f,B=R/f;d.style.width=O+"px",d.style.height=B+"px";const F=d.getContext("2d");F.scale(f,f),t||await this.drawBackgroundToCanvas(F,O,B);const P=b>0?(b-m)/2:0,ee=E>0?(E-v)/2:0;n?F.drawImage(c,n.left,n.top,n.width,n.height,g+P,x+ee,n.width,n.height):F.drawImage(c,P,ee,m,v),l(d.toDataURL(s))}catch(d){h(d)}},c.onerror=d=>{h(d)},c.src=e})}drawBackgroundToCanvas(e,t,n){return new Promise((r,s)=>{const{backgroundColor:a="#fff",backgroundImage:o,backgroundRepeat:l="no-repeat",backgroundPosition:h="center center",backgroundSize:c="cover"}=this.mindMap.themeConfig;e.save(),e.rect(0,0,t,n),e.fillStyle=a,e.fill(),e.restore(),o&&o!=="none"?(e.save(),l4(e,t,n,o,{backgroundRepeat:l,backgroundPosition:h,backgroundSize:c},d=>{d?s(d):r(),e.restore()})):r()})}drawBackgroundToSvg(e){return new Promise(async t=>{const{backgroundColor:n="#fff",backgroundImage:r,backgroundRepeat:s="repeat"}=this.mindMap.themeConfig;if(e.css("background-color",n),r&&r!=="none"){const a=await Zl(r);e.css("background-image",`url(${a})`),e.css("background-repeat",s),t()}else t()})}async _image(e,t,n=!1,r=null,s=!1){this.mindMap.renderer.textEdit.hideEditTextBox(),this.handleNodeExport(r);const{str:a,clipData:o}=await this.getSvgData(r),l=await this.fixSvgStrAndToBlob(a);return await this.svgToPng(l,n,o,s,e)}async png(...e){return await this._image("image/png",...e)}async jpg(...e){return await this._image("image/jpg",...e)}handleNodeExport(e){if(e&&e.getData("isActive")){e.deactivate();const{alwaysShowExpandBtn:t,notShowExpandBtn:n}=this.mindMap.opt;!t&&!n&&e.getData("expand")&&e.removeExpandBtn()}}async pdf(e,t=!1,n=!1){if(!this.mindMap.doExportPDF)throw new Error("请注册ExportPDF插件");const r=await this.png(e,t,null,n);return await this.mindMap.doExportPDF.pdf(r)}async xmind(e){if(!this.mindMap.doExportXMind)throw new Error("请注册ExportXMind插件");const t=this.mindMap.getData(),n=await this.mindMap.doExportXMind.xmind(t,e);return await hs(n)}async svg(e){this.mindMap.renderer.textEdit.hideEditTextBox();const{node:t}=await this.getSvgData();t.first().before(mt(`<title>${e}</title>`)),await this.drawBackgroundToSvg(t);const n=t.svg();return await this.fixSvgStrAndToBlob(n)}async fixSvgStrAndToBlob(e){e=t2(e),e=m2(e);const t=new Blob([e],{type:"image/svg+xml"});return await hs(t)}async json(e,t=!0){const n=this.mindMap.getData(t),r=JSON.stringify(n),s=new Blob([r]);return await hs(s)}async smm(e,t){return await this.json(e,t)}async md(){const e=this.mindMap.getData(),t=d4(e),n=new Blob([t]);return await hs(n)}async txt(){const e=this.mindMap.getData(),t=f4(e),n=new Blob([t]);return await hs(n)}}zd.instanceName="doExport";class Cd{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.addShortcut()}addShortcut(){this.onLeftKeyUp=this.onLeftKeyUp.bind(this),this.onUpKeyUp=this.onUpKeyUp.bind(this),this.onRightKeyUp=this.onRightKeyUp.bind(this),this.onDownKeyUp=this.onDownKeyUp.bind(this),this.mindMap.keyCommand.addShortcut(_.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.addShortcut(_.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.addShortcut(_.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.addShortcut(_.KEY_DIR.DOWN,this.onDownKeyUp)}removeShortcut(){this.mindMap.keyCommand.removeShortcut(_.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.removeShortcut(_.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.removeShortcut(_.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.removeShortcut(_.KEY_DIR.DOWN,this.onDownKeyUp)}onLeftKeyUp(){this.onKeyup(_.KEY_DIR.LEFT)}onUpKeyUp(){this.onKeyup(_.KEY_DIR.UP)}onRightKeyUp(){this.onKeyup(_.KEY_DIR.RIGHT)}onDownKeyUp(){this.onKeyup(_.KEY_DIR.DOWN)}onKeyup(e){if(this.mindMap.renderer.activeNodeList.length>0)this.focus(e);else{let t=this.mindMap.renderer.root;this.mindMap.execCommand("GO_TARGET_NODE",t)}}focus(e){let t=this.mindMap.renderer.activeNodeList[0],n=this.getNodeRect(t),r=null,s=1/0,a=(o,l)=>{let h=this.getDistance(n,o);h<s&&(r=l,s=h)};this.getFocusNodeByShadowAlgorithm({currentActiveNode:t,currentActiveNodeRect:n,dir:e,checkNodeDis:a}),r||this.getFocusNodeByAreaAlgorithm({currentActiveNode:t,currentActiveNodeRect:n,dir:e,checkNodeDis:a}),r||this.getFocusNodeBySimpleAlgorithm({currentActiveNode:t,currentActiveNodeRect:n,dir:e,checkNodeDis:a}),r&&this.mindMap.execCommand("GO_TARGET_NODE",r)}getFocusNodeBySimpleAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Fr(this.mindMap.renderer.root,s=>{if(s.uid===e.uid)return;let a=this.getNodeRect(s),{left:o,top:l,right:h,bottom:c}=a,d=!1;n===_.KEY_DIR.LEFT?d=h<=t.left:n===_.KEY_DIR.RIGHT?d=o>=t.right:n===_.KEY_DIR.UP?d=c<=t.top:n===_.KEY_DIR.DOWN&&(d=l>=t.bottom),d&&r(a,s)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Fr(this.mindMap.renderer.root,s=>{if(s.uid===e.uid)return;let a=this.getNodeRect(s),{left:o,top:l,right:h,bottom:c}=a,d=!1;n===_.KEY_DIR.LEFT?d=o<t.left&&l<t.bottom&&c>t.top:n===_.KEY_DIR.RIGHT?d=h>t.right&&l<t.bottom&&c>t.top:n===_.KEY_DIR.UP?d=l<t.top&&o<t.right&&h>t.left:n===_.KEY_DIR.DOWN&&(d=c>t.bottom&&o<t.right&&h>t.left),d&&r(a,s)})}getFocusNodeByAreaAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){let s=(t.right+t.left)/2,a=(t.bottom+t.top)/2;Fr(this.mindMap.renderer.root,o=>{if(o.uid===e.uid)return;let l=this.getNodeRect(o),{left:h,top:c,right:d,bottom:f}=l,m=(d+h)/2,v=(f+c)/2,g=m-s,x=v-a;if(g===0&&x===0)return;let b=!1;n===_.KEY_DIR.LEFT?b=g<=0&&g<=x&&g<=-x:n===_.KEY_DIR.RIGHT?b=g>0&&g>=-x&&g>=x:n===_.KEY_DIR.UP?b=x<=0&&x<g&&x<-g:n===_.KEY_DIR.DOWN&&(b=x>0&&-x<g&&x>g),b&&r(l,o)})}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:s}=this.mindMap.draw.transform(),{left:a,top:o,width:l,height:h}=e;return{right:(a+l)*t+r,bottom:(o+h)*n+s,left:a*t+r,top:o*n+s}}getDistance(e,t){let n=this.getCenter(e),r=this.getCenter(t);return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))}getCenter({left:e,right:t,top:n,bottom:r}){return{x:(e+t)/2,y:(n+r)/2}}beforePluginRemove(){this.removeShortcut()}beforePluginDestroy(){this.removeShortcut()}}Cd.instanceName="keyboardNavigation";class Nd{constructor({mindMap:e}){this.mindMap=e,this.rect=null,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.isSelecting=!1,this.cacheActiveList=[],this.autoMove=new Md(e),this.bindEvent()}bindEvent(){this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkInNodes=Ga(this.checkInNodes,300,this),this.mindMap.on("mousedown",this.onMousedown),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup)}unBindEvent(){this.mindMap.off("mousedown",this.onMousedown),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_mouseup",this.onMouseup)}onMousedown(e){const{readonly:t,mousedownEventPreventDefault:n}=this.mindMap.opt;if(t)return;let{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(!(e.ctrlKey||e.metaKey)&&(r?e.which!==1:e.which!==3))return;n&&e.preventDefault(),this.isMousedown=!0,this.cacheActiveList=[...this.mindMap.renderer.activeNodeList];let{x:s,y:a}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseDownX=s,this.mouseDownY=a,this.createRect(s,a)}onMousemove(e){if(this.mindMap.opt.readonly||!this.isMousedown)return;let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,!(Math.abs(t-this.mouseDownX)<=10&&Math.abs(n-this.mouseDownY)<=10)&&(this.autoMove.clearAutoMoveTimer(),this.autoMove.onMove(e.clientX,e.clientY,()=>{this.isSelecting=!0,this.rect&&this.rect.plot([[this.mouseDownX,this.mouseDownY],[this.mouseMoveX,this.mouseDownY],[this.mouseMoveX,this.mouseMoveY],[this.mouseDownX,this.mouseMoveY]]),this.checkInNodes()},(r,s)=>{switch(r){case"left":this.mouseDownX+=s;break;case"top":this.mouseDownY+=s;break;case"right":this.mouseDownX-=s;break;case"bottom":this.mouseDownY-=s;break}}))}onMouseup(){this.mindMap.opt.readonly||this.isMousedown&&(this.checkTriggerNodeActiveEvent(),this.autoMove.clearAutoMoveTimer(),this.isMousedown=!1,this.cacheActiveList=[],this.rect&&this.rect.remove(),this.rect=null,setTimeout(()=>{this.isSelecting=!1},0))}checkTriggerNodeActiveEvent(){let e=this.cacheActiveList.length!==this.mindMap.renderer.activeNodeList.length,t=!1;if(!e)for(let n=0;n<this.cacheActiveList.length;n++){let r=this.cacheActiveList[n];if(!this.mindMap.renderer.activeNodeList.find(s=>s.getData("uid")===r.getData("uid"))){t=!0;break}}(e||t)&&this.mindMap.renderer.emitNodeActiveEvent()}createRect(e,t){this.rect&&this.rect.remove(),this.rect=this.mindMap.svg.polygon().stroke({color:"#0984e3"}).fill({color:"rgba(9,132,227,0.3)"}).plot([[e,t]])}checkInNodes(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),s=Math.min(this.mouseDownX,this.mouseMoveX),a=Math.min(this.mouseDownY,this.mouseMoveY),o=Math.max(this.mouseDownX,this.mouseMoveX),l=Math.max(this.mouseDownY,this.mouseMoveY);const h=c=>{let{left:d,top:f,width:m,height:v}=c,g=(d+m)*e+n,x=(f+v)*t+r;if(d=d*e+n,f=f*t+r,d2(s,o,a,l,d,g,f,x)){if(c.getData("isActive"))return;this.mindMap.renderer.addNodeToActiveList(c),this.mindMap.renderer.emitNodeActiveEvent()}else if(c.getData("isActive")){if(!c.getData("isActive"))return;this.mindMap.renderer.removeNodeFromActiveList(c),this.mindMap.renderer.emitNodeActiveEvent()}};Fr(this.mindMap.renderer.root,c=>{h(c),c._generalizationList&&c._generalizationList.length>0&&c._generalizationList.forEach(d=>{h(d.generalizationNode)})})}hasSelectRange(){return this.isSelecting}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Nd.instanceName="select";const p4="@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url("+new URL("KaTeX_AMS-Regular-BQhdFMY1.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_AMS-Regular-DMm9YOAa.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_AMS-Regular-DRggAlZN.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Caligraphic-Bold-BEiXGLvX.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Caligraphic-Bold-ATXxdsX0.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Caligraphic-Regular-Di6jR-x-.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Caligraphic-Regular-CTRA-rTL.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Caligraphic-Regular-wX97UBjC.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_Fraktur-Bold-CL6g_b3V.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Fraktur-Bold-BsDP51OF.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Fraktur-Bold-BdnERNNW.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Fraktur-Regular-CTYiF6lA.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Fraktur-Regular-Dxdc4cR9.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Fraktur-Regular-CB_wures.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_Main-Bold-Cx986IdX.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-Bold-Jm3AIy58.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-Bold-waoOVXN0.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url('+new URL("KaTeX_Main-BoldItalic-DxDJ3AOS.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-BoldItalic-SpSLRI95.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-BoldItalic-DzxPMmG6.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url('+new URL("KaTeX_Main-Italic-NWA7e6Wa.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-Italic-BMLOBm91.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-Italic-3WenGoN9.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Main-Regular-B22Nviop.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-Regular-Dr94JaBh.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-Regular-ypZvNtVU.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url('+new URL("KaTeX_Math-BoldItalic-CZnvNsCZ.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Math-BoldItalic-iY-2wyZ7.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Math-BoldItalic-B3XSjfu4.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url('+new URL("KaTeX_Math-Italic-t53AETM-.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Math-Italic-DA0__PXp.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Math-Italic-flOr_0UB.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_SansSerif-Bold-D1sUS0GD.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_SansSerif-Bold-DbIhKOiC.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_SansSerif-Bold-CFMepnvq.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url('+new URL("KaTeX_SansSerif-Italic-C3H0VqGB.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_SansSerif-Italic-DN2j7dab.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_SansSerif-Italic-YYjJ1zSn.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_SansSerif-Regular-DDBCnlJ7.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_SansSerif-Regular-CS6fqUqJ.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_SansSerif-Regular-BNo7hRIc.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Script-Regular-D3wIWfF6.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Script-Regular-D5yQViql.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Script-Regular-C5JkGWo-.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Size1-Regular-mCD8mA8B.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Size1-Regular-C195tn64.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size1-Regular-Dbsnue_I.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Size2-Regular-Dy4dx90m.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Size2-Regular-oD1tc_U0.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size2-Regular-B7gKUWhC.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url('+new URL("KaTeX_Size3-Regular-CTq5MqoE.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size3-Regular-DgpXs0kz.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Size4-Regular-Dl5lxZxV.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Size4-Regular-BF-4gkZK.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size4-Regular-DWFBv043.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Typewriter-Regular-CO6r4hn1.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Typewriter-Regular-C0xS9mPB.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf",import.meta.url).href+') format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}',m4=1440*60*1e3;function Ar(i,e=Date.now()){return i.pro||(i.trialUntil??0)>e}function g4(i,e=Date.now()){const t=(i.trialUntil??0)-e;return t>0?Math.ceil(t/m4):0}const v4=/^(\s*)([-*+]|\d+[.)])(\s+)(.*)$/,x4=/^(#{1,6})\s+(.*?)\s*#*\s*$/,na=/^\s*(```|~~~)/,bh=i=>i.length-i.trimStart().length,kh=i=>i.trim()==="";function y4(i,e="Untitled"){const t=i.replace(/\r\n?/g,`
293
+ `),n=t.endsWith(`
294
+ `),r=(n?t.slice(0,-1):t).split(`
295
+ `);let s="",a=0;if(r[0]==="---"){const b=r.indexOf("---",1);if(b>0){s=r.slice(0,b+1).join(`
296
+ `)+`
297
+ `,a=b+1;const E=s.match(/^title:\s*(.+)$/m);E&&(e=E[1].trim().replace(/^["']|["']$/g,""))}}const o={md:e,kind:"heading",level:0,children:[]},l=[{node:o,indent:-1,content:0,heading:0}];let h=0,c=-1,d=!1,f=null;const m=b=>{c<0?c=h:h&&(b.blankBefore=h),h=0,l[l.length-1].node.children.push(b)};for(;a<r.length;a++){const b=r[a];if(d){na.test(b)&&(d=!1),g(f,b);continue}if(kh(b)){h++;continue}const E=v4.exec(b),M=E?null:x4.exec(b),z=bh(b);if(f&&!E&&!M&&(z>=f.content||!h&&f.node.kind==="item"&&z>0)){v(f),g(f,b),na.test(b)&&(d=!0);continue}if(M){const O=M[1].length;for(;l.length>1&&(l[l.length-1].heading===void 0||l[l.length-1].heading>=O);)l.pop();const B={md:M[2],kind:"heading",level:O,children:[]};m(B),l.push({node:B,indent:-1,content:0,heading:O}),f=null;continue}if(E){for(;l.length>1&&l[l.length-1].heading===void 0&&l[l.length-1].indent>=z;)l.pop();const O={md:E[4],kind:"item",marker:E[2],children:[]};m(O),f={node:O,indent:z,content:z+E[2].length+E[3].length},l.push(f),na.test(E[4])&&(d=!0);continue}for(;l.length>1&&l[l.length-1].heading===void 0;)l.pop();const R={md:b.slice(z),kind:"block",children:[]};m(R),f={node:R,indent:z,content:z},na.test(b)&&(d=!0)}function v(b){for(;h>0;h--)b.node.md+=`
298
+ `}function g(b,E){b.node.md+=`
299
+ `+(kh(E)?"":E.slice(Math.min(b.content,bh(E))))}c<0&&(c=0);const x=o.children;return x.length===1&&x[0].kind==="heading"?{frontMatter:s,leadingBlank:c,root:x[0],syntheticRoot:!1,trailingNewline:n}:{frontMatter:s,leadingBlank:c,root:o,syntheticRoot:!0,trailingNewline:n}}function Th(i){return x0(i).md}function x0(i){const e=[],t=new Map,n=i.frontMatter?i.frontMatter.split(`
300
+ `).length-1:0,r=(l=0)=>{for(let h=0;h<l;h++)e.push("")},s=(l,h,c)=>{const[d,...f]=h.split(`
301
+ `);e.push(l+d);for(const m of f)e.push(m===""?"":c+m)},a=(l,h,c,d,f=!1)=>{if(f||r(h.kind==="heading"||l.kind==="item"?l.blankBefore:0),t.set(l,n+e.length),l.kind==="heading"&&h.kind==="heading"){const g=l.level&&l.level>d?l.level:d+1;s("#".repeat(Math.min(g,6))+" ",l.md,""),l.children.forEach(x=>a(x,l,0,g));return}if(l.kind==="block"&&h.kind==="heading"){s("",l.md,""),l.children.forEach(g=>a(g,l,0,d));return}const m=l.kind==="item"&&l.marker?l.marker:"-",v=" ".repeat(c);s(v+m+" ",l.md," ".repeat(c+m.length+1)),l.children.forEach(g=>a(g,l,c+m.length+1,d))};if(r(i.leadingBlank),i.syntheticRoot)t.set(i.root,n+e.length),i.root.children.forEach((l,h)=>a(l,i.root,0,0,h===0));else{const l=i.root.level||1;t.set(i.root,n+e.length),s("#".repeat(l)+" ",i.root.md,""),i.root.children.forEach(h=>a(h,i.root,0,l))}const o=e.join(`
302
+ `);return{md:i.frontMatter+o+(i.trailingNewline?`
303
+ `:""),lines:t}}function Ld(i){return/\n|[`*_\\|<>[\]!~]|\$[^\s$][\s\S]*\$|\$\$[\s\S]+\$\$|^#|^\d+\.\s/.test(i)}function y0(i){return i.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[`*_~]|\\(?=.)/g,"").replace(/\s*\n\s*/g," ").trim()}const w0=/^inkmap:[ \t]*\n((?:[ \t]+.*\n)*)/m;function Eh(i,e){var r,s;const n=(s=(((r=i.match(w0))==null?void 0:r[1])??"").match(new RegExp(`^[ \\t]+${e}:[ \\t]*(.*)$`,"m")))==null?void 0:s[1].trim();return n?n.replace(/^["']|["']$/g,""):void 0}function w4(i,e,t){const n=` ${e}: ${t}
304
+ `;if(!i)return`---
305
+ inkmap:
306
+ ${n}---
307
+ `;const r=i.match(w0);if(!r)return i.replace(/---\n$/,`inkmap:
308
+ ${n}---
309
+ `);const s=new RegExp(`^[ \\t]+${e}:.*\\n`,"m"),a=s.test(r[1])?r[1].replace(s,n):r[1]+n;return i.replace(w0,`inkmap:
310
+ ${a}`)}function b0(i){const e=Ld(i);return{md:i,rich:e,text:e?y0(i)||" ":i}}function Ad(i,e,t=[],n=0){const r=[...t,i.md];return{data:{...b0(i.md),kind:i.kind,level:i.level,marker:i.marker,blankBefore:i.blankBefore,expand:i.children.length?e(r,n):!0},children:i.children.map(s=>Ad(s,e,r,n+1))}}const Ii=i=>(i.rich?i.md:String(i.text??"")).replace(/\r\n?/g,`
311
+ `);function _d(i,e){const{data:t}=i,n={md:Ii(t),kind:t.kind??"item",level:t.level,marker:t.marker,blankBefore:t.blankBefore,children:(i.children??[]).map(r=>_d(r,e))};return e&&t.uid&&e.set(n,t.uid),n}function ra(i,e,t){return{...i,root:_d(e,t)}}function Rd(i,e=new Map,t=[]){const n=[...t,Ii(i.data)];return e.set(n.join("\0"),i.data.expand!==!1),(i.children??[]).forEach(r=>Rd(r,e,n)),e}function Dd(i,e={},t=[]){var r;const n=[...t,Ii(i.data)];return(r=i.children)!=null&&r.length&&(e[n.join("\0")]=i.data.expand!==!1,i.children.forEach(s=>Dd(s,e,n))),e}const Id=".ink-node{max-width:520px;padding:6px 12px;font-size:14px;line-height:1.6;color:var(--ink-text, #1f2329);white-space:normal;word-break:break-word;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Noto Sans SC,sans-serif;box-sizing:content-box}.ink-node.depth-0{font-size:18px;font-weight:600;color:#fff}.ink-node.depth-1{font-size:15px;font-weight:600}.ink-node:has(table),.ink-node:has(img),.ink-node:has(.katex-display){max-width:none}.ink-node .katex{font-size:1.08em}.ink-node .katex-display{margin:6px 0}.ink-node p{margin:0}.ink-node>*+*{margin-top:6px}.ink-node ul,.ink-node ol{margin:0;padding-left:1.4em}.ink-node em{font-style:normal;opacity:.65}.ink-node code{background:color-mix(in srgb,var(--ink-text, #1f2329) 8%,transparent);border-radius:3px;padding:0 4px;font-family:inherit;font-weight:600}.ink-node pre{background:color-mix(in srgb,var(--ink-text, #1f2329) 5%,transparent);border-radius:6px;padding:8px 10px;font:12px/1.5 ui-monospace,Menlo,monospace;white-space:pre}.ink-node pre code{background:none;padding:0;font-weight:400}.ink-node img{display:block;border-radius:6px;border:1px solid var(--ink-border, #eff0f1)}.ink-node table{border-collapse:separate;border-spacing:0;border:1px solid var(--ink-border, #dee0e3);border-radius:6px;overflow:hidden;font-size:13px;line-height:20px;background:var(--ink-card, #fff)}.ink-node th,.ink-node td{border-bottom:1px solid var(--ink-border, #eff0f1);padding:5px 10px;text-align:left;vertical-align:top;max-width:360px}.ink-node th+th,.ink-node td+td{border-left:1px solid var(--ink-border, #eff0f1)}.ink-node thead th{background:color-mix(in srgb,var(--ink-accent, #5b7fd4) 14%,var(--ink-card, #fff));font-weight:600;white-space:nowrap}.ink-node tbody tr:nth-child(2n) td{background:color-mix(in srgb,var(--ink-text, #1f2329) 3%,var(--ink-card, #fff))}.ink-node tbody tr:last-child td{border-bottom:none}.ink-node .ink-diagram{max-width:948px;border:1px solid var(--ink-border, #dee0e3);border-radius:8px;background:#fff;overflow:hidden}.ink-node .ink-diagram-viewport{max-height:620px;max-width:946px;overflow:auto;padding:10px 12px;box-sizing:border-box}.ink-node .ink-diagram-image{display:block;border:0;cursor:zoom-in}.ink-node .ink-diagram-error{max-width:540px;margin:8px;overflow:auto;color:#28313b}.ink-node .ink-diagram-bar{display:flex;justify-content:flex-end;gap:6px;padding:6px 10px;border-top:1px solid #eef1f5;background:#f8fafc}.ink-node .ink-diagram-zoom,.ink-node .ink-diagram-edit{padding:2px 8px;border:1px solid #d8e0ea;border-radius:5px;background:#fff;color:#334155;font:inherit;font-size:12px;cursor:pointer}.ink-node .ink-diagram-zoom:hover,.ink-node .ink-diagram-edit:hover{background:#f0f4ff;border-color:#8fb0f5;color:#1d4ed8}";function b4(i,e,t){const r=document.querySelector("#phone-sign-in-template").content.firstElementChild.cloneNode(!0),s=r.querySelector("#phone-sign-in-title"),a=r.querySelector(".phone-sign-in-sub"),o=r.querySelector("#sign-in-phone"),l=r.querySelector("#sign-in-code"),h=r.querySelector("#send-phone-code"),c=r.querySelector("button[type=submit]"),d=r.querySelector("#phone-browser-sign-in"),f=r.querySelector("#cancel-phone-sign-in"),m=r.querySelector("#phone-sign-in-status");let v=!1,g=!1,x=!1,b,E=0,M=0,z,R=0,O;function B(){window.clearTimeout(M);const Y=Math.max(0,Math.ceil((E-Date.now())/1e3));s.textContent=J(x?"phoneSignInForPay":"phoneSignIn"),a.textContent=J(x?"phoneSignInForPaySub":"phoneSignInSub"),c.textContent=J(x?"phoneVerifyAndPay":"phoneVerifySubmit"),h.textContent=Y?J("resendPhoneCode",{seconds:Y}):J("sendPhoneCode"),h.disabled=v||Y>0,c.disabled=d.disabled=v,f.disabled=g,o.readOnly=l.readOnly=v,m.hidden=!O,O&&(m.textContent=J(O.key),m.dataset.state=O.error?"error":""),r.isConnected&&Y&&(M=window.setTimeout(B,1e3))}function F(){ba(r),f.setAttribute("aria-label",J("close")),B()}function P(Y=!1){r.isConnected&&(R++,r.remove(),r.reset(),window.clearTimeout(M),v=!1,g=!1,x=!1,b=void 0,O=void 0,Y&&(z==null||z.focus()),z=void 0)}function ee(Y,ie){Y==="rateLimited"&&(E=Date.now()+6e4),O={key:Y==="rateLimited"?"phoneRateLimited":Y==="unavailable"?"phoneSignInUnavailable":ie?"phoneCodeInvalid":"phoneInvalid",error:!0}}function V(){const Y=o.value.normalize("NFKC").trim();if(Y.includes("@")){const Q=Y.toLowerCase();if(Q.length<=254&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Q))return Q;ee("invalid",!1),B(),o.focus();return}const ie=Y.replace(/[\s\-–‑]/g,"").replace(/^(?:\+86|0086|86(?=1\d{10}$))/,"");if(/^1[3-9]\d{9}$/.test(ie))return ie;ee("invalid",!1),B(),o.focus()}return h.addEventListener("click",async()=>{const Y=V();if(!Y||v||Date.now()<E)return;const ie=++R;v=!0,O=void 0,B();const Q=await i.send(Y).catch(()=>({ok:!1,reason:"unavailable"}));(Q.ok||Q.reason==="rateLimited")&&(E=Date.now()+6e4),ie===R&&(v=!1,Q.ok?(O={key:"phoneCodeSent",error:!1},l.focus()):ee(Q.reason,!1),B())}),r.addEventListener("submit",async Y=>{if(Y.preventDefault(),v)return;const ie=V();if(!ie)return;const Q=++R;v=g=!0,O=void 0,B();const oe=await i.verify(ie,l.value).catch(()=>({ok:!1,reason:"unavailable"}));if(Q===R){if(v=g=!1,oe.ok){const de=b;P(),e(oe.value),de==null||de(oe.value);return}ee(oe.reason,!0),B(),l.select()}}),l.addEventListener("input",()=>{const Y=l.value.replace(/\D+/g,"").slice(0,6);l.value!==Y&&(l.value=Y)}),f.addEventListener("click",()=>P(!0)),d.addEventListener("click",async()=>{if(!v){v=!0,B();try{await t()&&P()}finally{v=!1,r.isConnected&&B()}}}),{open(Y,ie,Q){P(),z=ie,x=!!(Q!=null&&Q.forPurchase),b=Q==null?void 0:Q.onVerified,Y.append(r),F(),o.focus()},close:P,isOpen:()=>r.isConnected,isVerifying:()=>g,refreshLanguage:F}}function k4(i,e,t,n){const s=document.querySelector("#wechat-pay-template").content.firstElementChild.cloneNode(!0),a=s.querySelector("#wechat-pay-account"),o=s.querySelector("#wechat-pay-amount"),l=s.querySelector("#wechat-pay-qr"),h=s.querySelector("#wechat-pay-expired"),c=s.querySelector("#refresh-wechat-pay"),d=s.querySelector("#wechat-pay-expires"),f=s.querySelector("#wechat-pay-browser"),m=s.querySelector("#close-wechat-pay");let v,g,x=0,b=0,E=0,M=!1;function z(){if(!v)return;o.textContent="¥"+(v.amountFen/100).toFixed(2);const F=e();a.hidden=!F,F&&(a.textContent=J("wechatPayAccount",{account:F})),l.getAttribute("src")!==v.qr&&(l.src=v.qr);const P=v.expiresAt?Date.parse(v.expiresAt):NaN,ee=Number.isFinite(P)&&P<=Date.now();if(h.hidden=!ee,c.disabled=M,ee)d.textContent=J("wechatPayExpired");else if(Number.isFinite(P)){const V=new Intl.DateTimeFormat(Ha()==="zh"?"zh-CN":"en-US",{hour:"2-digit",minute:"2-digit"}).format(P);d.textContent=J("wechatPayWaiting",{time:V})}else d.textContent=J("wechatPayWaitingSimple")}function R(){if(window.clearTimeout(x),window.clearTimeout(b),!s.isConnected||!v)return;const F=E,P=v.expiresAt?Date.parse(v.expiresAt):NaN;if(Number.isFinite(P)){const ee=P-Date.now();if(ee<=0){z();return}b=window.setTimeout(()=>{F===E&&z()},ee+50)}x=window.setTimeout(async()=>{if(!(F!==E||!s.isConnected)){try{const ee=await i();if(F!==E||!s.isConnected)return;if(ee.status==="active"){B(),t(ee.state);return}ee.status==="qr"&&(v=ee,z())}catch{}F===E&&s.isConnected&&R()}},4e3)}function O(){ba(s),m.setAttribute("aria-label",J("close")),z()}function B(F=!1){s.isConnected&&(E++,window.clearTimeout(x),window.clearTimeout(b),s.remove(),v=void 0,M=!1,F&&(g!=null&&g.getClientRects().length)&&g.focus(),g=void 0)}return c.addEventListener("click",async()=>{if(M)return;const F=++E;M=!0,z();try{const P=await i();if(F!==E||!s.isConnected)return;if(P.status==="active"){B(),t(P.state);return}P.status==="qr"&&(v=P)}catch{}finally{F===E&&(M=!1,z(),R())}}),m.addEventListener("click",()=>B(!0)),f.addEventListener("click",()=>{B(),n()}),{open(F,P,ee){B(),E++,g=P,v=ee,F.append(s),O(),R(),m.focus()},close:B,isOpen:()=>s.isConnected,refreshLanguage:O}}const T4=["markdown","diagram","browser","export","layouts","themes","replace","present","updates"],Te=i=>document.querySelector(i);async function E4(i,e){let t={pro:!1};const n=[];let r=0;const s=Te("#pro"),a=Te("#account"),o=Te("#account-panel"),l=Te("#account-badge"),h=Te("#account-heading"),c=Te("#account-text"),d=Te("#account-plan-status"),f=Te("#account-plan-title"),m=Te("#account-plan-detail"),v=Te("#account-perks"),g=Te("#account-perks-more"),x=Te("#account-actions"),b=Te("#account-message"),E=Te("#account-buy"),M=Te("#account-sign-in"),z=Te("#account-web-links"),R=Te("#account-web-checkout"),O=Te("#account-official-link"),B=Te("#switch-account"),F=Te("#sign-out"),P=Te("#upgrade"),ee=Te("#bar"),V=P.querySelector(".upgrade-card"),Y=Te("#checkout-msg"),ie=Te("#buy-pro"),Q=Te("#upgrade-sign-in"),oe=Te("#upgrade-web-links"),de=Te("#upgrade-web-checkout"),ge=Te("#upgrade-official-link"),Qe=Te("#upgrade-account-actions"),di=Te("#upgrade-account"),qe=Te("#upgrade-switch-account"),st=Te("#upgrade-sign-out"),at=Te("#trial-status"),We=Te("#trial-expired-message"),zt=Te(".upgrade-close"),wi=Te(".upgrade-features"),ue=i.capabilities.account==="purchase",He=i.capabilities.account!=="none",Zi=[E,M,R,B,F,ie,Q,de,qe,st];let It=!1,ii=null;const dt=()=>!!(t.connected||t.pro||t.account),bi=()=>[ie,Q,qe].find(G=>G.getClientRects().length&&!G.disabled)??V,he=i.phoneSignIn&&b4(i.phoneSignIn,G=>{_e(G),o.hidden?P.hidden||bi().focus():s.focus()},()=>Gt("restore",P.hidden||!o.hidden?b:Y)),ve=i.orderPro&&k4(()=>i.orderPro(),()=>t.account,G=>{_e(G),e==null||e(J("proUnlocked"))},()=>Gt("buy",P.hidden||!o.hidden?b:Y).then(()=>{}));V.tabIndex=-1,wi.hidden=!ue;function Ai(){for(const G of T4){let le=wi.querySelector(`[data-feature="${G}"]`);le||(le=document.createElement("li"),le.dataset.feature=G,wi.append(le)),le.textContent=J(`feature.${G}`)}}function Ie(){ue||(Te("#upgrade-title").textContent=J("accountHeading"),Te(".upgrade-sub").textContent=J(He?"accountSync":"accountUnavailable"))}Ai(),Ie();function Ct(G){It=G;for(const le of Zi)le.disabled=G}function Ne(G,le,Ae,Le){if(G.textContent=le,Le){const Me=document.createElement("div");Me.className="popup-fallback-actions";const Ue=document.createElement("a");Ue.className="popup-fallback-link",Ue.href=Le,Ue.target="_blank",Ue.rel="noopener noreferrer",Ue.textContent=`${J("openLoginLink")} ↗`;const Ze=document.createElement("button");Ze.type="button",Ze.className="popup-copy-link",Ze.textContent=J("copyLink"),Ze.addEventListener("click",()=>{var Ot;(Ot=navigator.clipboard)==null||Ot.writeText(Le).then(()=>{Ze.textContent=J("linkCopied"),window.setTimeout(()=>{Ze.textContent=J("copyLink")},1800)})}),Me.append(Ue,Ze),G.append(Me)}G.dataset.state=Ae,G.hidden=!1}async function Gt(G,le){if(It||he!=null&&he.isVerifying()||(G==="buy"?!ue:!He))return!1;const Ae=document.activeElement;Ct(!0),le.hidden=!0;try{return await i.checkout(G),(G==="buy"?!t.pro:!dt())&&Ne(le,J(G==="buy"?"checkoutOpened":"signInOpened"),G==="buy"?"buy":"signIn"),!0}catch(Le){const Me=String(Le instanceof Error?Le.message:Le),Ue=G==="restore"?"signInFailed":"checkoutFailed",Ze=J(Ue,{error:""}).replace(/[::\s]+$/,""),Ot=Le instanceof ka?Le.url:void 0;return Ne(le,Me.startsWith(Ze)?Me:J(Ue,{error:Me}),"error",Ot),!1}finally{Ct(!1),Ae instanceof HTMLElement&&Ae.getClientRects().length&&(document.activeElement===document.body||document.activeElement===V)&&Ae.focus()}}async function ot(G){if(!(It||he!=null&&he.isVerifying()||!He)){he==null||he.close(),ve==null||ve.close(),Ct(!0),G.hidden=!0;try{await i.signOut();const le=await i.license().catch(()=>({pro:!1,trialUntil:t.trialUntil}));_e(le),e==null||e(J("signedOut"))}catch(le){Ne(G,J("signOutFailed",{error:String(le instanceof Error?le.message:le)}),"error")}finally{Ct(!1),dt()||(P.hidden?M:Q).focus()}}}function qt(G,le,Ae){It||he!=null&&he.isVerifying()||(ve==null||ve.close(),he?(Ae.hidden=!0,he.open(Te(le),G)):Gt("restore",Ae))}async function jt(G,le,Ae,Le=!1){if(!(It||he!=null&&he.isVerifying()||!ue)){if(!i.orderPro)return Gt("buy",Ae);Ct(!0),Ae.hidden=!0;try{const Me=await i.orderPro();if(Me.status==="active"){_e(Me.state),e==null||e(J("proUnlocked"));return}if(Me.status==="qr"){he==null||he.close(),ve==null||ve.open(Te(le),G,Me);return}if(Me.status==="needsPhone"&&he){if(Le){he.close(),Ne(Ae,J("checkoutFailed",{error:J("signInPageUnavailable")}),"error");return}ve==null||ve.close(),he.open(Te(le),G,{forPurchase:!0,onVerified:Ue=>{Ue.pro||jt(G,le,Ae,!0)}});return}if(Me.status==="redirect"){Ne(Ae,J("checkoutOpened"),"buy");return}}catch(Me){const Ue=String(Me instanceof Error?Me.message:Me),Ze=J("checkoutFailed",{error:""}).replace(/[::\s]+$/,""),Ot=Me instanceof ka?Me.url:void 0;Ne(Ae,Ue.startsWith(Ze)?Ue:J("checkoutFailed",{error:Ue}),"error",Ot)}finally{Ct(!1)}}}E.addEventListener("click",()=>void jt(E,"#account-phone-slot",b)),R.addEventListener("click",()=>void Gt("buy",b)),g.addEventListener("click",()=>ni()),M.addEventListener("click",()=>qt(M,"#account-phone-slot",b)),B.addEventListener("click",()=>qt(B,"#account-phone-slot",b)),F.addEventListener("click",()=>void ot(b)),ie.addEventListener("click",()=>void jt(ie,"#upgrade-phone-slot",Y)),de.addEventListener("click",()=>void Gt("buy",Y)),Q.addEventListener("click",()=>qt(Q,"#upgrade-phone-slot",Y)),qe.addEventListener("click",()=>qt(qe,"#upgrade-phone-slot",Y)),st.addEventListener("click",()=>void ot(Y));function lt(G,le=!1){o.hidden!==!G&&(!G&&o.querySelector(".phone-sign-in")&&(he!=null&&he.isVerifying())||(o.hidden=!G,!G&&o.querySelector(".phone-sign-in")&&(he==null||he.close()),!G&&o.querySelector(".wechat-pay")&&(ve==null||ve.close()),s.setAttribute("aria-expanded",String(G)),!G&&le&&s.focus()))}s.addEventListener("click",()=>lt(!!o.hidden)),document.addEventListener("pointerdown",G=>{G.target instanceof Node&&!a.contains(G.target)&&lt(!1)}),a.addEventListener("focusout",G=>{G.relatedTarget instanceof Node&&!a.contains(G.relatedTarget)&&lt(!1)});function ki(){!Ar(t)||P.hidden||V.querySelector(".phone-sign-in")&&(he!=null&&he.isVerifying())||(V.querySelector(".phone-sign-in")&&(he==null||he.close()),V.querySelector(".wechat-pay")&&(ve==null||ve.close()),P.hidden=!0,Nt(!0),(ii!=null&&ii.getClientRects().length?ii:s).focus(),ii=null)}window.addEventListener("keydown",G=>{var Ae;if(G.key==="Escape"&&(ve!=null&&ve.isOpen())){G.preventDefault(),G.stopImmediatePropagation(),ve.close(!0);return}if(G.key==="Escape"&&(he!=null&&he.isOpen())){G.preventDefault(),G.stopImmediatePropagation(),he.isVerifying()||he.close(!0);return}if(G.key==="Escape"&&!o.hidden){G.preventDefault(),G.stopImmediatePropagation(),lt(!1,!0);return}if(P.hidden)return;if(G.key==="Escape"){G.preventDefault(),G.stopImmediatePropagation(),ki();return}const le=!Ar(t);if(G.target instanceof Node&&(P.contains(G.target)||le&&a.contains(G.target))||(G.preventDefault(),bi().focus()),G.key==="Tab"){const Le="button:not(:disabled), input:not(:disabled), select",Me=[...le?a.querySelectorAll(Le):[],...V.querySelectorAll(Le)].filter(Ze=>Ze.getClientRects().length>0),Ue=G.shiftKey?Me[0]:Me.at(-1);Ue&&(document.activeElement===Ue||document.activeElement===V)&&(G.preventDefault(),(Ae=G.shiftKey?Me.at(-1):Me[0])==null||Ae.focus())}G.stopImmediatePropagation()},!0),P.addEventListener("pointerdown",G=>G.target===P&&ki()),zt.addEventListener("click",ki);function Nt(G){V.setAttribute("aria-modal",String(G));for(const le of document.body.children)le instanceof HTMLElement&&le!==P&&le.tagName!=="SCRIPT"&&(le.inert=!P.hidden&&(G||le!==ee))}function ni(G){var Me;const le=Ar(t),Ae=he==null?void 0:he.isVerifying();if(t.pro||le&&(Ae||!ue))return;P.hidden&&(ii=document.activeElement instanceof HTMLElement?document.activeElement:null,(Me=i.track)==null||Me.call(i,"paywall_view")),lt(!1);const Le=Te(".upgrade-locked");Le.hidden=!G||le,G&&(Le.textContent=J("locked",{feature:J(`featureName.${G}`)})),wi.querySelectorAll("li").forEach(Ue=>Ue.classList.toggle("highlight",Ue.dataset.feature===G)),Y.hidden=!0,P.hidden=!1,Nt(le),Ae||bi().focus()}function yt(){clearTimeout(r);const G=Date.now(),le=Ar(t,G);document.documentElement.classList.toggle("trial-expired",!le),document.documentElement.classList.toggle("pro",le),document.documentElement.classList.toggle("pro-member",t.pro);const Ae=g4(t,G),Le=!t.pro&&le,Me=J(t.pro?"proBadge":Le?"trialBadge":"trialEnded",{days:Ae}),Ue=Le?new Intl.DateTimeFormat(Ha()==="zh"?"zh-CN":"en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t.trialUntil):"",Ze=Le?J("trialUntil",{date:Ue}):"";l.textContent=Me,s.setAttribute("aria-label",`${J("accountHeading")} · ${Me}`),s.hidden=!1,a.dataset.plan=t.pro?"pro":!Le||Ae<=2?"ending":"trial",a.dataset.signedIn=String(dt()),c.textContent=t.account||J(dt()?"accountConnected":"accountSignedOut"),h.textContent=J(dt()?"accountHeading":"accountSignedOutSub"),d.hidden=!1,f.textContent=J(t.pro?"proActive":Le?"trialPlan":"trialEnded"),m.textContent=t.pro?J("proActiveDetail"):Le?Ze:J("noProOnAccount"),E.hidden=!ue||t.pro,v.hidden=g.hidden=!ue||t.pro,R.hidden=!ue||t.pro,O.hidden=!ue,z.hidden=R.hidden&&O.hidden;for(const Ot of[M,Q])Ot.textContent=J(he?"phoneSignIn":"signIn");if(M.hidden=!He||dt(),B.hidden=!He||!dt(),x.hidden=!He||!dt(),!He&&!t.pro&&Ne(b,J("accountUnavailable"),"signIn"),Le){const Ot=Math.min(Math.max(50,t.trialUntil-G+25),36e5);r=window.setTimeout(()=>{yt(),n.forEach(mn=>mn(t))},Ot)}zt.hidden=!le,at.hidden=!Le,at.textContent=Ze,We.hidden=le,We.textContent=J(ue?dt()?"trialExpiredSignedIn":"trialExpired":He?dt()?"trialExpiredNoPro":"trialExpiredSignIn":"trialExpiredNoAccount"),ie.hidden=!ue||t.pro,Q.hidden=!He||dt(),de.hidden=!ue||t.pro,ge.hidden=!ue,oe.hidden=de.hidden&&ge.hidden,Qe.hidden=le||!He||!dt(),qe.hidden=Qe.hidden,di.hidden=Qe.hidden,di.textContent=t.account||J("accountConnected"),Te(".upgrade-buy").hidden=ie.hidden&&Q.hidden,Nt(le),t.pro?ki():!le&&P.hidden&&ni()}function _e(G){const le=dt(),Ae=t.pro;if(t=G,t.pro&&(ve!=null&&ve.isOpen())&&(ve.close(),Ae||e==null||e(J("proUnlocked"))),yt(),!le&&dt()){for(const Le of[b,Y])Le.dataset.state==="signIn"&&(Le.hidden=!0);!o.hidden&&document.activeElement===document.body&&s.focus(),!P.hidden&&o.hidden&&!V.contains(document.activeElement)&&bi().focus()}n.forEach(Le=>Le(t))}let Lt=!1;i.onLicenseChange(G=>{Lt=!0,_e(G)});const I=await i.license().catch(()=>t);return Lt||_e(I),{isPro:()=>Ar(t),allow(G){return Ar(t)?!0:(ni(G),!1)},openUpgrade:ni,onChange:G=>n.push(G),refreshLanguage(){Ai(),Ie(),he==null||he.refreshLanguage(),ve==null||ve.refreshLanguage(),yt()}}}class j extends Error{constructor(e,t){var n="KaTeX parse error: "+e,r,s,a=t&&t.loc;if(a&&a.start<=a.end){var o=a.lexer.input;r=a.start,s=a.end,r===o.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=o.slice(r,s).replace(/[^]/g,"$&̲"),h;r>15?h="…"+o.slice(r-15,r):h=o.slice(0,r);var c;s+15<o.length?c=o.slice(s,s+15)+"…":c=o.slice(s),n+=h+l+c}super(n),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,j.prototype),this.position=r,r!=null&&s!=null&&(this.length=s-r),this.rawMessage=e}}var M4=/([A-Z])/g,S4=i=>i.replace(M4,"-$1").toLowerCase(),z4={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},C4=/[&><"']/g,Vt=i=>String(i).replace(C4,e=>z4[e]),va=i=>i.type==="ordgroup"||i.type==="color"?i.body.length===1?va(i.body[0]):i:i.type==="font"?va(i.body):i,N4=new Set(["mathord","textord","atom"]),un=i=>N4.has(va(i).type),L4=i=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(i);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},k0={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 <type>"},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 <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:i=>"#"+i},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(i,e)=>(e.push(i),e)},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:i=>Math.max(0,i),cli:"--min-rule-thickness <size>",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:i=>Math.max(0,i),cli:"-s, --max-size <n>",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:i=>Math.max(0,i),cli:"-e, --max-expand <n>",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function A4(i){if(typeof i!="string")return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function _4(i){if(i.default!==void 0)return i.default;var e=Array.isArray(i.type)?i.type[0]:i.type;return A4(e)}function R4(i,e,t,n){var r=t[e];i[e]=r!==void 0?n.processor?n.processor(r):r:_4(n)}class fl{constructor(e){e===void 0&&(e={}),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,e=e||{};for(var t of Object.keys(k0)){var n=k0[t];n&&R4(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r=="function"&&(r=r(e,t,n)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new j("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);r==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r=="function")try{r=r(e,t,n)}catch{r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=L4(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class zn{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return qi[D4[this.id]]}sub(){return qi[I4[this.id]]}fracNum(){return qi[O4[this.id]]}fracDen(){return qi[B4[this.id]]}cramp(){return qi[P4[this.id]]}text(){return qi[F4[this.id]]}isTight(){return this.size>=2}}var pl=0,Aa=1,Hr=2,hn=3,Ls=4,Ni=5,qr=6,Jt=7,qi=[new zn(pl,0,!1),new zn(Aa,0,!0),new zn(Hr,1,!1),new zn(hn,1,!0),new zn(Ls,2,!1),new zn(Ni,2,!0),new zn(qr,3,!1),new zn(Jt,3,!0)],D4=[Ls,Ni,Ls,Ni,qr,Jt,qr,Jt],I4=[Ni,Ni,Ni,Ni,Jt,Jt,Jt,Jt],O4=[Hr,hn,Ls,Ni,qr,Jt,qr,Jt],B4=[hn,hn,Ni,Ni,Jt,Jt,Jt,Jt],P4=[Aa,Aa,hn,hn,Ni,Ni,Jt,Jt],F4=[pl,Aa,Hr,hn,Hr,hn,Hr,hn],be={DISPLAY:qi[pl],TEXT:qi[Hr],SCRIPT:qi[Ls],SCRIPTSCRIPT:qi[qr]},T0=[{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 H4(i){for(var e=0;e<T0.length;e++)for(var t=T0[e],n=0;n<t.blocks.length;n++){var r=t.blocks[n];if(i>=r[0]&&i<=r[1])return t.name}return null}var xa=[];T0.forEach(i=>i.blocks.forEach(e=>xa.push(...e)));function Od(i){for(var e=0;e<xa.length;e+=2)if(i>=xa[e]&&i<=xa[e+1])return!0;return!1}var Mt=i=>i+" "+i,_r=80,U4=function(e,t){return"M95,"+(622+e+t)+`
312
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
313
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
314
+ 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
315
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
316
+ c69,-144,104.5,-217.7,106.5,-221
317
+ l`+e/2.075+" -"+e+`
318
+ c5.3,-9.3,12,-14,20,-14
319
+ H400000v`+(40+e)+`H845.2724
320
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
321
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
322
+ M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},$4=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119
323
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
324
+ c340,-704.7,510.7,-1060.3,512,-1067
325
+ l`+e/2.084+" -"+e+`
326
+ c4.7,-7.3,11,-11,19,-11
327
+ H40000v`+(40+e)+`H1012.3
328
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
329
+ 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
330
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
331
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
332
+ M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},G4=function(e,t){return"M983 "+(10+e+t)+`
333
+ l`+e/3.13+" -"+e+`
334
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
335
+ 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
336
+ 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
337
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
338
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
339
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
340
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
341
+ M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},q4=function(e,t){return"M424,"+(2398+e+t)+`
342
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
343
+ 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
344
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
345
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
346
+ l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
347
+ v`+(40+e)+`H1014.6
348
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
349
+ c-2,6,-10,9,-24,9
350
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+`
351
+ h400000v`+(40+e)+"h-400000z"},W4=function(e,t){return"M473,"+(2713+e+t)+`
352
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
353
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
354
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
355
+ 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
356
+ 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
357
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
358
+ 606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Y4=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},X4=function(e,t,n){var r=n-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+`
359
+ H742v`+r+`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
360
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
361
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
362
+ 219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},V4=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=U4(t,_r);break;case"sqrtSize1":r=$4(t,_r);break;case"sqrtSize2":r=G4(t,_r);break;case"sqrtSize3":r=q4(t,_r);break;case"sqrtSize4":r=W4(t,_r);break;case"sqrtTall":r=X4(t,_r,n)}return r},j4=function(e,t){switch(e){case"⎜":return Mt("M291 0 H417 V"+t+" H291z");case"∣":return Mt("M145 0 H188 V"+t+" H145z");case"∥":return Mt("M145 0 H188 V"+t+" H145z")+Mt("M367 0 H410 V"+t+" H367z");case"⎟":return Mt("M457 0 H583 V"+t+" H457z");case"⎢":return Mt("M319 0 H403 V"+t+" H319z");case"⎥":return Mt("M263 0 H347 V"+t+" H263z");case"⎪":return Mt("M384 0 H504 V"+t+" H384z");case"⏐":return Mt("M312 0 H355 V"+t+" H312z");case"‖":return Mt("M257 0 H300 V"+t+" H257z")+Mt("M478 0 H521 V"+t+" H478z");default:return""}},Mh={doubleleftarrow:`M262 157
363
+ 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
364
+ 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
365
+ 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
366
+ 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
367
+ 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
368
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
369
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
370
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
371
+ -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
372
+ 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
373
+ -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
374
+ -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
375
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
376
+ 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
377
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
378
+ 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
379
+ -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
380
+ 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
381
+ 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
382
+ 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
383
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
384
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
385
+ 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
386
+ 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
387
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
388
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
389
+ 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
390
+ 435 0h399565z`,leftgroupunder:`M400000 262
391
+ 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
392
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
393
+ -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
394
+ -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
395
+ -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
396
+ 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
397
+ -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
398
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
399
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
400
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
401
+ 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
402
+ -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
403
+ 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
404
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
405
+ 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
406
+ -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
407
+ -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
408
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Mt("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Mt("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Mt("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Mt("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
409
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
410
+ 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
411
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Mt("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
412
+ 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
413
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
414
+ 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
415
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
416
+ 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
417
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
418
+ 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
419
+ -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
420
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
421
+ 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
422
+ 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
423
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
424
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
425
+ 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
426
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
427
+ 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
428
+ 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
429
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
430
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
431
+ 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
432
+ -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
433
+ 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
434
+ 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
435
+ -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
436
+ -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
437
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
438
+ -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
439
+ 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
440
+ 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
441
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
442
+ -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
443
+ 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
444
+ 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
445
+ -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
446
+ -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
447
+ 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
448
+ -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
449
+ 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
450
+ 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
451
+ 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
452
+ -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
453
+ -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
454
+ 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
455
+ 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
456
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
457
+ 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
458
+ 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
459
+ -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
460
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Mt("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Mt("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Mt("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
461
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
462
+ -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
463
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
464
+ 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
465
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
466
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
467
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
468
+ 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
469
+ 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
470
+ 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
471
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
472
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
473
+ 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
474
+ -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
475
+ 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
476
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
477
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
478
+ -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
479
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
480
+ 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
481
+ 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
482
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
483
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
484
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
485
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
486
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
487
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
488
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
489
+ -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
490
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
491
+ 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
492
+ -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
493
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
494
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
495
+ 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
496
+ 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
497
+ -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
498
+ -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
499
+ -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,
500
+ -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,
501
+ -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,
502
+ -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,
503
+ -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
504
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
505
+ 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
506
+ 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
507
+ 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
508
+ 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
509
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
510
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
511
+ -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
512
+ 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
513
+ -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
514
+ -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
515
+ -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
516
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
517
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
518
+ 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
519
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
520
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
521
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
522
+ 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,
523
+ -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
524
+ 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
525
+ 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
526
+ 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,
527
+ 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,
528
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
529
+ 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
530
+ 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,
531
+ -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
532
+ 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
533
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},K4=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84
534
+ H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z
535
+ M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
536
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
537
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
538
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
539
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
540
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
541
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
542
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z
543
+ MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z
544
+ MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z
545
+ M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z
546
+ M347 1759 V0 h-84 V1759 v`+t+" 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
547
+ 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,
548
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
549
+ 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
550
+ 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,
551
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
552
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
553
+ -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,
554
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
555
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
556
+ 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
557
+ 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
558
+ 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
559
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
560
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
561
+ -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.")}};function Z4(i){return"toText"in i}class Kr{constructor(e){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=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(Z4(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var E0={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},Q4={ex:!0,em:!0,mu:!0},Bd=function(e){return typeof e!="string"&&(e=e.unit),e in E0||e in Q4||e==="ex"},ct=function(e,t){var n;if(e.unit in E0)n=E0[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var r;if(t.style.isTight()?r=t.havingStyle(t.style.text()):r=t,e.unit==="ex")n=r.fontMetrics().xHeight;else if(e.unit==="em")n=r.fontMetrics().quad;else throw new j("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Z=function(e){return+e.toFixed(4)+"em"},In=function(e){return e.filter(t=>t).join(" ")},ml=function(e){var t="";for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=S4(n)+":"+r+";")}return t},Pd=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Fd=function(e){var t=document.createElement(e);t.className=In(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},J4=/[\s"'>/=\x00-\x1f]/,Hd=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Vt(In(this.classes))+'"');var n=ml(this.style);n&&(t+=' style="'+Vt(n)+'"');for(var r of Object.keys(this.attributes)){if(J4.test(r))throw new j("Invalid attribute name '"+r+"'");t+=" "+r+'="'+Vt(this.attributes[r])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t};class Zr{constructor(e,t,n,r){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,this.italic=void 0,Pd.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Fd.call(this,"span")}toMarkup(){return Hd.call(this,"span")}}class Xa{constructor(e,t,n,r){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,Pd.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Fd.call(this,"a")}toMarkup(){return Hd.call(this,"a")}}class ep{constructor(e,t,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=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Vt(this.src)+'"'+(' alt="'+Vt(this.alt)+'"'),t=ml(this.style);return t&&(e+=' style="'+Vt(t)+'"'),e+="'/>",e}}var tp={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class gi{constructor(e,t,n,r,s,a,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=s||0,this.width=a||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var h=H4(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=tp[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement("span"),t.style.marginRight=Z(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=In(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Vt(In(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+Z(this.italic)+";"),n+=ml(this.style),n&&(e=!0,t+=' style="'+Vt(n)+'"');var r=Vt(this.text);return e?(t+=">",t+=r,t+="</span>",t):r}}class cn{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Vt(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class On{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",Mh[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+Vt(this.alternate)+'"/>':'<path d="'+Vt(Mh[this.pathName])+'"/>'}}class M0{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Vt(this.attributes[t])+'"';return e+="/>",e}}function ip(i){if(i instanceof gi)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function np(i){if(i instanceof Zr)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var rp=i=>i instanceof Zr||i instanceof Xa||i instanceof Kr,Yi={"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]}},sa={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]},Sh={Å:"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 sp(i,e){Yi[i]=e}function gl(i,e,t){if(!Yi[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=Yi[e][n];if(!r&&i[0]in Sh&&(n=Sh[i[0]].charCodeAt(0),r=Yi[e][n]),!r&&t==="text"&&Od(n)&&(r=Yi[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var To={};function ap(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!To[e]){var t=To[e]={cssEmPerMu:sa.quad[e]/18};for(var n in sa)sa.hasOwnProperty(n)&&(t[n]=sa[n][e])}return To[e]}var it={math:{},text:{}};function u(i,e,t,n,r,s){it[i][r]={font:e,group:t,replace:n},s&&n&&(it[i][n]=it[i][r])}var p="math",W="text",w="main",S="ams",rt="accent-token",ae="bin",ti="close",Qr="inner",me="mathord",Tt="op-token",xi="open",Bs="punct",C="rel",fn="spacing",L="textord";u(p,w,C,"≡","\\equiv",!0);u(p,w,C,"≺","\\prec",!0);u(p,w,C,"≻","\\succ",!0);u(p,w,C,"∼","\\sim",!0);u(p,w,C,"⊥","\\perp");u(p,w,C,"⪯","\\preceq",!0);u(p,w,C,"⪰","\\succeq",!0);u(p,w,C,"≃","\\simeq",!0);u(p,w,C,"∣","\\mid",!0);u(p,w,C,"≪","\\ll",!0);u(p,w,C,"≫","\\gg",!0);u(p,w,C,"≍","\\asymp",!0);u(p,w,C,"∥","\\parallel");u(p,w,C,"⋈","\\bowtie",!0);u(p,w,C,"⌣","\\smile",!0);u(p,w,C,"⊑","\\sqsubseteq",!0);u(p,w,C,"⊒","\\sqsupseteq",!0);u(p,w,C,"≐","\\doteq",!0);u(p,w,C,"⌢","\\frown",!0);u(p,w,C,"∋","\\ni",!0);u(p,w,C,"∝","\\propto",!0);u(p,w,C,"⊢","\\vdash",!0);u(p,w,C,"⊣","\\dashv",!0);u(p,w,C,"∋","\\owns");u(p,w,Bs,".","\\ldotp");u(p,w,Bs,"⋅","\\cdotp");u(p,w,Bs,"⋅","·");u(W,w,L,"⋅","·");u(p,w,L,"#","\\#");u(W,w,L,"#","\\#");u(p,w,L,"&","\\&");u(W,w,L,"&","\\&");u(p,w,L,"ℵ","\\aleph",!0);u(p,w,L,"∀","\\forall",!0);u(p,w,L,"ℏ","\\hbar",!0);u(p,w,L,"∃","\\exists",!0);u(p,w,L,"∇","\\nabla",!0);u(p,w,L,"♭","\\flat",!0);u(p,w,L,"ℓ","\\ell",!0);u(p,w,L,"♮","\\natural",!0);u(p,w,L,"♣","\\clubsuit",!0);u(p,w,L,"℘","\\wp",!0);u(p,w,L,"♯","\\sharp",!0);u(p,w,L,"♢","\\diamondsuit",!0);u(p,w,L,"ℜ","\\Re",!0);u(p,w,L,"♡","\\heartsuit",!0);u(p,w,L,"ℑ","\\Im",!0);u(p,w,L,"♠","\\spadesuit",!0);u(p,w,L,"§","\\S",!0);u(W,w,L,"§","\\S");u(p,w,L,"¶","\\P",!0);u(W,w,L,"¶","\\P");u(p,w,L,"†","\\dag");u(W,w,L,"†","\\dag");u(W,w,L,"†","\\textdagger");u(p,w,L,"‡","\\ddag");u(W,w,L,"‡","\\ddag");u(W,w,L,"‡","\\textdaggerdbl");u(p,w,ti,"⎱","\\rmoustache",!0);u(p,w,xi,"⎰","\\lmoustache",!0);u(p,w,ti,"⟯","\\rgroup",!0);u(p,w,xi,"⟮","\\lgroup",!0);u(p,w,ae,"∓","\\mp",!0);u(p,w,ae,"⊖","\\ominus",!0);u(p,w,ae,"⊎","\\uplus",!0);u(p,w,ae,"⊓","\\sqcap",!0);u(p,w,ae,"∗","\\ast");u(p,w,ae,"⊔","\\sqcup",!0);u(p,w,ae,"◯","\\bigcirc",!0);u(p,w,ae,"∙","\\bullet",!0);u(p,w,ae,"‡","\\ddagger");u(p,w,ae,"≀","\\wr",!0);u(p,w,ae,"⨿","\\amalg");u(p,w,ae,"&","\\And");u(p,w,C,"⟵","\\longleftarrow",!0);u(p,w,C,"⇐","\\Leftarrow",!0);u(p,w,C,"⟸","\\Longleftarrow",!0);u(p,w,C,"⟶","\\longrightarrow",!0);u(p,w,C,"⇒","\\Rightarrow",!0);u(p,w,C,"⟹","\\Longrightarrow",!0);u(p,w,C,"↔","\\leftrightarrow",!0);u(p,w,C,"⟷","\\longleftrightarrow",!0);u(p,w,C,"⇔","\\Leftrightarrow",!0);u(p,w,C,"⟺","\\Longleftrightarrow",!0);u(p,w,C,"↦","\\mapsto",!0);u(p,w,C,"⟼","\\longmapsto",!0);u(p,w,C,"↗","\\nearrow",!0);u(p,w,C,"↩","\\hookleftarrow",!0);u(p,w,C,"↪","\\hookrightarrow",!0);u(p,w,C,"↘","\\searrow",!0);u(p,w,C,"↼","\\leftharpoonup",!0);u(p,w,C,"⇀","\\rightharpoonup",!0);u(p,w,C,"↙","\\swarrow",!0);u(p,w,C,"↽","\\leftharpoondown",!0);u(p,w,C,"⇁","\\rightharpoondown",!0);u(p,w,C,"↖","\\nwarrow",!0);u(p,w,C,"⇌","\\rightleftharpoons",!0);u(p,S,C,"≮","\\nless",!0);u(p,S,C,"","\\@nleqslant");u(p,S,C,"","\\@nleqq");u(p,S,C,"⪇","\\lneq",!0);u(p,S,C,"≨","\\lneqq",!0);u(p,S,C,"","\\@lvertneqq");u(p,S,C,"⋦","\\lnsim",!0);u(p,S,C,"⪉","\\lnapprox",!0);u(p,S,C,"⊀","\\nprec",!0);u(p,S,C,"⋠","\\npreceq",!0);u(p,S,C,"⋨","\\precnsim",!0);u(p,S,C,"⪹","\\precnapprox",!0);u(p,S,C,"≁","\\nsim",!0);u(p,S,C,"","\\@nshortmid");u(p,S,C,"∤","\\nmid",!0);u(p,S,C,"⊬","\\nvdash",!0);u(p,S,C,"⊭","\\nvDash",!0);u(p,S,C,"⋪","\\ntriangleleft");u(p,S,C,"⋬","\\ntrianglelefteq",!0);u(p,S,C,"⊊","\\subsetneq",!0);u(p,S,C,"","\\@varsubsetneq");u(p,S,C,"⫋","\\subsetneqq",!0);u(p,S,C,"","\\@varsubsetneqq");u(p,S,C,"≯","\\ngtr",!0);u(p,S,C,"","\\@ngeqslant");u(p,S,C,"","\\@ngeqq");u(p,S,C,"⪈","\\gneq",!0);u(p,S,C,"≩","\\gneqq",!0);u(p,S,C,"","\\@gvertneqq");u(p,S,C,"⋧","\\gnsim",!0);u(p,S,C,"⪊","\\gnapprox",!0);u(p,S,C,"⊁","\\nsucc",!0);u(p,S,C,"⋡","\\nsucceq",!0);u(p,S,C,"⋩","\\succnsim",!0);u(p,S,C,"⪺","\\succnapprox",!0);u(p,S,C,"≆","\\ncong",!0);u(p,S,C,"","\\@nshortparallel");u(p,S,C,"∦","\\nparallel",!0);u(p,S,C,"⊯","\\nVDash",!0);u(p,S,C,"⋫","\\ntriangleright");u(p,S,C,"⋭","\\ntrianglerighteq",!0);u(p,S,C,"","\\@nsupseteqq");u(p,S,C,"⊋","\\supsetneq",!0);u(p,S,C,"","\\@varsupsetneq");u(p,S,C,"⫌","\\supsetneqq",!0);u(p,S,C,"","\\@varsupsetneqq");u(p,S,C,"⊮","\\nVdash",!0);u(p,S,C,"⪵","\\precneqq",!0);u(p,S,C,"⪶","\\succneqq",!0);u(p,S,C,"","\\@nsubseteqq");u(p,S,ae,"⊴","\\unlhd");u(p,S,ae,"⊵","\\unrhd");u(p,S,C,"↚","\\nleftarrow",!0);u(p,S,C,"↛","\\nrightarrow",!0);u(p,S,C,"⇍","\\nLeftarrow",!0);u(p,S,C,"⇏","\\nRightarrow",!0);u(p,S,C,"↮","\\nleftrightarrow",!0);u(p,S,C,"⇎","\\nLeftrightarrow",!0);u(p,S,C,"△","\\vartriangle");u(p,S,L,"ℏ","\\hslash");u(p,S,L,"▽","\\triangledown");u(p,S,L,"◊","\\lozenge");u(p,S,L,"Ⓢ","\\circledS");u(p,S,L,"®","\\circledR");u(W,S,L,"®","\\circledR");u(p,S,L,"∡","\\measuredangle",!0);u(p,S,L,"∄","\\nexists");u(p,S,L,"℧","\\mho");u(p,S,L,"Ⅎ","\\Finv",!0);u(p,S,L,"⅁","\\Game",!0);u(p,S,L,"‵","\\backprime");u(p,S,L,"▲","\\blacktriangle");u(p,S,L,"▼","\\blacktriangledown");u(p,S,L,"■","\\blacksquare");u(p,S,L,"⧫","\\blacklozenge");u(p,S,L,"★","\\bigstar");u(p,S,L,"∢","\\sphericalangle",!0);u(p,S,L,"∁","\\complement",!0);u(p,S,L,"ð","\\eth",!0);u(W,w,L,"ð","ð");u(p,S,L,"╱","\\diagup");u(p,S,L,"╲","\\diagdown");u(p,S,L,"□","\\square");u(p,S,L,"□","\\Box");u(p,S,L,"◊","\\Diamond");u(p,S,L,"¥","\\yen",!0);u(W,S,L,"¥","\\yen",!0);u(p,S,L,"✓","\\checkmark",!0);u(W,S,L,"✓","\\checkmark");u(p,S,L,"ℶ","\\beth",!0);u(p,S,L,"ℸ","\\daleth",!0);u(p,S,L,"ℷ","\\gimel",!0);u(p,S,L,"ϝ","\\digamma",!0);u(p,S,L,"ϰ","\\varkappa");u(p,S,xi,"┌","\\@ulcorner",!0);u(p,S,ti,"┐","\\@urcorner",!0);u(p,S,xi,"└","\\@llcorner",!0);u(p,S,ti,"┘","\\@lrcorner",!0);u(p,S,C,"≦","\\leqq",!0);u(p,S,C,"⩽","\\leqslant",!0);u(p,S,C,"⪕","\\eqslantless",!0);u(p,S,C,"≲","\\lesssim",!0);u(p,S,C,"⪅","\\lessapprox",!0);u(p,S,C,"≊","\\approxeq",!0);u(p,S,ae,"⋖","\\lessdot");u(p,S,C,"⋘","\\lll",!0);u(p,S,C,"≶","\\lessgtr",!0);u(p,S,C,"⋚","\\lesseqgtr",!0);u(p,S,C,"⪋","\\lesseqqgtr",!0);u(p,S,C,"≑","\\doteqdot");u(p,S,C,"≓","\\risingdotseq",!0);u(p,S,C,"≒","\\fallingdotseq",!0);u(p,S,C,"∽","\\backsim",!0);u(p,S,C,"⋍","\\backsimeq",!0);u(p,S,C,"⫅","\\subseteqq",!0);u(p,S,C,"⋐","\\Subset",!0);u(p,S,C,"⊏","\\sqsubset",!0);u(p,S,C,"≼","\\preccurlyeq",!0);u(p,S,C,"⋞","\\curlyeqprec",!0);u(p,S,C,"≾","\\precsim",!0);u(p,S,C,"⪷","\\precapprox",!0);u(p,S,C,"⊲","\\vartriangleleft");u(p,S,C,"⊴","\\trianglelefteq");u(p,S,C,"⊨","\\vDash",!0);u(p,S,C,"⊪","\\Vvdash",!0);u(p,S,C,"⌣","\\smallsmile");u(p,S,C,"⌢","\\smallfrown");u(p,S,C,"≏","\\bumpeq",!0);u(p,S,C,"≎","\\Bumpeq",!0);u(p,S,C,"≧","\\geqq",!0);u(p,S,C,"⩾","\\geqslant",!0);u(p,S,C,"⪖","\\eqslantgtr",!0);u(p,S,C,"≳","\\gtrsim",!0);u(p,S,C,"⪆","\\gtrapprox",!0);u(p,S,ae,"⋗","\\gtrdot");u(p,S,C,"⋙","\\ggg",!0);u(p,S,C,"≷","\\gtrless",!0);u(p,S,C,"⋛","\\gtreqless",!0);u(p,S,C,"⪌","\\gtreqqless",!0);u(p,S,C,"≖","\\eqcirc",!0);u(p,S,C,"≗","\\circeq",!0);u(p,S,C,"≜","\\triangleq",!0);u(p,S,C,"∼","\\thicksim");u(p,S,C,"≈","\\thickapprox");u(p,S,C,"⫆","\\supseteqq",!0);u(p,S,C,"⋑","\\Supset",!0);u(p,S,C,"⊐","\\sqsupset",!0);u(p,S,C,"≽","\\succcurlyeq",!0);u(p,S,C,"⋟","\\curlyeqsucc",!0);u(p,S,C,"≿","\\succsim",!0);u(p,S,C,"⪸","\\succapprox",!0);u(p,S,C,"⊳","\\vartriangleright");u(p,S,C,"⊵","\\trianglerighteq");u(p,S,C,"⊩","\\Vdash",!0);u(p,S,C,"∣","\\shortmid");u(p,S,C,"∥","\\shortparallel");u(p,S,C,"≬","\\between",!0);u(p,S,C,"⋔","\\pitchfork",!0);u(p,S,C,"∝","\\varpropto");u(p,S,C,"◀","\\blacktriangleleft");u(p,S,C,"∴","\\therefore",!0);u(p,S,C,"∍","\\backepsilon");u(p,S,C,"▶","\\blacktriangleright");u(p,S,C,"∵","\\because",!0);u(p,S,C,"⋘","\\llless");u(p,S,C,"⋙","\\gggtr");u(p,S,ae,"⊲","\\lhd");u(p,S,ae,"⊳","\\rhd");u(p,S,C,"≂","\\eqsim",!0);u(p,w,C,"⋈","\\Join");u(p,S,C,"≑","\\Doteq",!0);u(p,S,ae,"∔","\\dotplus",!0);u(p,S,ae,"∖","\\smallsetminus");u(p,S,ae,"⋒","\\Cap",!0);u(p,S,ae,"⋓","\\Cup",!0);u(p,S,ae,"⩞","\\doublebarwedge",!0);u(p,S,ae,"⊟","\\boxminus",!0);u(p,S,ae,"⊞","\\boxplus",!0);u(p,S,ae,"⋇","\\divideontimes",!0);u(p,S,ae,"⋉","\\ltimes",!0);u(p,S,ae,"⋊","\\rtimes",!0);u(p,S,ae,"⋋","\\leftthreetimes",!0);u(p,S,ae,"⋌","\\rightthreetimes",!0);u(p,S,ae,"⋏","\\curlywedge",!0);u(p,S,ae,"⋎","\\curlyvee",!0);u(p,S,ae,"⊝","\\circleddash",!0);u(p,S,ae,"⊛","\\circledast",!0);u(p,S,ae,"⋅","\\centerdot");u(p,S,ae,"⊺","\\intercal",!0);u(p,S,ae,"⋒","\\doublecap");u(p,S,ae,"⋓","\\doublecup");u(p,S,ae,"⊠","\\boxtimes",!0);u(p,S,C,"⇢","\\dashrightarrow",!0);u(p,S,C,"⇠","\\dashleftarrow",!0);u(p,S,C,"⇇","\\leftleftarrows",!0);u(p,S,C,"⇆","\\leftrightarrows",!0);u(p,S,C,"⇚","\\Lleftarrow",!0);u(p,S,C,"↞","\\twoheadleftarrow",!0);u(p,S,C,"↢","\\leftarrowtail",!0);u(p,S,C,"↫","\\looparrowleft",!0);u(p,S,C,"⇋","\\leftrightharpoons",!0);u(p,S,C,"↶","\\curvearrowleft",!0);u(p,S,C,"↺","\\circlearrowleft",!0);u(p,S,C,"↰","\\Lsh",!0);u(p,S,C,"⇈","\\upuparrows",!0);u(p,S,C,"↿","\\upharpoonleft",!0);u(p,S,C,"⇃","\\downharpoonleft",!0);u(p,w,C,"⊶","\\origof",!0);u(p,w,C,"⊷","\\imageof",!0);u(p,S,C,"⊸","\\multimap",!0);u(p,S,C,"↭","\\leftrightsquigarrow",!0);u(p,S,C,"⇉","\\rightrightarrows",!0);u(p,S,C,"⇄","\\rightleftarrows",!0);u(p,S,C,"↠","\\twoheadrightarrow",!0);u(p,S,C,"↣","\\rightarrowtail",!0);u(p,S,C,"↬","\\looparrowright",!0);u(p,S,C,"↷","\\curvearrowright",!0);u(p,S,C,"↻","\\circlearrowright",!0);u(p,S,C,"↱","\\Rsh",!0);u(p,S,C,"⇊","\\downdownarrows",!0);u(p,S,C,"↾","\\upharpoonright",!0);u(p,S,C,"⇂","\\downharpoonright",!0);u(p,S,C,"⇝","\\rightsquigarrow",!0);u(p,S,C,"⇝","\\leadsto");u(p,S,C,"⇛","\\Rrightarrow",!0);u(p,S,C,"↾","\\restriction");u(p,w,L,"‘","`");u(p,w,L,"$","\\$");u(W,w,L,"$","\\$");u(W,w,L,"$","\\textdollar");u(p,w,L,"%","\\%");u(W,w,L,"%","\\%");u(p,w,L,"_","\\_");u(W,w,L,"_","\\_");u(W,w,L,"_","\\textunderscore");u(p,w,L,"∠","\\angle",!0);u(p,w,L,"∞","\\infty",!0);u(p,w,L,"′","\\prime");u(p,w,L,"△","\\triangle");u(p,w,L,"Γ","\\Gamma",!0);u(p,w,L,"Δ","\\Delta",!0);u(p,w,L,"Θ","\\Theta",!0);u(p,w,L,"Λ","\\Lambda",!0);u(p,w,L,"Ξ","\\Xi",!0);u(p,w,L,"Π","\\Pi",!0);u(p,w,L,"Σ","\\Sigma",!0);u(p,w,L,"Υ","\\Upsilon",!0);u(p,w,L,"Φ","\\Phi",!0);u(p,w,L,"Ψ","\\Psi",!0);u(p,w,L,"Ω","\\Omega",!0);u(p,w,L,"A","Α");u(p,w,L,"B","Β");u(p,w,L,"E","Ε");u(p,w,L,"Z","Ζ");u(p,w,L,"H","Η");u(p,w,L,"I","Ι");u(p,w,L,"K","Κ");u(p,w,L,"M","Μ");u(p,w,L,"N","Ν");u(p,w,L,"O","Ο");u(p,w,L,"P","Ρ");u(p,w,L,"T","Τ");u(p,w,L,"X","Χ");u(p,w,L,"¬","\\neg",!0);u(p,w,L,"¬","\\lnot");u(p,w,L,"⊤","\\top");u(p,w,L,"⊥","\\bot");u(p,w,L,"∅","\\emptyset");u(p,S,L,"∅","\\varnothing");u(p,w,me,"α","\\alpha",!0);u(p,w,me,"β","\\beta",!0);u(p,w,me,"γ","\\gamma",!0);u(p,w,me,"δ","\\delta",!0);u(p,w,me,"ϵ","\\epsilon",!0);u(p,w,me,"ζ","\\zeta",!0);u(p,w,me,"η","\\eta",!0);u(p,w,me,"θ","\\theta",!0);u(p,w,me,"ι","\\iota",!0);u(p,w,me,"κ","\\kappa",!0);u(p,w,me,"λ","\\lambda",!0);u(p,w,me,"μ","\\mu",!0);u(p,w,me,"ν","\\nu",!0);u(p,w,me,"ξ","\\xi",!0);u(p,w,me,"ο","\\omicron",!0);u(p,w,me,"π","\\pi",!0);u(p,w,me,"ρ","\\rho",!0);u(p,w,me,"σ","\\sigma",!0);u(p,w,me,"τ","\\tau",!0);u(p,w,me,"υ","\\upsilon",!0);u(p,w,me,"ϕ","\\phi",!0);u(p,w,me,"χ","\\chi",!0);u(p,w,me,"ψ","\\psi",!0);u(p,w,me,"ω","\\omega",!0);u(p,w,me,"ε","\\varepsilon",!0);u(p,w,me,"ϑ","\\vartheta",!0);u(p,w,me,"ϖ","\\varpi",!0);u(p,w,me,"ϱ","\\varrho",!0);u(p,w,me,"ς","\\varsigma",!0);u(p,w,me,"φ","\\varphi",!0);u(p,w,ae,"∗","*",!0);u(p,w,ae,"+","+");u(p,w,ae,"−","-",!0);u(p,w,ae,"⋅","\\cdot",!0);u(p,w,ae,"∘","\\circ",!0);u(p,w,ae,"÷","\\div",!0);u(p,w,ae,"±","\\pm",!0);u(p,w,ae,"×","\\times",!0);u(p,w,ae,"∩","\\cap",!0);u(p,w,ae,"∪","\\cup",!0);u(p,w,ae,"∖","\\setminus",!0);u(p,w,ae,"∧","\\land");u(p,w,ae,"∨","\\lor");u(p,w,ae,"∧","\\wedge",!0);u(p,w,ae,"∨","\\vee",!0);u(p,w,L,"√","\\surd");u(p,w,xi,"⟨","\\langle",!0);u(p,w,xi,"∣","\\lvert");u(p,w,xi,"∥","\\lVert");u(p,w,ti,"?","?");u(p,w,ti,"!","!");u(p,w,ti,"⟩","\\rangle",!0);u(p,w,ti,"∣","\\rvert");u(p,w,ti,"∥","\\rVert");u(p,w,C,"=","=");u(p,w,C,":",":");u(p,w,C,"≈","\\approx",!0);u(p,w,C,"≅","\\cong",!0);u(p,w,C,"≥","\\ge");u(p,w,C,"≥","\\geq",!0);u(p,w,C,"←","\\gets");u(p,w,C,">","\\gt",!0);u(p,w,C,"∈","\\in",!0);u(p,w,C,"","\\@not");u(p,w,C,"⊂","\\subset",!0);u(p,w,C,"⊃","\\supset",!0);u(p,w,C,"⊆","\\subseteq",!0);u(p,w,C,"⊇","\\supseteq",!0);u(p,S,C,"⊈","\\nsubseteq",!0);u(p,S,C,"⊉","\\nsupseteq",!0);u(p,w,C,"⊨","\\models");u(p,w,C,"←","\\leftarrow",!0);u(p,w,C,"≤","\\le");u(p,w,C,"≤","\\leq",!0);u(p,w,C,"<","\\lt",!0);u(p,w,C,"→","\\rightarrow",!0);u(p,w,C,"→","\\to");u(p,S,C,"≱","\\ngeq",!0);u(p,S,C,"≰","\\nleq",!0);u(p,w,fn," ","\\ ");u(p,w,fn," ","\\space");u(p,w,fn," ","\\nobreakspace");u(W,w,fn," ","\\ ");u(W,w,fn," "," ");u(W,w,fn," ","\\space");u(W,w,fn," ","\\nobreakspace");u(p,w,fn,"","\\nobreak");u(p,w,fn,"","\\allowbreak");u(p,w,Bs,",",",");u(p,w,Bs,";",";");u(p,S,ae,"⊼","\\barwedge",!0);u(p,S,ae,"⊻","\\veebar",!0);u(p,w,ae,"⊙","\\odot",!0);u(p,w,ae,"⊕","\\oplus",!0);u(p,w,ae,"⊗","\\otimes",!0);u(p,w,L,"∂","\\partial",!0);u(p,w,ae,"⊘","\\oslash",!0);u(p,S,ae,"⊚","\\circledcirc",!0);u(p,S,ae,"⊡","\\boxdot",!0);u(p,w,ae,"△","\\bigtriangleup");u(p,w,ae,"▽","\\bigtriangledown");u(p,w,ae,"†","\\dagger");u(p,w,ae,"⋄","\\diamond");u(p,w,ae,"⋆","\\star");u(p,w,ae,"◃","\\triangleleft");u(p,w,ae,"▹","\\triangleright");u(p,w,xi,"{","\\{");u(W,w,L,"{","\\{");u(W,w,L,"{","\\textbraceleft");u(p,w,ti,"}","\\}");u(W,w,L,"}","\\}");u(W,w,L,"}","\\textbraceright");u(p,w,xi,"{","\\lbrace");u(p,w,ti,"}","\\rbrace");u(p,w,xi,"[","\\lbrack",!0);u(W,w,L,"[","\\lbrack",!0);u(p,w,ti,"]","\\rbrack",!0);u(W,w,L,"]","\\rbrack",!0);u(p,w,xi,"(","\\lparen",!0);u(p,w,ti,")","\\rparen",!0);u(W,w,L,"<","\\textless",!0);u(W,w,L,">","\\textgreater",!0);u(p,w,xi,"⌊","\\lfloor",!0);u(p,w,ti,"⌋","\\rfloor",!0);u(p,w,xi,"⌈","\\lceil",!0);u(p,w,ti,"⌉","\\rceil",!0);u(p,w,L,"\\","\\backslash");u(p,w,L,"∣","|");u(p,w,L,"∣","\\vert");u(W,w,L,"|","\\textbar",!0);u(p,w,L,"∥","\\|");u(p,w,L,"∥","\\Vert");u(W,w,L,"∥","\\textbardbl");u(W,w,L,"~","\\textasciitilde");u(W,w,L,"\\","\\textbackslash");u(W,w,L,"^","\\textasciicircum");u(p,w,C,"↑","\\uparrow",!0);u(p,w,C,"⇑","\\Uparrow",!0);u(p,w,C,"↓","\\downarrow",!0);u(p,w,C,"⇓","\\Downarrow",!0);u(p,w,C,"↕","\\updownarrow",!0);u(p,w,C,"⇕","\\Updownarrow",!0);u(p,w,Tt,"∐","\\coprod");u(p,w,Tt,"⋁","\\bigvee");u(p,w,Tt,"⋀","\\bigwedge");u(p,w,Tt,"⨄","\\biguplus");u(p,w,Tt,"⋂","\\bigcap");u(p,w,Tt,"⋃","\\bigcup");u(p,w,Tt,"∫","\\int");u(p,w,Tt,"∫","\\intop");u(p,w,Tt,"∬","\\iint");u(p,w,Tt,"∭","\\iiint");u(p,w,Tt,"∏","\\prod");u(p,w,Tt,"∑","\\sum");u(p,w,Tt,"⨂","\\bigotimes");u(p,w,Tt,"⨁","\\bigoplus");u(p,w,Tt,"⨀","\\bigodot");u(p,w,Tt,"∮","\\oint");u(p,w,Tt,"∯","\\oiint");u(p,w,Tt,"∰","\\oiiint");u(p,w,Tt,"⨆","\\bigsqcup");u(p,w,Tt,"∫","\\smallint");u(W,w,Qr,"…","\\textellipsis");u(p,w,Qr,"…","\\mathellipsis");u(W,w,Qr,"…","\\ldots",!0);u(p,w,Qr,"…","\\ldots",!0);u(p,w,Qr,"⋯","\\@cdots",!0);u(p,w,Qr,"⋱","\\ddots",!0);u(p,w,L,"⋮","\\varvdots");u(W,w,L,"⋮","\\varvdots");u(p,w,rt,"ˊ","\\acute");u(p,w,rt,"ˋ","\\grave");u(p,w,rt,"¨","\\ddot");u(p,w,rt,"~","\\tilde");u(p,w,rt,"ˉ","\\bar");u(p,w,rt,"˘","\\breve");u(p,w,rt,"ˇ","\\check");u(p,w,rt,"^","\\hat");u(p,w,rt,"⃗","\\vec");u(p,w,rt,"˙","\\dot");u(p,w,rt,"˚","\\mathring");u(p,w,me,"","\\@imath");u(p,w,me,"","\\@jmath");u(p,w,L,"ı","ı");u(p,w,L,"ȷ","ȷ");u(W,w,L,"ı","\\i",!0);u(W,w,L,"ȷ","\\j",!0);u(W,w,L,"ß","\\ss",!0);u(W,w,L,"æ","\\ae",!0);u(W,w,L,"œ","\\oe",!0);u(W,w,L,"ø","\\o",!0);u(W,w,L,"Æ","\\AE",!0);u(W,w,L,"Œ","\\OE",!0);u(W,w,L,"Ø","\\O",!0);u(W,w,rt,"ˊ","\\'");u(W,w,rt,"ˋ","\\`");u(W,w,rt,"ˆ","\\^");u(W,w,rt,"˜","\\~");u(W,w,rt,"ˉ","\\=");u(W,w,rt,"˘","\\u");u(W,w,rt,"˙","\\.");u(W,w,rt,"¸","\\c");u(W,w,rt,"˚","\\r");u(W,w,rt,"ˇ","\\v");u(W,w,rt,"¨",'\\"');u(W,w,rt,"˝","\\H");u(W,w,rt,"◯","\\textcircled");var Ud={"--":!0,"---":!0,"``":!0,"''":!0};u(W,w,L,"–","--",!0);u(W,w,L,"–","\\textendash");u(W,w,L,"—","---",!0);u(W,w,L,"—","\\textemdash");u(W,w,L,"‘","`",!0);u(W,w,L,"‘","\\textquoteleft");u(W,w,L,"’","'",!0);u(W,w,L,"’","\\textquoteright");u(W,w,L,"“","``",!0);u(W,w,L,"“","\\textquotedblleft");u(W,w,L,"”","''",!0);u(W,w,L,"”","\\textquotedblright");u(p,w,L,"°","\\degree",!0);u(W,w,L,"°","\\degree");u(W,w,L,"°","\\textdegree",!0);u(p,w,L,"£","\\pounds");u(p,w,L,"£","\\mathsterling",!0);u(W,w,L,"£","\\pounds");u(W,w,L,"£","\\textsterling",!0);u(p,S,L,"✠","\\maltese");u(W,S,L,"✠","\\maltese");var zh='0123456789/@."';for(var Eo=0;Eo<zh.length;Eo++){var Ch=zh.charAt(Eo);u(p,w,L,Ch,Ch)}var Nh='0123456789!@*()-=+";:?/.,';for(var Mo=0;Mo<Nh.length;Mo++){var Lh=Nh.charAt(Mo);u(W,w,L,Lh,Lh)}var _a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var So=0;So<_a.length;So++){var aa=_a.charAt(So);u(p,w,me,aa,aa),u(W,w,L,aa,aa)}u(p,S,L,"C","ℂ");u(W,S,L,"C","ℂ");u(p,S,L,"H","ℍ");u(W,S,L,"H","ℍ");u(p,S,L,"N","ℕ");u(W,S,L,"N","ℕ");u(p,S,L,"P","ℙ");u(W,S,L,"P","ℙ");u(p,S,L,"Q","ℚ");u(W,S,L,"Q","ℚ");u(p,S,L,"R","ℝ");u(W,S,L,"R","ℝ");u(p,S,L,"Z","ℤ");u(W,S,L,"Z","ℤ");u(p,w,me,"h","ℎ");u(W,w,me,"h","ℎ");var ye;for(var Kt=0;Kt<_a.length;Kt++){var pt=_a.charAt(Kt);ye=String.fromCharCode(55349,56320+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56372+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56424+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56580+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56684+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56736+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56788+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56840+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56944+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),Kt<26&&(ye=String.fromCharCode(55349,56632+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye),ye=String.fromCharCode(55349,56476+Kt),u(p,w,me,pt,ye),u(W,w,L,pt,ye))}ye="𝕜";u(p,w,me,"k",ye);u(W,w,L,"k",ye);for(var nr=0;nr<10;nr++){var Cn=nr.toString();ye=String.fromCharCode(55349,57294+nr),u(p,w,me,Cn,ye),u(W,w,L,Cn,ye),ye=String.fromCharCode(55349,57314+nr),u(p,w,me,Cn,ye),u(W,w,L,Cn,ye),ye=String.fromCharCode(55349,57324+nr),u(p,w,me,Cn,ye),u(W,w,L,Cn,ye),ye=String.fromCharCode(55349,57334+nr),u(p,w,me,Cn,ye),u(W,w,L,Cn,ye)}var S0="ÐÞþ";for(var zo=0;zo<S0.length;zo++){var oa=S0.charAt(zo);u(p,w,me,oa,oa),u(W,w,L,oa,oa)}var z0={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Ah={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},_h={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},op={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},hr={mathClass:"",textClass:"",font:""},Rh={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Dh={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Ih={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},C0={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},N0={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Oh={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},L0={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Bh=[z0,z0,Ah,Ah,_h,_h,op,hr,hr,hr,Rh,Rh,Dh,Dh,Ih,Ih,C0,C0,N0,N0,Oh,Oh,hr,hr,L0,L0],lp=[z0,hr,C0,N0,L0],hp=i=>{var e=i.charCodeAt(0),t=i.charCodeAt(1),n=(e-55296)*1024+(t-56320)+65536;if(119808<=n&&n<120484){var r=Math.floor((n-119808)/26);return Bh[r]}else if(120782<=n&&n<=120831){var s=Math.floor((n-120782)/10);return lp[s]}else{if(n===120485||n===120486)return Bh[0];if(120486<n&&n<120782)return hr;throw new j("Unsupported character: "+i)}},Va=function(e,t,n){if(it[n][e]){var r=it[n][e].replace;r&&(e=r)}return{value:e,metrics:gl(e,t,n)}},Zt=function(e,t,n,r,s){var a=Va(e,t,n),o=a.metrics;e=a.value;var l;if(o){var h=o.italic;(n==="text"||r&&r.font==="mathit")&&(h=0),l=new gi(e,o.height,o.depth,h,o.skew,o.width,s)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+n+"'")),l=new gi(e,0,0,0,0,0,s);if(r){l.maxFontSize=r.sizeMultiplier,r.style.isTight()&&l.classes.push("mtight");var c=r.getColor();c&&(l.style.color=c)}return l},vl=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&Va(e,"Main-Bold",t).metrics?Zt(e,"Main-Bold",t,n,r.concat(["mathbf"])):e==="\\"||it[t][e].font==="main"?Zt(e,"Main-Regular",t,n,r):Zt(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},cp=function(e,t,n){return n!=="textord"&&Va(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},ja=function(e,t,n){var r=e.mode,s=e.text,a=["mord"],{font:o,fontFamily:l,fontWeight:h,fontShape:c}=t,d=r==="math"||r==="text"&&!!o,f=d?o:l,m="",v="";if(s.charCodeAt(0)===55349){var g=hp(s);m=g.font,v=g[r+"Class"]}if(m)return Zt(s,m,r,t,a.concat(v));if(f){var x,b;if(f==="boldsymbol"){var E=cp(s,r,n);x=E.fontName,b=[E.fontClass]}else d?(x=A0[o].fontName,b=[o]):(x=la(l,h,c),b=[l,h,c]);if(Va(s,x,r).metrics)return Zt(s,x,r,t,a.concat(b));if(Ud.hasOwnProperty(s)&&x.slice(0,10)==="Typewriter"){for(var M=[],z=0;z<s.length;z++)M.push(Zt(s[z],x,r,t,a.concat(b)));return pn(M)}}if(n==="mathord")return Zt(s,"Math-Italic",r,t,a.concat(["mathnormal"]));if(n==="textord"){var R=it[r][s]&&it[r][s].font;if(R==="ams"){var O=la("amsrm",h,c);return Zt(s,O,r,t,a.concat("amsrm",h,c))}else if(R==="main"||!R){var B=la("textrm",h,c);return Zt(s,B,r,t,a.concat(h,c))}else{var F=la(R,h,c);return Zt(s,F,r,t,a.concat(F,h,c))}}else throw new Error("unexpected type: "+n+" in makeOrd")},dp=(i,e)=>{if(In(i.classes)!==In(e.classes)||i.skew!==e.skew||i.maxFontSize!==e.maxFontSize||i.italic!==0&&i.hasClass("mathnormal"))return!1;if(i.classes.length===1){var t=i.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n of Object.keys(i.style))if(i.style[n]!==e.style[n])return!1;for(var r of Object.keys(e.style))if(i.style[r]!==e.style[r])return!1;return!0},$d=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof gi&&n instanceof gi&&dp(t,n)&&(t.text+=n.text,t.height=Math.max(t.height,n.height),t.depth=Math.max(t.depth,n.depth),t.italic=n.italic,i.splice(e+1,1),e--)}return i},xl=function(e){for(var t=0,n=0,r=0,s=0;s<e.children.length;s++){var a=e.children[s];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},X=function(e,t,n,r){var s=new Zr(e,t,n,r);return xl(s),s},Bn=(i,e,t,n)=>new Zr(i,e,t,n),Wr=function(e,t,n){var r=X([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Z(r.height),r.maxFontSize=1,r},up=function(e,t,n,r){var s=new Xa(e,t,n,r);return xl(s),s},pn=function(e){var t=new Kr(e);return xl(t),t},Yr=function(e,t){return e instanceof Kr?X([],[e],t):e},fp=function(e){if(e.positionType==="individualShift"){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,s=r,a=1;a<t.length;a++){var o=-t[a].shift-s-t[a].elem.depth,l=o-(t[a-1].elem.height+t[a-1].elem.depth);s=s+o,n.push({type:"kern",size:l}),n.push(t[a])}return{children:n,depth:r}}var h;if(e.positionType==="top"){for(var c=e.positionData,d=0;d<e.children.length;d++){var f=e.children[d];c-=f.type==="kern"?f.size:f.elem.height+f.elem.depth}h=c}else if(e.positionType==="bottom")h=-e.positionData;else{var m=e.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")h=-m.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")h=-m.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:h}},$e=function(e,t){for(var{children:n,depth:r}=fp(e),s=0,a=0;a<n.length;a++){var o=n[a];if(o.type==="elem"){var l=o.elem;s=Math.max(s,l.maxFontSize,l.height)}}s+=2;var h=X(["pstrut"],[]);h.style.height=Z(s);for(var c=[],d=r,f=r,m=r,v=0;v<n.length;v++){var g=n[v];if(g.type==="kern")m+=g.size;else{var x=g.elem,b=g.wrapperClasses||[],E=g.wrapperStyle||{},M=X(b,[h,x],void 0,E);M.style.top=Z(-s-m-x.depth),g.marginLeft&&(M.style.marginLeft=g.marginLeft),g.marginRight&&(M.style.marginRight=g.marginRight),c.push(M),m+=x.height+x.depth}d=Math.min(d,m),f=Math.max(f,m)}var z=X(["vlist"],c);z.style.height=Z(f);var R;if(d<0){var O=X([],[]),B=X(["vlist"],[O]);B.style.height=Z(-d);var F=X(["vlist-s"],[new gi("​")]);R=[X(["vlist-r"],[z,F]),X(["vlist-r"],[B])]}else R=[X(["vlist-r"],[z])];var P=X(["vlist-t"],R);return R.length===2&&P.classes.push("vlist-t2"),P.height=f,P.depth=-d,P},Gd=(i,e)=>{var t=X(["mspace"],[],e),n=ct(i,e);return t.style.marginRight=Z(n),t},la=(i,e,t)=>{var n,r;switch(i){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=i}return e==="textbf"&&t==="textit"?r="BoldItalic":e==="textbf"?r="Bold":t==="textit"?r="Italic":r="Regular",n+"-"+r},A0={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"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-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"}},qd={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Wd=function(e,t){var[n,r,s]=qd[e],a=new On(n),o=new cn([a],{width:Z(r),height:Z(s),style:"width:"+Z(r),viewBox:"0 0 "+1e3*r+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=Bn(["overlay"],[o],t);return l.height=s,l.style.height=Z(s),l.style.width=Z(r),l},ht={number:3,unit:"mu"},rr={number:4,unit:"mu"},tn={number:5,unit:"mu"},pp={mord:{mop:ht,mbin:rr,mrel:tn,minner:ht},mop:{mord:ht,mop:ht,mrel:tn,minner:ht},mbin:{mord:rr,mop:rr,mopen:rr,minner:rr},mrel:{mord:tn,mop:tn,mopen:tn,minner:tn},mopen:{},mclose:{mop:ht,mbin:rr,mrel:tn,minner:ht},mpunct:{mord:ht,mop:ht,mrel:tn,mopen:ht,mclose:ht,mpunct:ht,minner:ht},minner:{mord:ht,mop:ht,mbin:rr,mrel:tn,mopen:ht,mpunct:ht,minner:ht}},mp={mord:{mop:ht},mop:{mord:ht,mop:ht},mbin:{},mrel:{},mopen:{},mclose:{mop:ht},mpunct:{},minner:{mop:ht}},Yd={},Ra={},Da={};function re(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:s,mathmlBuilder:a}=i,o={type:e,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:r},l=0;l<t.length;++l)Yd[t[l]]=o;e&&(s&&(Ra[e]=s),a&&(Da[e]=a))}function kr(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;re({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var Ia=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},bt=function(e){return e.type==="ordgroup"?e.body:[e]},gp=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),vp=new Set(["rightmost","mrel","mclose","mpunct"]),xp={display:be.DISPLAY,text:be.TEXT,script:be.SCRIPT,scriptscript:be.SCRIPTSCRIPT},yp={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},St=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var s=[],a=0;a<e.length;a++){var o=Ge(e[a],t);if(o instanceof Kr){var l=o.children;s.push(...l)}else s.push(o)}if($d(s),!n)return s;var h=t;if(e.length===1){var c=e[0];c.type==="sizing"?h=t.havingSize(c.size):c.type==="styling"&&(h=t.havingStyle(xp[c.style]))}var d=X([r[0]||"leftmost"],[],t),f=X([r[1]||"rightmost"],[],t),m=n==="root";return _0(s,(v,g)=>{var x=g.classes[0],b=v.classes[0];x==="mbin"&&vp.has(b)?g.classes[0]="mord":b==="mbin"&&gp.has(x)&&(v.classes[0]="mord")},{node:d},f,m),_0(s,(v,g)=>{var x,b,E=D0(g),M=D0(v),z=E&&M?v.hasClass("mtight")?(x=mp[E])==null?void 0:x[M]:(b=pp[E])==null?void 0:b[M]:null;if(z)return Gd(z,h)},{node:d},f,m),s},_0=function(e,t,n,r,s){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],l=Xd(o);if(l){_0(l.children,t,n,null,s);continue}var h=!o.hasClass("mspace");if(h){var c=t(o,n.node);c&&(n.insertAfter?n.insertAfter(c):(e.unshift(c),a++))}h?n.node=o:s&&o.hasClass("newline")&&(n.node=X(["leftmost"])),n.insertAfter=(d=>f=>{e.splice(d+1,0,f),a++})(a)}r&&e.pop()},Xd=function(e){return e instanceof Kr||e instanceof Xa||e instanceof Zr&&e.hasClass("enclosing")?e:null},R0=function(e,t){var n=Xd(e);if(n){var r=n.children;if(r.length){if(t==="right")return R0(r[r.length-1],"right");if(t==="left")return R0(r[0],"left")}}return e},D0=function(e,t){if(!e)return null;t&&(e=R0(e,t));var n=e.classes[0];return yp[n]||null},As=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return X(t.concat(n))},Ge=function(e,t,n){if(!e)return X();if(Ra[e.type]){var r=Ra[e.type](e,t);if(n&&t.size!==n.size){r=X(t.sizingClasses(n),[r],t);var s=t.sizeMultiplier/n.sizeMultiplier;r.height*=s,r.depth*=s}return r}else throw new j("Got group of unknown type: '"+e.type+"'")};function ha(i,e){var t=X(["base"],i,e),n=X(["strut"]);return n.style.height=Z(t.height+t.depth),t.depth&&(n.style.verticalAlign=Z(-t.depth)),t.children.unshift(n),t}function I0(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=St(i,e,"root"),r;n.length===2&&n[1].hasClass("tag")&&(r=n.pop());for(var s=[],a=[],o=0;o<n.length;o++)if(a.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,a.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(s.push(ha(a,e)),a=[])}else n[o].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(ha(a,e)),a=[]),s.push(n[o]));a.length>0&&s.push(ha(a,e));var h;t?(h=ha(St(t,e,!0),e),h.classes=["tag"],s.push(h)):r&&s.push(r);var c=X(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=Z(c.height+c.depth),c.depth&&(d.style.verticalAlign=Z(-c.depth))}return c}function Vd(i){return new Kr(i)}class K{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=In(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof kt&&this.children[n+1]instanceof kt){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof kt;)r+=this.children[++n].toText();e.appendChild(new kt(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Vt(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Vt(In(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class kt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Vt(this.toText())}toText(){return this.text}}class jd{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Z(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Z(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var wp=new Set(["\\imath","\\jmath"]),bp=new Set(["mrow","mtable"]),Li=function(e,t,n){return it[t][e]&&it[t][e].replace&&e.charCodeAt(0)!==55349&&!(Ud.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=it[t][e].replace),new kt(e)},yl=function(e){return e.length===1?e[0]:new K("mrow",e)},kp={mathit:"italic",boldsymbol:i=>i.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},wl=(i,e)=>{if(i.mode==="text"){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 t=e.font;if(!t||t==="mathnormal")return null;var n=i.mode,r=kp[t];if(r)return typeof r=="function"?r(i):r;var s=i.text;if(wp.has(s))return null;if(it[n][s]){var a=it[n][s].replace;a&&(s=a)}var o=A0[t].fontName;return gl(s,o,n)?A0[t].variant:null};function Co(i){if(!i)return!1;if(i.type==="mi"&&i.children.length===1){var e=i.children[0];return e instanceof kt&&e.text==="."}else if(i.type==="mo"&&i.children.length===1&&i.getAttribute("separator")==="true"&&i.getAttribute("lspace")==="0em"&&i.getAttribute("rspace")==="0em"){var t=i.children[0];return t instanceof kt&&t.text===","}else return!1}var yi=function(e,t,n){if(e.length===1){var r=Ke(e[0],t);return n&&r instanceof K&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var s=[],a,o=0;o<e.length;o++){var l=Ke(e[o],t);if(l instanceof K&&a instanceof K){if(l.type==="mtext"&&a.type==="mtext"&&l.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...l.children);continue}else if(l.type==="mn"&&a.type==="mn"){a.children.push(...l.children);continue}else if(Co(l)&&a.type==="mn"){a.children.push(...l.children);continue}else if(l.type==="mn"&&Co(a))l.children=[...a.children,...l.children],s.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(a.type==="mn"||Co(a))){var h=l.children[0];h instanceof K&&h.type==="mn"&&(h.children=[...a.children,...h.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var c=a.children[0];if(c instanceof kt&&c.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof kt&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),a=l}return s},Pn=function(e,t,n){return yl(yi(e,t,n))},Ke=function(e,t){if(!e)return new K("mrow");if(Da[e.type])return Da[e.type](e,t);throw new j("Got group of unknown type: '"+e.type+"'")};function Ph(i,e,t,n,r){var s=yi(i,t),a;s.length===1&&s[0]instanceof K&&bp.has(s[0].type)?a=s[0]:a=new K("mrow",s);var o=new K("annotation",[new kt(e)]);o.setAttribute("encoding","application/x-tex");var l=new K("semantics",[a,o]),h=new K("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var c=r?"katex":"katex-mathml";return X([c],[h])}var Tp=[[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]],Fh=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Hh=function(e,t){return t.size<2?e:Tp[e-1][t.size-1]};class an{constructor(e){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=e.style,this.color=e.color,this.size=e.size||an.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Fh[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={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};return Object.assign(t,e),new an(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Hh(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Fh[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Hh(an.BASESIZE,e);return this.size===t&&this.textSize===an.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==an.BASESIZE?["sizing","reset-size"+this.size,"size"+an.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=ap(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}an.BASESIZE=6;var Kd=function(e){return new an({style:e.displayMode?be.DISPLAY:be.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Zd=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=X(n,[e])}return e},Ep=function(e,t,n){var r=Kd(n),s;if(n.output==="mathml")return Ph(e,t,r,n.displayMode,!0);if(n.output==="html"){var a=I0(e,r);s=X(["katex"],[a])}else{var o=Ph(e,t,r,n.displayMode,!1),l=I0(e,r);s=X(["katex"],[o,l])}return Zd(s,n)},Mp=function(e,t,n){var r=Kd(n),s=I0(e,r),a=X(["katex"],[s]);return Zd(a,n)},Sp={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",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":"="},Ka=function(e){var t=new K("mo",[new kt(Sp[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},zp={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],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],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]},Cp=new Set(["widehat","widecheck","widetilde","utilde"]),Za=function(e,t){function n(){var o=4e5,l=e.label.slice(1);if(Cp.has(l)&&"base"in e){var h=e.base.type==="ordgroup"?e.base.body.length:1,c,d,f;if(h>5)l==="widehat"||l==="widecheck"?(c=420,o=2364,f=.42,d=l+"4"):(c=312,o=2340,f=.34,d="tilde4");else{var m=[1,1,2,2,3,3][h];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],c=[0,239,300,360,420][m],f=[0,.24,.3,.3,.36,.42][m],d=l+m):(o=[0,600,1033,2339,2340][m],c=[0,260,286,306,312][m],f=[0,.26,.286,.3,.306,.34][m],d="tilde"+m)}var v=new On(d),g=new cn([v],{width:"100%",height:Z(f),viewBox:"0 0 "+o+" "+c,preserveAspectRatio:"none"});return{span:Bn([],[g],t),minWidth:0,height:f}}else{var x=[],b=zp[l];if(!b)throw new Error('No SVG data for "'+l+'".');var[E,M,z]=b,R=z/1e3,O=E.length,B,F;if(O===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');B=["hide-tail"],F=[b[3]]}else if(O===2)B=["halfarrow-left","halfarrow-right"],F=["xMinYMin","xMaxYMin"];else if(O===3)B=["brace-left","brace-center","brace-right"],F=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
562
+ `+O+" children.");for(var P=0;P<O;P++){var ee=new On(E[P]),V=new cn([ee],{width:"400em",height:Z(R),viewBox:"0 0 "+o+" "+z,preserveAspectRatio:F[P]+" slice"}),Y=Bn([B[P]],[V],t);if(O===1)return{span:Y,minWidth:M,height:R};Y.style.height=Z(R),x.push(Y)}return{span:X(["stretchy"],x,t),minWidth:M,height:R}}}var{span:r,minWidth:s,height:a}=n();return r.height=a,r.style.height=Z(a),s>0&&(r.style.minWidth=Z(s)),r},Np=function(e,t,n,r,s){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=X(["stretchy",t],[],s),t==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var h=[];/^[bx]cancel$/.test(t)&&h.push(new M0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&h.push(new M0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new cn(h,{width:"100%",height:Z(o)});a=Bn([],[c],s)}return a.height=o,a.style.height=Z(o),a},Lp={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ap={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function _p(i){return i in Lp}function ze(i,e){if(!i||i.type!==e)throw new Error("Expected node of type "+e+", but got "+(i?"node of type "+i.type:String(i)));return i}function Qa(i){var e=Ja(i);if(!e)throw new Error("Expected node of symbol group type, but got "+(i?"node of type "+i.type:String(i)));return e}function Ja(i){return i&&(i.type==="atom"||Ap.hasOwnProperty(i.type))?i:null}var Qd=i=>{if(i instanceof gi)return i;if(rp(i)&&i.children.length===1)return Qd(i.children[0])},bl=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=ze(i.base,"accent"),t=n.base,i.base=t,r=np(Ge(i,e)),i.base=n):(n=ze(i,"accent"),t=n.base);var s=Ge(t,e.havingCrampedStyle()),a=n.isShifty&&un(t),o=0;if(a){var l,h;o=(l=(h=Qd(s))==null?void 0:h.skew)!=null?l:0}var c=n.label==="\\c",d=c?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),f;if(n.isStretchy)f=Za(n,e),f=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Z(2*o)+")",marginLeft:Z(2*o)}:void 0}]});else{var m,v;n.label==="\\vec"?(m=Wd("vec",e),v=qd.vec[1]):(m=ja({mode:n.mode,text:n.label},e,"textord"),m=ip(m),m.italic=0,v=m.width,c&&(d+=m.depth)),f=X(["accent-body"],[m]);var g=n.label==="\\textcircled";g&&(f.classes.push("accent-full"),d=s.height);var x=o;g||(x-=v/2),f.style.left=Z(x),n.label==="\\textcircled"&&(f.style.top=".2em"),f=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]})}var b=X(["mord","accent"],[f],e);return r?(r.children[0]=b,r.height=Math.max(b.height,r.height),r.classes[0]="mord",r):b},Jd=(i,e)=>{var t=i.isStretchy?Ka(i.label):new K("mo",[Li(i.label,i.mode)]),n=new K("mover",[Ke(i.base,e),t]);return n.setAttribute("accent","true"),n},Rp=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));re({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:(i,e)=>{var t=Ia(e[0]),n=!Rp.test(i.funcName),r=!n||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:n,isShifty:r,base:t}},htmlBuilder:bl,mathmlBuilder:Jd});re({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(i,e)=>{var t=e[0],n=i.parser.mode;return n==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:bl,mathmlBuilder:Jd});re({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"accentUnder",mode:t.mode,label:n,base:r}},htmlBuilder:(i,e)=>{var t=Ge(i.base,e),n=Za(i,e),r=i.label==="\\utilde"?.12:0,s=$e({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]});return X(["mord","accentunder"],[s],e)},mathmlBuilder:(i,e)=>{var t=Ka(i.label),n=new K("munder",[Ke(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var ca=i=>{var e=new K("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};re({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(i,e,t){var{parser:n,funcName:r}=i;return{type:"xArrow",mode:n.mode,label:r,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,n=e.havingStyle(t.sup()),r=Yr(Ge(i.body,n,e),e),s=i.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(s+"-arrow-pad");var a;i.below&&(n=e.havingStyle(t.sub()),a=Yr(Ge(i.below,n,e),e),a.classes.push(s+"-arrow-pad"));var o=Za(i,e),l=-e.fontMetrics().axisHeight+.5*o.height,h=-e.fontMetrics().axisHeight-.5*o.height-.111;(r.depth>.25||i.label==="\\xleftequilibrium")&&(h-=r.depth);var c;if(a){var d=-e.fontMetrics().axisHeight+a.height+.5*o.height+.111;c=$e({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:d}]})}else c=$e({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return X(["mrel","x-arrow"],[c],e)},mathmlBuilder(i,e){var t=Ka(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=ca(Ke(i.body,e));if(i.below){var s=ca(Ke(i.below,e));n=new K("munderover",[t,s,r])}else n=new K("mover",[t,r])}else if(i.below){var a=ca(Ke(i.below,e));n=new K("munder",[t,a])}else n=ca(),n=new K("mover",[t,n]);return n}});function e1(i,e){var t=St(i.body,e,!0);return X([i.mclass],t,e)}function t1(i,e){var t,n=yi(i.body,e);return i.mclass==="minner"?t=new K("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new K("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new K("mo",n),i.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):i.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):i.mclass==="mopen"||i.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):i.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}re({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:bt(r),isCharacterBox:un(r)}},htmlBuilder:e1,mathmlBuilder:t1});var eo=i=>{var e=i.type==="ordgroup"&&i.body.length?i.body[0]:i;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};re({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:eo(e[0]),body:bt(e[1]),isCharacterBox:un(e[1])}}});re({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:n}=i,r=e[1],s=e[0],a;n!=="\\stackrel"?a=eo(r):a="mrel";var o={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:bt(r)},l={type:"supsub",mode:s.mode,base:o,sup:n==="\\underset"?null:s,sub:n==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:a,body:[l],isCharacterBox:un(l)}},htmlBuilder:e1,mathmlBuilder:t1});re({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:eo(e[0]),body:bt(e[0])}},htmlBuilder(i,e){var t=St(i.body,e,!0),n=X([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=yi(i.body,e),n=new K("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Dp={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Uh=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),$h=i=>i.type==="textord"&&i.text==="@",Ip=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function Op(i,e,t){var n=Dp[i];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:n,mode:"math",family:"rel"},a=t.callFunction("\\Big",[s],[]),o=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,a,o]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Bp(i){var e=[];for(i.gullet.beginGroup(),i.gullet.macros.set("\\cr","\\\\\\relax"),i.gullet.beginGroup();;){e.push(i.parseExpression(!1,"\\\\")),i.gullet.endGroup(),i.gullet.beginGroup();var t=i.fetch().text;if(t==="&"||t==="\\\\")i.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new j("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],s=0;s<e.length;s++){for(var a=e[s],o=Uh(),l=0;l<a.length;l++)if(!$h(a[l]))o.body.push(a[l]);else{n.push(o),l+=1;var h=Qa(a[l]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(h))if("<>AV".includes(h))for(var d=0;d<2;d++){for(var f=!0,m=l+1;m<a.length;m++){if(Ip(a[m],h)){f=!1,l=m;break}if($h(a[m]))throw new j("Missing a "+h+" character to complete a CD arrow.",a[m]);c[d].body.push(a[m])}if(f)throw new j("Missing a "+h+" character to complete a CD arrow.",a[l])}else throw new j('Expected one of "<>AV=|." after @',a[l]);var v=Op(h,c,i),g={type:"styling",body:[v],mode:"math",style:"display",resetFont:!0};n.push(g),o=Uh()}s%2===0?n.push(o):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var x=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}re({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),n=Yr(Ge(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=Z(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new K("mrow",[Ke(i.label,e)]);return t=new K("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new K("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});re({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(i,e){var{parser:t}=i;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(i,e){var t=Yr(Ge(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new K("mrow",[Ke(i.fragment,e)])}});re({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=ze(e[0],"ordgroup"),r=n.body,s="",a=0;a<r.length;a++){var o=ze(r[a],"textord");s+=o.text}var l=parseInt(s),h;if(isNaN(l))throw new j("\\@char has non-numeric argument "+s);if(l<0||l>=1114111)throw new j("\\@char with invalid code point "+s);return l<=65535?h=String.fromCharCode(l):(l-=65536,h=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:h}}});var i1=(i,e)=>{var t=St(i.body,e.withColor(i.color),!1);return pn(t)},n1=(i,e)=>{var t=yi(i.body,e.withColor(i.color)),n=new K("mstyle",t);return n.setAttribute("mathcolor",i.color),n};re({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=ze(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:bt(r)}},htmlBuilder:i1,mathmlBuilder:n1});re({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=ze(e[0],"color-token").color;t.gullet.macros.set("\\current@color",r);var s=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:r,body:s}},htmlBuilder:i1,mathmlBuilder:n1});re({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:n}=i,r=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:r&&ze(r,"size").value}},htmlBuilder(i,e){var t=X(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=Z(ct(i.size,e)))),t},mathmlBuilder(i,e){var t=new K("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",Z(ct(i.size,e)))),t}});var O0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},r1=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new j("Expected a control sequence",i);return e},Pp=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},s1=(i,e,t,n)=>{var r=i.gullet.macros.get(t.text);r==null&&(t.noexpand=!0,r={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,r,n)};re({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var n=e.fetch();if(O0[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=O0[n.text]),ze(e.parseFunction(),"internal");throw new j("Invalid token after macro prefix",n)}});re({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=e.gullet.popToken(),r=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new j("Expected a control sequence",n);for(var s=0,a,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){a=e.gullet.future(),o[s].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new j('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new j('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new j("Expected a macro definition");o[s].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),(t==="\\edef"||t==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:s,delimiters:o},t===O0[t]),{type:"internal",mode:e.mode}}});re({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=r1(e.gullet.popToken());e.gullet.consumeSpaces();var r=Pp(e);return s1(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});re({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=r1(e.gullet.popToken()),r=e.gullet.popToken(),s=e.gullet.popToken();return s1(e,n,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var ys=function(e,t,n){var r=it.math[e]&&it.math[e].replace,s=gl(r||e,t,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},kl=function(e,t,n,r){var s=n.havingBaseStyle(t),a=X(r.concat(s.sizingClasses(n)),[e],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},a1=function(e,t,n){var r=t.havingBaseStyle(n),s=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Z(s),e.height-=s,e.depth+=s},Fp=function(e,t,n,r,s,a){var o=Zt(e,"Main-Regular",s,r),l=kl(o,t,r,a);return a1(l,r,t),l},Hp=function(e,t,n,r){return Zt(e,"Size"+t+"-Regular",n,r)},o1=function(e,t,n,r,s,a){var o=Hp(e,t,s,r),l=kl(X(["delimsizing","size"+t],[o],r),be.TEXT,r,a);return n&&a1(l,r,be.TEXT),l},No=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var s=X(["delimsizinginner",r],[X([],[Zt(e,t,n)])]);return{type:"elem",elem:s}},Lo=function(e,t,n){var r=Yi["Size4-Regular"][e.charCodeAt(0)]?Yi["Size4-Regular"][e.charCodeAt(0)][4]:Yi["Size1-Regular"][e.charCodeAt(0)][4],s=new On("inner",j4(e,Math.round(1e3*t))),a=new cn([s],{width:Z(r),height:Z(t),style:"width:"+Z(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Bn([],[a],n);return o.height=t,o.style.height=Z(t),o.style.width=Z(r),{type:"elem",elem:o}},B0=.008,da={type:"kern",size:-1*B0},Up=new Set(["|","\\lvert","\\rvert","\\vert"]),$p=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),l1=function(e,t,n,r,s,a){var o,l,h,c,d="",f=0;o=h=c=e,l=null;var m="Size1-Regular";e==="\\uparrow"?h=c="⏐":e==="\\Uparrow"?h=c="‖":e==="\\downarrow"?o=h="⏐":e==="\\Downarrow"?o=h="‖":e==="\\updownarrow"?(o="\\uparrow",h="⏐",c="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",h="‖",c="\\Downarrow"):Up.has(e)?(h="∣",d="vert",f=333):$p.has(e)?(h="∥",d="doublevert",f=556):e==="["||e==="\\lbrack"?(o="⎡",h="⎢",c="⎣",m="Size4-Regular",d="lbrack",f=667):e==="]"||e==="\\rbrack"?(o="⎤",h="⎥",c="⎦",m="Size4-Regular",d="rbrack",f=667):e==="\\lfloor"||e==="⌊"?(h=o="⎢",c="⎣",m="Size4-Regular",d="lfloor",f=667):e==="\\lceil"||e==="⌈"?(o="⎡",h=c="⎢",m="Size4-Regular",d="lceil",f=667):e==="\\rfloor"||e==="⌋"?(h=o="⎥",c="⎦",m="Size4-Regular",d="rfloor",f=667):e==="\\rceil"||e==="⌉"?(o="⎤",h=c="⎥",m="Size4-Regular",d="rceil",f=667):e==="("||e==="\\lparen"?(o="⎛",h="⎜",c="⎝",m="Size4-Regular",d="lparen",f=875):e===")"||e==="\\rparen"?(o="⎞",h="⎟",c="⎠",m="Size4-Regular",d="rparen",f=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",c="⎩",h="⎪",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",c="⎭",h="⎪",m="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",c="⎩",h="⎪",m="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",c="⎭",h="⎪",m="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",c="⎭",h="⎪",m="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",c="⎩",h="⎪",m="Size4-Regular");var v=ys(o,m,s),g=v.height+v.depth,x=ys(h,m,s),b=x.height+x.depth,E=ys(c,m,s),M=E.height+E.depth,z=0,R=1;if(l!==null){var O=ys(l,m,s);z=O.height+O.depth,R=2}var B=g+M+z,F=Math.max(0,Math.ceil((t-B)/(R*b))),P=B+F*R*b,ee=r.fontMetrics().axisHeight;n&&(ee*=r.sizeMultiplier);var V=P/2-ee,Y=[];if(d.length>0){var ie=P-g-M,Q=Math.round(P*1e3),oe=K4(d,Math.round(ie*1e3)),de=new On(d,oe),ge=Z(f/1e3),Qe=Z(Q/1e3),di=new cn([de],{width:ge,height:Qe,viewBox:"0 0 "+f+" "+Q}),qe=Bn([],[di],r);qe.height=Q/1e3,qe.style.width=ge,qe.style.height=Qe,Y.push({type:"elem",elem:qe})}else{if(Y.push(No(c,m,s)),Y.push(da),l===null){var st=P-g-M+2*B0;Y.push(Lo(h,st,r))}else{var at=(P-g-M-z)/2+2*B0;Y.push(Lo(h,at,r)),Y.push(da),Y.push(No(l,m,s)),Y.push(da),Y.push(Lo(h,at,r))}Y.push(da),Y.push(No(o,m,s))}var We=r.havingBaseStyle(be.TEXT),zt=$e({positionType:"bottom",positionData:V,children:Y});return kl(X(["delimsizing","mult"],[zt],We),be.TEXT,r,a)},Ao=80,_o=.08,Ro=function(e,t,n,r,s){var a=V4(e,r,n),o=new On(e,a),l=new cn([o],{width:"400em",height:Z(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Bn(["hide-tail"],[l],s)},Gp=function(e,t){var n=t.havingBaseSizing(),r=f1("\\surd",e*n.sizeMultiplier,u1,n),s=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,l,h,c,d;return r.type==="small"?(c=1e3+1e3*a+Ao,e<1?s=1:e<1.4&&(s=.7),l=(1+a+_o)/s,h=(1+a)/s,o=Ro("sqrtMain",l,c,a,t),o.style.minWidth="0.853em",d=.833/s):r.type==="large"?(c=(1e3+Ao)*ws[r.size],h=(ws[r.size]+a)/s,l=(ws[r.size]+a+_o)/s,o=Ro("sqrtSize"+r.size,l,c,a,t),o.style.minWidth="1.02em",d=1/s):(l=e+a+_o,h=e+a,c=Math.floor(1e3*e+a)+Ao,o=Ro("sqrtTall",l,c,a,t),o.style.minWidth="0.742em",d=1.056),o.height=h,o.style.height=Z(l),{span:o,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*s}},h1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),qp=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),c1=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),ws=[0,1.2,1.8,2.4,3],d1=function(e,t,n,r,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),h1.has(e)||c1.has(e))return o1(e,t,!1,n,r,s);if(qp.has(e))return l1(e,ws[t],!1,n,r,s);throw new j("Illegal delimiter: '"+e+"'")},Wp=[{type:"small",style:be.SCRIPTSCRIPT},{type:"small",style:be.SCRIPT},{type:"small",style:be.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Yp=[{type:"small",style:be.SCRIPTSCRIPT},{type:"small",style:be.SCRIPT},{type:"small",style:be.TEXT},{type:"stack"}],u1=[{type:"small",style:be.SCRIPTSCRIPT},{type:"small",style:be.SCRIPT},{type:"small",style:be.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Xp=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},f1=function(e,t,n,r){for(var s=Math.min(2,3-r.style.size),a=s;a<n.length;a++){var o=n[a];if(o.type==="stack")break;var l=ys(e,Xp(o),"math"),h=l.height+l.depth;if(o.type==="small"){var c=r.havingBaseStyle(o.style);h*=c.sizeMultiplier}if(h>t)return o}return n[n.length-1]},P0=function(e,t,n,r,s,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;c1.has(e)?o=Wp:h1.has(e)?o=u1:o=Yp;var l=f1(e,t,o,r);return l.type==="small"?Fp(e,l.style,n,r,s,a):l.type==="large"?o1(e,l.size,n,r,s,a):l1(e,t,n,r,s,a)},Do=function(e,t,n,r,s,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,h=5/r.fontMetrics().ptPerEm,c=Math.max(t-o,n+o),d=Math.max(c/500*l,2*c-h);return P0(e,d,!0,r,s,a)},Gh={"\\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}},Vp=new Set(["(","\\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 qh(i){return"isMiddle"in i}function to(i,e){var t=Ja(i);if(t&&Vp.has(t.text))return t;throw t?new j("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new j("Invalid delimiter type '"+i.type+"'",i)}re({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:(i,e)=>{var t=to(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:Gh[i.funcName].size,mclass:Gh[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?X([i.mclass]):d1(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(Li(i.delim,i.mode));var t=new K("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=Z(ws[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function Wh(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}re({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=i.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new j("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:to(e[0],i).text,color:t}}});re({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=to(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=ze(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(i,e)=>{Wh(i);for(var t=St(i.body,e,!0,["mopen","mclose"]),n=0,r=0,s=!1,a=0;a<t.length;a++){var o=t[a];qh(o)?s=!0:(n=Math.max(t[a].height,n),r=Math.max(t[a].depth,r))}n*=e.sizeMultiplier,r*=e.sizeMultiplier;var l;if(i.left==="."?l=As(e,["mopen"]):l=Do(i.left,n,r,e,i.mode,["mopen"]),t.unshift(l),s)for(var h=1;h<t.length;h++){var c=t[h];if(qh(c)){var d=c.isMiddle;t[h]=Do(d.delim,n,r,d.options,i.mode,[])}}var f;if(i.right===".")f=As(e,["mclose"]);else{var m=i.rightColor?e.withColor(i.rightColor):e;f=Do(i.right,n,r,m,i.mode,["mclose"])}return t.push(f),X(["minner"],t,e)},mathmlBuilder:(i,e)=>{Wh(i);var t=yi(i.body,e);if(i.left!=="."){var n=new K("mo",[Li(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new K("mo",[Li(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return yl(t)}});re({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=to(e[0],i);if(!i.parser.leftrightDepth)throw new j("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;return i.delim==="."?t=As(e,[]):(t=d1(i.delim,1,e,i.mode,[]),t.isMiddle={delim:i.delim,options:e}),t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?Li("|","text"):Li(i.delim,i.mode),n=new K("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var io=(i,e)=>{var t=Yr(Ge(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,s,a,o=un(i.body);if(n==="sout")s=X(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/r,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=ct({number:.6,unit:"pt"},e),h=ct({number:.35,unit:"ex"},e),c=e.havingBaseSizing();r=r/c.sizeMultiplier;var d=t.height+t.depth+l+h;t.style.paddingLeft=Z(d/2+l);var f=Math.floor(1e3*d*r),m=Y4(f),v=new cn([new On("phase",m)],{width:"400em",height:Z(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=Bn(["hide-tail"],[v],e),s.style.height=Z(d),a=t.depth+l+h}else{/cancel/.test(n)?o||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g,x,b=0;/box/.test(n)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:b),x=g):n==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*b,x=Math.max(0,.25-t.depth)):(g=o?.2:0,x=g),s=Np(t,n,g,x,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=Z(b)):n==="angl"&&b!==.049&&(s.style.borderTopWidth=Z(b),s.style.borderRightWidth=Z(b)),a=t.depth+x,i.backgroundColor&&(s.style.backgroundColor=i.backgroundColor,i.borderColor&&(s.style.borderColor=i.borderColor))}var E;if(i.backgroundColor)E=$e({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:t,shift:0}]});else{var M=/cancel|phase/.test(n)?["svg-align"]:[];E=$e({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:M}]})}return/cancel/.test(n)&&(E.height=t.height,E.depth=t.depth),/cancel/.test(n)&&!o?X(["mord","cancel-lap"],[E],e):X(["mord"],[E],e)},no=(i,e)=>{var t,n=new K(i.label.includes("colorbox")?"mpadded":"menclose",[Ke(i.body,e)]);switch(i.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(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+Z(r)+" solid "+i.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};re({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=ze(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,body:a}},htmlBuilder:io,mathmlBuilder:no});re({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=ze(e[0],"color-token").color,a=ze(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:io,mathmlBuilder:no});re({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});re({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:io,mathmlBuilder:no});re({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:io,mathmlBuilder:no});re({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var p1={};function Vi(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:s,mathmlBuilder:a}=i,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l<t.length;++l)p1[t[l]]=o;s&&(Ra[e]=s),a&&(Da[e]=a)}var m1={};function T(i,e){m1[i]=e}class oi{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new oi(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class pi{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new pi(t,oi.range(this,e))}}function Yh(i){var e=[];i.consumeSpaces();var t=i.fetch().text;for(t==="\\relax"&&(i.consume(),i.consumeSpaces(),t=i.fetch().text);t==="\\hline"||t==="\\hdashline";)i.consume(),e.push(t==="\\hdashline"),i.consumeSpaces(),t=i.fetch().text;return e}var ro=i=>{var e=i.parser.settings;if(!e.displayMode)throw new j("{"+i.envName+"} can be used only in display mode.")},jp=new Set(["gather","gather*"]);function Tl(i){if(!i.includes("ed"))return!i.includes("*")}function Hn(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:h,emptySingleRow:c,maxNumCols:d,leqno:f}=e;if(i.gullet.beginGroup(),h||i.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=i.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new j("Invalid \\arraystretch: "+m)}i.gullet.beginGroup();var v=[],g=[v],x=[],b=[],E=l!=null?[]:void 0;function M(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function z(){E&&(i.gullet.macros.get("\\df@tag")?(E.push(i.subparse([new pi("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):E.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(M(),b.push(Yh(i));;){var R=i.parseExpression(!1,h?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup();var O={type:"ordgroup",mode:i.mode,body:R};t&&(O={type:"styling",mode:i.mode,style:t,resetFont:!0,body:[O]}),v.push(O);var B=i.fetch().text;if(B==="&"){if(d&&v.length===d){if(h||o)throw new j("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(B==="\\end"){z(),v.length===1&&O.type==="styling"&&O.body.length===1&&O.body[0].type==="ordgroup"&&O.body[0].body.length===0&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}else if(B==="\\\\"){i.consume();var F=void 0;i.gullet.future().text!==" "&&(F=i.parseSizeGroup(!0)),x.push(F?F.value:null),z(),b.push(Yh(i)),v=[],g.push(v),M()}else throw new j("Expected & or \\\\ or \\cr or \\end",i.nextToken)}return i.gullet.endGroup(),i.gullet.endGroup(),{type:"array",mode:i.mode,addJot:r,arraystretch:a,body:g,cols:s,rowGaps:x,hskipBeforeAndAfter:n,hLinesBeforeRow:b,colSeparationType:o,tags:E,leqno:f}}function El(i){return i.slice(0,1)==="d"?"display":"text"}var ji=function(e,t){var n,r,s=e.body.length,a=e.hLinesBeforeRow,o=0,l=new Array(s),h=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,f=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var m=t.havingStyle(be.SCRIPT).sizeMultiplier;f=.2778*(m/t.sizeMultiplier)}var v=e.colSeparationType==="CD"?ct({number:3,unit:"ex"},t):12*d,g=3*d,x=e.arraystretch*v,b=.7*x,E=.3*x,M=0;function z(_e){for(var Lt=0;Lt<_e.length;++Lt)Lt>0&&(M+=.25),h.push({pos:M,isDashed:_e[Lt]})}for(z(a[0]),n=0;n<e.body.length;++n){var R=e.body[n],O=b,B=E;o<R.length&&(o=R.length);var F={cells:new Array(R.length),height:0,depth:0,pos:0};for(r=0;r<R.length;++r){var P=Ge(R[r],t);B<P.depth&&(B=P.depth),O<P.height&&(O=P.height),F.cells[r]=P}var ee=e.rowGaps[n],V=0;ee&&(V=ct(ee,t),V>0&&(V+=E,B<V&&(B=V),V=0)),e.addJot&&n<e.body.length-1&&(B+=g),F.height=O,F.depth=B,M+=O,F.pos=M,M+=B+V,l[n]=F,z(a[n+1])}var Y=M/2+t.fontMetrics().axisHeight,ie=e.cols||[],Q=[],oe,de,ge=[];if(e.tags&&e.tags.some(_e=>_e))for(n=0;n<s;++n){var Qe=l[n],di=Qe.pos-Y,qe=e.tags[n],st=void 0;qe===!0?st=X(["eqn-num"],[],t):qe===!1?st=X([],[],t):st=X([],St(qe,t,!0),t),st.depth=Qe.depth,st.height=Qe.height,ge.push({type:"elem",elem:st,shift:di})}for(r=0,de=0;r<o||de<ie.length;++r,++de){for(var at,We=ie[de],zt=!0;((wi=We)==null?void 0:wi.type)==="separator";){var wi;if(zt||(oe=X(["arraycolsep"],[]),oe.style.width=Z(t.fontMetrics().doubleRuleSep),Q.push(oe)),We.separator==="|"||We.separator===":"){var ue=We.separator==="|"?"solid":"dashed",He=X(["vertical-separator"],[],t);He.style.height=Z(M),He.style.borderRightWidth=Z(c),He.style.borderRightStyle=ue,He.style.margin="0 "+Z(-c/2);var Zi=M-Y;Zi&&(He.style.verticalAlign=Z(-Zi)),Q.push(He)}else throw new j("Invalid separator type: "+We.separator);de++,We=ie[de],zt=!1}if(!(r>=o)){var It=void 0;if(r>0||e.hskipBeforeAndAfter){var ii,dt;It=(ii=(dt=We)==null?void 0:dt.pregap)!=null?ii:f,It!==0&&(oe=X(["arraycolsep"],[]),oe.style.width=Z(It),Q.push(oe))}var bi=[];for(n=0;n<s;++n){var he=l[n],ve=he.cells[r];if(ve){var Ai=he.pos-Y;ve.depth=he.depth,ve.height=he.height,bi.push({type:"elem",elem:ve,shift:Ai})}}var Ie=$e({positionType:"individualShift",children:bi}),Ct=X(["col-align-"+(((at=We)==null?void 0:at.align)||"c")],[Ie]);if(Q.push(Ct),r<o-1||e.hskipBeforeAndAfter){var Ne,Gt;It=(Ne=(Gt=We)==null?void 0:Gt.postgap)!=null?Ne:f,It!==0&&(oe=X(["arraycolsep"],[]),oe.style.width=Z(It),Q.push(oe))}}}var ot=X(["mtable"],Q);if(h.length>0){for(var qt=Wr("hline",t,c),jt=Wr("hdashline",t,c),lt=[{type:"elem",elem:ot,shift:0}];h.length>0;){var ki=h.pop(),Nt=ki.pos-Y;ki.isDashed?lt.push({type:"elem",elem:jt,shift:Nt}):lt.push({type:"elem",elem:qt,shift:Nt})}ot=$e({positionType:"individualShift",children:lt})}if(ge.length===0)return X(["mord"],[ot],t);var ni=$e({positionType:"individualShift",children:ge}),yt=X(["tag"],[ni],t);return pn([ot,yt])},Kp={c:"center ",l:"left ",r:"right "},Ki=function(e,t){for(var n=[],r=new K("mtd",[],["mtr-glue"]),s=new K("mtd",[],["mml-eqn-num"]),a=0;a<e.body.length;a++){for(var o=e.body[a],l=[],h=0;h<o.length;h++)l.push(new K("mtd",[Ke(o[h],t)]));e.tags&&e.tags[a]&&(l.unshift(r),l.push(r),e.leqno?l.unshift(s):l.push(s)),n.push(new K("mtr",l))}var c=new K("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",Z(d));var f="",m="";if(e.cols&&e.cols.length>0){var v=e.cols,g="",x=!1,b=0,E=v.length;v[0].type==="separator"&&(f+="top ",b=1),v[v.length-1].type==="separator"&&(f+="bottom ",E-=1);for(var M=b;M<E;M++){var z=v[M];z.type==="align"?(m+=Kp[z.align],x&&(g+="none "),x=!0):z.type==="separator"&&x&&(g+=z.separator==="|"?"solid ":"dashed ",x=!1)}c.setAttribute("columnalign",m.trim()),/[sd]/.test(g)&&c.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var R=e.cols||[],O="",B=1;B<R.length;B++)O+=B%2?"0em ":"1em ";c.setAttribute("columnspacing",O.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?c.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?c.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var F="",P=e.hLinesBeforeRow;f+=P[0].length>0?"left ":"",f+=P[P.length-1].length>0?"right ":"";for(var ee=1;ee<P.length-1;ee++)F+=P[ee].length===0?"none ":P[ee][0]?"dashed ":"solid ";return/[sd]/.test(F)&&c.setAttribute("rowlines",F.trim()),f!==""&&(c=new K("menclose",[c]),c.setAttribute("notation",f.trim())),e.arraystretch&&e.arraystretch<1&&(c=new K("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},g1=function(e,t){e.envName.includes("ed")||ro(e);var n=[],r=e.envName.includes("at")?"alignat":"align",s=e.envName==="split",a=Hn(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Tl(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var c="",d=0;d<t[0].body.length;d++){var f=ze(t[0].body[d],"textord");c+=f.text}o=Number(c),l=o*2}var m=!l;a.body.forEach(function(b){for(var E=1;E<b.length;E+=2){var M=ze(b[E],"styling"),z=ze(M.body[0],"ordgroup");z.body.unshift(h)}if(m)l<b.length&&(l=b.length);else{var R=b.length/2;if(o<R)throw new j("Too many math in a row: "+("expected "+o+", but got "+R),b[0])}});for(var v=0;v<l;++v){var g="r",x=0;v%2===1?g="l":v>0&&m&&(x=1),n[v]={type:"align",align:g,pregap:x,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};Vi({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=Ja(e[0]),n=t?[e[0]]:ze(e[0],"ordgroup").body,r=n.map(function(a){var o=Qa(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new j("Unknown column alignment: "+l,a)}),s={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Hn(i.parser,s,El(i.envName))},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(i){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[i.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var r=i.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),t=r.fetch().text,!"lcr".includes(t))throw new j("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var s=Hn(i.parser,n,El(i.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:t}),e?{type:"leftright",mode:i.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=Hn(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=Ja(e[0]),n=t?[e[0]]:ze(e[0],"ordgroup").body,r=n.map(function(o){var l=Qa(o),h=l.text;if("lc".includes(h))return{type:"align",align:h};throw new j("Unknown column alignment: "+h,o)});if(r.length>1)throw new j("{subarray} can contain only one column");var s={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},a=Hn(i.parser,s,"script");if(a.body.length>0&&a.body[0].length>1)throw new j("{subarray} can contain only one column");return a},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(i){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=Hn(i.parser,e,El(i.envName));return{type:"leftright",mode:i.mode,body:[t],left:i.envName.includes("r")?".":"\\{",right:i.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:g1,htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){jp.has(i.envName)&&ro(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Tl(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return Hn(i.parser,e,"display")},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:g1,htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){ro(i);var e={autoTag:Tl(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return Hn(i.parser,e,"display")},htmlBuilder:ji,mathmlBuilder:Ki});Vi({type:"array",names:["CD"],props:{numArgs:0},handler(i){return ro(i),Bp(i.parser)},htmlBuilder:ji,mathmlBuilder:Ki});T("\\nonumber","\\gdef\\@eqnsw{0}");T("\\notag","\\nonumber");re({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new j(i.funcName+" valid only within array environment")}});var Xh=p1;re({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];if(r.type!=="ordgroup")throw new j("Invalid environment name",r);for(var s="",a=0;a<r.body.length;++a)s+=ze(r.body[a],"textord").text;if(n==="\\begin"){if(!Xh.hasOwnProperty(s))throw new j("No such environment: "+s,r);var o=Xh[s],{args:l,optArgs:h}=t.parseArguments("\\begin{"+s+"}",o),c={mode:t.mode,envName:s,parser:t},d=o.handler(c,l,h);t.expect("\\end",!1);var f=t.nextToken,m=ze(t.parseFunction(),"environment");if(m.name!==s)throw new j("Mismatch: \\begin{"+s+"} matched by \\end{"+m.name+"}",f);return d}return{type:"environment",mode:t.mode,name:s,nameGroup:r}}});var v1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ge(i.body,n)},x1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ke(i.body,n)},Vh={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};re({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=Ia(e[0]),s=n;return s in Vh&&(s=Vh[s]),{type:"font",mode:t.mode,font:s.slice(1),body:r}},htmlBuilder:v1,mathmlBuilder:x1});re({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"mclass",mode:t.mode,mclass:eo(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:un(n)}}});re({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,breakOnTokenText:r}=i,{mode:s}=t,a=t.parseExpression(!0,r);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:v1,mathmlBuilder:x1});var Zp=(i,e)=>{var t=e.style,n=t.fracNum(),r=t.fracDen(),s;s=e.havingStyle(n);var a=Ge(i.numer,s,e);if(i.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<l?l:a.depth}s=e.havingStyle(r);var h=Ge(i.denom,s,e),c,d,f;i.hasBarLine?(i.barSize?(d=ct(i.barSize,e),c=Wr("frac-line",e,d)):c=Wr("frac-line",e),d=c.height,f=c.height):(c=null,d=0,f=e.fontMetrics().defaultRuleThickness);var m,v,g;t.size===be.DISPLAY.size?(m=e.fontMetrics().num1,d>0?v=3*f:v=7*f,g=e.fontMetrics().denom1):(d>0?(m=e.fontMetrics().num2,v=f):(m=e.fontMetrics().num3,v=3*f),g=e.fontMetrics().denom2);var x;if(c){var E=e.fontMetrics().axisHeight;m-a.depth-(E+.5*d)<v&&(m+=v-(m-a.depth-(E+.5*d))),E-.5*d-(h.height-g)<v&&(g+=v-(E-.5*d-(h.height-g)));var M=-(E-.5*d);x=$e({positionType:"individualShift",children:[{type:"elem",elem:h,shift:g},{type:"elem",elem:c,shift:M},{type:"elem",elem:a,shift:-m}]})}else{var b=m-a.depth-(h.height-g);b<v&&(m+=.5*(v-b),g+=.5*(v-b)),x=$e({positionType:"individualShift",children:[{type:"elem",elem:h,shift:g},{type:"elem",elem:a,shift:-m}]})}s=e.havingStyle(t),x.height*=s.sizeMultiplier/e.sizeMultiplier,x.depth*=s.sizeMultiplier/e.sizeMultiplier;var z;t.size===be.DISPLAY.size?z=e.fontMetrics().delim1:t.size===be.SCRIPTSCRIPT.size?z=e.havingStyle(be.SCRIPT).fontMetrics().delim2:z=e.fontMetrics().delim2;var R,O;return i.leftDelim==null?R=As(e,["mopen"]):R=P0(i.leftDelim,z,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?O=X([]):i.rightDelim==null?O=As(e,["mclose"]):O=P0(i.rightDelim,z,!0,e.havingStyle(t),i.mode,["mclose"]),X(["mord"].concat(s.sizingClasses(e)),[R,X(["mfrac"],[x]),O],e)},Qp=(i,e)=>{var t=new K("mfrac",[Ke(i.numer,e),Ke(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=ct(i.barSize,e);t.setAttribute("linethickness",Z(n))}if(i.leftDelim!=null||i.rightDelim!=null){var r=[];if(i.leftDelim!=null){var s=new K("mo",[new kt(i.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),r.push(s)}if(r.push(t),i.rightDelim!=null){var a=new K("mo",[new kt(i.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),r.push(a)}return yl(r)}return t},y1=(i,e)=>{if(!e)return i;var t={type:"styling",mode:i.mode,style:e,body:[i]};return t};re({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],s=e[1],a,o=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var h=n==="\\cfrac",c=null;return h||n.startsWith("\\d")?c="display":n.startsWith("\\t")&&(c="text"),y1({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:h,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},c)},htmlBuilder:Zp,mathmlBuilder:Qp});re({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:n}=i,r;switch(t){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:n}}});var jh=["display","text","script","scriptscript"],Kh=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};re({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,n=e[4],r=e[5],s=Ia(e[0]),a=s.type==="atom"&&s.family==="open"?Kh(s.text):null,o=Ia(e[1]),l=o.type==="atom"&&o.family==="close"?Kh(o.text):null,h=ze(e[2],"size"),c,d=null;h.isBlank?c=!0:(d=h.value,c=d.number>0);var f=null,m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var v=ze(m.body[0],"textord");f=jh[Number(v.text)]}}else m=ze(m,"textord"),f=jh[Number(m.text)];return y1({type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:c,barSize:d,leftDelim:a,rightDelim:l},f)}});re({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:n,token:r}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:ze(e[0],"size").value,token:r}}});re({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],s=ze(e[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));var a=e[2],o=s.number>0;return{type:"genfrac",mode:t.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var w1=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?Ge(i.sup,e.havingStyle(t.sup()),e):Ge(i.sub,e.havingStyle(t.sub()),e),r=ze(i.base,"horizBrace")):r=ze(i,"horizBrace");var s=Ge(r.base,e.havingBaseStyle(be.DISPLAY)),a=Za(r,e),o;if(r.isOver?o=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=$e({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),n){var l=X(["minner",r.isOver?"mover":"munder"],[o],e);r.isOver?o=$e({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=$e({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return X(["minner",r.isOver?"mover":"munder"],[o],e)},Jp=(i,e)=>{var t=Ka(i.label);return new K(i.isOver?"mover":"munder",[Ke(i.base,e),t])};re({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"horizBrace",mode:t.mode,label:n,isOver:n.includes("\\over"),base:e[0]}},htmlBuilder:w1,mathmlBuilder:Jp});re({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=ze(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:bt(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=St(i.body,e,!1);return up(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=Pn(i.body,e);return t instanceof K||(t=new K("mrow",[t])),t.setAttribute("href",i.href),t}});re({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=ze(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var r=[],s=0;s<n.length;s++){var a=n[s];a==="~"&&(a="\\textasciitilde"),r.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:t.mode,font:"\\texttt",body:r};return{type:"href",mode:t.mode,href:n,body:bt(o)}}});re({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(i,e){var{parser:t}=i;return{type:"hbox",mode:t.mode,body:bt(e[0])}},htmlBuilder(i,e){var t=St(i.body,e.withFont(""),!1);return pn(t)},mathmlBuilder(i,e){return new K("mrow",yi(i.body,e.withFont("")))}});re({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,token:r}=i,s=ze(e[0],"raw").string,a=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var h=s.split(","),c=0;c<h.length;c++){var d=h[c],f=d.indexOf("=");if(f<0)throw new j("\\htmlData key/value '"+d+"' missing equals sign");var m=d.slice(0,f),v=d.slice(f+1);l["data-"+m.trim()]=v}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(o)?{type:"html",mode:t.mode,attributes:l,body:bt(a)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=St(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=X(n,t,e);for(var s in i.attributes)s!=="class"&&i.attributes.hasOwnProperty(s)&&r.setAttribute(s,i.attributes[s]);return r},mathmlBuilder:(i,e)=>Pn(i.body,e)});re({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:bt(e[0]),mathml:bt(e[1])}},htmlBuilder:(i,e)=>{var t=St(i.html,e,!1);return pn(t)},mathmlBuilder:(i,e)=>Pn(i.mathml,e)});var Io=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new j("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Bd(n))throw new j("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};re({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:n}=i,r={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var l=ze(t[0],"raw").string,h=l.split(","),c=0;c<h.length;c++){var d=h[c].split("=");if(d.length===2){var f=d[1].trim();switch(d[0].trim()){case"alt":o=f;break;case"width":r=Io(f);break;case"height":s=Io(f);break;case"totalheight":a=Io(f);break;default:throw new j("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=ze(e[0],"url").url;return o===""&&(o=m,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:o,width:r,height:s,totalheight:a,src:m}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=ct(i.height,e),n=0;i.totalheight.number>0&&(n=ct(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=ct(i.width,e));var s={height:Z(t+n)};r>0&&(s.width=Z(r)),n>0&&(s.verticalAlign=Z(-n));var a=new ep(i.src,i.alt,s);return a.height=t,a.depth=n,a},mathmlBuilder:(i,e)=>{var t=new K("mglyph",[]);t.setAttribute("alt",i.alt);var n=ct(i.height,e),r=0;if(i.totalheight.number>0&&(r=ct(i.totalheight,e)-n,t.setAttribute("valign",Z(-r))),t.setAttribute("height",Z(n+r)),i.width.number>0){var s=ct(i.width,e);t.setAttribute("width",Z(s))}return t.setAttribute("src",i.src),t}});re({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=ze(e[0],"size");if(t.settings.strict){var s=n[1]==="m",a=r.value.unit==="mu";s?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+r.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:r.value}},htmlBuilder(i,e){return Gd(i.dimension,e)},mathmlBuilder(i,e){var t=ct(i.dimension,e);return new jd(t)}});re({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:r}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=X([],[Ge(i.body,e)]),t=X(["inner"],[t],e)):t=X(["inner"],[Ge(i.body,e)]);var n=X(["fix"],[]),r=X([i.alignment],[t,n],e),s=X(["strut"]);return s.style.height=Z(r.height+r.depth),r.depth&&(s.style.verticalAlign=Z(-r.depth)),r.children.unshift(s),r=X(["thinbox"],[r],e),X(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new K("mpadded",[Ke(i.body,e)]);if(i.alignment!=="rlap"){var n=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});re({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:n}=i,r=n.mode;n.switchMode("math");var s=t==="\\("?"\\)":"$",a=n.parseExpression(!1,s);return n.expect(s),n.switchMode(r),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});re({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new j("Mismatched "+i.funcName)}});var Zh=(i,e)=>{switch(e.style.size){case be.DISPLAY.size:return i.display;case be.TEXT.size:return i.text;case be.SCRIPT.size:return i.script;case be.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};re({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:bt(e[0]),text:bt(e[1]),script:bt(e[2]),scriptscript:bt(e[3])}},htmlBuilder:(i,e)=>{var t=Zh(i,e),n=St(t,e,!1);return pn(n)},mathmlBuilder:(i,e)=>{var t=Zh(i,e);return Pn(t,e)}});var b1=(i,e,t,n,r,s,a)=>{i=X([],[i]);var o=t&&un(t),l,h;if(e){var c=Ge(e,n.havingStyle(r.sup()),n);h={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(t){var d=Ge(t,n.havingStyle(r.sub()),n);l={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var f;if(h&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+a;f=$e({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Z(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Z(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var v=i.height-a;f=$e({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Z(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i}]})}else if(h){var g=i.depth+a;f=$e({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Z(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return i;var x=[f];if(l&&s!==0&&!o){var b=X(["mspace"],[],n);b.style.marginRight=Z(s),x.unshift(b)}return X(["mop","op-limits"],x,n)},k1=new Set(["\\smallint"]),Jr=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=ze(i.base,"op"),r=!0):s=ze(i,"op");var a=e.style,o=!1;a.size===be.DISPLAY.size&&s.symbol&&!k1.has(s.name)&&(o=!0);var l,h;if(s.symbol){var c=o?"Size2-Regular":"Size1-Regular",d="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(d=s.name.slice(1),s.name=d==="oiint"?"\\iint":"\\iiint"),l=Zt(s.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h=l.italic,d.length>0){var f=Wd(d+"Size"+(o?"2":"1"),e);l=$e({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:o?.08:0}]}),s.name="\\"+d,l.classes.unshift("mop"),l.italic=h}}else if(s.body){var m=St(s.body,e,!0);m.length===1&&m[0]instanceof gi?(l=m[0],l.classes[0]="mop"):l=X(["mop"],m,e)}else{for(var v=[],g=1;g<s.name.length;g++)v.push(vl(s.name[g],s.mode,e));l=X(["mop"],v,e)}var x=0,b=0;if((l instanceof gi||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift){var E;x=(l.height-l.depth)/2-e.fontMetrics().axisHeight,b=(E=l.italic)!=null?E:0}return r?b1(l,t,n,e,a,b,x):(x&&(l.style.position="relative",l.style.top=Z(x)),l)},Ps=(i,e)=>{var t;if(i.symbol)t=new K("mo",[Li(i.name,i.mode)]),k1.has(i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new K("mo",yi(i.body,e));else{t=new K("mi",[new kt(i.name.slice(1))]);var n=new K("mo",[Li("⁡","text")]);i.parentIsSupSub?t=new K("mrow",[t,n]):t=Vd([t,n])}return t},em={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};re({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=n;return r.length===1&&(r=em[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Jr,mathmlBuilder:Ps});re({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:bt(n)}},htmlBuilder:Jr,mathmlBuilder:Ps});var tm={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};re({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(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Jr,mathmlBuilder:Ps});re({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Jr,mathmlBuilder:Ps});re({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(i){var{parser:e,funcName:t}=i,n=t;return n.length===1&&(n=tm[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Jr,mathmlBuilder:Ps});var T1=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=ze(i.base,"operatorname"),r=!0):s=ze(i,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(d=>{var f="text"in d?d.text:void 0;return typeof f=="string"?{type:"textord",mode:d.mode,text:f}:d}),l=St(o,e.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof gi&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=X(["mop"],l,e)}else a=X(["mop"],[],e);return r?b1(a,t,n,e,e.style,0,0):a},im=(i,e)=>{for(var t=yi(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var s=t[r];if(!(s instanceof jd))if(s instanceof K)switch(s.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var a=s.children[0];s.children.length===1&&a instanceof kt?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=t.map(c=>c.toText()).join("");t=[new kt(o)]}var l=new K("mi",t);l.setAttribute("mathvariant","normal");var h=new K("mo",[Li("⁡","text")]);return i.parentIsSupSub?new K("mrow",[l,h]):Vd([l,h])};re({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"operatorname",mode:t.mode,body:bt(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:T1,mathmlBuilder:im});T("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");kr({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?pn(St(i.body,e,!1)):X(["mord"],St(i.body,e,!0),e)},mathmlBuilder(i,e){return Pn(i.body,e,!0)}});re({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,n=e[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(i,e){var t=Ge(i.body,e.havingCrampedStyle()),n=Wr("overline-line",e),r=e.fontMetrics().defaultRuleThickness,s=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]});return X(["mord","overline"],[s],e)},mathmlBuilder(i,e){var t=new K("mo",[new kt("‾")]);t.setAttribute("stretchy","true");var n=new K("mover",[Ke(i.body,e),t]);return n.setAttribute("accent","true"),n}});re({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"phantom",mode:t.mode,body:bt(n)}},htmlBuilder:(i,e)=>{var t=St(i.body,e.withPhantom(),!1);return pn(t)},mathmlBuilder:(i,e)=>{var t=yi(i.body,e);return new K("mphantom",t)}});T("\\hphantom","\\smash{\\phantom{#1}}");re({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=X(["inner"],[Ge(i.body,e.withPhantom())]),n=X(["fix"],[]);return X(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=yi(bt(i.body),e),n=new K("mphantom",t),r=new K("mpadded",[n]);return r.setAttribute("width","0px"),r}});re({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=ze(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=Ge(i.body,e),n=ct(i.dy,e);return $e({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new K("mpadded",[Ke(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});re({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});re({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(i,e,t){var{parser:n}=i,r=t[0],s=ze(e[0],"size"),a=ze(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&ze(r,"size").value,width:s.value,height:a.value}},htmlBuilder(i,e){var t=X(["mord","rule"],[],e),n=ct(i.width,e),r=ct(i.height,e),s=i.shift?ct(i.shift,e):0;return t.style.borderRightWidth=Z(n),t.style.borderTopWidth=Z(r),t.style.bottom=Z(s),t.width=n,t.height=r+s,t.depth=-s,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=ct(i.width,e),n=ct(i.height,e),r=i.shift?ct(i.shift,e):0,s=e.color&&e.getColor()||"black",a=new K("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",Z(t)),a.setAttribute("height",Z(n));var o=new K("mpadded",[a]);return r>=0?o.setAttribute("height",Z(r)):(o.setAttribute("height",Z(r)),o.setAttribute("depth",Z(-r))),o.setAttribute("voffset",Z(r)),o}});function E1(i,e,t){for(var n=St(i,e,!1),r=e.sizeMultiplier/t.sizeMultiplier,s=0;s<n.length;s++){var a=n[s].classes.indexOf("sizing");a<0?Array.prototype.push.apply(n[s].classes,e.sizingClasses(t)):n[s].classes[a+1]==="reset-size"+e.size&&(n[s].classes[a+1]="reset-size"+t.size),n[s].height*=r,n[s].depth*=r}return pn(n)}var Qh=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],nm=(i,e)=>{var t=e.havingSize(i.size);return E1(i.body,t,e)};re({type:"sizing",names:Qh,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:n,parser:r}=i,s=r.parseExpression(!1,t);return{type:"sizing",mode:r.mode,size:Qh.indexOf(n)+1,body:s}},htmlBuilder:nm,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=yi(i.body,t),r=new K("mstyle",n);return r.setAttribute("mathsize",Z(t.sizeMultiplier)),r}});re({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:n}=i,r=!1,s=!1,a=t[0]&&ze(t[0],"ordgroup");if(a)for(var o,l=0;l<a.body.length;++l){var h=a.body[l];if(o=Qa(h).text,o==="t")r=!0;else if(o==="b")s=!0;else{r=!1,s=!1;break}}else r=!0,s=!0;var c=e[0];return{type:"smash",mode:n.mode,body:c,smashHeight:r,smashDepth:s}},htmlBuilder:(i,e)=>{var t=X([],[Ge(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0),i.smashDepth&&(t.depth=0),i.smashHeight&&i.smashDepth)return X(["mord","smash"],[t],e);if(t.children)for(var n=0;n<t.children.length;n++)i.smashHeight&&(t.children[n].height=0),i.smashDepth&&(t.children[n].depth=0);var r=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t}]});return X(["mord"],[r],e)},mathmlBuilder:(i,e)=>{var t=new K("mpadded",[Ke(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});re({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n}=i,r=t[0],s=e[0];return{type:"sqrt",mode:n.mode,body:s,index:r}},htmlBuilder(i,e){var t=Ge(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=Yr(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,s=r;e.style.id<be.TEXT.id&&(s=e.fontMetrics().xHeight);var a=r+s/4,o=t.height+t.depth+a+r,{span:l,ruleWidth:h,advanceWidth:c}=Gp(o,e),d=l.height-h;d>t.height+t.depth+a&&(a=(a+d-t.height-t.depth)/2);var f=l.height-t.height-a-h;t.style.paddingLeft=Z(c);var m=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+f)},{type:"elem",elem:l},{type:"kern",size:h}]});if(i.index){var v=e.havingStyle(be.SCRIPTSCRIPT),g=Ge(i.index,v,e),x=.6*(m.height-m.depth),b=$e({positionType:"shift",positionData:-x,children:[{type:"elem",elem:g}]}),E=X(["root"],[b]);return X(["mord","sqrt"],[E,m],e)}else return X(["mord","sqrt"],[m],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new K("mroot",[Ke(t,e),Ke(n,e)]):new K("msqrt",[Ke(t,e)])}});var F0={display:be.DISPLAY,text:be.TEXT,script:be.SCRIPT,scriptscript:be.SCRIPTSCRIPT};function rm(i){return i in F0}re({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:n,parser:r}=i,s=r.parseExpression(!0,t),a=n.slice(1,n.length-5);if(!rm(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:r.mode,style:a,body:s}},htmlBuilder(i,e){var t=F0[i.style],n=e.havingStyle(t);return i.resetFont&&(n=n.withFont("")),E1(i.body,n,e)},mathmlBuilder(i,e){var t=F0[i.style],n=e.havingStyle(t);i.resetFont&&(n=n.withFont(""));var r=yi(i.body,n),s=new K("mstyle",r),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[i.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var sm=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===be.DISPLAY.size||n.alwaysHandleSupSub);return r?Jr:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(t.style.size===be.DISPLAY.size||n.limits);return s?T1:null}else{if(n.type==="accent")return un(n.base)?bl:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?w1:null}else return null}else return null};kr({type:"supsub",htmlBuilder(i,e){var t=sm(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:s}=i,a=Ge(n,e),o,l,h=e.fontMetrics(),c=0,d=0,f=n&&un(n);if(r){var m=e.havingStyle(e.style.sup());o=Ge(r,m,e),f||(c=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(s){var v=e.havingStyle(e.style.sub());l=Ge(s,v,e),f||(d=a.depth+v.fontMetrics().subDrop*v.sizeMultiplier/e.sizeMultiplier)}var g;e.style===be.DISPLAY?g=h.sup1:e.style.cramped?g=h.sup3:g=h.sup2;var x=e.sizeMultiplier,b=Z(.5/h.ptPerEm/x),E=null;if(l){var M=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");if(a instanceof gi||M){var z;E=Z(-((z=a.italic)!=null?z:0))}}var R;if(o&&l){c=Math.max(c,g,o.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var O=h.defaultRuleThickness,B=4*O;if(c-o.depth-(l.height-d)<B){d=B-(c-o.depth)+l.height;var F=.8*h.xHeight-(c-o.depth);F>0&&(c+=F,d-=F)}var P=[{type:"elem",elem:l,shift:d,marginRight:b,marginLeft:E},{type:"elem",elem:o,shift:-c,marginRight:b}];R=$e({positionType:"individualShift",children:P})}else if(l){d=Math.max(d,h.sub1,l.height-.8*h.xHeight);var ee=[{type:"elem",elem:l,marginLeft:E,marginRight:b}];R=$e({positionType:"shift",positionData:d,children:ee})}else if(o)c=Math.max(c,g,o.depth+.25*h.xHeight),R=$e({positionType:"shift",positionData:-c,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var V=D0(a,"right")||"mord";return X([V],[a,X(["msupsub"],[R])],e)},mathmlBuilder(i,e){var t=!1,n,r;i.base&&i.base.type==="horizBrace"&&(r=!!i.sup,r===i.base.isOver&&(t=!0,n=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var s=[Ke(i.base,e)];i.sub&&s.push(Ke(i.sub,e)),i.sup&&s.push(Ke(i.sup,e));var a;if(t)a=n?"mover":"munder";else if(i.sub)if(i.sup){var h=i.base;h&&h.type==="op"&&h.limits&&e.style===be.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===be.DISPLAY||h.limits)?a="munderover":a="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===be.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===be.DISPLAY)?a="munder":a="msub"}else{var o=i.base;o&&o.type==="op"&&o.limits&&(e.style===be.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===be.DISPLAY)?a="mover":a="msup"}return new K(a,s)}});kr({type:"atom",htmlBuilder(i,e){return vl(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new K("mo",[Li(i.text,i.mode)]);if(i.family==="bin"){var n=wl(i,e);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var M1={mi:"italic",mn:"normal",mtext:"normal"};kr({type:"mathord",htmlBuilder(i,e){return ja(i,e,"mathord")},mathmlBuilder(i,e){var t=new K("mi",[Li(i.text,i.mode,e)]),n=wl(i,e)||"italic";return n!==M1[t.type]&&t.setAttribute("mathvariant",n),t}});kr({type:"textord",htmlBuilder(i,e){return ja(i,e,"textord")},mathmlBuilder(i,e){var t=Li(i.text,i.mode,e),n=wl(i,e)||"normal",r;return i.mode==="text"?r=new K("mtext",[t]):/[0-9]/.test(i.text)?r=new K("mn",[t]):i.text==="\\prime"?r=new K("mo",[t]):r=new K("mi",[t]),n!==M1[r.type]&&r.setAttribute("mathvariant",n),r}});var Oo={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Bo={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};kr({type:"spacing",htmlBuilder(i,e){if(Bo.hasOwnProperty(i.text)){var t=Bo[i.text].className||"";if(i.mode==="text"){var n=ja(i,e,"textord");return n.classes.push(t),n}else return X(["mspace",t],[vl(i.text,i.mode,e)],e)}else{if(Oo.hasOwnProperty(i.text))return X(["mspace",Oo[i.text]],[],e);throw new j('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(Bo.hasOwnProperty(i.text))t=new K("mtext",[new kt(" ")]);else{if(Oo.hasOwnProperty(i.text))return new K("mspace");throw new j('Unknown type of space "'+i.text+'"')}return t}});var Jh=()=>{var i=new K("mtd",[]);return i.setAttribute("width","50%"),i};kr({type:"tag",mathmlBuilder(i,e){var t=new K("mtable",[new K("mtr",[Jh(),new K("mtd",[Pn(i.body,e)]),Jh(),new K("mtd",[Pn(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var ec={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},tc={"\\textbf":"textbf","\\textmd":"textmd"},am={"\\textit":"textit","\\textup":"textup"},ic=(i,e)=>{var t=i.font;if(t){if(ec[t])return e.withTextFontFamily(ec[t]);if(tc[t])return e.withTextFontWeight(tc[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(am[t])};re({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"text",mode:t.mode,body:bt(r),font:n}},htmlBuilder(i,e){var t=ic(i,e),n=St(i.body,t,!0);return X(["mord","text"],n,t)},mathmlBuilder(i,e){var t=ic(i,e);return Pn(i.body,t)}});re({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=Ge(i.body,e),n=Wr("underline-line",e),r=e.fontMetrics().defaultRuleThickness,s=$e({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]});return X(["mord","underline"],[s],e)},mathmlBuilder(i,e){var t=new K("mo",[new kt("‾")]);t.setAttribute("stretchy","true");var n=new K("munder",[Ke(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});re({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=Ge(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return $e({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new K("mpadded",[Ke(i.body,e)],["vcenter"]);return new K("mrow",[t])}});re({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new j("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=nc(i),n=[],r=e.havingStyle(e.style.text()),s=0;s<t.length;s++){var a=t[s];a==="~"&&(a="\\textasciitilde"),n.push(Zt(a,"Typewriter-Regular",i.mode,r,["mord","texttt"]))}return X(["mord","text"].concat(r.sizingClasses(e)),$d(n),r)},mathmlBuilder(i,e){var t=new kt(nc(i)),n=new K("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var nc=i=>i.body.replace(/ /g,i.star?"␣":" "),An=Yd,S1=`[ \r
563
+ ]`,om="\\\\[a-zA-Z@]+",lm="\\\\[^\uD800-\uDFFF]",hm="("+om+")"+S1+"*",cm=`\\\\(
564
+ |[ \r ]+
565
+ ?)[ \r ]*`,H0="[̀-ͯ]",dm=new RegExp(H0+"+$"),um="("+S1+"+)|"+(cm+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(H0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(H0+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+hm)+("|"+lm+")");class rc{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(um,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new pi("EOF",new oi(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new j("Unexpected character: '"+e[t]+"'",new pi(e[t],new oi(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var s=e.indexOf(`
566
+ `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.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=s+1,this.lex()}return new pi(r,new oi(this,t,this.tokenRegex.lastIndex))}}class fm{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new j("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var pm=m1;T("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});T("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});T("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});T("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});T("\\@ifnextchar",function(i){var e=i.consumeArgs(3);i.consumeSpaces();var t=i.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});T("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");T("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var sc={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};T("\\char",function(i){var e=i.popToken(),t,n=0;if(e.text==="'")t=8,e=i.popToken();else if(e.text==='"')t=16,e=i.popToken();else if(e.text==="`")if(e=i.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new j("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=sc[e.text],n==null||n>=t)throw new j("Invalid base-"+t+" digit "+e.text);for(var r;(r=sc[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var Ml=(i,e,t,n)=>{var r=i.consumeArg().tokens;if(r.length!==1)throw new j("\\newcommand's first argument must be a macro name");var s=r[0].text,a=i.isDefined(s);if(a&&!e)throw new j("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!t)throw new j("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(r=i.consumeArg().tokens,r.length===1&&r[0].text==="["){for(var l="",h=i.expandNextToken();h.text!=="]"&&h.text!=="EOF";)l+=h.text,h=i.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new j("Invalid number of arguments: "+l);o=parseInt(l),r=i.consumeArg().tokens}return a&&n||i.macros.set(s,{tokens:r,numArgs:o}),""};T("\\newcommand",i=>Ml(i,!1,!0,!1));T("\\renewcommand",i=>Ml(i,!0,!1,!1));T("\\providecommand",i=>Ml(i,!0,!0,!0));T("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});T("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});T("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),An[t],it.math[t],it.text[t]),""});T("\\bgroup","{");T("\\egroup","}");T("~","\\nobreakspace");T("\\lq","`");T("\\rq","'");T("\\aa","\\r a");T("\\AA","\\r A");T("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");T("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");T("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");T("ℬ","\\mathscr{B}");T("ℰ","\\mathscr{E}");T("ℱ","\\mathscr{F}");T("ℋ","\\mathscr{H}");T("ℐ","\\mathscr{I}");T("ℒ","\\mathscr{L}");T("ℳ","\\mathscr{M}");T("ℛ","\\mathscr{R}");T("ℭ","\\mathfrak{C}");T("ℌ","\\mathfrak{H}");T("ℨ","\\mathfrak{Z}");T("\\Bbbk","\\Bbb{k}");T("\\llap","\\mathllap{\\textrm{#1}}");T("\\rlap","\\mathrlap{\\textrm{#1}}");T("\\clap","\\mathclap{\\textrm{#1}}");T("\\mathstrut","\\vphantom{(}");T("\\underbar","\\underline{\\text{#1}}");T("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');T("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");T("\\ne","\\neq");T("≠","\\neq");T("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");T("∉","\\notin");T("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");T("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");T("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");T("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");T("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");T("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");T("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");T("⟂","\\perp");T("‼","\\mathclose{!\\mkern-0.8mu!}");T("∌","\\notni");T("⌜","\\ulcorner");T("⌝","\\urcorner");T("⌞","\\llcorner");T("⌟","\\lrcorner");T("©","\\copyright");T("®","\\textregistered");T("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');T("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');T("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');T("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');T("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");T("⋮","\\vdots");T("\\varGamma","\\mathit{\\Gamma}");T("\\varDelta","\\mathit{\\Delta}");T("\\varTheta","\\mathit{\\Theta}");T("\\varLambda","\\mathit{\\Lambda}");T("\\varXi","\\mathit{\\Xi}");T("\\varPi","\\mathit{\\Pi}");T("\\varSigma","\\mathit{\\Sigma}");T("\\varUpsilon","\\mathit{\\Upsilon}");T("\\varPhi","\\mathit{\\Phi}");T("\\varPsi","\\mathit{\\Psi}");T("\\varOmega","\\mathit{\\Omega}");T("\\substack","\\begin{subarray}{c}#1\\end{subarray}");T("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");T("\\boxed","\\fbox{$\\displaystyle{#1}$}");T("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");T("\\implies","\\DOTSB\\;\\Longrightarrow\\;");T("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");T("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");T("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ac={",":"\\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"},mm=new Set(["bin","rel"]);T("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in ac?e=ac[t]:(t.slice(0,4)==="\\not"||t in it.math&&mm.has(it.math[t].group))&&(e="\\dotsb"),e});var Sl={")":!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};T("\\dotso",function(i){var e=i.future().text;return e in Sl?"\\ldots\\,":"\\ldots"});T("\\dotsc",function(i){var e=i.future().text;return e in Sl&&e!==","?"\\ldots\\,":"\\ldots"});T("\\cdots",function(i){var e=i.future().text;return e in Sl?"\\@cdots\\,":"\\@cdots"});T("\\dotsb","\\cdots");T("\\dotsm","\\cdots");T("\\dotsi","\\!\\cdots");T("\\dotsx","\\ldots\\,");T("\\DOTSI","\\relax");T("\\DOTSB","\\relax");T("\\DOTSX","\\relax");T("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");T("\\,","\\tmspace+{3mu}{.1667em}");T("\\thinspace","\\,");T("\\>","\\mskip{4mu}");T("\\:","\\tmspace+{4mu}{.2222em}");T("\\medspace","\\:");T("\\;","\\tmspace+{5mu}{.2777em}");T("\\thickspace","\\;");T("\\!","\\tmspace-{3mu}{.1667em}");T("\\negthinspace","\\!");T("\\negmedspace","\\tmspace-{4mu}{.2222em}");T("\\negthickspace","\\tmspace-{5mu}{.277em}");T("\\enspace","\\kern.5em ");T("\\enskip","\\hskip.5em\\relax");T("\\quad","\\hskip1em\\relax");T("\\qquad","\\hskip2em\\relax");T("\\tag","\\@ifstar\\tag@literal\\tag@paren");T("\\tag@paren","\\tag@literal{({#1})}");T("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new j("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});T("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");T("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");T("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");T("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");T("\\newline","\\\\\\relax");T("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var z1=Z(Yi["Main-Regular"][84][1]-.7*Yi["Main-Regular"][65][1]);T("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+z1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");T("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+z1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");T("\\hspace","\\@ifstar\\@hspacer\\@hspace");T("\\@hspace","\\hskip #1\\relax");T("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");T("\\ordinarycolon",":");T("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");T("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');T("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');T("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');T("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');T("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');T("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');T("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');T("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');T("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');T("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');T("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');T("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');T("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');T("∷","\\dblcolon");T("∹","\\eqcolon");T("≔","\\coloneqq");T("≕","\\eqqcolon");T("⩴","\\Coloneqq");T("\\ratio","\\vcentcolon");T("\\coloncolon","\\dblcolon");T("\\colonequals","\\coloneqq");T("\\coloncolonequals","\\Coloneqq");T("\\equalscolon","\\eqqcolon");T("\\equalscoloncolon","\\Eqqcolon");T("\\colonminus","\\coloneq");T("\\coloncolonminus","\\Coloneq");T("\\minuscolon","\\eqcolon");T("\\minuscoloncolon","\\Eqcolon");T("\\coloncolonapprox","\\Colonapprox");T("\\coloncolonsim","\\Colonsim");T("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");T("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");T("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");T("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");T("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");T("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");T("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");T("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");T("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");T("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");T("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");T("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");T("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");T("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");T("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");T("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");T("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");T("\\nleqq","\\html@mathml{\\@nleqq}{≰}");T("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");T("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");T("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");T("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");T("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");T("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");T("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");T("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");T("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");T("\\imath","\\html@mathml{\\@imath}{ı}");T("\\jmath","\\html@mathml{\\@jmath}{ȷ}");T("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");T("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");T("⟦","\\llbracket");T("⟧","\\rrbracket");T("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");T("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");T("⦃","\\lBrace");T("⦄","\\rBrace");T("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");T("⦵","\\minuso");T("\\darr","\\downarrow");T("\\dArr","\\Downarrow");T("\\Darr","\\Downarrow");T("\\lang","\\langle");T("\\rang","\\rangle");T("\\uarr","\\uparrow");T("\\uArr","\\Uparrow");T("\\Uarr","\\Uparrow");T("\\N","\\mathbb{N}");T("\\R","\\mathbb{R}");T("\\Z","\\mathbb{Z}");T("\\alef","\\aleph");T("\\alefsym","\\aleph");T("\\Alpha","\\mathrm{A}");T("\\Beta","\\mathrm{B}");T("\\bull","\\bullet");T("\\Chi","\\mathrm{X}");T("\\clubs","\\clubsuit");T("\\cnums","\\mathbb{C}");T("\\Complex","\\mathbb{C}");T("\\Dagger","\\ddagger");T("\\diamonds","\\diamondsuit");T("\\empty","\\emptyset");T("\\Epsilon","\\mathrm{E}");T("\\Eta","\\mathrm{H}");T("\\exist","\\exists");T("\\harr","\\leftrightarrow");T("\\hArr","\\Leftrightarrow");T("\\Harr","\\Leftrightarrow");T("\\hearts","\\heartsuit");T("\\image","\\Im");T("\\infin","\\infty");T("\\Iota","\\mathrm{I}");T("\\isin","\\in");T("\\Kappa","\\mathrm{K}");T("\\larr","\\leftarrow");T("\\lArr","\\Leftarrow");T("\\Larr","\\Leftarrow");T("\\lrarr","\\leftrightarrow");T("\\lrArr","\\Leftrightarrow");T("\\Lrarr","\\Leftrightarrow");T("\\Mu","\\mathrm{M}");T("\\natnums","\\mathbb{N}");T("\\Nu","\\mathrm{N}");T("\\Omicron","\\mathrm{O}");T("\\plusmn","\\pm");T("\\rarr","\\rightarrow");T("\\rArr","\\Rightarrow");T("\\Rarr","\\Rightarrow");T("\\real","\\Re");T("\\reals","\\mathbb{R}");T("\\Reals","\\mathbb{R}");T("\\Rho","\\mathrm{P}");T("\\sdot","\\cdot");T("\\sect","\\S");T("\\spades","\\spadesuit");T("\\sub","\\subset");T("\\sube","\\subseteq");T("\\supe","\\supseteq");T("\\Tau","\\mathrm{T}");T("\\thetasym","\\vartheta");T("\\weierp","\\wp");T("\\Zeta","\\mathrm{Z}");T("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");T("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");T("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");T("\\bra","\\mathinner{\\langle{#1}|}");T("\\ket","\\mathinner{|{#1}\\rangle}");T("\\braket","\\mathinner{\\langle{#1}\\rangle}");T("\\Bra","\\left\\langle#1\\right|");T("\\Ket","\\left|#1\\right\\rangle");var C1=i=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,s=e.consumeArg().tokens,a=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=d=>f=>{i&&(f.macros.set("|",a),r.length&&f.macros.set("\\|",o));var m=d;if(!d&&r.length){var v=f.future();v.text==="|"&&(f.popToken(),m=!0)}return{tokens:m?r:n,numArgs:0}};e.macros.set("|",l(!1)),r.length&&e.macros.set("\\|",l(!0));var h=e.consumeArg().tokens,c=e.expandTokens([...s,...h,...t]);return e.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};T("\\bra@ket",C1(!1));T("\\bra@set",C1(!0));T("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");T("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");T("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");T("\\angln","{\\angl n}");T("\\blue","\\textcolor{##6495ed}{#1}");T("\\orange","\\textcolor{##ffa500}{#1}");T("\\pink","\\textcolor{##ff00af}{#1}");T("\\red","\\textcolor{##df0030}{#1}");T("\\green","\\textcolor{##28ae7b}{#1}");T("\\gray","\\textcolor{gray}{#1}");T("\\purple","\\textcolor{##9d38bd}{#1}");T("\\blueA","\\textcolor{##ccfaff}{#1}");T("\\blueB","\\textcolor{##80f6ff}{#1}");T("\\blueC","\\textcolor{##63d9ea}{#1}");T("\\blueD","\\textcolor{##11accd}{#1}");T("\\blueE","\\textcolor{##0c7f99}{#1}");T("\\tealA","\\textcolor{##94fff5}{#1}");T("\\tealB","\\textcolor{##26edd5}{#1}");T("\\tealC","\\textcolor{##01d1c1}{#1}");T("\\tealD","\\textcolor{##01a995}{#1}");T("\\tealE","\\textcolor{##208170}{#1}");T("\\greenA","\\textcolor{##b6ffb0}{#1}");T("\\greenB","\\textcolor{##8af281}{#1}");T("\\greenC","\\textcolor{##74cf70}{#1}");T("\\greenD","\\textcolor{##1fab54}{#1}");T("\\greenE","\\textcolor{##0d923f}{#1}");T("\\goldA","\\textcolor{##ffd0a9}{#1}");T("\\goldB","\\textcolor{##ffbb71}{#1}");T("\\goldC","\\textcolor{##ff9c39}{#1}");T("\\goldD","\\textcolor{##e07d10}{#1}");T("\\goldE","\\textcolor{##a75a05}{#1}");T("\\redA","\\textcolor{##fca9a9}{#1}");T("\\redB","\\textcolor{##ff8482}{#1}");T("\\redC","\\textcolor{##f9685d}{#1}");T("\\redD","\\textcolor{##e84d39}{#1}");T("\\redE","\\textcolor{##bc2612}{#1}");T("\\maroonA","\\textcolor{##ffbde0}{#1}");T("\\maroonB","\\textcolor{##ff92c6}{#1}");T("\\maroonC","\\textcolor{##ed5fa6}{#1}");T("\\maroonD","\\textcolor{##ca337c}{#1}");T("\\maroonE","\\textcolor{##9e034e}{#1}");T("\\purpleA","\\textcolor{##ddd7ff}{#1}");T("\\purpleB","\\textcolor{##c6b9fc}{#1}");T("\\purpleC","\\textcolor{##aa87ff}{#1}");T("\\purpleD","\\textcolor{##7854ab}{#1}");T("\\purpleE","\\textcolor{##543b78}{#1}");T("\\mintA","\\textcolor{##f5f9e8}{#1}");T("\\mintB","\\textcolor{##edf2df}{#1}");T("\\mintC","\\textcolor{##e0e5cc}{#1}");T("\\grayA","\\textcolor{##f6f7f7}{#1}");T("\\grayB","\\textcolor{##f0f1f2}{#1}");T("\\grayC","\\textcolor{##e3e5e6}{#1}");T("\\grayD","\\textcolor{##d6d8da}{#1}");T("\\grayE","\\textcolor{##babec2}{#1}");T("\\grayF","\\textcolor{##888d93}{#1}");T("\\grayG","\\textcolor{##626569}{#1}");T("\\grayH","\\textcolor{##3b3e40}{#1}");T("\\grayI","\\textcolor{##21242c}{#1}");T("\\kaBlue","\\textcolor{##314453}{#1}");T("\\kaGreen","\\textcolor{##71B307}{#1}");var N1={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gm{constructor(e,t,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=t,this.expansionCount=0,this.feed(e),this.macros=new fm(pm,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new rc(e,this.settings)}switchMode(e){this.mode=e}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(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg(["]"])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new pi("EOF",n.loc)),this.pushTokens(r),new pi("",oi.range(t,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),s,a=0,o=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++a;else if(s.text==="}"){if(--a,a===-1)throw new j("Extra }",s)}else if(s.text==="EOF")throw new j("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((a===0||a===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new j("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var s=this.popToken();if(n[r]!==s.text)throw new j("Use of the macro doesn't match its definition",s)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new j("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new j("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var l=s[o];if(l.text==="#"){if(o===0)throw new j("Incomplete placeholder at end of macro body",l);if(l=s[--o],l.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(l.text))s.splice(o,2,...a[+l.text-1]);else throw new j("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new pi(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(n=>n.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t=="function"?t(this):t;if(typeof r=="string"){var s=0;if(r.includes("#"))for(var a=r.replace(/##/g,"");a.includes("#"+(s+1));)++s;for(var o=new rc(r,this.settings),l=[],h=o.lex();h.text!=="EOF";)l.push(h),h=o.lex();l.reverse();var c={tokens:l,numArgs:s};return c}return r}isDefined(e){return this.macros.has(e)||An.hasOwnProperty(e)||it.math.hasOwnProperty(e)||it.text.hasOwnProperty(e)||N1.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:An.hasOwnProperty(e)&&!An[e].primitive}}var oc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ua=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Po={"́":{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"}},lc={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class so{constructor(e,t){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 gm(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new j("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new pi("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var r=this.fetch();if(so.endOfExpression.has(r.text)||t&&r.text===t||e&&An[r.text]&&An[r.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var s=e[r];if(s.type==="infix"){if(t!==-1)throw new j("only one infix operator per group",s.token);t=r,n=s.replaceWith}}if(t!==-1&&n){var a,o,l=e.slice(0,t),h=e.slice(t+1);l.length===1&&l[0].type==="ordgroup"?a=l[0]:a={type:"ordgroup",mode:this.mode,body:l},h.length===1&&h[0].type==="ordgroup"?o=h[0]:o={type:"ordgroup",mode:this.mode,body:h};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[a,e[t],o],[]):c=this.callFunction(n,[a,o],[]),[c]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do{var s;r=this.parseGroup(e)}while(((s=r)==null?void 0:s.type)==="internal");if(!r)throw new j("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if((t==null?void 0:t.type)==="internal"||this.mode==="text")return t;for(var n,r;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op"){var a=s.text==="\\limits";t.limits=a,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=s.text==="\\limits");else throw new j("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new j("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new j("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new j("Double superscript",s);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();this.fetch().text==="'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(ua[s.text]){var h=oc.test(s.text),c=[];for(c.push(new pi(ua[s.text])),this.consume();;){var d=this.fetch().text;if(!ua[d]||oc.test(d)!==h)break;c.unshift(new pi(ua[d])),this.consume()}var f=this.subparse(c);h?r={type:"ordgroup",mode:"math",body:f}:n={type:"ordgroup",mode:"math",body:f}}else break}return n||r?{type:"supsub",mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,s=An[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new j("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!s.allowedInText)throw new j("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&s.allowedInMath===!1)throw new j("Can't use function '"+r+"' in math mode",n);var{args:a,optArgs:o}=this.parseArguments(r,s);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,s){var a={funcName:e,parser:this,token:r,breakOnTokenText:s},o=An[e];if(o&&o.handler)return o.handler(a,t,n);throw new j("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],s=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],l=a<t.numOptionalArgs;("primitive"in t&&t.primitive&&o==null||t.type==="sqrt"&&a===1&&s[0]==null)&&(o="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",o,l);if(l)s.push(h);else if(h!=null)r.push(h);else throw new j("Null argument, please report this as a bug")}return{args:r,optArgs:s}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null}case"raw":{var s=this.parseStringGroup("raw",n);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(n)throw new j("A primitive argument cannot be optional");var a=this.parseGroup(e);if(a==null)throw new j("Expected group as "+e,this.fetch());return a}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new j("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r="",s;(s=this.fetch()).text!=="EOF";)r+=s.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,s="",a;(a=this.fetch()).text!=="EOF"&&e.test(s+a.text);)r=a,s+=r.text,this.consume();if(s==="")throw new j("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new j("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new j("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!Bd(s))throw new j("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,s;if(r==="{"||r==="\\begingroup"){this.consume();var a=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,a),l=this.fetch();this.expect(a),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:oi.range(n,l),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!N1.hasOwnProperty(r)){if(this.settings.throwOnError)throw new j("Undefined control sequence: "+r,n);s=this.formatUnsupportedCmd(r),this.consume()}return s}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type==="textord"){var s=r.text,a=e[n+1];if(!(!a||a.type!=="textord")){if(s==="-"&&a.text==="-"){var o=e[n+2];n+1<t&&o&&o.type==="textord"&&o.text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:oi.range(r,o),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:oi.range(r,a),text:"--"}),t-=1)}(s==="'"||s==="`")&&a.text===s&&(e.splice(n,2,{type:"textord",mode:"text",loc:oi.range(r,a),text:s+s}),t-=1)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new j(`\\verb assertion failed --
567
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}lc.hasOwnProperty(t[0])&&!it[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=lc[t[0]]+t.slice(1));var s=dm.exec(t);s&&(t=t.substring(0,s.index),t==="i"?t="ı":t==="j"&&(t="ȷ"));var a;if(it[this.mode][t]){this.settings.strict&&this.mode==="math"&&S0.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var o=it[this.mode][t].group,l=oi.range(e),h;_p(o)?h={type:"atom",mode:this.mode,family:o,loc:l,text:t}:h={type:o,mode:this.mode,loc:l,text:t},a=h}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Od(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:oi.range(e),text:t};else return null;if(this.consume(),s)for(var c=0;c<s[0].length;c++){var d=s[0][c];if(!Po[d])throw new j("Unknown accent ' "+d+"'",e);var f=Po[d][this.mode]||Po[d].text;if(!f)throw new j("Accent "+d+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:oi.range(e),label:f,isStretchy:!1,isShifty:!0,base:a}}return a}}so.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var zl=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new so(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new j("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new pi("\\df@tag")])}]}return r},L1=function(e,t,n){t.textContent="";var r=Cl(e,n).toNode();t.appendChild(r)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),L1=function(){throw new j("KaTeX doesn't work in quirks mode.")});var vm=function(e,t){var n=Cl(e,t).toMarkup();return n},xm=function(e,t){var n=new fl(t);return zl(e,n)},A1=function(e,t,n){if(n.throwOnError||!(e instanceof j))throw e;var r=X(["katex-error"],[new gi(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Cl=function(e,t){var n=new fl(t);try{var r=zl(e,n);return Ep(r,e,n)}catch(s){return A1(s,e,n)}},ym=function(e,t){var n=new fl(t);try{var r=zl(e,n);return Mp(r,e,n)}catch(s){return A1(s,e,n)}},wm="0.16.47",bm={Span:Zr,Anchor:Xa,SymbolNode:gi,SvgNode:cn,PathNode:On,LineNode:M0},km={version:wm,render:L1,renderToString:vm,ParseError:j,SETTINGS_SCHEMA:k0,__parse:xm,__renderToDomTree:Cl,__renderToHTMLTree:ym,__setFontMetrics:sp,__defineSymbol:u,__defineFunction:re,__defineMacro:T,__domTree:bm};const Tm=(function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"})(),Em=function(i,e){return new URL(i,e).href},hc={},Mm=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let a=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),h=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=a(t.map(c=>{if(c=Em(c,n),c in hc)return;hc[c]=!0;const d=c.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(!!n)for(let g=o.length-1;g>=0;g--){const x=o[g];if(x.href===c&&(!d||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":Tm,d||(v.as="script"),v.crossOrigin="",v.href=c,h&&v.setAttribute("nonce",h),document.head.appendChild(v),d)return new Promise((g,x)=>{v.addEventListener("load",g),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return r.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})},cc='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',Sm=920,zm=.78,Cm=1200,Fo=new Map;let dc,uc=0;function Nm(i){return/^\s*(?:---\s*\n[\s\S]*?\n---\s*\n\s*)?(?:%%\{[\s\S]*?\}%%\s*)*(?:flowchart|graph)\b/m.test(i)?i.split(`
568
+ `).map(t=>/^\s*%%/.test(t)?t:t.replace(/(\b[A-Za-z0-9_]+)\{(?!\{)((?:"[^"\n]*"|[^}\n])+)\}(?!\})/g,"$1{{$2}}")).join(`
569
+ `):i}async function Lm(){return dc??(dc=Mm(async()=>{const{default:i}=await import("./mermaid.core-CD6VFwtI.js").then(e=>e.bb);return{default:i}},[],import.meta.url).then(({default:i})=>(i.initialize({startOnLoad:!1,securityLevel:"strict",htmlLabels:!1,suppressErrorRendering:!0,maxTextSize:5e4,maxEdges:500,look:"classic",theme:"base",fontFamily:cc,fontSize:13,flowchart:{htmlLabels:!1,curve:"basis",wrappingWidth:260,minNodeWidth:96,nodeSpacing:36,rankSpacing:38,padding:12,diagramPadding:16,subGraphTitleMargin:{top:10,bottom:12}},state:{padding:10},themeVariables:{background:"#ffffff",fontFamily:cc,fontSize:"13px",primaryColor:"#eef4ff",primaryTextColor:"#1f2329",primaryBorderColor:"#638ef2",secondaryColor:"#eefaf6",secondaryTextColor:"#1f2329",secondaryBorderColor:"#45b892",tertiaryColor:"#f8fafc",tertiaryTextColor:"#334155",tertiaryBorderColor:"#cbd5e1",lineColor:"#64748b",textColor:"#1f2329",mainBkg:"#eef4ff",nodeBorder:"#638ef2",clusterBkg:"#f8fafc",clusterBorder:"#cbd5e1",titleColor:"#334155",edgeLabelBackground:"#ffffff",stateBkg:"#eef4ff",stateLabelColor:"#1f2329",transitionColor:"#64748b",noteBkgColor:"#fff8e6",noteBorderColor:"#e2a336",noteTextColor:"#1f2329"},themeCSS:`
570
+ .node rect, .node circle, .node ellipse, .statediagram-state rect.basic { rx: 10px; ry: 10px; stroke-width: 1.5px; }
571
+ .node polygon { fill: #fffbeb !important; stroke: #d97706 !important; stroke-width: 1.6px !important; stroke-linejoin: round; }
572
+ .cluster rect { fill: #f8fafc !important; stroke: #cbd5e1 !important; stroke-width: 1.3px !important; stroke-dasharray: 6 4; rx: 12px; ry: 12px; }
573
+ .cluster-label text, .cluster text { font-weight: 650 !important; fill: #1e293b !important; font-size: 13px !important; }
574
+ .edgePaths path, .transition { stroke: #64748b !important; stroke-width: 1.5px !important; }
575
+ .arrowheadPath, marker path { fill: #64748b !important; stroke: #64748b !important; }
576
+ .edgeLabel rect, .labelBkg { fill: #ffffff !important; stroke: #e2e8f0 !important; stroke-width: 1px !important; opacity: 0.98 !important; rx: 6px; ry: 6px; }
577
+ .edgeLabel text, .edgeLabel tspan { fill: #334155 !important; font-size: 11.5px !important; font-weight: 500 !important; }
578
+ `}),i))),dc}function U0(){var e;if(typeof window>"u"||typeof document>"u"||window.innerWidth<=0||window.innerHeight<=0)return!1;const i=(e=document.body)==null?void 0:e.getBoundingClientRect();return!!(i&&i.width>0&&i.height>0)}async function Am(i){var v;if(!U0())throw new Error("Mermaid viewport hidden");const e=await Lm(),t=Nm(i);let n;try{({svg:n}=await e.render("inkmap-mermaid-"+ ++uc,t))}catch{if(t===i)throw new Error("Mermaid render failed");({svg:n}=await e.render("inkmap-mermaid-"+ ++uc,i))}const s=new DOMParser().parseFromString(n,"image/svg+xml").documentElement,a=(v=s.getAttribute("viewBox"))==null?void 0:v.trim().split(/\s+/).map(Number);if(s.localName!=="svg"||!a||a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("Invalid Mermaid viewBox");const o=Math.max(1,Math.round(a[2])),l=Math.max(1,Math.round(a[3]));if(o<=36||l<=36||!U0())throw new Error("Mermaid measured zero-size bounds in hidden viewport");const h=Math.min(1,Sm/o),c=Math.min(h,Math.max(zm,Cm/l)),d=Math.max(1,Math.round(o*c)),f=Math.max(1,Math.round(l*c));s.setAttribute("width",String(d)),s.setAttribute("height",String(f)),s.style.removeProperty("max-width");const m=new XMLSerializer().serializeToString(s);try{window.postMessage({type:"__inkmap_debug",event:"diagram.rendered",width:d,height:f,naturalWidth:o,naturalHeight:l,bounds:a},"*")}catch{}return{src:"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(m),width:d,height:f,naturalWidth:o,naturalHeight:l}}function _m(i){if(!U0())return Promise.resolve(void 0);const e=Fo.get(i);if(e)return e;const t=Am(i).catch(n=>{try{window.postMessage({type:"__inkmap_debug",event:"diagram.error",error:String(n instanceof Error?n.message:n),innerW:window.innerWidth,innerH:window.innerHeight},"*")}catch{}Fo.delete(i)});return Fo.set(i,t),t}function Nl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Tr=Nl();function _1(i){Tr=i}var bs={exec:()=>null};function Xe(i,e=""){let t=typeof i=="string"?i:i.source;const n={replace:(r,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(ei.caret,"$1"),t=t.replace(r,a),n},getRegex:()=>new RegExp(t,e)};return n}var ei={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},Rm=/^(?:[ \t]*(?:\n|$))+/,Dm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Im=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Om=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ll=/(?:[*+-]|\d{1,9}[.)])/,R1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,D1=Xe(R1).replace(/bull/g,Ll).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bm=Xe(R1).replace(/bull/g,Ll).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Al=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pm=/^[^\n]+/,_l=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fm=Xe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hm=Xe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ll).getRegex(),ao="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Rl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Um=Xe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Rl).replace("tag",ao).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),I1=Xe(Al).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ao).getRegex(),$m=Xe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",I1).getRegex(),Dl={blockquote:$m,code:Dm,def:Fm,fences:Im,heading:Om,hr:Fs,html:Um,lheading:D1,list:Hm,newline:Rm,paragraph:I1,table:bs,text:Pm},fc=Xe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ao).getRegex(),Gm={...Dl,lheading:Bm,table:fc,paragraph:Xe(Al).replace("hr",Fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ao).getRegex()},qm={...Dl,html:Xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Rl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Xe(Al).replace("hr",Fs).replace("heading",` *#{1,6} *[^
579
+ ]`).replace("lheading",D1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Wm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ym=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,O1=/^( {2,}|\\)\n(?!\s*$)/,Xm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,oo=/[\p{P}\p{S}]/u,Il=/[\s\p{P}\p{S}]/u,B1=/[^\s\p{P}\p{S}]/u,Vm=Xe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Il).getRegex(),P1=/(?!~)[\p{P}\p{S}]/u,jm=/(?!~)[\s\p{P}\p{S}]/u,Km=/(?:[^\s\p{P}\p{S}]|~)/u,Zm=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,F1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qm=Xe(F1,"u").replace(/punct/g,oo).getRegex(),Jm=Xe(F1,"u").replace(/punct/g,P1).getRegex(),H1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",e5=Xe(H1,"gu").replace(/notPunctSpace/g,B1).replace(/punctSpace/g,Il).replace(/punct/g,oo).getRegex(),t5=Xe(H1,"gu").replace(/notPunctSpace/g,Km).replace(/punctSpace/g,jm).replace(/punct/g,P1).getRegex(),i5=Xe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,B1).replace(/punctSpace/g,Il).replace(/punct/g,oo).getRegex(),n5=Xe(/\\(punct)/,"gu").replace(/punct/g,oo).getRegex(),r5=Xe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),s5=Xe(Rl).replace("(?:-->|$)","-->").getRegex(),a5=Xe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",s5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,o5=Xe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Oa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),U1=Xe(/^!?\[(label)\]\[(ref)\]/).replace("label",Oa).replace("ref",_l).getRegex(),$1=Xe(/^!?\[(ref)\](?:\[\])?/).replace("ref",_l).getRegex(),l5=Xe("reflink|nolink(?!\\()","g").replace("reflink",U1).replace("nolink",$1).getRegex(),Ol={_backpedal:bs,anyPunctuation:n5,autolink:r5,blockSkip:Zm,br:O1,code:Ym,del:bs,emStrongLDelim:Qm,emStrongRDelimAst:e5,emStrongRDelimUnd:i5,escape:Wm,link:o5,nolink:$1,punctuation:Vm,reflink:U1,reflinkSearch:l5,tag:a5,text:Xm,url:bs},h5={...Ol,link:Xe(/^!?\[(label)\]\((.*?)\)/).replace("label",Oa).getRegex(),reflink:Xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oa).getRegex()},$0={...Ol,emStrongRDelimAst:t5,emStrongLDelim:Jm,url:Xe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},c5={...$0,br:Xe(O1).replace("{2,}","*").getRegex(),text:Xe($0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fa={normal:Dl,gfm:Gm,pedantic:qm},cs={normal:Ol,gfm:$0,breaks:c5,pedantic:h5},d5={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pc=i=>d5[i];function Gi(i,e){if(e){if(ei.escapeTest.test(i))return i.replace(ei.escapeReplace,pc)}else if(ei.escapeTestNoEncode.test(i))return i.replace(ei.escapeReplaceNoEncode,pc);return i}function mc(i){try{i=encodeURI(i).replace(ei.percentDecode,"%")}catch{return null}return i}function gc(i,e){var s;const t=i.replace(ei.findPipe,(a,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),n=t.split(ei.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!((s=n.at(-1))!=null&&s.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(ei.slashPipe,"|");return n}function ds(i,e,t){const n=i.length;if(n===0)return"";let r=0;for(;r<n&&i.charAt(n-r-1)===e;)r++;return i.slice(0,n-r)}function u5(i,e){if(i.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])t++;else if(i[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function vc(i,e,t,n,r){const s=e.href,a=e.title||null,o=i[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:i[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function f5(i,e,t){const n=i.match(t.other.indentCodeCompensation);if(n===null)return e;const r=n[1];return e.split(`
580
+ `).map(s=>{const a=s.match(t.other.beginningSpace);if(a===null)return s;const[o]=a;return o.length>=r.length?s.slice(r.length):s}).join(`
581
+ `)}var Ba=class{constructor(i){ne(this,"options");ne(this,"rules");ne(this,"lexer");this.options=i||Tr}space(i){const e=this.rules.block.newline.exec(i);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(i){const e=this.rules.block.code.exec(i);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ds(t,`
582
+ `)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const t=e[0],n=f5(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(i){const e=this.rules.block.heading.exec(i);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const n=ds(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(i){const e=this.rules.block.hr.exec(i);if(e)return{type:"hr",raw:ds(e[0],`
583
+ `)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let t=ds(e[0],`
584
+ `).split(`
585
+ `),n="",r="";const s=[];for(;t.length>0;){let a=!1;const o=[];let l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))o.push(t[l]),a=!0;else if(!a)o.push(t[l]);else break;t=t.slice(l);const h=o.join(`
586
+ `),c=h.replace(this.rules.other.blockquoteSetextReplace,`
587
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
588
+ ${h}`:h,r=r?`${r}
589
+ ${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=d,t.length===0)break;const f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const m=f,v=m.raw+`
590
+ `+t.join(`
591
+ `),g=this.blockquote(v);s[s.length-1]=g,n=n.substring(0,n.length-m.raw.length)+g.raw,r=r.substring(0,r.length-m.text.length)+g.text;break}else if((f==null?void 0:f.type)==="list"){const m=f,v=m.raw+`
592
+ `+t.join(`
593
+ `),g=this.list(v);s[s.length-1]=g,n=n.substring(0,n.length-f.raw.length)+g.raw,r=r.substring(0,r.length-m.raw.length)+g.raw,t=v.substring(s.at(-1).raw.length).split(`
594
+ `);continue}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(i){let e=this.rules.block.list.exec(i);if(e){let t=e[1].trim();const n=t.length>1,r={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");const s=this.rules.other.listItemRegex(t);let a=!1;for(;i;){let l=!1,h="",c="";if(!(e=s.exec(i))||this.rules.block.hr.test(i))break;h=e[0],i=i.substring(h.length);let d=e[2].split(`
595
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=i.split(`
596
+ `,1)[0],m=!d.trim(),v=0;if(this.options.pedantic?(v=2,c=d.trimStart()):m?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,c=d.slice(v),v+=e[1].length),m&&this.rules.other.blankLine.test(f)&&(h+=f+`
597
+ `,i=i.substring(f.length+1),l=!0),!l){const b=this.rules.other.nextBulletRegex(v),E=this.rules.other.hrRegex(v),M=this.rules.other.fencesBeginRegex(v),z=this.rules.other.headingBeginRegex(v),R=this.rules.other.htmlBeginRegex(v);for(;i;){const O=i.split(`
598
+ `,1)[0];let B;if(f=O,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),B=f):B=f.replace(this.rules.other.tabCharGlobal," "),M.test(f)||z.test(f)||R.test(f)||b.test(f)||E.test(f))break;if(B.search(this.rules.other.nonSpaceChar)>=v||!f.trim())c+=`
599
+ `+B.slice(v);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(d)||z.test(d)||E.test(d))break;c+=`
600
+ `+f}!m&&!f.trim()&&(m=!0),h+=O+`
601
+ `,i=i.substring(O.length+1),d=B.slice(v)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0));let g=null,x;this.options.gfm&&(g=this.rules.other.listIsTask.exec(c),g&&(x=g[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:h,task:!!g,checked:x,loose:!1,text:c,tokens:[]}),r.raw+=h}const o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){const h=r.items[l].tokens.filter(d=>d.type==="space"),c=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=c}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(i){const e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){const e=this.rules.block.def.exec(i);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(i){var a;const e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=gc(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
602
+ `):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(const o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<t.length;o++)s.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:s.align[o]});for(const o of r)s.rows.push(gc(o,s.header.length).map((l,h)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[h]})));return s}}lheading(i){const e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){const e=this.rules.block.paragraph.exec(i);if(e){const t=e[1].charAt(e[1].length-1)===`
603
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(i){const e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){const e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){const e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){const e=this.rules.inline.link.exec(i);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const s=ds(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{const s=u5(e[2],"()");if(s===-2)return;if(s>-1){const o=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),vc(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(i,e){let t;if((t=this.rules.inline.reflink.exec(i))||(t=this.rules.inline.nolink.exec(i))){const n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[n.toLowerCase()];if(!r){const s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return vc(t,r,t[0],this.lexer,this.rules)}}emStrong(i,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(i);if(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const s=[...n[0]].length-1;let a,o,l=s,h=0;const c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*i.length+s);(n=c.exec(e))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&s%3&&!((s+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);const d=[...n[0]][0].length,f=i.slice(0,s+n.index+d+o);if(Math.min(s,o)%2){const v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}const m=f.slice(2,-2);return{type:"strong",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(i){const e=this.rules.inline.code.exec(i);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(i){const e=this.rules.inline.br.exec(i);if(e)return{type:"br",raw:e[0]}}del(i){const e=this.rules.inline.del.exec(i);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(i){const e=this.rules.inline.autolink.exec(i);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(i){var t;let e;if(e=this.rules.inline.url.exec(i)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let s;do s=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(s!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(i){const e=this.rules.inline.text.exec(i);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},on=class G0{constructor(e){ne(this,"tokens");ne(this,"options");ne(this,"state");ne(this,"tokenizer");ne(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Tr,this.options.tokenizer=this.options.tokenizer||new Ba,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:ei,block:fa.normal,inline:cs.normal};this.options.pedantic?(t.block=fa.pedantic,t.inline=cs.pedantic):this.options.gfm&&(t.block=fa.gfm,this.options.breaks?t.inline=cs.breaks:t.inline=cs.gfm),this.tokenizer.rules=t}static get rules(){return{block:fa,inline:cs}}static lex(e,t){return new G0(t).lex(e)}static lexInline(e,t){return new G0(t).inlineTokens(e)}lex(e){e=e.replace(ei.carriageReturn,`
604
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var r,s,a;for(this.options.pedantic&&(e=e.replace(ei.tabCharGlobal," ").replace(ei.spaceLine,""));e;){let o;if((s=(r=this.options.extensions)==null?void 0:r.block)!=null&&s.some(h=>(o=h.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);const h=t.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
605
+ `:t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);const h=t.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
606
+ `+o.raw,h.text+=`
607
+ `+o.text,this.inlineQueue.at(-1).src=h.text):t.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);const h=t.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
608
+ `+o.raw,h.text+=`
609
+ `+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let h=1/0;const c=e.slice(1);let d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(l=e.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){const h=t.at(-1);n&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=`
610
+ `+o.raw,h.text+=`
611
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):t.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);const h=t.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=`
612
+ `+o.raw,h.text+=`
613
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):t.push(o);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var o,l,h;let n=e,r=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let c;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(f=>(c=f.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);const f=t.at(-1);c.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,a)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let d=e;if((h=this.options.extensions)!=null&&h.startInline){let f=1/0;const m=e.slice(1);let v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},m),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=e.substring(0,f+1))}if(c=this.tokenizer.inlineText(d)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(a=c.raw.slice(-1)),s=!0;const f=t.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):t.push(c);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return t}},Pa=class{constructor(i){ne(this,"options");ne(this,"parser");this.options=i||Tr}space(i){return""}code({text:i,lang:e,escaped:t}){var s;const n=(s=(e||"").match(ei.notSpaceStart))==null?void 0:s[0],r=i.replace(ei.endingNewline,"")+`
614
+ `;return n?'<pre><code class="language-'+Gi(n)+'">'+(t?r:Gi(r,!0))+`</code></pre>
615
+ `:"<pre><code>"+(t?r:Gi(r,!0))+`</code></pre>
616
+ `}blockquote({tokens:i}){return`<blockquote>
617
+ ${this.parser.parse(i)}</blockquote>
618
+ `}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
619
+ `}hr(i){return`<hr>
620
+ `}list(i){const e=i.ordered,t=i.start;let n="";for(let a=0;a<i.items.length;a++){const o=i.items[a];n+=this.listitem(o)}const r=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+r+s+`>
621
+ `+n+"</"+r+`>
622
+ `}listitem(i){var t;let e="";if(i.task){const n=this.checkbox({checked:!!i.checked});i.loose?((t=i.tokens[0])==null?void 0:t.type)==="paragraph"?(i.tokens[0].text=n+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=n+" "+Gi(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(i.tokens,!!i.loose),`<li>${e}</li>
623
+ `}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
624
+ `}table(i){let e="",t="";for(let r=0;r<i.header.length;r++)t+=this.tablecell(i.header[r]);e+=this.tablerow({text:t});let n="";for(let r=0;r<i.rows.length;r++){const s=i.rows[r];t="";for(let a=0;a<s.length;a++)t+=this.tablecell(s[a]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
625
+ <thead>
626
+ `+e+`</thead>
627
+ `+n+`</table>
628
+ `}tablerow({text:i}){return`<tr>
629
+ ${i}</tr>
630
+ `}tablecell(i){const e=this.parser.parseInline(i.tokens),t=i.header?"th":"td";return(i.align?`<${t} align="${i.align}">`:`<${t}>`)+e+`</${t}>
631
+ `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Gi(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:t}){const n=this.parser.parseInline(t),r=mc(i);if(r===null)return n;i=r;let s='<a href="'+i+'"';return e&&(s+=' title="'+Gi(e)+'"'),s+=">"+n+"</a>",s}image({href:i,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));const r=mc(i);if(r===null)return Gi(t);i=r;let s=`<img src="${i}" alt="${t}"`;return e&&(s+=` title="${Gi(e)}"`),s+=">",s}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Gi(i.text)}},Bl=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},ln=class q0{constructor(e){ne(this,"options");ne(this,"renderer");ne(this,"textRenderer");this.options=e||Tr,this.options.renderer=this.options.renderer||new Pa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bl}static parse(e,t){return new q0(t).parse(e)}static parseInline(e,t){return new q0(t).parseInline(e)}parse(e,t=!0){var r,s;let n="";for(let a=0;a<e.length;a++){const o=e[a];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[o.type]){const h=o,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)){n+=c||"";continue}}const l=o;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;a+1<e.length&&e[a+1].type==="text";)h=e[++a],c+=`
632
+ `+this.renderer.text(h);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}parseInline(e,t=this.renderer){var r,s;let n="";for(let a=0;a<e.length;a++){const o=e[a];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[o.type]){const h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=h||"";continue}}const l=o;switch(l.type){case"escape":{n+=t.text(l);break}case"html":{n+=t.html(l);break}case"link":{n+=t.link(l);break}case"image":{n+=t.image(l);break}case"strong":{n+=t.strong(l);break}case"em":{n+=t.em(l);break}case"codespan":{n+=t.codespan(l);break}case"br":{n+=t.br(l);break}case"del":{n+=t.del(l);break}case"text":{n+=t.text(l);break}default:{const h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}},Zo,ya=(Zo=class{constructor(i){ne(this,"options");ne(this,"block");this.options=i||Tr}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?on.lex:on.lexInline}provideParser(){return this.block?ln.parse:ln.parseInline}},ne(Zo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Zo),G1=class{constructor(...i){ne(this,"defaults",Nl());ne(this,"options",this.setOptions);ne(this,"parse",this.parseMarkdown(!0));ne(this,"parseInline",this.parseMarkdown(!1));ne(this,"Parser",ln);ne(this,"Renderer",Pa);ne(this,"TextRenderer",Bl);ne(this,"Lexer",on);ne(this,"Tokenizer",Ba);ne(this,"Hooks",ya);this.use(...i)}walkTokens(i,e){var n,r;let t=[];for(const s of i)switch(t=t.concat(e.call(this,s)),s.type){case"table":{const a=s;for(const o of a.header)t=t.concat(this.walkTokens(o.tokens,e));for(const o of a.rows)for(const l of o)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{const a=s;t=t.concat(this.walkTokens(a.items,e));break}default:{const a=s;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{const l=a[o].flat(1/0);t=t.concat(this.walkTokens(l,e))}):a.tokens&&(t=t.concat(this.walkTokens(a.tokens,e)))}}return t}use(...i){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...a){let o=r.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){const r=this.defaults.renderer||new Pa(this.defaults);for(const s in t.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const a=s,o=t.renderer[a],l=r[a];r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c||""}}n.renderer=r}if(t.tokenizer){const r=this.defaults.tokenizer||new Ba(this.defaults);for(const s in t.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,o=t.tokenizer[a],l=r[a];r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c}}n.tokenizer=r}if(t.hooks){const r=this.defaults.hooks||new ya;for(const s in t.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const a=s,o=t.hooks[a],l=r[a];ya.passThroughHooks.has(s)?r[a]=h=>{if(this.defaults.async)return Promise.resolve(o.call(r,h)).then(d=>l.call(r,d));const c=o.call(r,h);return l.call(r,c)}:r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c}}n.hooks=r}if(t.walkTokens){const r=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),r&&(o=o.concat(r.call(this,a))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,e){return on.lex(i,e??this.defaults)}parser(i,e){return ln.parse(i,e??this.defaults)}parseMarkdown(i){return(t,n)=>{const r={...n},s={...this.defaults,...r},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=i);const o=s.hooks?s.hooks.provideLexer():i?on.lex:on.lexInline,l=s.hooks?s.hooks.provideParser():i?ln.parse:ln.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(h=>o(h,s)).then(h=>s.hooks?s.hooks.processAllTokens(h):h).then(h=>s.walkTokens?Promise.all(this.walkTokens(h,s.walkTokens)).then(()=>h):h).then(h=>l(h,s)).then(h=>s.hooks?s.hooks.postprocess(h):h).catch(a);try{s.hooks&&(t=s.hooks.preprocess(t));let h=o(t,s);s.hooks&&(h=s.hooks.processAllTokens(h)),s.walkTokens&&this.walkTokens(h,s.walkTokens);let c=l(h,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(h){return a(h)}}}onError(i,e){return t=>{if(t.message+=`
633
+ Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+Gi(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},vr=new G1;function je(i,e){return vr.parse(i,e)}je.options=je.setOptions=function(i){return vr.setOptions(i),je.defaults=vr.defaults,_1(je.defaults),je};je.getDefaults=Nl;je.defaults=Tr;je.use=function(...i){return vr.use(...i),je.defaults=vr.defaults,_1(je.defaults),je};je.walkTokens=function(i,e){return vr.walkTokens(i,e)};je.parseInline=vr.parseInline;je.Parser=ln;je.parser=ln.parse;je.Renderer=Pa;je.TextRenderer=Bl;je.Lexer=on;je.lexer=on.lex;je.Tokenizer=Ba;je.Hooks=ya;je.parse=je;je.options;je.setOptions;je.use;je.walkTokens;je.parseInline;ln.parse;on.lex;/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function xc(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=Array(e);t<e;t++)n[t]=i[t];return n}function p5(i){if(Array.isArray(i))return i}function m5(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n,r,s,a,o=[],l=!0,h=!1;try{if(s=(t=t.call(i)).next,e!==0)for(;!(l=(n=s.call(t)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(c){h=!0,r=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(h)throw r}}return o}}function g5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
634
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function v5(i,e){return p5(i)||m5(i,e)||x5(i,e)||g5()}function x5(i,e){if(i){if(typeof i=="string")return xc(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xc(i,e):void 0}}const q1=Object.entries,yc=Object.setPrototypeOf,y5=Object.isFrozen,W1=Object.getPrototypeOf,Y1=Object.getOwnPropertyDescriptor;let Rt=Object.freeze,$t=Object.seal,Dr=Object.create,X1=typeof Reflect<"u"&&Reflect,W0=X1.apply,Y0=X1.construct;Rt||(Rt=function(e){return e});$t||($t=function(e){return e});W0||(W0=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];return e.apply(t,r)});Y0||(Y0=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const nn=nt(Array.prototype.forEach),w5=nt(Array.prototype.lastIndexOf),wc=nt(Array.prototype.pop),us=nt(Array.prototype.push),b5=nt(Array.prototype.slice),k5=nt(Array.prototype.splice),Ur=Array.isArray,Ho=V1(Set),Uo=nt(Set.prototype.add),fs=nt(Set.prototype.has),lr=nt(String.prototype.toLowerCase),$o=nt(String.prototype.toString),bc=nt(String.prototype.match),ps=nt(String.prototype.replace),kc=nt(String.prototype.indexOf),T5=nt(String.prototype.trim),E5=nt(Number.prototype.toString),M5=nt(Boolean.prototype.toString),Tc=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),Ec=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),ai=nt(Object.prototype.hasOwnProperty),ms=nt(Object.prototype.toString),Ht=nt(RegExp.prototype.test),rn=V1(TypeError);function nt(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return W0(i,e,n)}}function V1(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Y0(i,t)}}function Be(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lr;if(yc&&yc(i,null),!Ur(e))return i;let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const s=t(r);s!==r&&(y5(e)||(e[n]=s),r=s)}i[r]=!0}return i}function S5(i){for(let e=0;e<i.length;e++)ai(i,e)||(i[e]=null);return i}function ui(i){const e=Dr(null);for(const n of q1(i)){var t=v5(n,2);const r=t[0],s=t[1];ai(i,r)&&(Ur(s)?e[r]=S5(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=ui(s):e[r]=s)}return e}function z5(i){switch(typeof i){case"string":return i;case"number":return E5(i);case"boolean":return M5(i);case"bigint":return Tc?Tc(i):"0";case"symbol":return Ec?Ec(i):"Symbol()";case"undefined":return ms(i);case"function":case"object":{if(i===null)return ms(i);const e=i,t=zi(e,"toString");if(typeof t=="function"){const n=t(e);return typeof n=="string"?n:ms(n)}return ms(i)}default:return ms(i)}}function zi(i,e){for(;i!==null;){const n=Y1(i,e);if(n){if(n.get)return nt(n.get);if(typeof n.value=="function")return nt(n.value)}i=W1(i)}function t(){return null}return t}function C5(i,e){for(;i!==null;){const t=Y1(i,e);if(t)return t.get?nt(t.get):null;i=W1(i)}return null}function N5(i){try{return Ht(i,""),!0}catch{return!1}}const Mc=Rt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Go=Rt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qo=Rt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L5=Rt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wo=Rt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),A5=Rt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sc=Rt(["#text"]),zc=Rt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Yo=Rt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Cc=Rt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),pa=Rt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_5=$t(/{{[\w\W]*|^[\w\W]*}}/g),R5=$t(/<%[\w\W]*|^[\w\W]*%>/g),D5=$t(/\${[\w\W]*/g),I5=$t(/^data-[\-\w.\u00B7-\uFFFF]+$/),O5=$t(/^aria-[\-\w]+$/),Nc=$t(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B5=$t(/^(?:\w+script|data):/i),P5=$t(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),F5=$t(/^html$/i),H5=$t(/^[a-z][.\w]*(-[.\w]+)+$/i),Xo=$t(/<[/\w!]/g),Lc=$t(/<[/\w]/g),U5=$t(/<\/no(script|embed|frames)/i),Ac=$t(/\/>/i),wt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$5=Rt(Be({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),G5=function(){return typeof window>"u"?null:window},q5=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},_c=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Nn=function(e,t,n,r){return ai(e,t)&&Ur(e[t])?Be(r.base?ui(r.base):{},e[t],r.transform):n},Vo=function(e,t,n){const r=ai(e,t)?e[t]:void 0;return r&&typeof r=="object"?ui(r):n()};function j1(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:G5();const e=q=>j1(q);if(e.version="3.4.17",e.removed=[],!i||!i.document||i.document.nodeType!==wt.document||!i.Element)return e.isSupported=!1,e;let t=i.document;const n=t,r=n.currentScript;i.DocumentFragment;const s=i.HTMLTemplateElement,a=i.Node,o=i.Element,l=i.NodeFilter;i.NamedNodeMap===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const h=i.DOMParser,c=i.trustedTypes,d=o.prototype,f=zi(d,"cloneNode"),m=zi(d,"remove"),v=zi(d,"removeAttributeNode"),g=zi(d,"nextSibling"),x=zi(d,"childNodes"),b=zi(d,"parentNode"),E=zi(d,"shadowRoot"),M=zi(d,"attributes"),z=a&&a.prototype?zi(a.prototype,"nodeType"):null,R=a&&a.prototype?zi(a.prototype,"nodeName"):null,O=a&&a.prototype?zi(a.prototype,"ownerDocument"):null,B=function(k){return z?z(k):k.nodeType},F=function(k){return R?R(k):k.nodeName},P=C5(d,"namespaceURI"),ee=function(k){return P?P(k):k.namespaceURI};if(typeof s=="function"){const q=t.createElement("template");q.content&&q.content.ownerDocument&&(t=q.content.ownerDocument)}let V,Y="",ie,Q=!1,oe=0;const de=function(){if(oe>0)throw rn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ge=function(k){de(),oe++;try{return V.createHTML(k)}finally{oe--}},Qe=function(k){de(),oe++;try{return V.createScriptURL(k)}finally{oe--}},di=function(){return Q||(ie=q5(c,r),Q=!0),ie},qe=t,st=qe.implementation,at=qe.createNodeIterator,We=qe.createDocumentFragment,zt=qe.getElementsByTagName,wi=n.importNode;let ue=_c();e.isSupported=typeof q1=="function"&&typeof b=="function"&&st&&st.createHTMLDocument!==void 0;const He=_5,Zi=R5,It=D5,ii=I5,dt=O5,bi=B5,he=P5,ve=H5;let Ai=Nc,Ie=null;const Ct=Be({},[...Mc,...Go,...qo,...Wo,...Sc]);let Ne=null;const Gt=Be({},[...zc,...Yo,...Cc,...pa]);let ot=Object.seal(Dr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),qt=null,jt=null;const lt=Object.seal(Dr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ki=!0,Nt=!0,ni=!1,yt=!0,_e=!1,Lt=!0,I=!1,G=!1,le=null,Ae=null,Le=!1,Me=!1,Ue=!1,Ze=!1,Ot=!0,mn=!1;const Un="user-content-";let $n=!0,Bi=!1,ri=null,Ti={},si=null;const Er=Be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Gn=null;const qn=Be({},["audio","video","img","source","image","track"]);let Pi=null;const Hs=Be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",Et="http://www.w3.org/1999/xhtml";let vn=Et,Mr=!1,Sr=null;const Wt=Be({},[Wn,gn,Et],$o),Yn=Rt(["mi","mo","mn","ms","mtext"]);let es=Be({},Yn);const Xn=Rt(["annotation-xml"]);let xn=Be({},Xn);const Us=Be({},["title","style","font","a","script"]);let yn=null;const ts=["application/xhtml+xml","text/html"],is="text/html";let tt=null,Fi=null;const $s=t.createElement("form"),Vn=function(k){return k instanceof RegExp||k instanceof Function},wn=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fi&&Fi===k)return;(!k||typeof k!="object")&&(k={}),k=ui(k),yn=ts.indexOf(k.PARSER_MEDIA_TYPE)===-1?is:k.PARSER_MEDIA_TYPE,tt=yn==="application/xhtml+xml"?$o:lr,Ie=Nn(k,"ALLOWED_TAGS",Ct,{transform:tt}),Ne=Nn(k,"ALLOWED_ATTR",Gt,{transform:tt}),Sr=Nn(k,"ALLOWED_NAMESPACES",Wt,{transform:$o}),Pi=Nn(k,"ADD_URI_SAFE_ATTR",Hs,{transform:tt,base:Hs}),Gn=Nn(k,"ADD_DATA_URI_TAGS",qn,{transform:tt,base:qn}),si=Nn(k,"FORBID_CONTENTS",Er,{transform:tt}),qt=Nn(k,"FORBID_TAGS",ui({}),{transform:tt}),jt=Nn(k,"FORBID_ATTR",ui({}),{transform:tt}),Ti=ai(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?ui(k.USE_PROFILES):k.USE_PROFILES:!1,ki=k.ALLOW_ARIA_ATTR!==!1,Nt=k.ALLOW_DATA_ATTR!==!1,ni=k.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=k.SAFE_FOR_TEMPLATES||!1,Lt=k.SAFE_FOR_XML!==!1,I=k.WHOLE_DOCUMENT||!1,Me=k.RETURN_DOM||!1,Ue=k.RETURN_DOM_FRAGMENT||!1,Ze=k.RETURN_TRUSTED_TYPE||!1,Le=k.FORCE_BODY||!1,Ot=k.SANITIZE_DOM!==!1,mn=k.SANITIZE_NAMED_PROPS||!1,$n=k.KEEP_CONTENT!==!1,Bi=k.IN_PLACE||!1,Ai=N5(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:Nc,vn=typeof k.NAMESPACE=="string"?k.NAMESPACE:Et,es=Vo(k,"MATHML_TEXT_INTEGRATION_POINTS",()=>Be({},Yn)),xn=Vo(k,"HTML_INTEGRATION_POINTS",()=>Be({},Xn));const N=Vo(k,"CUSTOM_ELEMENT_HANDLING",()=>Dr(null));if(ot=Dr(null),ai(N,"tagNameCheck")&&Vn(N.tagNameCheck)&&(ot.tagNameCheck=N.tagNameCheck),ai(N,"attributeNameCheck")&&Vn(N.attributeNameCheck)&&(ot.attributeNameCheck=N.attributeNameCheck),ai(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&(ot.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),$t(ot),_e&&(Nt=!1),Ue&&(Me=!0),Ti&&(Ie=Be({},Sc),Ne=Dr(null),Ti.html===!0&&(Be(Ie,Mc),Be(Ne,zc)),Ti.svg===!0&&(Be(Ie,Go),Be(Ne,Yo),Be(Ne,pa)),Ti.svgFilters===!0&&(Be(Ie,qo),Be(Ne,Yo),Be(Ne,pa)),Ti.mathMl===!0&&(Be(Ie,Wo),Be(Ne,Cc),Be(Ne,pa))),lt.tagCheck=null,lt.attributeCheck=null,ai(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?lt.tagCheck=k.ADD_TAGS:Ur(k.ADD_TAGS)&&(Ie===Ct&&(Ie=ui(Ie)),Be(Ie,k.ADD_TAGS,tt))),ai(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?lt.attributeCheck=k.ADD_ATTR:Ur(k.ADD_ATTR)&&(Ne===Gt&&(Ne=ui(Ne)),Be(Ne,k.ADD_ATTR,tt))),ai(k,"ADD_FORBID_CONTENTS")&&Ur(k.ADD_FORBID_CONTENTS)&&(si===Er&&(si=ui(si)),Be(si,k.ADD_FORBID_CONTENTS,tt)),$n&&(Ie["#text"]=!0),I&&Be(Ie,["html","head","body"]),Ie.table&&(Be(Ie,["tbody"]),delete qt.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=V;V=k.TRUSTED_TYPES_POLICY;try{Y=ge("")}catch($){throw V=U,$}}else k.TRUSTED_TYPES_POLICY===null?(V=void 0,Y=""):(V===void 0&&(V=di()),V&&typeof Y=="string"&&(Y=ge("")));Rt&&Rt(k),Fi=k},jn=Be({},[...Go,...qo,...L5]),bn=Be({},[...Wo,...A5]),Gs=function(k,N,U){return N.namespaceURI===Et?k==="svg":N.namespaceURI===Wn?k==="svg"&&(U==="annotation-xml"||es[U]):!!jn[k]},qs=function(k,N,U){return N.namespaceURI===Et?k==="math":N.namespaceURI===gn?k==="math"&&xn[U]:!!bn[k]},Ws=function(k,N,U){return N.namespaceURI===gn&&!xn[U]||N.namespaceURI===Wn&&!es[U]?!1:!bn[k]&&(Us[k]||!jn[k])},Ys=function(k){const N=ee(k),U=lr(F(k)),$=b(k);let ce,xe;return $&&B($)===wt.element?(ce={namespaceURI:ee($)},xe=lr(F($))):(ce={namespaceURI:vn},xe="template"),Sr[N]?N===gn?Gs(U,ce,xe):N===Wn?qs(U,ce,xe):N===Et?Ws(U,ce,xe):!!(yn==="application/xhtml+xml"&&Sr[N]):!1},Hi=function(k){us(e.removed,{element:k});try{b(k).removeChild(k)}catch{if(m(k),!b(k))throw rn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Xs=function(k,N,U){try{v(k,N)}catch{try{k.removeAttribute(U)}catch{}}},ns=function(k){Ji(k);const N=x(k);N&&nn(b5(N),$=>{try{m($)}catch{}});const U=B(k)===wt.element?M(k):null;if(U)for(let $=U.length-1;$>=0;--$){const ce=U[$],xe=ce&&ce.name;typeof xe=="string"&&Xs(k,ce,xe)}},_i=function(k,N,U){if(!U)try{U=N.getAttributeNode(k)}catch{U=null}us(e.removed,{attribute:U||null,from:N});try{U?v(N,U):N.removeAttribute(k)}catch{try{N.removeAttribute(k)}catch{}}if(k==="is")if(Me||Ue)try{Hi(N)}catch{}else try{N.setAttribute(k,"")}catch{}},rs=function(k){const N=M(k);if(N)for(let U=N.length-1;U>=0;--U){const $=N[U],ce=$&&$.name;typeof ce!="string"||Ne[tt(ce)]||Xs(k,$,ce)}},Qi=function(k,N){let U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const $=[k];for(;$.length>0;){const ce=$.pop();if(N(ce)===!1)continue;if(U&&B(ce)===wt.element){const Se=E(ce);Ri(Se)&&$.push(Se)}const xe=x(ce);if(xe)for(let Se=xe.length-1;Se>=0;--Se)$.push(xe[Se])}},Ji=function(k){Qi(k,N=>{B(N)===wt.element&&rs(N)})},Kn=function(k){const N=[];return Qi(k,U=>{N.push(U)},!0),N},lo=function(k,N){const U=Ho();nn(Kn(k),$=>{B($)===wt.element&&Uo(U,$)}),nn(N,$=>{B($)===wt.element&&!fs(U,$)&&rs($)})},ss=function(k,N){let U=!1;return nn(e.removed,$=>{$.element&&(U=U||$.element===k,Ji($.element))}),lo(k,N),U},as=8,Zn=function(k,N){const U=ri;let $=null;const ce=()=>($||($=Ho(),nn(N,xe=>{Uo($,xe)})),$);for(let xe=0;;xe++){const Se=Kn(k),ft=[k];let Mi=!1;if(nn(Se,Pt=>{B(Pt)===wt.documentFragment?us(ft,Pt):!Mi&&!fs(U,Pt)&&(Mi=fs(ce(),Pt))}),!Mi)return;if(xe>=as)throw rn("the tree kept changing during in-place sanitization; refusing to return it");nn(ft,(Pt,Yt)=>{Vs(Pt,Yt>0,k,ce())})}},Vs=function(k,N,U,$){const ce=er(k);let xe;for(;xe=ce.nextNode();)!fs($,xe)||fs(ri,xe)||(N&&y(ue.uponSanitizeShadowNode,xe,null),fe(xe,U),En(xe,U),Ri(xe.content)&&Ei(xe.content))},Bt=function(k){ri&&Uo(ri,k)},Qn=function(k,N){return Lt?k==="patchsrc"?!0:k==="for"&&N!=="label"&&N!=="output":!1},ho=function(k){Lt&&Qi(k,N=>{const U=B(N);if(U===wt.processingInstruction||U===wt.comment&&Ht(Lc,N.data)){try{m(N)}catch{}return!1}if(U===wt.element){const $=N,ce=tt(F(N));try{$.hasAttribute&&$.hasAttribute("patchsrc")&&$.removeAttribute("patchsrc"),$.hasAttribute&&$.hasAttribute("for")&&Qn("for",ce)&&$.removeAttribute("for")}catch{}}return!0})},Jn=function(k){let N=null,U=null;if(Le)k="<remove></remove>"+k;else{const xe=bc(k,/^[\r\n\t ]+/);U=xe&&xe[0]}yn==="application/xhtml+xml"&&vn===Et&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const $=V?ge(k):k;if(vn===Et)try{N=new h().parseFromString($,yn)}catch{}if(!N||!N.documentElement){N=st.createDocument(vn,"template",null);try{N.documentElement.innerHTML=Mr?Y:$}catch{}}const ce=N.body||N.documentElement;return k&&U&&ce.insertBefore(t.createTextNode(U),ce.childNodes[0]||null),vn===Et?zt.call(N,I?"html":"body")[0]:I?N.documentElement:ce},er=function(k){const N=O?O(k):k.ownerDocument;return at.call(N||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},kn=function(k){return k=ps(k,He," "),k=ps(k,Zi," "),k=ps(k,It," "),k},zr=function(k){var N;os(k);const U=(N=k.querySelectorAll)===null||N===void 0?void 0:N.call(k,"template");U&&nn(U,$=>{Ri($.content)&&zr($.content)})},os=function(k){k.normalize();const N=O?O(k):k.ownerDocument,U=at.call(N||k,k,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let $=U.nextNode();for(;$;)$.data=kn($.data),$=U.nextNode()},tr=function(k){const N=R?R(k):null;return typeof N!="string"||tt(N)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==M(k)||typeof k.removeAttribute!="function"||typeof k.removeAttributeNode!="function"||typeof k.getAttributeNode!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==z(k)||k.childNodes!==x(k)},Ri=function(k){if(!z||typeof k!="object"||k===null)return!1;try{return z(k)===wt.documentFragment}catch{return!1}},Tn=function(k){if(!z||typeof k!="object"||k===null)return!1;try{return typeof z(k)=="number"}catch{return!1}};function y(q,k,N){q.length!==0&&nn(q,U=>{U.call(e,k,N,Fi)})}const A=function(k,N){return!!(Lt&&k.hasChildNodes()&&!Tn(k.firstElementChild)&&Ht(Xo,k.textContent)&&Ht(Xo,k.innerHTML)||Lt&&$5[N]&&B(k)===wt.element&&ee(k)===Et&&(Tn(k.firstElementChild)||typeof k.textContent=="string"&&Ht(Xo,k.textContent))||k.nodeType===wt.processingInstruction||Lt&&k.nodeType===wt.comment&&Ht(Lc,k.data))},D=function(k,N){if(k instanceof RegExp)return Ht(k,N);if(k instanceof Function){for(var U=arguments.length,$=new Array(U>2?U-2:0),ce=2;ce<U;ce++)$[ce-2]=arguments[ce];return!!k(N,...$)}return!1},H=function(k,N,U){if(!qt[N]&&ut(N)&&D(ot.tagNameCheck,N))return!1;if($n&&!si[N]&&!si[lr(N)]){const $=b(k),ce=x(k);if(ce&&$){const xe=ce.length;for(let Se=xe-1;Se>=0;--Se){const ft=k===U?f(ce[Se],!0):ce[Se];$.insertBefore(ft,g(k))}}}return Hi(k),!0},te=function(k,N,U,$){return k.length===0?N:N===U||N===$?ui(N):N},se=function(k,N){return k===N||b(k)!==null?!1:(Bi&&Ji(k),!0)},fe=function(k,N){if(Bt(k),y(ue.beforeSanitizeElements,k,null),se(k,N))return!0;if(tr(k))return Hi(k),!0;const U=tt(F(k));if(Ie=te(ue.uponSanitizeElement,Ie,Ct,le),y(ue.uponSanitizeElement,k,{tagName:U,allowedTags:Ie}),se(k,N))return!0;if(A(k,U))return Hi(k),!0;if(qt[U]||!(lt.tagCheck instanceof Function&&lt.tagCheck(U))&&!Ie[U]){const $=H(k,U,N);return $===!1&&(y(ue.afterSanitizeElements,k,null),se(k,N))?!0:$}if(B(k)===wt.element&&!Ys(k)||(U==="noscript"||U==="noembed"||U==="noframes")&&Ht(U5,k.innerHTML))return Hi(k),!0;if(_e&&k.nodeType===wt.text){const $=kn(k.textContent);k.textContent!==$&&(us(e.removed,{element:k.cloneNode()}),k.textContent=$)}return y(ue.afterSanitizeElements,k,null),se(k,N)},De=function(k,N,U){if(jt[N]||Qn(N,k)||Ot&&(N==="id"||N==="name")&&(U in t||U in $s))return!1;const $=Ne[N]||lt.attributeCheck instanceof Function&&lt.attributeCheck(N,k);return Nt&&Ht(ii,N)||ki&&Ht(dt,N)?!0:$?Pi[N]||Ht(Ai,ps(U,he,""))||(N==="src"||N==="xlink:href"||N==="href")&&k!=="script"&&kc(U,"data:")===0&&Gn[k]||ni&&!Ht(bi,ps(U,he,""))?!0:!U:ut(k)&&D(ot.tagNameCheck,k)&&D(ot.attributeNameCheck,N,k)||N==="is"&&ot.allowCustomizedBuiltInElements&&D(ot.tagNameCheck,U)},we=Be({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ut=function(k){return!we[lr(k)]&&Ht(ve,k)},gt=function(k,N,U,$){if(V&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!U)switch(c.getAttributeType(k,N)){case"TrustedHTML":return ge($);case"TrustedScriptURL":return Qe($)}return $},vt=function(k,N,U,$){try{return U?k.setAttributeNS(U,N,$):k.setAttribute(N,$),tr(k)?(Hi(k),!1):!0}catch{return _i(N,k),!1}},en=function(k,N){return Lt&&Ht(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,N)?!0:lr(k)==="attributename"&&bc(N,"href")!==null},En=function(k,N){if(y(ue.beforeSanitizeAttributes,k,null),se(k,N))return;const U=k.attributes;if(!U||tr(k))return;Ne=te(ue.uponSanitizeAttribute,Ne,Gt,Ae);const $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let ce=U.length;const xe=tt(k.nodeName);for(;ce--;){const Se=U[ce],ft=Se.name,Mi=Se.namespaceURI,Pt=Se.value,Yt=tt(ft),Mn=Pt;let At=ft==="value"?Mn:T5(Mn),Cr=!1;if($.attrName=Yt,$.attrValue=At,$.keepAttr=!0,$.forceKeepAttr=void 0,y(ue.uponSanitizeAttribute,k,$),At=$.attrValue,mn&&(Yt==="id"||Yt==="name")&&kc(At,Un)!==0&&(_i(ft,k,Se),At=Un+At,Cr=!0),en(ft,At)){_i(ft,k,Se);continue}if(!$.forceKeepAttr){if(!$.keepAttr){_i(ft,k,Se);continue}if(!yt&&Ht(Ac,At)){_i(ft,k,Se);continue}if(_e&&(At=kn(At)),!De(xe,Yt,At)){_i(ft,k,Se);continue}At=gt(xe,Yt,Mi,At),At!==Mn&&vt(k,ft,Mi,At)&&Cr&&wc(e.removed)}}y(ue.afterSanitizeAttributes,k,null),se(k,N)},Ei=function(k){let N=null;const U=er(k);for(y(ue.beforeSanitizeShadowDOM,k,null);N=U.nextNode();)if(y(ue.uponSanitizeShadowNode,N,null),fe(N,k),En(N,k),Ri(N.content)&&Ei(N.content),B(N)===wt.element){const $=E(N);Ri($)&&(ir($),Ei($))}_e&&os(k),y(ue.afterSanitizeShadowDOM,k,null)},ir=function(k){const N=[{node:k,shadow:null}];for(;N.length>0;){const U=N.pop();if(U.shadow){Ei(U.shadow);continue}const $=U.node,ce=B($)===wt.element,xe=x($);if(xe)for(let Se=xe.length-1;Se>=0;--Se)N.push({node:xe[Se],shadow:null});if(ce){const Se=R?R($):null;if(typeof Se=="string"&&tt(Se)==="template"){const ft=$.content;Ri(ft)&&N.push({node:ft,shadow:null})}}if(ce){const Se=E($);Ri(Se)&&N.push({node:null,shadow:Se},{node:Se,shadow:null})}}};return e.sanitize=function(q){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,U=null,$=null,ce=null;if(Mr=!q,Mr&&(q="<!-->"),typeof q!="string"&&!Tn(q)&&(q=z5(q),typeof q!="string"))throw rn("dirty is not a string, aborting");if(!e.isSupported)return q;G?(Ie=le,Ne=Ae):wn(k),(ue.uponSanitizeElement.length>0||ue.uponSanitizeAttribute.length>0)&&(Ie=ui(Ie)),ue.uponSanitizeAttribute.length>0&&(Ne=ui(Ne)),e.removed=[];const xe=Bi&&typeof q!="string"&&Tn(q);let Se=[];const ft=ri;if(xe){ho(q);const Yt=F(q);if(typeof Yt=="string"){const Mn=tt(Yt);if(!Ie[Mn]||qt[Mn])throw ns(q),rn("root node is forbidden and cannot be sanitized in-place")}if(tr(q))throw ns(q),rn("root node is clobbered and cannot be sanitized in-place");Se=Kn(q),ri=Ho()}else if(Tn(q))N=Jn("<!---->"),U=N.ownerDocument.importNode(q,!0),U.nodeType===wt.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?N=U:N.appendChild(U),ir(N);else{if(!Me&&!_e&&!I&&q.indexOf("<")===-1)return V&&Ze?ge(q):q;if(N=Jn(q),!N)return Me?null:Ze?Y:""}N&&Le&&Hi(N.firstChild);const Mi=xe?q:N;try{xe&&ir(q);const Yt=er(Mi);for(;$=Yt.nextNode();)fe($,Mi),En($,Mi),Ri($.content)&&Ei($.content);xe&&Zn(q,Se)}catch(Yt){throw xe&&(ns(q),ss(q,Se)),Yt}finally{ri=ft}if(xe){if(ss(q,Se))throw rn("a node selected for removal could not be safely returned; refusing to sanitize in place");return _e&&zr(q),q}if(Me){if(_e&&zr(N),Ue)for(ce=We.call(N.ownerDocument);N.firstChild;)ce.appendChild(N.firstChild);else ce=N;return(Ne.shadowroot||Ne.shadowrootmode)&&(ce=wi.call(n,ce,!0)),ce}let Pt=I?N.outerHTML:N.innerHTML;return I&&Ie["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&Ht(F5,N.ownerDocument.doctype.name)&&(Pt="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
635
+ `+Pt),_e&&(Pt=kn(Pt)),V&&Ze?ge(Pt):Pt},e.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wn(q),G=!0,le=Ie,Ae=Ne},e.clearConfig=function(){Fi=null,G=!1,le=null,Ae=null,V=ie,Y=""},e.isValidAttribute=function(q,k,N){Fi||wn({});const U=tt(q),$=tt(k);return typeof N=="string"&&(en(k,N)||!yt&&Ht(Ac,N))?!1:De(U,$,N)},e.addHook=function(q,k){typeof k=="function"&&ai(ue,q)&&us(ue[q],k)},e.removeHook=function(q,k){if(ai(ue,q)){if(k!==void 0){const N=w5(ue[q],k);return N===-1?void 0:k5(ue[q],N,1)[0]}return wc(ue[q])}},e.removeHooks=function(q){ai(ue,q)&&(ue[q]=[])},e.removeAllHooks=function(){ue=_c()},e}var W5=j1();const jo=new Map,Y5=/!\[[^\]]*\]\(\s*<?([^)\s>]+)>?(?:\s+"[^"]*")?\s*\)/g,X5=/\$|\\[([]/,Rc=600,Rr=i=>i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),K1=(i,e)=>km.renderToString(i.trim(),{displayMode:e,output:"html",throwOnError:!1,strict:!1}),V5={name:"blockMath",level:"block",start:i=>i.search(/\$\$|\\\[/),tokenizer(i){const e=/^\$\$([\s\S]+?)\$\$[ \t]*(?:\n|$)/.exec(i)??/^\\\[([\s\S]+?)\\\][ \t]*(?:\n|$)/.exec(i);if(!(!e||!e[1].trim()))return{type:"blockMath",raw:e[0],tex:e[1],display:!0}},renderer:i=>K1(i.tex,!0)},j5={name:"inlineMath",level:"inline",start:i=>i.search(/\$|\\[([]/),tokenizer(i){const e=/^\$\$(?!\$)([\s\S]+?)\$\$/.exec(i)??/^\\\[([\s\S]+?)\\\]/.exec(i);if(e&&e[1].trim())return{type:"inlineMath",raw:e[0],tex:e[1],display:!0};const t=/^\\\(([\s\S]+?)\\\)/.exec(i);if(t&&t[1].trim())return{type:"inlineMath",raw:t[0],tex:t[1],display:!1};if(i[0]==="$"&&i[1]&&!/[\s$]/.test(i[1]))for(let n=1;n<i.length;n++){const r=i[n];if(r==="\\"){n++;continue}if(r===`
636
+ `&&i[n+1]===`
637
+ `)break;if(r==="$"){const s=i[n-1],a=i[n+1]??"";if(!/\s/.test(s)&&a!=="$"&&!/[0-9]/.test(a))return{type:"inlineMath",raw:i.slice(0,n+1),tex:i.slice(1,n),display:!1};break}}},renderer:i=>K1(i.tex,i.display)};function K5(i,e=!1){const t=a=>{const o=/^([a-z][a-z0-9+.-]*:|[\\/])/i.test(a);if(e){if(/^data:image\/(?:png|jpeg|gif|webp);base64,[\w+/=]+$/i.test(a))return a;if(o||!i)return"";const l=new URL(a,location.origin+i);return l.origin===location.origin&&l.pathname.startsWith(i)?l.href:""}return o?a:i+a.replace(/^\.\//,"")},n=new Map,r=new G1({gfm:!0,extensions:[V5,j5],renderer:{html({raw:a}){return e?Rr(a):!1},link({href:a,tokens:o}){if(!e)return!1;const l=this.parser.parseInline(o);return/^(https?:\/\/|mailto:)/i.test(a)?`<a href="${Rr(a)}" target="_blank" rel="noopener noreferrer">${l}</a>`:l},code({lang:a,text:o}){if((a==null?void 0:a.trim().toLowerCase())!=="mermaid")return!1;const l=n.get(o);return`<div class="ink-diagram">${l?`<div class="ink-diagram-viewport"><img class="ink-diagram-image" src="${l.src}" width="${l.width}" height="${l.height}" data-natural-width="${l.naturalWidth}" data-natural-height="${l.naturalHeight}" alt="Mermaid"></div>`:`<pre class="ink-diagram-error"><code>${Rr(o)}</code></pre>`}<div class="ink-diagram-bar">${l?'<button type="button" class="ink-diagram-zoom"></button>':""}<button type="button" class="ink-diagram-edit"></button></div></div>`},image({href:a,title:o,text:l}){const h=t(a);if(!h)return`<span>${Rr(l||a)}</span>`;const c=jo.get(h),d=Number(o)||Math.min((c==null?void 0:c.width)??Rc,Rc),f=c?Math.round(c.height*d/c.width):void 0;return`<img src="${Rr(h)}" alt="${Rr(l)}" width="${d}"${f?` height="${f}"`:""}>`}}});let s;return{render(a){const o=r.parse(a,{async:!1});return e?W5.sanitize(o):o},async preload(a){const o=new Set,l=new Set;let h=!1;for(const c of a){!h&&X5.test(c)&&(h=!0);for(const d of c.matchAll(Y5)){const f=t(d[1]);f&&o.add(f)}/mermaid/i.test(c)&&r.walkTokens(r.lexer(c),d=>{var f;d.type==="code"&&((f=d.lang)==null?void 0:f.trim().toLowerCase())==="mermaid"&&l.add(d.text)})}h&&typeof document<"u"&&document.fonts&&(s??(s=Promise.all(["1em KaTeX_Main","italic 1em KaTeX_Math","1em KaTeX_Size1","1em KaTeX_AMS"].map(c=>document.fonts.load(c).catch(()=>{}))))),await Promise.all([s,...[...l].map(async c=>{if(!n.get(c)){const d=await _m(c);d&&n.set(c,d)}}),...[...o].filter(c=>!jo.has(c)).map(c=>new Promise(d=>{const f=new Image;f.onload=()=>{jo.set(c,{width:f.naturalWidth,height:f.naturalHeight}),d()},f.onerror=()=>d(),f.src=c}))])}}}const sn=i=>document.querySelector(i),Z5=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function Q5(i,e,t){const n=new RegExp(Z5(e),"gi");return n.test(i)?i.replace(n,()=>t):null}function J5({mindMap:i,pro:e,showToast:t,rewrite:n,onReplace:r}){const s=sn("#search"),a=sn("#find-input"),o=sn("#replace-input"),l=sn("#find-count");let h=[],c=-1;function d(z){const R=z.toLowerCase(),O=[],B=F=>{(y0(Ii(F.data)).toLowerCase().includes(R)||Ii(F.data).toLowerCase().includes(R))&&O.push(String(F.data.uid)),(F.children??[]).forEach(B)};return R&&B(i.renderer.renderTree),O}function f(){l.textContent=a.value?h.length?`${c+1}/${h.length}`:J("noResults"):""}function m(){const z=h[c];if(!z)return f();i.renderer.expandToNodeUid(z,()=>{const R=i.renderer.findNodeByUid(z);R&&(i.execCommand("CLEAR_ACTIVE_NODE"),R.active(),i.renderer.moveNodeToCenter(R,!1))}),f()}function v(z=!1){h=d(a.value),c=h.length?z?Math.min(Math.max(c,0),h.length-1):0:-1,m()}function g(z){if(!h.length)return v();c=(c+z+h.length)%h.length,m()}function x(){s.hidden=!1;const z=i.renderer.activeNodeList[0];!a.value&&z&&(a.value=y0(Ii(z.getData())).slice(0,60)),a.focus(),a.select(),v()}function b(){s.hidden=!0,a.blur(),o.blur()}async function E(z){if(!e.allow("replace"))return;const R=a.value;if(!R)return a.focus();const O=z?void 0:h[c];if(!z&&!O)return;const B=await n(F=>Q5(F,R,o.value),O);B>0&&(r==null||r()),t(J("replaced",{n:B})),v(!z)}let M=0;return a.addEventListener("input",()=>{clearTimeout(M),M=window.setTimeout(()=>v(),150)}),a.addEventListener("keydown",z=>{z.key==="Enter"&&g(z.shiftKey?-1:1),z.key==="Escape"&&b()}),o.addEventListener("keydown",z=>{z.key==="Enter"&&E(z.metaKey||z.ctrlKey),z.key==="Escape"&&b()}),sn("#find-prev").addEventListener("click",()=>g(-1)),sn("#find-next").addEventListener("click",()=>g(1)),sn("#replace-one").addEventListener("click",()=>E(!1)),sn("#replace-all").addEventListener("click",()=>E(!0)),sn("#find-close").addEventListener("click",b),{open:x,close:b,isOpen:()=>!s.hidden}}const wa='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',Ko=[{id:"logicalStructure",pro:!1},{id:"mindMap",pro:!1},{id:"logicalStructureLeft",pro:!0},{id:"organizationStructure",pro:!0},{id:"catalogOrganization",pro:!0},{id:"timeline",pro:!0},{id:"timeline2",pro:!0},{id:"verticalTimeline",pro:!0},{id:"fishbone",pro:!0}],ma=[{id:"classic",pro:!1,dark:!1,palette:{background:"#f5f6f7",line:"#5b7fd4",root:"#4e83fd",rootText:"#fff",card:"#fff",text:"#1f2329",border:"#dee0e3",second:"#5b7fd4"}},{id:"mint",pro:!0,dark:!1,palette:{background:"#f3f8f6",line:"#2f9e7a",root:"#1f8a68",rootText:"#fff",card:"#fff",text:"#1d2b26",border:"#d5e6df",second:"#2f9e7a"}},{id:"sunset",pro:!0,dark:!1,palette:{background:"#fbf6f1",line:"#e07a3f",root:"#d9622b",rootText:"#fff",card:"#fff",text:"#2d221b",border:"#eedfd2",second:"#e07a3f"}},{id:"dusk",pro:!0,dark:!0,palette:{background:"#1b1e24",line:"#6f8fe8",root:"#4e83fd",rootText:"#fff",card:"#262a32",text:"#e6e8eb",border:"#3a3f49",second:"#6f8fe8"}}],e7=i=>`layout.${i}`,t7=i=>`theme.${i}`;function Dc({palette:i}){return{backgroundColor:i.background,lineStyle:"straight",lineRadius:6,lineWidth:1.5,lineColor:i.line,generalizationLineColor:i.line,rootLineKeepSameInCurve:!1,paddingX:12,paddingY:6,root:{fillColor:i.root,color:i.rootText,fontSize:18,fontWeight:"bold",fontFamily:wa,borderWidth:0,borderRadius:8,marginX:80,marginY:24},second:{fillColor:i.card,color:i.text,fontSize:15,fontWeight:"bold",fontFamily:wa,borderColor:i.second,borderWidth:1.5,borderRadius:6,marginX:60,marginY:16},node:{fillColor:i.card,color:i.text,fontSize:14,fontFamily:wa,borderColor:i.border,borderWidth:1,borderRadius:6,marginX:50,marginY:12}}}function Ic(i){const e=document.documentElement.style,t=i.palette;e.setProperty("--ink-bg",t.background),e.setProperty("--ink-text",t.text),e.setProperty("--ink-card",t.card),e.setProperty("--ink-border",t.border),e.setProperty("--ink-accent",t.line),document.documentElement.dataset.theme=i.id,document.documentElement.classList.toggle("dark",i.dark)}const Z1=li;Z1.usePlugin(Sd).usePlugin(Nd).usePlugin(Cd).usePlugin(zd).usePlugin(Ed);const Oc=3,i7=400,Bc=40,Ee=i=>document.querySelector(i),Q1=document.createElement("style");Q1.textContent=Id;document.head.append(Q1);async function n7(i){var zr,os,tr,Ri,Tn;let e=null;try{e=localStorage.getItem("inkmap.language")}catch{}const t=Fa(i.locale);Fl(e==="zh"||e==="en"?e:t),ba();const n=Ee("#status"),r=Ee("#toast"),s=Ee("#source"),a=Ee("#source-text"),o=Ee("#node-inline-edit"),l=Ee("#diagram-modal"),h=Ee("#diagram-modal-stage"),c=Ee("#diagram-modal-world"),d=Ee("#diagram-modal-img"),f=Ee("#diagram-zoom-level");let m=0,v=0,g=1,x=0,b=0,E=null;function M(y){return Math.max(.15,Math.min(8,y))}function z(){const y=x-m*g/2,A=b-v*g/2;c.style.transform=`translate(${y}px, ${A}px) scale(${g})`,f.textContent=`${Math.round(g*100)}%`}function R(y,A){const D=h.getBoundingClientRect();return{x:y-D.left-D.width/2,y:A-D.top-D.height/2}}function O(y,A,D){const{x:H,y:te}=R(y,A),se=M(D),fe=se/g;x=H-(H-x)*fe,b=te-(te-b)*fe,g=se,z()}function B(y,A,D){const H=h.getBoundingClientRect();O(A??H.left+H.width/2,D??H.top+H.height/2,g*y)}function F(){const y=h.getBoundingClientRect(),A=48,D=Math.max(120,y.width-A),H=Math.max(120,y.height-A);g=M(Math.min(1,D/m,H/v)),x=0,b=0,z()}function P(){g=1,x=0,b=0,z()}function ee(y){m=Number(y.dataset.naturalWidth)||y.naturalWidth||y.width||600,v=Number(y.dataset.naturalHeight)||y.naturalHeight||y.height||400,d.src=y.src,d.style.width=`${m}px`,d.style.height=`${v}px`,l.hidden=!1,h.focus({preventScroll:!0}),requestAnimationFrame(F)}const V=()=>{E=null,h.classList.remove("is-panning"),l.hidden=!0;try{document.body.focus({preventScroll:!0})}catch{}};Ee("#diagram-zoom-in").addEventListener("click",()=>B(1.25)),Ee("#diagram-zoom-out").addEventListener("click",()=>B(1/1.25)),Ee("#diagram-zoom-fit").addEventListener("click",F),Ee("#diagram-zoom-reset").addEventListener("click",P),Ee("#diagram-modal-close").addEventListener("click",V),h.addEventListener("wheel",y=>{if(l.hidden)return;if(y.preventDefault(),y.ctrlKey||y.metaKey){const D=Math.exp(-y.deltaY*.01);O(y.clientX,y.clientY,g*D);return}const A=y.deltaMode===1?16:y.deltaMode===2?h.clientHeight:1;x-=y.deltaX*A,b-=y.deltaY*A,z()},{passive:!1}),h.addEventListener("pointerdown",y=>{y.button!==0&&y.button!==1||(E={pointerId:y.pointerId,x:y.clientX,y:y.clientY,tx:x,ty:b},h.classList.add("is-panning"),h.setPointerCapture(y.pointerId))}),h.addEventListener("pointermove",y=>{!E||y.pointerId!==E.pointerId||(x=E.tx+(y.clientX-E.x),b=E.ty+(y.clientY-E.y),z())});const Y=y=>{!E||y.pointerId!==E.pointerId||(E=null,h.classList.remove("is-panning"))};h.addEventListener("pointerup",Y),h.addEventListener("pointercancel",Y),h.addEventListener("dblclick",y=>{y.target.closest(".diagram-modal-bar")||B(g>=2.5?1/g:1.6,y.clientX,y.clientY)}),window.addEventListener("keydown",y=>{if(l.hidden)return;const A=(D,H)=>{x+=D,b+=H,z()};if(y.key==="Escape"){y.preventDefault(),y.stopPropagation(),V();return}y.key==="+"||y.key==="="?(y.preventDefault(),y.stopPropagation(),B(1.25)):y.key==="-"||y.key==="_"?(y.preventDefault(),y.stopPropagation(),B(1/1.25)):y.key==="0"?(y.preventDefault(),y.stopPropagation(),P()):y.key==="1"||y.key==="f"||y.key==="F"?(y.preventDefault(),y.stopPropagation(),F()):y.key==="ArrowLeft"?(y.preventDefault(),y.stopPropagation(),A(48,0)):y.key==="ArrowRight"?(y.preventDefault(),y.stopPropagation(),A(-48,0)):y.key==="ArrowUp"?(y.preventDefault(),y.stopPropagation(),A(0,48)):y.key==="ArrowDown"&&(y.preventDefault(),y.stopPropagation(),A(0,-48))},!0);let ie=await i.load();const{saveTarget:Q,compact:oe,restrictAssets:de}=i.capabilities,ge=K5(i.assetBase,de);document.documentElement.classList.toggle("ink-sidebar",!!oe),n.setAttribute("role","status");let Qe,di=ie.md,qe=Promise.resolve(),st=0,at=null;const We=()=>ie.writable===!1,zt=(y,A)=>{n.dataset.state=y,n.textContent=A};let wi=0;const ue=y=>{r.textContent=y,r.hidden=!1,clearTimeout(wi),wi=window.setTimeout(()=>r.hidden=!0,4e3)},He=await E4(i,ue);async function Zi(y,A){const D=y4(y,ie.name),{root:H,...te}=D;Qe=te;const se=[],fe=De=>(se.push(De.md),De.children.forEach(fe));return fe(H),await ge.preload(se),Ad(H,A)}const It=y=>{var A;return y.startsWith(`---
638
+ `)?((A=y.match(/^---\n[\s\S]*?\n---\n/))==null?void 0:A[0])??"":""};function ii(y){const A=It(y),D=Ko.find(H=>H.id===Eh(A,"layout"));return D&&(!D.pro||He.isPro())?D.id:/^\s*layout:\s*["']?(two-sided|mindMap)/m.test(A)?"mindMap":"logicalStructure"}function dt(y){const A=ma.find(D=>D.id===Eh(It(y),"theme"));return A&&(!A.pro||He.isPro())?A:ma[0]}const bi=y=>{var A;return((A=y.match(/^---\n[\s\S]*?^title:\s*["']?(.+?)["']?\s*$/m))==null?void 0:A[1])??ie.name};let he=bi(ie.md);document.title=`${he} · Inkmap`;let ve=dt(ie.md);Ic(ve);const Ai=(zr=ie.viewState)==null?void 0:zr.folds;let Ie=(os=ie.viewState)==null?void 0:os.view,Ct=!1,Ne,Gt=!1;i.onExternalChange(y=>{Gt||(Ne=y)});const ot=Ee("#map"),qt=new Set,jt=ot.getBoundingClientRect.bind(ot);let lt=!1;{const y=jt();lt=y.width>=160&&y.height>=160}ot.getBoundingClientRect=()=>{const y=jt();if(y.width>=160&&y.height>=160)return y;const A=window.innerWidth>=160?window.innerWidth:960,D=window.innerHeight>=160?window.innerHeight:720;return new DOMRect(0,0,A,D)};const ki=await Zi(ie.md,(y,A)=>A===0?!0:(Ai==null?void 0:Ai[y.join("\0")])??A<Oc);{const y=jt();y.width>=160&&y.height>=160&&(lt=!0)}document.body.tabIndex=-1,document.body.style.outline="none";const Nt=Ee("#node-menu"),ni=Ee("#export-menu");let yt=[];const _e=()=>{Nt.hidden=!0,ni.hidden=!0,yt=[]},Lt=y=>{if(!(y instanceof Element)||y.classList.contains("smm-node-edit-wrap"))return!1;const A=y.tagName;return A==="INPUT"||A==="TEXTAREA"||A==="SELECT"||A==="BUTTON"||A==="A"?!0:y.isContentEditable===!0},I=new Z1({el:ot,readonly:We(),data:ki,layout:ii(ie.md),fit:!Ie,nodeTextEditZIndex:5,enableShortcutOnlyWhenMouseInSvg:!1,enableAutoEnterTextEditWhenKeydown:!0,customCheckEnableShortcut:y=>{if(!l.hidden||document.documentElement.classList.contains("presenting"))return!1;const A=document.getElementById("upgrade");if(A&&!A.hidden)return!1;const D=document.getElementById("account-panel");return!(D&&!D.hidden||Lt(y.target)||Lt(document.activeElement))},beforeShortcutRun:()=>(_e(),!1),defaultInsertSecondLevelNodeText:J("newTopic"),defaultInsertBelowSecondLevelNodeText:J("newTopic"),isShowCreateChildBtnIcon:!1,isUseCustomNodeContent:!0,customCreateNodeContent(y){const A=y.getData();if(!A.rich)return null;const D=document.createElement("div");return D.className=`ink-node depth-${Math.min(y.layerIndex,2)}`,D.innerHTML=ge.render(A.md),D.querySelectorAll(".ink-diagram-viewport").forEach(H=>{H.addEventListener("wheel",te=>{if(te.ctrlKey||te.metaKey)return;const se=H.scrollHeight>H.clientHeight+1,fe=H.scrollWidth>H.clientWidth+1;if(!se&&!fe)return;const De=H.scrollTop<=0&&te.deltaY<0,we=H.scrollTop+H.clientHeight>=H.scrollHeight-1&&te.deltaY>0,ut=H.scrollLeft<=0&&te.deltaX<0,gt=H.scrollLeft+H.clientWidth>=H.scrollWidth-1&&te.deltaX>0;(se&&!(De||we)||fe&&!(ut||gt))&&te.stopPropagation()},{passive:!0})}),D.querySelectorAll(".ink-diagram-image").forEach(H=>{var te;H.dataset.trackedRender||(H.dataset.trackedRender="1",(te=i.track)==null||te.call(i,"diagram_render")),H.addEventListener("pointerdown",se=>se.stopPropagation()),H.addEventListener("click",se=>{se.stopPropagation(),ee(H)})}),D.querySelectorAll(".ink-diagram-zoom").forEach(H=>{H.textContent=J("zoomDiagram"),H.addEventListener("pointerdown",te=>te.stopPropagation()),H.addEventListener("click",te=>{var fe;te.stopPropagation();const se=(fe=H.closest(".ink-diagram"))==null?void 0:fe.querySelector(".ink-diagram-image");se&&ee(se)})}),D.querySelectorAll(".ink-diagram-edit").forEach((H,te)=>{var fe,De;const se=!!((De=(fe=H.parentElement)==null?void 0:fe.parentElement)!=null&&De.querySelector(".ink-diagram-error"));se&&jt().width>0&&!qt.has(A.md)&&(qt.add(A.md),ge.preload([A.md]).then(()=>{I.reRender()})),H.hidden=We(),H.textContent=J(se?"diagramInvalid":"editDiagram"),H.addEventListener("pointerdown",we=>we.stopPropagation()),H.addEventListener("click",we=>{var vt;we.stopPropagation(),$n(y);const gt=[...a.value.matchAll(/^ {0,3}(`{3,}|~{3,})[ ]*mermaid[ ]*$/gim)][te];if((gt==null?void 0:gt.index)!==void 0){const en=gt.index+gt[0].length+1,Ei=(vt=new RegExp("^ {0,3}"+gt[1][0]+"{"+gt[1].length+",}[ ]*$","m").exec(a.value.slice(en)))==null?void 0:vt.index;a.setSelectionRange(en,Ei===void 0?a.value.length:en+Ei)}})}),D},themeConfig:Dc(ve),expandBtnStyle:{color:ve.palette.line,fill:ve.palette.card,fontSize:12,strokeColor:ve.palette.line},exportPaddingX:Bc,exportPaddingY:Bc,handleBeingExportSvg:y=>(y.node.querySelectorAll(".ink-diagram-bar, .ink-diagram-edit").forEach(A=>A.remove()),y.node.querySelectorAll(".ink-diagram-viewport").forEach(A=>{A.style.maxHeight="none",A.style.maxWidth="none",A.style.overflow="visible"}),y.node.insertAdjacentHTML("afterbegin",`<style>${Xs()}</style>`),y),demonstrateConfig:{boxShadowColor:"rgba(0, 0, 0, 0.75)",borderColor:ve.palette.line,padding:24,margin:60}}),G=()=>Th(ra(Qe,I.getData(!1)));let le=G();const Ae=()=>{if(We())return J("readOnly");switch(Q){case"copy":return J("savedInCopy");case"file":return J("saved");case"editor":return J("synced")}};zt("saved",Ae());function Le(){clearTimeout(st),!We()&&G()!==le&&(zt("pending",J("pending")),st=window.setTimeout(()=>qe=qe.then(Me),i7))}async function Me(){if(We())return;const y=G();if(y===le)return zt("saved",Ae());zt("saving",J("saving"));try{const A=await i.save(y,ie.version);A.ok?(di=y,le=y,ie={...ie,md:y,version:A.version},G()===le?zt("saved",Ae()):Le()):(await Ot(A.doc),ue(J("conflict")))}catch(A){zt("error",J("saveFailed")),ue(String(A instanceof Error?A.message:A))}}async function Ue(){clearTimeout(st),st=0,await(qe=qe.then(Me))}async function Ze(y,A){var te;Pi(!1),he=bi(y),document.title=`${he} · Inkmap`;const D=Rd(I.getData(!1)),H=await Zi(y,(se,fe)=>D.get(se.join("\0"))??fe<Oc);Bi(),I.updateData(H),qs(y),A&&((te=i.onMapMarkdownChange)==null||te.call(i,G()),Le())}async function Ot(y){if(y.name===ie.name&&y.md===di&&y.writable===ie.writable){ie=y;return}ie=y,di=y.md,I.setMode(We()?"readonly":"edit"),await Ze(y.md,!1),le=G(),clearTimeout(st),zt("saved",Ae())}if(Gt=!0,Ne){const y=Ne;Ne=void 0,qe=qe.then(()=>Ot(y)).catch(()=>{})}I.on("data_change",()=>{var y;(y=i.onMapMarkdownChange)==null||y.call(i,G()),Le()}),i.onExternalChange(y=>{const A=y.name!==ie.name;A&&clearTimeout(st),qe=qe.then(async()=>{const D=!A&&G()!==le&&y.md!==di;await Ot(y),D&&ue(J("conflict"))}).catch(D=>ue(String(D instanceof Error?D.message:D)))});const mn=new WeakMap;async function Un(y,A){const D={};mn.set(y,D),await ge.preload([A]),mn.get(y)===D&&I.renderer.setNodeDataRender(y,b0(A))}I.on("hide_text_edit",(y,A,D)=>{const H=String((D==null?void 0:D.getData("text"))??"");D&&Ld(H)&&Un(D,H),Et()});function $n(y,A=!0){at=y,s.hidden=!1,a.value=Ii(y.getData()),a.readOnly=We(),A&&a.focus()}function Bi(){at=null,s.hidden=!0,a.blur(),Et()}const ri=new WeakMap;a.addEventListener("input",()=>{const y=at;if(!y)return;clearTimeout(ri.get(y)),mn.delete(y);const A=a.value.replace(/\n+$/,"");ri.set(y,window.setTimeout(()=>void Un(y,A),250))}),a.addEventListener("keydown",y=>{y.key==="Escape"&&Bi()});let Ti=null,si="",Er=!1;function Gn(){if(!Ti)return;const y=Ti.group.node;if(!y.isConnected)return Pi(!1);const A=y.getBoundingClientRect(),D=Math.max(1,innerWidth-16),H=Math.max(36,innerHeight-24),te=Math.min(D,Math.max(A.width,180)),se=si.includes(`
639
+ `)||o.value.includes(`
640
+ `);o.style.width=`${te}px`,o.style.height="auto";const fe=Math.max(A.height,o.scrollHeight+2,se?88:34),De=Math.min(H,fe);o.style.height=`${De}px`,o.style.left=`${Math.max(8,Math.min(A.left,innerWidth-te-8))}px`,o.style.top=`${Math.max(8,Math.min(A.top,innerHeight-De-8))}px`}function qn(y){if(!y||We())return;Pi(!0);const A=at===y?a.value:Ii(y.getData());if(Bi(),Ti=y,si=Ii(y.getData()),Er=/^\d+\\[.)]\s/.test(A),o.value=Er?A.replace(/^(\d+)\\([.)])/,"$1$2"):A,o.setAttribute("aria-label",J("editNode")),o.hidden=!1,Gn(),o.focus({preventScroll:!0}),si.includes(`
641
+ `)||o.value.length>80){const D=o.value.length;o.setSelectionRange(D,D)}else o.select()}function Pi(y){const A=Ti;if(!A)return;Ti=null,o.hidden=!0;const D=o.value.replace(/\n+$/,""),H=Er?D.replace(/^(\d+)([.)])(?=\s)/,"$1\\$2"):D;y&&!We()&&H!==si&&(clearTimeout(ri.get(A)),Un(A,H)),Et()}o.addEventListener("blur",()=>Pi(!0)),o.addEventListener("input",Gn),o.addEventListener("keydown",y=>{if(y.stopPropagation(),y.isComposing)return;const A=si.includes(`
642
+ `)||o.value.includes(`
643
+ `),D=y.key==="Enter"&&(y.metaKey||y.ctrlKey||!y.shiftKey&&!A)||y.key==="Tab"&&!A;(D||y.key==="Escape")&&(y.preventDefault(),Pi(D))});for(const y of["scale","translate","node_tree_render_end"])I.on(y,Gn);window.addEventListener("resize",Gn),I.on("node_dblclick",y=>{!y.getData("rich")||We()||qn(y)}),I.on("node_active",(y,A)=>{s.hidden||(A.length===1?$n(A[0],!1):a.value="")});async function Hs(y,A){if(We())return 0;const D=I.getData(!1);let H=0;const te=se=>{if(!A||se.data.uid===A){const fe=y(Ii(se.data));fe!==null&&fe!==Ii(se.data)&&(Object.assign(se.data,b0(fe)),H++)}(se.children??[]).forEach(te)};return te(D),H&&await Ze(Th(ra(Qe,D)),!0),H}function Wn(){const y=new Map,{lines:A}=x0(ra(Qe,I.getData(!1),y)),D=new Map;for(const[H,te]of A){const se=y.get(H);se&&D.set(se,te)}return D}let gn=!1;const Et=()=>{var A;const y=document.activeElement;if(y&&y!==document.body&&!y.classList.contains("smm-node-edit-wrap")&&y!==o&&typeof y.blur=="function"&&y.blur(),document.activeElement!==o&&!((A=document.activeElement)!=null&&A.classList.contains("smm-node-edit-wrap")))try{window.focus(),document.body.focus({preventScroll:!0})}catch{}};I.on("node_mousedown",Et),I.on("svg_mousedown",Et),i.select&&I.on("node_click",y=>{if(Et(),gn)return;const A=Wn().get(y.getData("uid"));if(A!==void 0){const D=Us([y]);i.select(A,(D==null?void 0:D.endLine)??A)}}),(tr=i.onReveal)==null||tr.call(i,y=>{let A,D=-1;for(const[te,se]of Wn())se<=y&&se>D&&([A,D]=[te,se]);if(!A)return;const H=A;I.renderer.expandToNodeUid(H,()=>{var se;const te=I.renderer.findNodeByUid(H);te&&(gn=!0,((se=I.renderer.activeNodeList[0])==null?void 0:se.getData("uid"))!==H&&(I.renderer.clearActiveNodeList(),te.active()),gn=!1,I.resize(),I.renderer.moveNodeToCenter(te,!1))})});const vn=()=>{const y=I.renderer.activeNodeList;s.hidden?y.length===1?$n(y[0]):ue(J("selectNode")):Bi()};I.keyCommand.addShortcut("Control+e",vn),I.keyCommand.addShortcut("F2",()=>{const y=I.renderer.activeNodeList;y.length===1&&y[0].getData("rich")&&qn(y[0])}),I.keyCommand.addShortcut("Enter",()=>{var A,D;const y=I.renderer.activeNodeList;!((D=(A=I.renderer.textEdit)==null?void 0:A.isShowTextEdit)!=null&&D.call(A))&&y.length===1&&y[0].isRoot&&I.execCommand("INSERT_CHILD_NODE")}),I.keyCommand.addShortcut("Alt+Up",()=>I.execCommand("UP_NODE")),I.keyCommand.addShortcut("Alt+Down",()=>I.execCommand("DOWN_NODE"));const Mr=(y=I.renderer.activeNodeList)=>{if(!y.length)return ue(J("selectNode"));y.forEach(A=>I.execCommand("EXPAND_ALL",A.getData("uid")))};I.keyCommand.addShortcut("Shift+/",()=>Mr()),I.keyCommand.unBindEvent();const Sr=y=>{var A,D,H,te,se,fe,De;if((y.metaKey||y.ctrlKey)&&!y.altKey&&!y.shiftKey&&y.key.toLowerCase()==="s"){y.preventDefault(),y.stopImmediatePropagation(),(async()=>{var we,ut,gt,vt;o.hidden||Pi(!0),(gt=(ut=(we=I.renderer)==null?void 0:we.textEdit)==null?void 0:ut.isShowTextEdit)!=null&&gt.call(ut)&&I.renderer.textEdit.hideEditTextBox(),!s.hidden&&at&&ri.has(at)&&(clearTimeout(ri.get(at)),ri.delete(at),await Un(at,a.value.replace(/\n+$/,""))),await((vt=i.flushPendingEdits)==null?void 0:vt.call(i)),await Ue(),ue(ie.name?`${Ae()} · ${ie.name}`:Ae())})();return}if(!y.isComposing){if(!o.hidden&&(y.target===o||document.activeElement===o)){const we=si.includes(`
644
+ `)||o.value.includes(`
645
+ `),ut=y.key==="Enter"&&(y.metaKey||y.ctrlKey||!y.shiftKey&&!we)||y.key==="Tab"&&!we;(ut||y.key==="Escape")&&(y.preventDefault(),y.stopImmediatePropagation(),Pi(ut));return}if((H=(D=(A=I.renderer)==null?void 0:A.textEdit)==null?void 0:D.isShowTextEdit)!=null&&H.call(D)&&y.key==="Escape"){y.preventDefault(),y.stopImmediatePropagation(),I.renderer.textEdit.hideEditTextBox(),Et();return}if(I.keyCommand.onKeydown(y),!y.defaultPrevented&&((se=(te=I.opt).customCheckEnableShortcut)!=null&&se.call(te,y))){const we=I.renderer.activeNodeList;we.length===1&&we[0].getData("rich")&&((De=(fe=I.renderer.textEdit)==null?void 0:fe.checkIsAutoEnterTextEditKey)!=null&&De.call(fe,y))&&(y.preventDefault(),y.stopPropagation(),qn(we[0]))}}};window.addEventListener("keydown",Sr,!0),I.on("beforeDestroy",()=>window.removeEventListener("keydown",Sr,!0)),I.on("node_contextmenu",(y,A)=>{y.preventDefault(),Et();const D=I.renderer.activeNodeList;yt=D.includes(A)?[...D]:[A];const H=yt.every(se=>se==null?void 0:se.isRoot),te=We();Ee("#menu-insert-child").hidden=te,Ee("#menu-insert-sibling").hidden=te||H,Ee("#menu-insert-parent").hidden=te||H,Ee("#menu-move-up").hidden=te||H,Ee("#menu-move-down").hidden=te||H,Ee("#menu-remove-node").hidden=te||H,Nt.hidden=!1,Nt.style.left=`${Math.min(y.clientX,innerWidth-Nt.offsetWidth-8)}px`,Nt.style.top=`${Math.min(y.clientY,innerHeight-Nt.offsetHeight-8)}px`}),window.addEventListener("pointerdown",y=>{const A=y.target;!Nt.contains(A)&&!ni.parentElement.contains(A)&&_e()},!0),window.addEventListener("keydown",y=>y.key==="Escape"&&_e()),I.on("scale",_e),I.on("translate",_e);const Wt=Ee("#chat-add"),Yn=Ee("#menu-add-to-chat"),es=await((Ri=i.canAddToChat)==null?void 0:Ri.call(i))===!0,Xn=/Mac|iPhone|iPad/.test(navigator.platform),xn=Xn?"⌘L":"Ctrl+L";Ee("#menu-source-kbd").textContent=Xn?"⌘E":"Ctrl+E",Ee("#menu-up-kbd").textContent=Xn?"⌘↑":"Ctrl+↑",Ee("#menu-down-kbd").textContent=Xn?"⌘↓":"Ctrl+↓",Wt.innerHTML=`<span>${J("addToChat")}</span><kbd>${xn}</kbd>`,Wt.title=J("addToChatTitle"),Yn.innerHTML=`<span>${J("addToChat")}</span><kbd>${xn}</kbd>`;function Us(y){const A=new Set(y.map(we=>we.getData("uid"))),D=new Map,{md:H,lines:te}=x0(ra(Qe,I.getData(!1),D)),se=H.replace(/\n$/,"").split(`
646
+ `).length-1;let fe=1/0,De=-1;for(const[we,ut]of te){if(!A.has(D.get(we)))continue;const gt=Qe.syntheticRoot&&we===te.keys().next().value;fe=Math.min(fe,gt?0:ut),De=Math.max(De,gt?se:ut+we.md.split(`
647
+ `).length-1)}return De<0?null:{startLine:fe,endLine:Math.min(De,se)}}function yn(){var A;const y=document.activeElement;if(!s.hidden&&at&&y===a&&a.selectionStart!==a.selectionEnd){const D=a.value.slice(a.selectionStart,a.selectionEnd),H=Ee(".source-head button").getBoundingClientRect();return D.trim()?{node:at,text:D,anchorRight:H.left-6,anchorY:(H.top+H.bottom)/2,outer:{left:H.left-6,right:H.left-6,top:H.top,bottom:H.bottom},inHeader:!0}:null}if(y!=null&&y.classList.contains("smm-node-edit-wrap")){const D=getSelection(),H=I.renderer.activeNodeList[0],te=D&&!D.isCollapsed?D.toString():"";if(H&&te.trim()){const se=D.getRangeAt(0).getBoundingClientRect(),fe=y.getBoundingClientRect(),De=(A=H.group)==null?void 0:A.node.getBoundingClientRect(),we={left:De?Math.min(De.left,fe.left):fe.left,right:De?Math.max(De.right,fe.right):fe.right,top:De?Math.min(De.top,fe.top):fe.top,bottom:De?Math.max(De.bottom,fe.bottom):fe.bottom};return{node:H,text:te,anchorRight:se.width>0?se.right:we.right,anchorY:se.height>0?(se.top+se.bottom)/2:(we.top+we.bottom)/2,outer:we}}}return null}async function ts(y){_e();const A=y?null:yn();if(y??(y=A?[A.node]:[...I.renderer.activeNodeList]),!y.length)return i.addToChat();if(clearTimeout(st),await(qe=qe.then(Me)),n.dataset.state!=="saved")return;const D=Us(y);D&&i.addToChat({...D,...A&&{text:A.text}})}function is(y){const A=[],D=jt(),H=D.width>=160?D.left:0,te=D.width>=160?D.right:innerWidth,se=D.height>=160?D.top:0,fe=D.height>=160?D.bottom:innerHeight,De=we=>{var ut,gt;if(we){if(!y.has(we)){const vt=(ut=we.group)==null?void 0:ut.node.getBoundingClientRect();vt&&vt.width>0&&vt.bottom>se&&vt.top<fe&&vt.right>H&&vt.left<te&&A.push(vt)}((gt=we.getData)==null?void 0:gt.call(we,"expand"))!==!1&&(we.children??[]).forEach(De)}};return De(I.renderer.root),A}const tt=(y,A)=>Math.max(0,Math.min(y.right,A.right)-Math.max(y.left,A.left))*Math.max(0,Math.min(y.bottom,A.bottom)-Math.max(y.top,A.top)),Fi=()=>document.documentElement.classList.contains("presenting");let $s=0;function Vn(){cancelAnimationFrame($s),$s=requestAnimationFrame(()=>{var q;const y=()=>void(Wt.hidden=!0);if(Fi())return y();const A=Ee("#bar").getBoundingClientRect(),D=A.bottom+6;Wt.hidden=!1;const{offsetWidth:H,offsetHeight:te}=Wt,se=k=>Math.max(8,Math.min(k,innerWidth-H-8)),fe=k=>Math.max(D,Math.min(k,innerHeight-te-8)),De=(k,N,U,$)=>{const ce=is($);s.hidden||ce.push(s.getBoundingClientRect()),Ee("#search").hidden||ce.push(Ee("#search").getBoundingClientRect());const xe=[[N-H,k.top-te-5],[k.right-H,k.top-te-5],[N-H,k.bottom+5],[k.right-H,k.bottom+5],[k.right+8,U-te/2],[k.left-H-8,U-te/2]];let Se=null,ft=1/0;for(const[Yt,Mn]of xe){const At=se(Yt),Cr=fe(Mn),Pl={left:At,right:At+H,top:Cr,bottom:Cr+te},J1=tt(Pl,k),eu=ce.reduce((tu,iu)=>tu+tt(Pl,iu),0),co=J1*100+eu;if(co<ft&&(Se=[At,Cr],ft=co,co===0))break}const[Mi,Pt]=Se??[se(k.right-H),fe(k.top-te-5)];Wt.style.left=`${Mi}px`,Wt.style.top=`${Pt}px`},we=yn();if(we){if(we.inHeader){Wt.style.left=`${se(we.anchorRight-H)}px`,Wt.style.top=`${Math.max(8,we.outer.top+(we.outer.bottom-we.outer.top-te)/2)}px`;return}return De(we.outer,we.anchorRight,we.anchorY,new Set([we.node]))}if((q=document.activeElement)!=null&&q.classList.contains("smm-node-edit-wrap"))return y();const ut=I.renderer.activeNodeList,vt=ut.map(k=>{var N;return(N=k.group)==null?void 0:N.node.getBoundingClientRect()}).filter(k=>k&&k.width>0),en=Math.min(...vt.map(k=>k.left)),En=Math.max(...vt.map(k=>k.right)),Ei=Math.min(...vt.map(k=>k.top)),ir=Math.max(...vt.map(k=>k.bottom));if(!vt.length||ir<A.bottom||Ei>innerHeight||En<0||en>innerWidth)return y();De({left:en,right:En,top:Ei,bottom:ir},En,(Ei+ir)/2,new Set(ut))})}if(es){Yn.hidden=!1;for(const y of["node_active","node_tree_render_end","scale","translate","expand_btn_click","node_dragend","exit_demonstrate","before_show_text_edit","hide_text_edit"])I.on(y,Vn);I.on("node_dragging",()=>Wt.hidden=!0),window.addEventListener("resize",Vn),document.addEventListener("selectionchange",Vn);for(const y of["select","keyup","mouseup","blur"])a.addEventListener(y,Vn);Wt.addEventListener("mousedown",y=>(y.stopPropagation(),y.preventDefault())),Wt.addEventListener("click",y=>{y.stopPropagation(),ts()}),Yn.addEventListener("click",()=>ts(yt)),(Tn=i.onChatRequest)==null||Tn.call(i,()=>ts())}const wn=Ee("#layout-select"),jn=Ee("#theme-select"),bn=()=>{wn.innerHTML=Ko.map(y=>`<option value="${y.id}">${J(e7(y.id))}</option>`).join(""),jn.innerHTML=ma.map(y=>`<option value="${y.id}">${J(t7(y.id))}</option>`).join(""),wn.value=I.getLayout(),jn.value=ve.id};function Gs(y){ve=y,Ic(ve),I.updateConfig({expandBtnStyle:{color:ve.palette.line,fill:ve.palette.card,fontSize:12,strokeColor:ve.palette.line}}),I.setThemeConfig(Dc(ve))}function qs(y){const A=ii(y);A!==I.getLayout()&&I.setLayout(A);const D=dt(y);D.id!==ve.id&&Gs(D),bn()}function Ws(y,A){var D;We()||(Qe={...Qe,frontMatter:w4(Qe.frontMatter,y,A)},(D=i.onMapMarkdownChange)==null||D.call(i,G()),Le())}wn.addEventListener("change",()=>{var A;const y=Ko.find(D=>D.id===wn.value);if(y.pro&&!He.allow("layouts"))return bn();(A=i.track)==null||A.call(i,"feature_layouts"),I.setLayout(y.id),Ws("layout",y.id),setTimeout(()=>I.view.fit(),200)}),jn.addEventListener("change",()=>{var A;const y=ma.find(D=>D.id===jn.value);if(y.pro&&!He.allow("themes"))return bn();(A=i.track)==null||A.call(i,"feature_themes"),Gs(y),Ws("theme",y.id)}),He.onChange(()=>qs(G())),bn();const Ys=document.querySelectorAll(".language-select");Ys.forEach(y=>{y.value=Ha(),y.addEventListener("change",()=>{var D;const A=y.value==="zh"?"zh":"en";try{localStorage.setItem("inkmap.language",A)}catch{}Fl(A),Ys.forEach(H=>{H.value=A}),ba(),He.refreshLanguage(),bn(),zt(n.dataset.state||"saved",Ae()),Wt.innerHTML=`<span>${J("addToChat")}</span><kbd>${xn}</kbd>`,Wt.title=J("addToChatTitle"),Yn.innerHTML=`<span>${J("addToChat")}</span><kbd>${xn}</kbd>`,document.querySelectorAll(".ink-diagram-zoom").forEach(H=>{H.textContent=J("zoomDiagram")}),document.querySelectorAll(".ink-diagram-edit").forEach(H=>{var se,fe;const te=!!((fe=(se=H.parentElement)==null?void 0:se.parentElement)!=null&&fe.querySelector(".ink-diagram-error"));H.textContent=J(te?"diagramInvalid":"editDiagram")}),(D=i.refreshLanguage)==null||D.call(i)})});const Hi=p4.replace(/@font-face\{[^}]*\}/g,"");function Xs(){const y=getComputedStyle(document.documentElement),A=Id.replace(/var\((--[\w-]+),\s*([^()]+)\)/g,(D,H,te)=>y.getPropertyValue(H).trim()||te);return`${Hi}
648
+ ${A}`}async function ns(y){var D;if(_e(),!He.allow("export"))return;(D=i.track)==null||D.call(i,"feature_export");const A=he.replace(/[\\/:*?"<>|]+/g,"_");try{I.execCommand("CLEAR_ACTIVE_NODE");const H=await I.export(y,!1,A),te=`${A}.${y}`;await i.saveFile(te,H)&&ue(J("exported",{name:te}))}catch(H){ue(J("exportFailed",{error:String(H instanceof Error?H.message:H)}))}}const _i=Ee("#present-bar"),rs=Ee("#present-step"),Qi=Ee("#present-prev"),Ji=Ee("#present-next"),Kn=Ee("#present-exit");async function lo(){var y;if(He.allow("present")){(y=i.track)==null||y.call(i,"feature_present"),_e(),Bi(),Zn.close(),document.documentElement.classList.add("presenting"),_i&&(_i.hidden=!1);try{await I.el.requestFullscreen()}catch{I.demonstrate._enter()}}}Qi==null||Qi.addEventListener("click",()=>{var y;return(y=I.demonstrate)==null?void 0:y.prev()}),Ji==null||Ji.addEventListener("click",()=>{var y;return(y=I.demonstrate)==null?void 0:y.next()}),Kn==null||Kn.addEventListener("click",()=>{var y;return(y=I.demonstrate)==null?void 0:y.exit()}),I.on("demonstrate_jump",(y,A)=>{rs&&(rs.textContent=`${y+1} / ${A}`),Qi&&(Qi.disabled=y<=0),Ji&&(Ji.disabled=y>=A-1)}),document.addEventListener("fullscreenchange",()=>{const y=I.demonstrate;document.fullscreenElement===I.el&&!y.isInDemonstrate?y._enter():!document.fullscreenElement&&y.isInDemonstrate&&y.exit()}),I.on("exit_demonstrate",()=>{document.documentElement.classList.remove("presenting"),_i&&(_i.hidden=!0)});let ss=0;const as=()=>{cancelAnimationFrame(ss),ss=requestAnimationFrame(()=>{const{width:y,height:A}=jt();if(!(y<160||A<160)){if(!lt){lt=!0,qt.clear(),I.resize(),Ze(G(),!1).then(()=>{I.resize(),I.reRender(()=>{I.view.fit()})});return}I.resize(),is(new Set).length===0&&I.view.fit()}})};new ResizeObserver(as).observe(I.el),window.addEventListener("resize",as),document.addEventListener("visibilitychange",as);const Zn=J5({mindMap:I,pro:He,showToast:ue,rewrite:Hs,onReplace:()=>{var y;return(y=i.track)==null?void 0:y.call(i,"feature_replace")}}),Vs=Ee("#bar");new ResizeObserver(()=>{const y=Vs.offsetHeight;y&&document.documentElement.style.setProperty("--toolbar-height",`${y}px`)}).observe(Vs),I.keyCommand.addShortcut("Control+f",()=>Zn.open());const Bt=(y,A)=>Ee(y).addEventListener("click",D=>{A(),D.currentTarget.blur()});i.history?(I.keyCommand.removeShortcut("Control+z"),I.keyCommand.removeShortcut("Control+y"),I.keyCommand.addShortcut("Control+z",()=>i.history.undo()),I.keyCommand.addShortcut("Control+y|Control+Shift+z",()=>i.history.redo())):I.keyCommand.addShortcut("Control+Shift+z",()=>I.execCommand("FORWARD")),Bt("#undo",()=>i.history?i.history.undo():I.execCommand("BACK")),Bt("#redo",()=>i.history?i.history.redo():I.execCommand("FORWARD")),Bt("#fit",()=>{I.resize(),I.view.fit()}),Bt("#menu-insert-child",()=>{const y=yt;_e(),y.length&&I.execCommand("INSERT_CHILD_NODE",!0,y)}),Bt("#menu-insert-sibling",()=>{const y=yt;_e(),y.length&&I.execCommand("INSERT_NODE",!0,y)}),Bt("#menu-insert-parent",()=>{const y=yt;_e(),y.length&&I.execCommand("INSERT_PARENT_NODE",!0,y)}),Bt("#menu-move-up",()=>{_e(),I.execCommand("UP_NODE")}),Bt("#menu-move-down",()=>{_e(),I.execCommand("DOWN_NODE")}),Bt("#menu-remove-node",()=>{const y=yt;_e(),y.length&&I.execCommand("REMOVE_NODE",y)}),Bt("#menu-source",()=>{const y=yt[0];_e(),y&&qn(y)}),Bt("#menu-expand-subtree",()=>{const y=yt;_e(),Mr(y)}),Bt("#close-source",Bi),Bt("#find",()=>Zn.isOpen()?Zn.close():Zn.open()),Bt("#export",()=>{He.allow("export")&&(ni.hidden=!ni.hidden)}),document.querySelectorAll("[data-export]").forEach(y=>y.addEventListener("click",()=>ns(y.dataset.export))),Bt("#present",lo);const Qn=Ee("#level-select");Qn.addEventListener("change",()=>{const y=Qn.value;y==="all"?I.execCommand("EXPAND_ALL"):y&&I.execCommand("UNEXPAND_TO_LEVEL",Number(y)+1),Qn.value="",Qn.blur(),setTimeout(()=>I.view.fit(),300)});function ho(){const y=I.renderer.root,A=I.view.scale,D=y&&Number.isFinite(y.left)?{scale:A,dx:I.view.x+(y.left+y.width/2)*A-I.width/2,dy:I.view.y+(y.top+y.height/2)*A-I.height/2}:void 0;return{folds:Dd(I.getData(!1)),...D&&{view:D}}}let Jn=0;function er(){!Ct||!i.saveView||Fi()||(clearTimeout(Jn),Jn=0,i.saveView(ho()))}function kn(){!Ct||!i.saveView||Fi()||(clearTimeout(Jn),Jn=window.setTimeout(er,250))}return I.on("node_tree_render_end",()=>{if(Ie){const y=Ie;Ie=void 0;const A=I.renderer.root;A&&I.width>0&&I.height>0&&(I.view.scale=y.scale,I.view.x=I.width/2+y.dx-(A.left+A.width/2)*y.scale,I.view.y=I.height/2+y.dy-(A.top+A.height/2)*y.scale,I.view.transform(),is(new Set).length===0?I.view.fit():(I.emit("scale",y.scale),I.emit("translate"))),Ct=!0;return}if(!Ct){Ct=!0;return}kn()}),I.on("scale",kn),I.on("translate",kn),document.addEventListener("visibilitychange",()=>document.visibilityState==="hidden"&&er()),window.addEventListener("beforeunload",y=>{er(),n.dataset.state!=="saved"&&y.preventDefault()}),{mindMap:I,currentMarkdown:G,pro:He,load:Ze,flushSave:Ue}}function r7(i){return n7(i).then(e=>(window.inkmap=e,e))}function s7(i){const e=document.createElement("p");e.style.cssText=`padding:24px;font:14px ${wa}`,e.textContent=String(i instanceof Error?i.message:i),document.body.replaceChildren(e)}r7(pu()).catch(s7);export{Mm as _,o7 as c,yu as g,W5 as p};