@tea-agent/loop-agent 0.38.0 → 0.38.1

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 (117) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/dist/build-stamp.json +3 -3
  3. package/dist/commands/init-upgrade.js +97 -19
  4. package/dist/commands/init.js +14 -2
  5. package/dist/executors/dag-pi-executor.js +1 -0
  6. package/dist/governance/manifest-types.js +2 -0
  7. package/dist/infrastructure/harness/atomic-write.js +2 -1
  8. package/dist/shared/openspec-spec.js +76 -0
  9. package/dist/shared/operator/capabilities.js +65 -8
  10. package/dist/task/config-types.js +21 -0
  11. package/dist/task/frontend-project-capability.js +292 -38
  12. package/dist/worker/console/chat/mcp-inventory.js +221 -0
  13. package/dist/worker/console/chat/pi-runtime.js +155 -78
  14. package/dist/worker/console/chat/repo-walk.js +10 -1
  15. package/dist/worker/console/chat/routes.js +19 -8
  16. package/dist/worker/console/chat/semantic-activity.js +17 -5
  17. package/dist/worker/console/chat/turn-process.js +17 -30
  18. package/dist/worker/console/harness-pi-model-matrix.js +146 -0
  19. package/dist/worker/console/operator-actions.js +123 -0
  20. package/dist/worker/console/operator-user-error.js +19 -0
  21. package/dist/worker/console/pi-readiness.js +7 -1
  22. package/dist/worker/console/security.js +20 -1
  23. package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-DSvF6RXQ.js → abnfDiagram-N423BO3Z-Hfsot6rP.js} +1 -1
  24. package/dist/worker/console/static/assets/{arc-DuI4ogtJ.js → arc-YGwEASin.js} +1 -1
  25. package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-DdBbgD4y.js → architectureDiagram-T3A2C74G-CmOM0F92.js} +1 -1
  26. package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-xQC2HELm.js → blockDiagram-VBNYF7ZC-DDLuaHC5.js} +1 -1
  27. package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-DPMSgwIZ.js → c4Diagram-5PPSVZJV-B0Um43W4.js} +1 -1
  28. package/dist/worker/console/static/assets/channel-Dp_2Aqf1.js +1 -0
  29. package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-WTEKTxin.js → chunk-2GRJ4B5K-DvBN4JZc.js} +1 -1
  30. package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-B6vZ0Pv_.js → chunk-2Q5K7J3B-B1UVgW4E.js} +1 -1
  31. package/dist/worker/console/static/assets/{chunk-5RXB4S5H-BrerNAix.js → chunk-5RXB4S5H-Cf0GgXzX.js} +1 -1
  32. package/dist/worker/console/static/assets/{chunk-5VM5RSS4-D_ch2aaI.js → chunk-5VM5RSS4-DbNA24sj.js} +1 -1
  33. package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-VvfacNrq.js → chunk-6Q2QTUOP-Bi_0Be06.js} +1 -1
  34. package/dist/worker/console/static/assets/{chunk-GF5L2VYU-B-uGFIg2.js → chunk-GF5L2VYU-C8pPGvRd.js} +1 -1
  35. package/dist/worker/console/static/assets/{chunk-JWPE2WC7-BlysCtod.js → chunk-JWPE2WC7-BitQY8Z-.js} +1 -1
  36. package/dist/worker/console/static/assets/{chunk-KBJHAD2P-BjAUAfcT.js → chunk-KBJHAD2P-U67GCiEo.js} +1 -1
  37. package/dist/worker/console/static/assets/{chunk-RYQCIY6F-BeZnBmb-.js → chunk-RYQCIY6F-IoJwXPBA.js} +1 -1
  38. package/dist/worker/console/static/assets/{chunk-XXDRQBXY-Bbfe3UJG.js → chunk-XXDRQBXY-YDZ_UHgE.js} +1 -1
  39. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL--CODy37j.js +1 -0
  40. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE--CODy37j.js +1 -0
  41. package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BKJQnYVM.js → cose-bilkent-JH36ORCC-CUZgsiRC.js} +1 -1
  42. package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-B1wtI3hU.js → cynefin-VYW2F7L2-COmCh4pT.js} +1 -1
  43. package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-DCF6DBSu.js → cynefinDiagram-MW4NZA55-Ta6FSm68.js} +1 -1
  44. package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-BJyNGRlP.js → dagre-VZM6K2ZE-UdcR-VW9.js} +1 -1
  45. package/dist/worker/console/static/assets/{diagram-7IWD3JNH-B7j1-VsZ.js → diagram-7IWD3JNH-DybcO3Et.js} +1 -1
  46. package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-BREJ140a.js → diagram-B4RE2ZJO-wErDFWLw.js} +1 -1
  47. package/dist/worker/console/static/assets/{diagram-LBJQPF4R-CDPHmHGH.js → diagram-LBJQPF4R-DkVHZWqz.js} +1 -1
  48. package/dist/worker/console/static/assets/{diagram-Q27KOJAE-BtZLrez1.js → diagram-Q27KOJAE-DdqWs7QN.js} +1 -1
  49. package/dist/worker/console/static/assets/{diagram-UB23O5K3-mzybu8oU.js → diagram-UB23O5K3-C9dMVmDo.js} +1 -1
  50. package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-Dk3I2uO6.js → ebnfDiagram-BXEA7PRR-B2T2WcBK.js} +1 -1
  51. package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-BT97u_tQ.js → erDiagram-JOGREHBK-Bt9rjDFq.js} +1 -1
  52. package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-CMOtYzui.js → flowDiagram-UKHOOZJN-U8ic_tvi.js} +1 -1
  53. package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-DiNydkuY.js → ganttDiagram-PKOTCBZU-BfQJdQoO.js} +1 -1
  54. package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-Cwt6fLkl.js → gitGraphDiagram-DS77QQ5N-CpMftH4O.js} +1 -1
  55. package/dist/worker/console/static/assets/index-BA5-N5ER.css +1 -0
  56. package/dist/worker/console/static/assets/index-DKPXBrdc.js +325 -0
  57. package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-AsGIGKKB.js → infoDiagram-6WML65LV-DzqWXNO_.js} +1 -1
  58. package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BL8ITZh3.js → ishikawaDiagram-WSZJBQD7-CJmGQ5Yp.js} +1 -1
  59. package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-VPKAUX8M.js → journeyDiagram-NVQOT4AX-ChPtKFLz.js} +1 -1
  60. package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-BL56hfGp.js → kanban-definition-27J2QSJJ-PRe7wB5u.js} +1 -1
  61. package/dist/worker/console/static/assets/{linear-BmSG3nIZ.js → linear-DpKX6QNp.js} +1 -1
  62. package/dist/worker/console/static/assets/{mermaid.core-DWGK9kwP.js → mermaid.core-Dnl76b7Y.js} +5 -5
  63. package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS--vvKLjo0.js → mindmap-definition-FAOFIHXS-S9PCXc3J.js} +1 -1
  64. package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-B41mxb2-.js → pegDiagram-VL7TDLO6-Du8e-FSX.js} +1 -1
  65. package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-DTlu77sw.js → pieDiagram-7S7Q4E2Y-CY6OmHTc.js} +1 -1
  66. package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-Bk5A7alv.js → quadrantDiagram-CIZ2JOQS-C65GPhpj.js} +1 -1
  67. package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-Csf9jzQy.js → railroadDiagram-AXF67PYL-U6IUiTCL.js} +1 -1
  68. package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-CeptoSNx.js → requirementDiagram-LRYGKXZP-D-I_9Qhi.js} +1 -1
  69. package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-A-DLCLer.js → sankeyDiagram-W5VNT64P-B57Fhed0.js} +1 -1
  70. package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-22VbPdOI.js → sequenceDiagram-SI44F4Z6-CJOtiw21.js} +1 -1
  71. package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-DWvAyBC9.js → sizeCapture-X5ZJPWSS-FyX8zxSh.js} +1 -1
  72. package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-qICZ75yT.js → stateDiagram-OKZ733FA-eF-pbs9t.js} +1 -1
  73. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-B-mvnLEc.js +1 -0
  74. package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-xi7lcMyp.js → swimlanes-SLNWSIFB-CcfkA-Dq.js} +2 -2
  75. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-JtpBmIv4.js +8 -0
  76. package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-Bu6Nl6O2.js → timeline-definition-Z64GVDOM-DH8FjnOK.js} +1 -1
  77. package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-BzMz4Bn9.js → vennDiagram-T6HMQDX7-beoTagJg.js} +1 -1
  78. package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-CxaJnzc5.js → wardleyDiagram-T6FBY63Y-CQSfw4cK.js} +1 -1
  79. package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-5JK-omQK.js → xychartDiagram-ELKLHX3M-CQgzQ6jn.js} +1 -1
  80. package/dist/worker/console/static/index.html +2 -2
  81. package/dist/worker/console/static-src/app/console-types.js +51 -0
  82. package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +44 -21
  83. package/dist/worker/console/static-src/operator-chat/mutation-gate.js +45 -0
  84. package/dist/worker/console/static-src/operator-chat/resource-diagnostics.js +204 -0
  85. package/dist/worker/console/static-src/operator-chat/useChatSessions.js +15 -0
  86. package/dist/worker/console/static-src/operator-chat/useChatStream.js +17 -4
  87. package/dist/worker/console/static-src/operator-chat/useChatThread.js +28 -22
  88. package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +26 -1
  89. package/dist/workflows/dag/contract-validator-registrations.js +2 -1
  90. package/dist/workflows/dag/failure-routing.js +9 -4
  91. package/dist/workflows/dag/frontend-implementation-contract.js +158 -0
  92. package/dist/workflows/dag/frontend-plan-render.js +90 -0
  93. package/dist/workflows/dag/frontend-prewrite-gate.js +411 -20
  94. package/dist/workflows/dag/init-hybrid.js +272 -27
  95. package/dist/workflows/dag/lifecycle.js +4 -0
  96. package/dist/workflows/dag/node-execution.js +51 -9
  97. package/dist/workflows/dag/report.js +6 -0
  98. package/dist/workflows/dag/retry-policy.js +15 -0
  99. package/dist/workflows/dag/types.js +50 -4
  100. package/dist/workflows/dag/validate.js +7 -2
  101. package/docs/templates/frontend-design-contract.md +40 -14
  102. package/docs/templates/frontend-implementation-contract.schema.json +9 -2
  103. package/docs/templates/frontend-task-constraints.md +40 -13
  104. package/docs/templates/frontend-task-requirement.md +54 -20
  105. package/docs/templates/harness.schema.json +8 -0
  106. package/harness.json +11 -2
  107. package/package.json +1 -1
  108. package/skills/frontend-design-review/references/review-checklist.md +2 -0
  109. package/skills/frontend-implementation/references/design-spec.md +16 -19
  110. package/skills/frontend-implementation/references/node-contracts.md +15 -11
  111. package/dist/worker/console/static/assets/channel-DLVz9TYW.js +0 -1
  112. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BeAuGcO9.js +0 -1
  113. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BeAuGcO9.js +0 -1
  114. package/dist/worker/console/static/assets/index-DQxiso1w.js +0 -325
  115. package/dist/worker/console/static/assets/index-_j0Hzo69.css +0 -1
  116. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DzKvfHTX.js +0 -1
  117. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Cxqr_qM1.js +0 -8
@@ -1,325 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lf={exports:{}},io={};var Xb;function Ax(){if(Xb)return io;Xb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return io.Fragment=t,io.jsx=n,io.jsxs=n,io}var Zb;function Rx(){return Zb||(Zb=1,lf.exports=Ax()),lf.exports}var f=Rx(),of={exports:{}},ut={};var Qb;function _x(){if(Qb)return ut;Qb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),x=Symbol.iterator;function y(B){return B===null||typeof B!="object"?null:(B=x&&B[x]||B["@@iterator"],typeof B=="function"?B:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,M={};function C(B,Y,_){this.props=B,this.context=Y,this.refs=M,this.updater=_||S}C.prototype.isReactComponent={},C.prototype.setState=function(B,Y){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,Y,"setState")},C.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function R(){}R.prototype=C.prototype;function A(B,Y,_){this.props=B,this.context=Y,this.refs=M,this.updater=_||S}var H=A.prototype=new R;H.constructor=A,E(H,C.prototype),H.isPureReactComponent=!0;var F=Array.isArray;function D(){}var $={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function ee(B,Y,_){var ce=_.ref;return{$$typeof:e,type:B,key:Y,ref:ce!==void 0?ce:null,props:_}}function q(B,Y){return ee(B.type,Y,B.props)}function Z(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function G(B){var Y={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(_){return Y[_]})}var le=/\/+/g;function W(B,Y){return typeof B=="object"&&B!==null&&B.key!=null?G(""+B.key):Y.toString(36)}function U(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(D,D):(B.status="pending",B.then(function(Y){B.status==="pending"&&(B.status="fulfilled",B.value=Y)},function(Y){B.status==="pending"&&(B.status="rejected",B.reason=Y)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function z(B,Y,_,ce,he){var ie=typeof B;(ie==="undefined"||ie==="boolean")&&(B=null);var ae=!1;if(B===null)ae=!0;else switch(ie){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(B.$$typeof){case e:case t:ae=!0;break;case g:return ae=B._init,z(ae(B._payload),Y,_,ce,he)}}if(ae)return he=he(B),ae=ce===""?"."+W(B,0):ce,F(he)?(_="",ae!=null&&(_=ae.replace(le,"$&/")+"/"),z(he,Y,_,"",function(Ie){return Ie})):he!=null&&(Z(he)&&(he=q(he,_+(he.key==null||B&&B.key===he.key?"":(""+he.key).replace(le,"$&/")+"/")+ae)),Y.push(he)),1;ae=0;var ge=ce===""?".":ce+":";if(F(B))for(var ve=0;ve<B.length;ve++)ce=B[ve],ie=ge+W(ce,ve),ae+=z(ce,Y,_,ie,he);else if(ve=y(B),typeof ve=="function")for(B=ve.call(B),ve=0;!(ce=B.next()).done;)ce=ce.value,ie=ge+W(ce,ve++),ae+=z(ce,Y,_,ie,he);else if(ie==="object"){if(typeof B.then=="function")return z(U(B),Y,_,ce,he);throw Y=String(B),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ae}function V(B,Y,_){if(B==null)return B;var ce=[],he=0;return z(B,ce,"","",function(ie){return Y.call(_,ie,he++)}),ce}function ne(B){if(B._status===-1){var Y=B._result;Y=Y(),Y.then(function(_){(B._status===0||B._status===-1)&&(B._status=1,B._result=_)},function(_){(B._status===0||B._status===-1)&&(B._status=2,B._result=_)}),B._status===-1&&(B._status=0,B._result=Y)}if(B._status===1)return B._result.default;throw B._result}var we=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},O={map:V,forEach:function(B,Y,_){V(B,function(){Y.apply(this,arguments)},_)},count:function(B){var Y=0;return V(B,function(){Y++}),Y},toArray:function(B){return V(B,function(Y){return Y})||[]},only:function(B){if(!Z(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return ut.Activity=b,ut.Children=O,ut.Component=C,ut.Fragment=n,ut.Profiler=s,ut.PureComponent=A,ut.StrictMode=a,ut.Suspense=m,ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,ut.__COMPILER_RUNTIME={__proto__:null,c:function(B){return $.H.useMemoCache(B)}},ut.cache=function(B){return function(){return B.apply(null,arguments)}},ut.cacheSignal=function(){return null},ut.cloneElement=function(B,Y,_){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ce=E({},B.props),he=B.key;if(Y!=null)for(ie in Y.key!==void 0&&(he=""+Y.key),Y)!P.call(Y,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&Y.ref===void 0||(ce[ie]=Y[ie]);var ie=arguments.length-2;if(ie===1)ce.children=_;else if(1<ie){for(var ae=Array(ie),ge=0;ge<ie;ge++)ae[ge]=arguments[ge+2];ce.children=ae}return ee(B.type,he,ce)},ut.createContext=function(B){return B={$$typeof:c,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:o,_context:B},B},ut.createElement=function(B,Y,_){var ce,he={},ie=null;if(Y!=null)for(ce in Y.key!==void 0&&(ie=""+Y.key),Y)P.call(Y,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(he[ce]=Y[ce]);var ae=arguments.length-2;if(ae===1)he.children=_;else if(1<ae){for(var ge=Array(ae),ve=0;ve<ae;ve++)ge[ve]=arguments[ve+2];he.children=ge}if(B&&B.defaultProps)for(ce in ae=B.defaultProps,ae)he[ce]===void 0&&(he[ce]=ae[ce]);return ee(B,ie,he)},ut.createRef=function(){return{current:null}},ut.forwardRef=function(B){return{$$typeof:d,render:B}},ut.isValidElement=Z,ut.lazy=function(B){return{$$typeof:g,_payload:{_status:-1,_result:B},_init:ne}},ut.memo=function(B,Y){return{$$typeof:h,type:B,compare:Y===void 0?null:Y}},ut.startTransition=function(B){var Y=$.T,_={};$.T=_;try{var ce=B(),he=$.S;he!==null&&he(_,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(D,we)}catch(ie){we(ie)}finally{Y!==null&&_.types!==null&&(Y.types=_.types),$.T=Y}},ut.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},ut.use=function(B){return $.H.use(B)},ut.useActionState=function(B,Y,_){return $.H.useActionState(B,Y,_)},ut.useCallback=function(B,Y){return $.H.useCallback(B,Y)},ut.useContext=function(B){return $.H.useContext(B)},ut.useDebugValue=function(){},ut.useDeferredValue=function(B,Y){return $.H.useDeferredValue(B,Y)},ut.useEffect=function(B,Y){return $.H.useEffect(B,Y)},ut.useEffectEvent=function(B){return $.H.useEffectEvent(B)},ut.useId=function(){return $.H.useId()},ut.useImperativeHandle=function(B,Y,_){return $.H.useImperativeHandle(B,Y,_)},ut.useInsertionEffect=function(B,Y){return $.H.useInsertionEffect(B,Y)},ut.useLayoutEffect=function(B,Y){return $.H.useLayoutEffect(B,Y)},ut.useMemo=function(B,Y){return $.H.useMemo(B,Y)},ut.useOptimistic=function(B,Y){return $.H.useOptimistic(B,Y)},ut.useReducer=function(B,Y,_){return $.H.useReducer(B,Y,_)},ut.useRef=function(B){return $.H.useRef(B)},ut.useState=function(B){return $.H.useState(B)},ut.useSyncExternalStore=function(B,Y,_){return $.H.useSyncExternalStore(B,Y,_)},ut.useTransition=function(){return $.H.useTransition()},ut.version="19.2.8",ut}var Wb;function Rh(){return Wb||(Wb=1,of.exports=_x()),of.exports}var N=Rh();const Fn=Ou(N);var cf={exports:{}},so={},uf={exports:{}},df={};var Jb;function Ix(){return Jb||(Jb=1,(function(e){function t(z,V){var ne=z.length;z.push(V);e:for(;0<ne;){var we=ne-1>>>1,O=z[we];if(0<s(O,V))z[we]=V,z[ne]=O,ne=we;else break e}}function n(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var V=z[0],ne=z.pop();if(ne!==V){z[0]=ne;e:for(var we=0,O=z.length,B=O>>>1;we<B;){var Y=2*(we+1)-1,_=z[Y],ce=Y+1,he=z[ce];if(0>s(_,ne))ce<O&&0>s(he,_)?(z[we]=he,z[ce]=ne,we=ce):(z[we]=_,z[Y]=ne,we=Y);else if(ce<O&&0>s(he,ne))z[we]=he,z[ce]=ne,we=ce;else break e}}return V}function s(z,V){var ne=z.sortIndex-V.sortIndex;return ne!==0?ne:z.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var m=[],h=[],g=1,b=null,x=3,y=!1,S=!1,E=!1,M=!1,C=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function H(z){for(var V=n(h);V!==null;){if(V.callback===null)a(h);else if(V.startTime<=z)a(h),V.sortIndex=V.expirationTime,t(m,V);else break;V=n(h)}}function F(z){if(E=!1,H(z),!S)if(n(m)!==null)S=!0,D||(D=!0,G());else{var V=n(h);V!==null&&U(F,V.startTime-z)}}var D=!1,$=-1,P=5,ee=-1;function q(){return M?!0:!(e.unstable_now()-ee<P)}function Z(){if(M=!1,D){var z=e.unstable_now();ee=z;var V=!0;try{e:{S=!1,E&&(E=!1,R($),$=-1),y=!0;var ne=x;try{t:{for(H(z),b=n(m);b!==null&&!(b.expirationTime>z&&q());){var we=b.callback;if(typeof we=="function"){b.callback=null,x=b.priorityLevel;var O=we(b.expirationTime<=z);if(z=e.unstable_now(),typeof O=="function"){b.callback=O,H(z),V=!0;break t}b===n(m)&&a(m),H(z)}else a(m);b=n(m)}if(b!==null)V=!0;else{var B=n(h);B!==null&&U(F,B.startTime-z),V=!1}}break e}finally{b=null,x=ne,y=!1}V=void 0}}finally{V?G():D=!1}}}var G;if(typeof A=="function")G=function(){A(Z)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,W=le.port2;le.port1.onmessage=Z,G=function(){W.postMessage(null)}}else G=function(){C(Z,0)};function U(z,V){$=C(function(){z(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(z){switch(x){case 1:case 2:case 3:var V=3;break;default:V=x}var ne=x;x=V;try{return z()}finally{x=ne}},e.unstable_requestPaint=function(){M=!0},e.unstable_runWithPriority=function(z,V){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ne=x;x=z;try{return V()}finally{x=ne}},e.unstable_scheduleCallback=function(z,V,ne){var we=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?we+ne:we):ne=we,z){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ne+O,z={id:g++,callback:V,priorityLevel:z,startTime:ne,expirationTime:O,sortIndex:-1},ne>we?(z.sortIndex=ne,t(h,z),n(m)===null&&z===n(h)&&(E?(R($),$=-1):E=!0,U(F,ne-we))):(z.sortIndex=O,t(m,z),S||y||(S=!0,D||(D=!0,G()))),z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(z){var V=x;return function(){var ne=x;x=V;try{return z.apply(this,arguments)}finally{x=ne}}}})(df)),df}var e4;function Mx(){return e4||(e4=1,uf.exports=Ix()),uf.exports}var ff={exports:{}},Wn={};var t4;function Ox(){if(t4)return Wn;t4=1;var e=Rh();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(m,h,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:m,containerInfo:h,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Wn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Wn.createPortal=function(m,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(m,h,null,g)},Wn.flushSync=function(m){var h=c.T,g=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=h,a.p=g,a.d.f()}},Wn.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(m,h))},Wn.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},Wn.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var g=h.as,b=d(g,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,y=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:y}):g==="script"&&a.d.X(m,{crossOrigin:b,integrity:x,fetchPriority:y,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Wn.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(m)},Wn.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,b=d(g,h.crossOrigin);a.d.L(m,g,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Wn.preloadModule=function(m,h){if(typeof m=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(m)},Wn.requestFormReset=function(m){a.d.r(m)},Wn.unstable_batchedUpdates=function(m,h){return m(h)},Wn.useFormState=function(m,h,g){return c.H.useFormState(m,h,g)},Wn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Wn.version="19.2.8",Wn}var n4;function by(){if(n4)return ff.exports;n4=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ff.exports=Ox(),ff.exports}var r4;function Dx(){if(r4)return so;r4=1;var e=Mx(),t=Rh(),n=by();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function o(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function c(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function m(r){if(o(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=o(r),i===null)throw Error(a(188));return i!==r?null:r}for(var l=r,u=i;;){var p=l.return;if(p===null)break;var v=p.alternate;if(v===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===v.child){for(v=p.child;v;){if(v===l)return m(p),r;if(v===u)return m(p),i;v=v.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=v;else{for(var T=!1,j=p.child;j;){if(j===l){T=!0,l=p,u=v;break}if(j===u){T=!0,u=p,l=v;break}j=j.sibling}if(!T){for(j=v.child;j;){if(j===l){T=!0,l=v,u=p;break}if(j===u){T=!0,u=v,l=p;break}j=j.sibling}if(!T)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),A=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function G(r){return r===null||typeof r!="object"?null:(r=Z&&r[Z]||r["@@iterator"],typeof r=="function"?r:null)}var le=Symbol.for("react.client.reference");function W(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===le?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case E:return"Fragment";case C:return"Profiler";case M:return"StrictMode";case F:return"Suspense";case D:return"SuspenseList";case ee:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case A:return r.displayName||"Context";case R:return(r._context.displayName||"Context")+".Consumer";case H:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case $:return i=r.displayName||null,i!==null?i:W(r.type)||"Memo";case P:i=r._payload,r=r._init;try{return W(r(i))}catch{}}return null}var U=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},we=[],O=-1;function B(r){return{current:r}}function Y(r){0>O||(r.current=we[O],we[O]=null,O--)}function _(r,i){O++,we[O]=r.current,r.current=i}var ce=B(null),he=B(null),ie=B(null),ae=B(null);function ge(r,i){switch(_(ie,i),_(he,r),_(ce,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?vb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=vb(i),r=yb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Y(ce),_(ce,r)}function ve(){Y(ce),Y(he),Y(ie)}function Ie(r){r.memoizedState!==null&&_(ae,r);var i=ce.current,l=yb(i,r.type);i!==l&&(_(he,r),_(ce,l))}function He(r){he.current===r&&(Y(ce),Y(he)),ae.current===r&&(Y(ae),to._currentValue=ne)}var Ee,nt;function mt(r){if(Ee===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);Ee=i&&i[1]||"",nt=-1<l.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ee+r+nt}var qt=!1;function Zt(r,i){if(!r||qt)return"";qt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(pe){var me=pe}Reflect.construct(r,[],ke)}else{try{ke.call()}catch(pe){me=pe}r.call(ke.prototype)}}else{try{throw Error()}catch(pe){me=pe}(ke=r())&&typeof ke.catch=="function"&&ke.catch(function(){})}}catch(pe){if(pe&&me&&typeof pe.stack=="string")return[pe.stack,me.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=u.DetermineComponentFrameRoot(),T=v[0],j=v[1];if(T&&j){var J=T.split(`
4
- `),de=j.split(`
5
- `);for(p=u=0;u<J.length&&!J[u].includes("DetermineComponentFrameRoot");)u++;for(;p<de.length&&!de[p].includes("DetermineComponentFrameRoot");)p++;if(u===J.length||p===de.length)for(u=J.length-1,p=de.length-1;1<=u&&0<=p&&J[u]!==de[p];)p--;for(;1<=u&&0<=p;u--,p--)if(J[u]!==de[p]){if(u!==1||p!==1)do if(u--,p--,0>p||J[u]!==de[p]){var ye=`
6
- `+J[u].replace(" at new "," at ");return r.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",r.displayName)),ye}while(1<=u&&0<=p);break}}}finally{qt=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?mt(l):""}function vn(r,i){switch(r.tag){case 26:case 27:case 5:return mt(r.type);case 16:return mt("Lazy");case 13:return r.child!==i&&i!==null?mt("Suspense Fallback"):mt("Suspense");case 19:return mt("SuspenseList");case 0:case 15:return Zt(r.type,!1);case 11:return Zt(r.type.render,!1);case 1:return Zt(r.type,!0);case 31:return mt("Activity");default:return""}}function Tn(r){try{var i="",l=null;do i+=vn(r,l),l=r,r=r.return;while(r);return i}catch(u){return`
7
- Error generating stack: `+u.message+`
8
- `+u.stack}}var mn=Object.prototype.hasOwnProperty,Ht=e.unstable_scheduleCallback,We=e.unstable_cancelCallback,xt=e.unstable_shouldYield,jt=e.unstable_requestPaint,Fe=e.unstable_now,Kt=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Ue=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,Je=e.unstable_IdlePriority,It=e.log,nn=e.unstable_setDisableYieldValue,At=null,lt=null;function cn(r){if(typeof It=="function"&&nn(r),lt&&typeof lt.setStrictMode=="function")try{lt.setStrictMode(At,r)}catch{}}var gt=Math.clz32?Math.clz32:it,Yn=Math.log,yn=Math.LN2;function it(r){return r>>>=0,r===0?32:31-(Yn(r)/yn|0)|0}var Ge=256,bt=262144,_t=4194304;function Lt(r){var i=r&42;if(i!==0)return i;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Q(r,i,l){var u=r.pendingLanes;if(u===0)return 0;var p=0,v=r.suspendedLanes,T=r.pingedLanes;r=r.warmLanes;var j=u&134217727;return j!==0?(u=j&~v,u!==0?p=Lt(u):(T&=j,T!==0?p=Lt(T):l||(l=j&~r,l!==0&&(p=Lt(l))))):(j=u&~v,j!==0?p=Lt(j):T!==0?p=Lt(T):l||(l=u&~r,l!==0&&(p=Lt(l)))),p===0?0:i!==0&&i!==p&&(i&v)===0&&(v=p&-p,l=i&-i,v>=l||v===32&&(l&4194048)!==0)?i:p}function xe(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function De(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var r=_t;return _t<<=1,(_t&62914560)===0&&(_t=4194304),r}function oe(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function Le(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function ze(r,i,l,u,p,v){var T=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var j=r.entanglements,J=r.expirationTimes,de=r.hiddenUpdates;for(l=T&~l;0<l;){var ye=31-gt(l),ke=1<<ye;j[ye]=0,J[ye]=-1;var me=de[ye];if(me!==null)for(de[ye]=null,ye=0;ye<me.length;ye++){var pe=me[ye];pe!==null&&(pe.lane&=-536870913)}l&=~ke}u!==0&&Oe(r,u,0),v!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=v&~(T&~i))}function Oe(r,i,l){r.pendingLanes|=i,r.suspendedLanes&=~i;var u=31-gt(i);r.entangledLanes|=i,r.entanglements[u]=r.entanglements[u]|1073741824|l&261930}function Ve(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var u=31-gt(l),p=1<<u;p&i|r[u]&i&&(r[u]|=i),l&=~p}}function Mt(r,i){var l=i&-i;return l=(l&42)!==0?1:wt(l),(l&(r.suspendedLanes|i))!==0?0:l}function wt(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Ln(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function ur(){var r=V.p;return r!==0?r:(r=window.event,r===void 0?32:Fb(r.type))}function Xn(r,i){var l=V.p;try{return V.p=r,i()}finally{V.p=l}}var nr=Math.random().toString(36).slice(2),xn="__reactFiber$"+nr,Zn="__reactProps$"+nr,Ka="__reactContainer$"+nr,fl="__reactEvents$"+nr,Io="__reactListeners$"+nr,fs="__reactHandles$"+nr,Mo="__reactResources$"+nr,Mi="__reactMarker$"+nr;function ml(r){delete r[xn],delete r[Zn],delete r[fl],delete r[Io],delete r[fs]}function rr(r){var i=r[xn];if(i)return i;for(var l=r.parentNode;l;){if(i=l[Ka]||l[xn]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=Nb(r);r!==null;){if(l=r[xn])return l;r=Nb(r)}return i}r=l,l=r.parentNode}return null}function pa(r){if(r=r[xn]||r[Ka]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Va(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Ya(r){var i=r[Mo];return i||(i=r[Mo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Nn(r){r[Mi]=!0}var Oo=new Set,Oi={};function ga(r,i){Ce(r,i),Ce(r+"Capture",i)}function Ce(r,i){for(Oi[r]=i,r=0;r<i.length;r++)Oo.add(i[r])}var Xe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),vt={},Ft={};function wn(r){return mn.call(Ft,r)?!0:mn.call(vt,r)?!1:Xe.test(r)?Ft[r]=!0:(vt[r]=!0,!1)}function Qn(r,i,l){if(wn(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+l)}}function kr(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+l)}}function dr(r,i,l,u){if(u===null)r.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(i,l,""+u)}}function tn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Er(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Do(r,i,l){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,v=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(T){l=""+T,v.call(this,T)}}),Object.defineProperty(r,i,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(T){l=""+T},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ms(r){if(!r._valueTracker){var i=Er(r)?"checked":"value";r._valueTracker=Do(r,i,""+r[i])}}function hl(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),u="";return r&&(u=Er(r)?r.checked?"true":"false":r.value),r=u,r!==l?(i.setValue(r),!0):!1}function hs(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var i0=/[\n"\\]/g;function fr(r){return r.replace(i0,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function pl(r,i,l,u,p,v,T,j){r.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.type=T:r.removeAttribute("type"),i!=null?T==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+tn(i)):r.value!==""+tn(i)&&(r.value=""+tn(i)):T!=="submit"&&T!=="reset"||r.removeAttribute("value"),i!=null?ps(r,T,tn(i)):l!=null?ps(r,T,tn(l)):u!=null&&r.removeAttribute("value"),p==null&&v!=null&&(r.defaultChecked=!!v),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?r.name=""+tn(j):r.removeAttribute("name")}function Di(r,i,l,u,p,v,T,j){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){ms(r);return}l=l!=null?""+tn(l):"",i=i!=null?""+tn(i):l,j||i===r.value||(r.value=i),r.defaultValue=i}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=j?r.checked:!!u,r.defaultChecked=!!u,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T),ms(r)}function ps(r,i,l){i==="number"&&hs(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function Pn(r,i,l,u){if(r=r.options,i){i={};for(var p=0;p<l.length;p++)i["$"+l[p]]=!0;for(l=0;l<r.length;l++)p=i.hasOwnProperty("$"+r[l].value),r[l].selected!==p&&(r[l].selected=p),p&&u&&(r[l].defaultSelected=!0)}else{for(l=""+tn(l),i=null,p=0;p<r.length;p++){if(r[p].value===l){r[p].selected=!0,u&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function jo(r,i,l){if(i!=null&&(i=""+tn(i),i!==r.value&&(r.value=i),l==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=l!=null?""+tn(l):""}function gs(r,i,l,u){if(i==null){if(u!=null){if(l!=null)throw Error(a(92));if(U(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),i=l}l=tn(i),r.defaultValue=l,u=r.textContent,u===l&&u!==""&&u!==null&&(r.value=u),ms(r)}function at(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var Lo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Cn(r,i,l){var u=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":u?r.setProperty(i,l):typeof l!="number"||l===0||Lo.has(i)?i==="float"?r.cssFloat=l:r[i]=(""+l).trim():r[i]=l+"px"}function Pt(r,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var p in i)u=i[p],i.hasOwnProperty(p)&&l[p]!==u&&Cn(r,p,u)}else for(var v in i)i.hasOwnProperty(v)&&Cn(r,v,i[v])}function Xa(r){if(r.indexOf("-")===-1)return!1;switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ba=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gl=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Za(r){return gl.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function je(){}var $e=null;function dt(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Tt=null,un=null;function Ur(r){var i=pa(r);if(i&&(r=i.stateNode)){var l=r[Zn]||null;e:switch(r=i.stateNode,i.type){case"input":if(pl(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+fr(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var u=l[i];if(u!==r&&u.form===r.form){var p=u[Zn]||null;if(!p)throw Error(a(90));pl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<l.length;i++)u=l[i],u.form===r.form&&hl(u)}break e;case"textarea":jo(r,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&Pn(r,!!l.multiple,i,!1)}}}var bl=!1;function zo(r,i,l){if(bl)return r(i,l);bl=!0;try{var u=r(i);return u}finally{if(bl=!1,(Tt!==null||un!==null)&&(Ec(),Tt&&(i=Tt,r=un,un=Tt=null,Ur(i),r)))for(i=0;i<r.length;i++)Ur(r[i])}}function vl(r,i){var l=r.stateNode;if(l===null)return null;var u=l[Zn]||null;if(u===null)return null;l=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),s0=!1;if(va)try{var yl={};Object.defineProperty(yl,"passive",{get:function(){s0=!0}}),window.addEventListener("test",yl,yl),window.removeEventListener("test",yl,yl)}catch{s0=!1}var Qa=null,l0=null,Bo=null;function yp(){if(Bo)return Bo;var r,i=l0,l=i.length,u,p="value"in Qa?Qa.value:Qa.textContent,v=p.length;for(r=0;r<l&&i[r]===p[r];r++);var T=l-r;for(u=1;u<=T&&i[l-u]===p[v-u];u++);return Bo=p.slice(r,1<u?1-u:void 0)}function Uo(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function qo(){return!0}function xp(){return!1}function mr(r){function i(l,u,p,v,T){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=v,this.target=T,this.currentTarget=null;for(var j in r)r.hasOwnProperty(j)&&(l=r[j],this[j]=l?l(v):v[j]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?qo:xp,this.isPropagationStopped=xp,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=qo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qo)},persist:function(){},isPersistent:qo}),i}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ho=mr(ji),xl=b({},ji,{view:0,detail:0}),N6=mr(xl),o0,c0,wl,Fo=b({},xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:d0,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==wl&&(wl&&r.type==="mousemove"?(o0=r.screenX-wl.screenX,c0=r.screenY-wl.screenY):c0=o0=0,wl=r),o0)},movementY:function(r){return"movementY"in r?r.movementY:c0}}),wp=mr(Fo),C6=b({},Fo,{dataTransfer:0}),A6=mr(C6),R6=b({},xl,{relatedTarget:0}),u0=mr(R6),_6=b({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),I6=mr(_6),M6=b({},ji,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),O6=mr(M6),D6=b({},ji,{data:0}),Sp=mr(D6),j6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L6={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},z6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B6(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=z6[r])?!!i[r]:!1}function d0(){return B6}var U6=b({},xl,{key:function(r){if(r.key){var i=j6[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Uo(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?L6[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:d0,charCode:function(r){return r.type==="keypress"?Uo(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Uo(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),q6=mr(U6),H6=b({},Fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kp=mr(H6),F6=b({},xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:d0}),P6=mr(F6),$6=b({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),G6=mr($6),K6=b({},Fo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),V6=mr(K6),Y6=b({},ji,{newState:0,oldState:0}),X6=mr(Y6),Z6=[9,13,27,32],f0=va&&"CompositionEvent"in window,Sl=null;va&&"documentMode"in document&&(Sl=document.documentMode);var Q6=va&&"TextEvent"in window&&!Sl,Ep=va&&(!f0||Sl&&8<Sl&&11>=Sl),Tp=" ",Np=!1;function Cp(r,i){switch(r){case"keyup":return Z6.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ap(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var bs=!1;function W6(r,i){switch(r){case"compositionend":return Ap(i);case"keypress":return i.which!==32?null:(Np=!0,Tp);case"textInput":return r=i.data,r===Tp&&Np?null:r;default:return null}}function J6(r,i){if(bs)return r==="compositionend"||!f0&&Cp(r,i)?(r=yp(),Bo=l0=Qa=null,bs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ep&&i.locale!=="ko"?null:i.data;default:return null}}var e7={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Rp(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!e7[r.type]:i==="textarea"}function _p(r,i,l,u){Tt?un?un.push(u):un=[u]:Tt=u,i=Ic(i,"onChange"),0<i.length&&(l=new Ho("onChange","change",null,l,u),r.push({event:l,listeners:i}))}var kl=null,El=null;function t7(r){fb(r,0)}function Po(r){var i=Va(r);if(hl(i))return r}function Ip(r,i){if(r==="change")return i}var Mp=!1;if(va){var m0;if(va){var h0="oninput"in document;if(!h0){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),h0=typeof Op.oninput=="function"}m0=h0}else m0=!1;Mp=m0&&(!document.documentMode||9<document.documentMode)}function Dp(){kl&&(kl.detachEvent("onpropertychange",jp),El=kl=null)}function jp(r){if(r.propertyName==="value"&&Po(El)){var i=[];_p(i,El,r,dt(r)),zo(t7,i)}}function n7(r,i,l){r==="focusin"?(Dp(),kl=i,El=l,kl.attachEvent("onpropertychange",jp)):r==="focusout"&&Dp()}function r7(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Po(El)}function a7(r,i){if(r==="click")return Po(i)}function i7(r,i){if(r==="input"||r==="change")return Po(i)}function s7(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Tr=typeof Object.is=="function"?Object.is:s7;function Tl(r,i){if(Tr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),u=Object.keys(i);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!mn.call(i,p)||!Tr(r[p],i[p]))return!1}return!0}function Lp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function zp(r,i){var l=Lp(r);r=0;for(var u;l;){if(l.nodeType===3){if(u=r+l.textContent.length,r<=i&&u>=i)return{node:l,offset:i-r};r=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Lp(l)}}function Bp(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Bp(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Up(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=hs(r.document);i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=hs(r.document)}return i}function p0(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var l7=va&&"documentMode"in document&&11>=document.documentMode,vs=null,g0=null,Nl=null,b0=!1;function qp(r,i,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;b0||vs==null||vs!==hs(u)||(u=vs,"selectionStart"in u&&p0(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Nl&&Tl(Nl,u)||(Nl=u,u=Ic(g0,"onSelect"),0<u.length&&(i=new Ho("onSelect","select",null,i,l),r.push({event:i,listeners:u}),i.target=vs)))}function Li(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}var ys={animationend:Li("Animation","AnimationEnd"),animationiteration:Li("Animation","AnimationIteration"),animationstart:Li("Animation","AnimationStart"),transitionrun:Li("Transition","TransitionRun"),transitionstart:Li("Transition","TransitionStart"),transitioncancel:Li("Transition","TransitionCancel"),transitionend:Li("Transition","TransitionEnd")},v0={},Hp={};va&&(Hp=document.createElement("div").style,"AnimationEvent"in window||(delete ys.animationend.animation,delete ys.animationiteration.animation,delete ys.animationstart.animation),"TransitionEvent"in window||delete ys.transitionend.transition);function zi(r){if(v0[r])return v0[r];if(!ys[r])return r;var i=ys[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in Hp)return v0[r]=i[l];return r}var Fp=zi("animationend"),Pp=zi("animationiteration"),$p=zi("animationstart"),o7=zi("transitionrun"),c7=zi("transitionstart"),u7=zi("transitioncancel"),Gp=zi("transitionend"),Kp=new Map,y0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");y0.push("scrollEnd");function Qr(r,i){Kp.set(r,i),ga(i,[r])}var $o=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},qr=[],xs=0,x0=0;function Go(){for(var r=xs,i=x0=xs=0;i<r;){var l=qr[i];qr[i++]=null;var u=qr[i];qr[i++]=null;var p=qr[i];qr[i++]=null;var v=qr[i];if(qr[i++]=null,u!==null&&p!==null){var T=u.pending;T===null?p.next=p:(p.next=T.next,T.next=p),u.pending=p}v!==0&&Vp(l,p,v)}}function Ko(r,i,l,u){qr[xs++]=r,qr[xs++]=i,qr[xs++]=l,qr[xs++]=u,x0|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function w0(r,i,l,u){return Ko(r,i,l,u),Vo(r)}function Bi(r,i){return Ko(r,null,null,i),Vo(r)}function Vp(r,i,l){r.lanes|=l;var u=r.alternate;u!==null&&(u.lanes|=l);for(var p=!1,v=r.return;v!==null;)v.childLanes|=l,u=v.alternate,u!==null&&(u.childLanes|=l),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(p=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,p&&i!==null&&(p=31-gt(l),r=v.hiddenUpdates,u=r[p],u===null?r[p]=[i]:u.push(i),i.lane=l|536870912),v):null}function Vo(r){if(50<Yl)throw Yl=0,_d=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var ws={};function d7(r,i,l,u){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(r,i,l,u){return new d7(r,i,l,u)}function S0(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ya(r,i){var l=r.alternate;return l===null?(l=Nr(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function Yp(r,i){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,i=l.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Yo(r,i,l,u,p,v){var T=0;if(u=r,typeof r=="function")S0(r)&&(T=1);else if(typeof r=="string")T=gx(r,l,ce.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case ee:return r=Nr(31,l,i,p),r.elementType=ee,r.lanes=v,r;case E:return Ui(l.children,p,v,i);case M:T=8,p|=24;break;case C:return r=Nr(12,l,i,p|2),r.elementType=C,r.lanes=v,r;case F:return r=Nr(13,l,i,p),r.elementType=F,r.lanes=v,r;case D:return r=Nr(19,l,i,p),r.elementType=D,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case A:T=10;break e;case R:T=9;break e;case H:T=11;break e;case $:T=14;break e;case P:T=16,u=null;break e}T=29,l=Error(a(130,r===null?"null":typeof r,"")),u=null}return i=Nr(T,l,i,p),i.elementType=r,i.type=u,i.lanes=v,i}function Ui(r,i,l,u){return r=Nr(7,r,u,i),r.lanes=l,r}function k0(r,i,l){return r=Nr(6,r,null,i),r.lanes=l,r}function Xp(r){var i=Nr(18,null,null,0);return i.stateNode=r,i}function E0(r,i,l){return i=Nr(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Zp=new WeakMap;function Hr(r,i){if(typeof r=="object"&&r!==null){var l=Zp.get(r);return l!==void 0?l:(i={value:r,source:i,stack:Tn(i)},Zp.set(r,i),i)}return{value:r,source:i,stack:Tn(i)}}var Ss=[],ks=0,Xo=null,Cl=0,Fr=[],Pr=0,Wa=null,ra=1,aa="";function xa(r,i){Ss[ks++]=Cl,Ss[ks++]=Xo,Xo=r,Cl=i}function Qp(r,i,l){Fr[Pr++]=ra,Fr[Pr++]=aa,Fr[Pr++]=Wa,Wa=r;var u=ra;r=aa;var p=32-gt(u)-1;u&=~(1<<p),l+=1;var v=32-gt(i)+p;if(30<v){var T=p-p%5;v=(u&(1<<T)-1).toString(32),u>>=T,p-=T,ra=1<<32-gt(i)+p|l<<p|u,aa=v+r}else ra=1<<v|l<<p|u,aa=r}function T0(r){r.return!==null&&(xa(r,1),Qp(r,1,0))}function N0(r){for(;r===Xo;)Xo=Ss[--ks],Ss[ks]=null,Cl=Ss[--ks],Ss[ks]=null;for(;r===Wa;)Wa=Fr[--Pr],Fr[Pr]=null,aa=Fr[--Pr],Fr[Pr]=null,ra=Fr[--Pr],Fr[Pr]=null}function Wp(r,i){Fr[Pr++]=ra,Fr[Pr++]=aa,Fr[Pr++]=Wa,ra=i.id,aa=i.overflow,Wa=r}var $n=null,rn=null,Rt=!1,Ja=null,$r=!1,C0=Error(a(519));function ei(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Al(Hr(i,r)),C0}function Jp(r){var i=r.stateNode,l=r.type,u=r.memoizedProps;switch(i[xn]=r,i[Zn]=u,l){case"dialog":kt("cancel",i),kt("close",i);break;case"iframe":case"object":case"embed":kt("load",i);break;case"video":case"audio":for(l=0;l<Zl.length;l++)kt(Zl[l],i);break;case"source":kt("error",i);break;case"img":case"image":case"link":kt("error",i),kt("load",i);break;case"details":kt("toggle",i);break;case"input":kt("invalid",i),Di(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":kt("invalid",i);break;case"textarea":kt("invalid",i),gs(i,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||u.suppressHydrationWarning===!0||gb(i.textContent,l)?(u.popover!=null&&(kt("beforetoggle",i),kt("toggle",i)),u.onScroll!=null&&kt("scroll",i),u.onScrollEnd!=null&&kt("scrollend",i),u.onClick!=null&&(i.onclick=je),i=!0):i=!1,i||ei(r,!0)}function e1(r){for($n=r.return;$n;)switch($n.tag){case 5:case 31:case 13:$r=!1;return;case 27:case 3:$r=!0;return;default:$n=$n.return}}function Es(r){if(r!==$n)return!1;if(!Rt)return e1(r),Rt=!0,!1;var i=r.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||Gd(r.type,r.memoizedProps)),l=!l),l&&rn&&ei(r),e1(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));rn=Tb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));rn=Tb(r)}else i===27?(i=rn,hi(r.type)?(r=Zd,Zd=null,rn=r):rn=i):rn=$n?Kr(r.stateNode.nextSibling):null;return!0}function qi(){rn=$n=null,Rt=!1}function A0(){var r=Ja;return r!==null&&(br===null?br=r:br.push.apply(br,r),Ja=null),r}function Al(r){Ja===null?Ja=[r]:Ja.push(r)}var R0=B(null),Hi=null,wa=null;function ti(r,i,l){_(R0,i._currentValue),i._currentValue=l}function Sa(r){r._currentValue=R0.current,Y(R0)}function _0(r,i,l){for(;r!==null;){var u=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),r===l)break;r=r.return}}function I0(r,i,l,u){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var v=p.dependencies;if(v!==null){var T=p.child;v=v.firstContext;e:for(;v!==null;){var j=v;v=p;for(var J=0;J<i.length;J++)if(j.context===i[J]){v.lanes|=l,j=v.alternate,j!==null&&(j.lanes|=l),_0(v.return,l,r),u||(T=null);break e}v=j.next}}else if(p.tag===18){if(T=p.return,T===null)throw Error(a(341));T.lanes|=l,v=T.alternate,v!==null&&(v.lanes|=l),_0(T,l,r),T=null}else T=p.child;if(T!==null)T.return=p;else for(T=p;T!==null;){if(T===r){T=null;break}if(p=T.sibling,p!==null){p.return=T.return,T=p;break}T=T.return}p=T}}function Ts(r,i,l,u){r=null;for(var p=i,v=!1;p!==null;){if(!v){if((p.flags&524288)!==0)v=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var T=p.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var j=p.type;Tr(p.pendingProps.value,T.value)||(r!==null?r.push(j):r=[j])}}else if(p===ae.current){if(T=p.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(to):r=[to])}p=p.return}r!==null&&I0(i,r,l,u),i.flags|=262144}function Zo(r){for(r=r.firstContext;r!==null;){if(!Tr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Fi(r){Hi=r,wa=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Gn(r){return t1(Hi,r)}function Qo(r,i){return Hi===null&&Fi(r),t1(r,i)}function t1(r,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},wa===null){if(r===null)throw Error(a(308));wa=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else wa=wa.next=i;return l}var f7=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,u){r.push(u)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},m7=e.unstable_scheduleCallback,h7=e.unstable_NormalPriority,An={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function M0(){return{controller:new f7,data:new Map,refCount:0}}function Rl(r){r.refCount--,r.refCount===0&&m7(h7,function(){r.controller.abort()})}var _l=null,O0=0,Ns=0,Cs=null;function p7(r,i){if(_l===null){var l=_l=[];O0=0,Ns=Ld(),Cs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return O0++,i.then(n1,n1),i}function n1(){if(--O0===0&&_l!==null){Cs!==null&&(Cs.status="fulfilled");var r=_l;_l=null,Ns=0,Cs=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function g7(r,i){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return r.then(function(){u.status="fulfilled",u.value=i;for(var p=0;p<l.length;p++)(0,l[p])(i)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var r1=z.S;z.S=function(r,i){qg=Fe(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&p7(r,i),r1!==null&&r1(r,i)};var Pi=B(null);function D0(){var r=Pi.current;return r!==null?r:Qt.pooledCache}function Wo(r,i){i===null?_(Pi,Pi.current):_(Pi,i.pool)}function a1(){var r=D0();return r===null?null:{parent:An._currentValue,pool:r}}var As=Error(a(460)),j0=Error(a(474)),Jo=Error(a(542)),ec={then:function(){}};function i1(r){return r=r.status,r==="fulfilled"||r==="rejected"}function s1(r,i,l){switch(l=r[l],l===void 0?r.push(i):l!==i&&(i.then(je,je),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,o1(r),r;default:if(typeof i.status=="string")i.then(je,je);else{if(r=Qt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(u){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=u}},function(u){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,o1(r),r}throw Gi=i,As}}function $i(r){try{var i=r._init;return i(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Gi=l,As):l}}var Gi=null;function l1(){if(Gi===null)throw Error(a(459));var r=Gi;return Gi=null,r}function o1(r){if(r===As||r===Jo)throw Error(a(483))}var Rs=null,Il=0;function tc(r){var i=Il;return Il+=1,Rs===null&&(Rs=[]),s1(Rs,r,i)}function Ml(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function nc(r,i){throw i.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function c1(r){function i(se,te){if(r){var ue=se.deletions;ue===null?(se.deletions=[te],se.flags|=16):ue.push(te)}}function l(se,te){if(!r)return null;for(;te!==null;)i(se,te),te=te.sibling;return null}function u(se){for(var te=new Map;se!==null;)se.key!==null?te.set(se.key,se):te.set(se.index,se),se=se.sibling;return te}function p(se,te){return se=ya(se,te),se.index=0,se.sibling=null,se}function v(se,te,ue){return se.index=ue,r?(ue=se.alternate,ue!==null?(ue=ue.index,ue<te?(se.flags|=67108866,te):ue):(se.flags|=67108866,te)):(se.flags|=1048576,te)}function T(se){return r&&se.alternate===null&&(se.flags|=67108866),se}function j(se,te,ue,Se){return te===null||te.tag!==6?(te=k0(ue,se.mode,Se),te.return=se,te):(te=p(te,ue),te.return=se,te)}function J(se,te,ue,Se){var Qe=ue.type;return Qe===E?ye(se,te,ue.props.children,Se,ue.key):te!==null&&(te.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===P&&$i(Qe)===te.type)?(te=p(te,ue.props),Ml(te,ue),te.return=se,te):(te=Yo(ue.type,ue.key,ue.props,null,se.mode,Se),Ml(te,ue),te.return=se,te)}function de(se,te,ue,Se){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=E0(ue,se.mode,Se),te.return=se,te):(te=p(te,ue.children||[]),te.return=se,te)}function ye(se,te,ue,Se,Qe){return te===null||te.tag!==7?(te=Ui(ue,se.mode,Se,Qe),te.return=se,te):(te=p(te,ue),te.return=se,te)}function ke(se,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=k0(""+te,se.mode,ue),te.return=se,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return ue=Yo(te.type,te.key,te.props,null,se.mode,ue),Ml(ue,te),ue.return=se,ue;case S:return te=E0(te,se.mode,ue),te.return=se,te;case P:return te=$i(te),ke(se,te,ue)}if(U(te)||G(te))return te=Ui(te,se.mode,ue,null),te.return=se,te;if(typeof te.then=="function")return ke(se,tc(te),ue);if(te.$$typeof===A)return ke(se,Qo(se,te),ue);nc(se,te)}return null}function me(se,te,ue,Se){var Qe=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Qe!==null?null:j(se,te,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return ue.key===Qe?J(se,te,ue,Se):null;case S:return ue.key===Qe?de(se,te,ue,Se):null;case P:return ue=$i(ue),me(se,te,ue,Se)}if(U(ue)||G(ue))return Qe!==null?null:ye(se,te,ue,Se,null);if(typeof ue.then=="function")return me(se,te,tc(ue),Se);if(ue.$$typeof===A)return me(se,te,Qo(se,ue),Se);nc(se,ue)}return null}function pe(se,te,ue,Se,Qe){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return se=se.get(ue)||null,j(te,se,""+Se,Qe);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case y:return se=se.get(Se.key===null?ue:Se.key)||null,J(te,se,Se,Qe);case S:return se=se.get(Se.key===null?ue:Se.key)||null,de(te,se,Se,Qe);case P:return Se=$i(Se),pe(se,te,ue,Se,Qe)}if(U(Se)||G(Se))return se=se.get(ue)||null,ye(te,se,Se,Qe,null);if(typeof Se.then=="function")return pe(se,te,ue,tc(Se),Qe);if(Se.$$typeof===A)return pe(se,te,ue,Qo(te,Se),Qe);nc(te,Se)}return null}function Pe(se,te,ue,Se){for(var Qe=null,Ot=null,Ke=te,ht=te=0,Ct=null;Ke!==null&&ht<ue.length;ht++){Ke.index>ht?(Ct=Ke,Ke=null):Ct=Ke.sibling;var Dt=me(se,Ke,ue[ht],Se);if(Dt===null){Ke===null&&(Ke=Ct);break}r&&Ke&&Dt.alternate===null&&i(se,Ke),te=v(Dt,te,ht),Ot===null?Qe=Dt:Ot.sibling=Dt,Ot=Dt,Ke=Ct}if(ht===ue.length)return l(se,Ke),Rt&&xa(se,ht),Qe;if(Ke===null){for(;ht<ue.length;ht++)Ke=ke(se,ue[ht],Se),Ke!==null&&(te=v(Ke,te,ht),Ot===null?Qe=Ke:Ot.sibling=Ke,Ot=Ke);return Rt&&xa(se,ht),Qe}for(Ke=u(Ke);ht<ue.length;ht++)Ct=pe(Ke,se,ht,ue[ht],Se),Ct!==null&&(r&&Ct.alternate!==null&&Ke.delete(Ct.key===null?ht:Ct.key),te=v(Ct,te,ht),Ot===null?Qe=Ct:Ot.sibling=Ct,Ot=Ct);return r&&Ke.forEach(function(yi){return i(se,yi)}),Rt&&xa(se,ht),Qe}function rt(se,te,ue,Se){if(ue==null)throw Error(a(151));for(var Qe=null,Ot=null,Ke=te,ht=te=0,Ct=null,Dt=ue.next();Ke!==null&&!Dt.done;ht++,Dt=ue.next()){Ke.index>ht?(Ct=Ke,Ke=null):Ct=Ke.sibling;var yi=me(se,Ke,Dt.value,Se);if(yi===null){Ke===null&&(Ke=Ct);break}r&&Ke&&yi.alternate===null&&i(se,Ke),te=v(yi,te,ht),Ot===null?Qe=yi:Ot.sibling=yi,Ot=yi,Ke=Ct}if(Dt.done)return l(se,Ke),Rt&&xa(se,ht),Qe;if(Ke===null){for(;!Dt.done;ht++,Dt=ue.next())Dt=ke(se,Dt.value,Se),Dt!==null&&(te=v(Dt,te,ht),Ot===null?Qe=Dt:Ot.sibling=Dt,Ot=Dt);return Rt&&xa(se,ht),Qe}for(Ke=u(Ke);!Dt.done;ht++,Dt=ue.next())Dt=pe(Ke,se,ht,Dt.value,Se),Dt!==null&&(r&&Dt.alternate!==null&&Ke.delete(Dt.key===null?ht:Dt.key),te=v(Dt,te,ht),Ot===null?Qe=Dt:Ot.sibling=Dt,Ot=Dt);return r&&Ke.forEach(function(Cx){return i(se,Cx)}),Rt&&xa(se,ht),Qe}function Xt(se,te,ue,Se){if(typeof ue=="object"&&ue!==null&&ue.type===E&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:e:{for(var Qe=ue.key;te!==null;){if(te.key===Qe){if(Qe=ue.type,Qe===E){if(te.tag===7){l(se,te.sibling),Se=p(te,ue.props.children),Se.return=se,se=Se;break e}}else if(te.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===P&&$i(Qe)===te.type){l(se,te.sibling),Se=p(te,ue.props),Ml(Se,ue),Se.return=se,se=Se;break e}l(se,te);break}else i(se,te);te=te.sibling}ue.type===E?(Se=Ui(ue.props.children,se.mode,Se,ue.key),Se.return=se,se=Se):(Se=Yo(ue.type,ue.key,ue.props,null,se.mode,Se),Ml(Se,ue),Se.return=se,se=Se)}return T(se);case S:e:{for(Qe=ue.key;te!==null;){if(te.key===Qe)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){l(se,te.sibling),Se=p(te,ue.children||[]),Se.return=se,se=Se;break e}else{l(se,te);break}else i(se,te);te=te.sibling}Se=E0(ue,se.mode,Se),Se.return=se,se=Se}return T(se);case P:return ue=$i(ue),Xt(se,te,ue,Se)}if(U(ue))return Pe(se,te,ue,Se);if(G(ue)){if(Qe=G(ue),typeof Qe!="function")throw Error(a(150));return ue=Qe.call(ue),rt(se,te,ue,Se)}if(typeof ue.then=="function")return Xt(se,te,tc(ue),Se);if(ue.$$typeof===A)return Xt(se,te,Qo(se,ue),Se);nc(se,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(l(se,te.sibling),Se=p(te,ue),Se.return=se,se=Se):(l(se,te),Se=k0(ue,se.mode,Se),Se.return=se,se=Se),T(se)):l(se,te)}return function(se,te,ue,Se){try{Il=0;var Qe=Xt(se,te,ue,Se);return Rs=null,Qe}catch(Ke){if(Ke===As||Ke===Jo)throw Ke;var Ot=Nr(29,Ke,null,se.mode);return Ot.lanes=Se,Ot.return=se,Ot}}}var Ki=c1(!0),u1=c1(!1),ni=!1;function L0(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function z0(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ri(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ai(r,i,l){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(zt&2)!==0){var p=u.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),u.pending=i,i=Vo(r),Vp(r,null,l),i}return Ko(r,u,i,l),Vo(r)}function Ol(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var u=i.lanes;u&=r.pendingLanes,l|=u,i.lanes=l,Ve(r,l)}}function B0(r,i){var l=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var T={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?p=v=T:v=v.next=T,l=l.next}while(l!==null);v===null?p=v=i:v=v.next=i}else p=v=i;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}var U0=!1;function Dl(){if(U0){var r=Cs;if(r!==null)throw r}}function jl(r,i,l,u){U0=!1;var p=r.updateQueue;ni=!1;var v=p.firstBaseUpdate,T=p.lastBaseUpdate,j=p.shared.pending;if(j!==null){p.shared.pending=null;var J=j,de=J.next;J.next=null,T===null?v=de:T.next=de,T=J;var ye=r.alternate;ye!==null&&(ye=ye.updateQueue,j=ye.lastBaseUpdate,j!==T&&(j===null?ye.firstBaseUpdate=de:j.next=de,ye.lastBaseUpdate=J))}if(v!==null){var ke=p.baseState;T=0,ye=de=J=null,j=v;do{var me=j.lane&-536870913,pe=me!==j.lane;if(pe?(Nt&me)===me:(u&me)===me){me!==0&&me===Ns&&(U0=!0),ye!==null&&(ye=ye.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Pe=r,rt=j;me=i;var Xt=l;switch(rt.tag){case 1:if(Pe=rt.payload,typeof Pe=="function"){ke=Pe.call(Xt,ke,me);break e}ke=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=rt.payload,me=typeof Pe=="function"?Pe.call(Xt,ke,me):Pe,me==null)break e;ke=b({},ke,me);break e;case 2:ni=!0}}me=j.callback,me!==null&&(r.flags|=64,pe&&(r.flags|=8192),pe=p.callbacks,pe===null?p.callbacks=[me]:pe.push(me))}else pe={lane:me,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ye===null?(de=ye=pe,J=ke):ye=ye.next=pe,T|=me;if(j=j.next,j===null){if(j=p.shared.pending,j===null)break;pe=j,j=pe.next,pe.next=null,p.lastBaseUpdate=pe,p.shared.pending=null}}while(!0);ye===null&&(J=ke),p.baseState=J,p.firstBaseUpdate=de,p.lastBaseUpdate=ye,v===null&&(p.shared.lanes=0),ci|=T,r.lanes=T,r.memoizedState=ke}}function d1(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function f1(r,i){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)d1(l[r],i)}var _s=B(null),rc=B(0);function m1(r,i){r=Ia,_(rc,r),_(_s,i),Ia=r|i.baseLanes}function q0(){_(rc,Ia),_(_s,_s.current)}function H0(){Ia=rc.current,Y(_s),Y(rc)}var Cr=B(null),Gr=null;function ii(r){var i=r.alternate;_(Sn,Sn.current&1),_(Cr,r),Gr===null&&(i===null||_s.current!==null||i.memoizedState!==null)&&(Gr=r)}function F0(r){_(Sn,Sn.current),_(Cr,r),Gr===null&&(Gr=r)}function h1(r){r.tag===22?(_(Sn,Sn.current),_(Cr,r),Gr===null&&(Gr=r)):si()}function si(){_(Sn,Sn.current),_(Cr,Cr.current)}function Ar(r){Y(Cr),Gr===r&&(Gr=null),Y(Sn)}var Sn=B(0);function ac(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yd(l)||Xd(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ka=0,ft=null,Vt=null,Rn=null,ic=!1,Is=!1,Vi=!1,sc=0,Ll=0,Ms=null,b7=0;function hn(){throw Error(a(321))}function P0(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Tr(r[l],i[l]))return!1;return!0}function $0(r,i,l,u,p,v){return ka=v,ft=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,z.H=r===null||r.memoizedState===null?Q1:id,Vi=!1,v=l(u,p),Vi=!1,Is&&(v=g1(i,l,u,p)),p1(r),v}function p1(r){z.H=Ul;var i=Vt!==null&&Vt.next!==null;if(ka=0,Rn=Vt=ft=null,ic=!1,Ll=0,Ms=null,i)throw Error(a(300));r===null||_n||(r=r.dependencies,r!==null&&Zo(r)&&(_n=!0))}function g1(r,i,l,u){ft=r;var p=0;do{if(Is&&(Ms=null),Ll=0,Is=!1,25<=p)throw Error(a(301));if(p+=1,Rn=Vt=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}z.H=W1,v=i(l,u)}while(Is);return v}function v7(){var r=z.H,i=r.useState()[0];return i=typeof i.then=="function"?zl(i):i,r=r.useState()[0],(Vt!==null?Vt.memoizedState:null)!==r&&(ft.flags|=1024),i}function G0(){var r=sc!==0;return sc=0,r}function K0(r,i,l){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~l}function V0(r){if(ic){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ic=!1}ka=0,Rn=Vt=ft=null,Is=!1,Ll=sc=0,Ms=null}function ar(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rn===null?ft.memoizedState=Rn=r:Rn=Rn.next=r,Rn}function kn(){if(Vt===null){var r=ft.alternate;r=r!==null?r.memoizedState:null}else r=Vt.next;var i=Rn===null?ft.memoizedState:Rn.next;if(i!==null)Rn=i,Vt=r;else{if(r===null)throw ft.alternate===null?Error(a(467)):Error(a(310));Vt=r,r={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},Rn===null?ft.memoizedState=Rn=r:Rn=Rn.next=r}return Rn}function lc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zl(r){var i=Ll;return Ll+=1,Ms===null&&(Ms=[]),r=s1(Ms,r,i),i=ft,(Rn===null?i.memoizedState:Rn.next)===null&&(i=i.alternate,z.H=i===null||i.memoizedState===null?Q1:id),r}function oc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return zl(r);if(r.$$typeof===A)return Gn(r)}throw Error(a(438,String(r)))}function Y0(r){var i=null,l=ft.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var u=ft.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=lc(),ft.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(r),u=0;u<r;u++)l[u]=q;return i.index++,l}function Ea(r,i){return typeof i=="function"?i(r):i}function cc(r){var i=kn();return X0(i,Vt,r)}function X0(r,i,l){var u=r.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=r.baseQueue,v=u.pending;if(v!==null){if(p!==null){var T=p.next;p.next=v.next,v.next=T}i.baseQueue=p=v,u.pending=null}if(v=r.baseState,p===null)r.memoizedState=v;else{i=p.next;var j=T=null,J=null,de=i,ye=!1;do{var ke=de.lane&-536870913;if(ke!==de.lane?(Nt&ke)===ke:(ka&ke)===ke){var me=de.revertLane;if(me===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),ke===Ns&&(ye=!0);else if((ka&me)===me){de=de.next,me===Ns&&(ye=!0);continue}else ke={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(j=J=ke,T=v):J=J.next=ke,ft.lanes|=me,ci|=me;ke=de.action,Vi&&l(v,ke),v=de.hasEagerState?de.eagerState:l(v,ke)}else me={lane:ke,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(j=J=me,T=v):J=J.next=me,ft.lanes|=ke,ci|=ke;de=de.next}while(de!==null&&de!==i);if(J===null?T=v:J.next=j,!Tr(v,r.memoizedState)&&(_n=!0,ye&&(l=Cs,l!==null)))throw l;r.memoizedState=v,r.baseState=T,r.baseQueue=J,u.lastRenderedState=v}return p===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Z0(r){var i=kn(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var u=l.dispatch,p=l.pending,v=i.memoizedState;if(p!==null){l.pending=null;var T=p=p.next;do v=r(v,T.action),T=T.next;while(T!==p);Tr(v,i.memoizedState)||(_n=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),l.lastRenderedState=v}return[v,u]}function b1(r,i,l){var u=ft,p=kn(),v=Rt;if(v){if(l===void 0)throw Error(a(407));l=l()}else l=i();var T=!Tr((Vt||p).memoizedState,l);if(T&&(p.memoizedState=l,_n=!0),p=p.queue,J0(x1.bind(null,u,p,r),[r]),p.getSnapshot!==i||T||Rn!==null&&Rn.memoizedState.tag&1){if(u.flags|=2048,Os(9,{destroy:void 0},y1.bind(null,u,p,l,i),null),Qt===null)throw Error(a(349));v||(ka&127)!==0||v1(u,i,l)}return l}function v1(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=ft.updateQueue,i===null?(i=lc(),ft.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function y1(r,i,l,u){i.value=l,i.getSnapshot=u,w1(i)&&S1(r)}function x1(r,i,l){return l(function(){w1(i)&&S1(r)})}function w1(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Tr(r,l)}catch{return!0}}function S1(r){var i=Bi(r,2);i!==null&&vr(i,r,2)}function Q0(r){var i=ar();if(typeof r=="function"){var l=r;if(r=l(),Vi){cn(!0);try{l()}finally{cn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:r},i}function k1(r,i,l,u){return r.baseState=l,X0(r,Vt,typeof u=="function"?u:Ea)}function y7(r,i,l,u,p){if(fc(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){v.listeners.push(T)}};z.T!==null?l(!0):v.isTransition=!1,u(v),l=i.pending,l===null?(v.next=i.pending=v,E1(i,v)):(v.next=l.next,i.pending=l.next=v)}}function E1(r,i){var l=i.action,u=i.payload,p=r.state;if(i.isTransition){var v=z.T,T={};z.T=T;try{var j=l(p,u),J=z.S;J!==null&&J(T,j),T1(r,i,j)}catch(de){W0(r,i,de)}finally{v!==null&&T.types!==null&&(v.types=T.types),z.T=v}}else try{v=l(p,u),T1(r,i,v)}catch(de){W0(r,i,de)}}function T1(r,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){N1(r,i,u)},function(u){return W0(r,i,u)}):N1(r,i,l)}function N1(r,i,l){i.status="fulfilled",i.value=l,C1(i),r.state=l,i=r.pending,i!==null&&(l=i.next,l===i?r.pending=null:(l=l.next,i.next=l,E1(r,l)))}function W0(r,i,l){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=l,C1(i),i=i.next;while(i!==u)}r.action=null}function C1(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function A1(r,i){return i}function R1(r,i){if(Rt){var l=Qt.formState;if(l!==null){e:{var u=ft;if(Rt){if(rn){t:{for(var p=rn,v=$r;p.nodeType!==8;){if(!v){p=null;break t}if(p=Kr(p.nextSibling),p===null){p=null;break t}}v=p.data,p=v==="F!"||v==="F"?p:null}if(p){rn=Kr(p.nextSibling),u=p.data==="F!";break e}}ei(u)}u=!1}u&&(i=l[0])}}return l=ar(),l.memoizedState=l.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A1,lastRenderedState:i},l.queue=u,l=Y1.bind(null,ft,u),u.dispatch=l,u=Q0(!1),v=ad.bind(null,ft,!1,u.queue),u=ar(),p={state:i,dispatch:null,action:r,pending:null},u.queue=p,l=y7.bind(null,ft,p,v,l),p.dispatch=l,u.memoizedState=r,[i,l,!1]}function _1(r){var i=kn();return I1(i,Vt,r)}function I1(r,i,l){if(i=X0(r,i,A1)[0],r=cc(Ea)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=zl(i)}catch(T){throw T===As?Jo:T}else u=i;i=kn();var p=i.queue,v=p.dispatch;return l!==i.memoizedState&&(ft.flags|=2048,Os(9,{destroy:void 0},x7.bind(null,p,l),null)),[u,v,r]}function x7(r,i){r.action=i}function M1(r){var i=kn(),l=Vt;if(l!==null)return I1(i,l,r);kn(),i=i.memoizedState,l=kn();var u=l.queue.dispatch;return l.memoizedState=r,[i,u,!1]}function Os(r,i,l,u){return r={tag:r,create:l,deps:u,inst:i,next:null},i=ft.updateQueue,i===null&&(i=lc(),ft.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=r.next=r:(u=l.next,l.next=r,r.next=u,i.lastEffect=r),r}function O1(){return kn().memoizedState}function uc(r,i,l,u){var p=ar();ft.flags|=r,p.memoizedState=Os(1|i,{destroy:void 0},l,u===void 0?null:u)}function dc(r,i,l,u){var p=kn();u=u===void 0?null:u;var v=p.memoizedState.inst;Vt!==null&&u!==null&&P0(u,Vt.memoizedState.deps)?p.memoizedState=Os(i,v,l,u):(ft.flags|=r,p.memoizedState=Os(1|i,v,l,u))}function D1(r,i){uc(8390656,8,r,i)}function J0(r,i){dc(2048,8,r,i)}function w7(r){ft.flags|=4;var i=ft.updateQueue;if(i===null)i=lc(),ft.updateQueue=i,i.events=[r];else{var l=i.events;l===null?i.events=[r]:l.push(r)}}function j1(r){var i=kn().memoizedState;return w7({ref:i,nextImpl:r}),function(){if((zt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function L1(r,i){return dc(4,2,r,i)}function z1(r,i){return dc(4,4,r,i)}function B1(r,i){if(typeof i=="function"){r=r();var l=i(r);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function U1(r,i,l){l=l!=null?l.concat([r]):null,dc(4,4,B1.bind(null,i,r),l)}function ed(){}function q1(r,i){var l=kn();i=i===void 0?null:i;var u=l.memoizedState;return i!==null&&P0(i,u[1])?u[0]:(l.memoizedState=[r,i],r)}function H1(r,i){var l=kn();i=i===void 0?null:i;var u=l.memoizedState;if(i!==null&&P0(i,u[1]))return u[0];if(u=r(),Vi){cn(!0);try{r()}finally{cn(!1)}}return l.memoizedState=[u,i],u}function td(r,i,l){return l===void 0||(ka&1073741824)!==0&&(Nt&261930)===0?r.memoizedState=i:(r.memoizedState=l,r=Fg(),ft.lanes|=r,ci|=r,l)}function F1(r,i,l,u){return Tr(l,i)?l:_s.current!==null?(r=td(r,l,u),Tr(r,i)||(_n=!0),r):(ka&42)===0||(ka&1073741824)!==0&&(Nt&261930)===0?(_n=!0,r.memoizedState=l):(r=Fg(),ft.lanes|=r,ci|=r,i)}function P1(r,i,l,u,p){var v=V.p;V.p=v!==0&&8>v?v:8;var T=z.T,j={};z.T=j,ad(r,!1,i,l);try{var J=p(),de=z.S;if(de!==null&&de(j,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var ye=g7(J,u);Bl(r,i,ye,Ir(r))}else Bl(r,i,u,Ir(r))}catch(ke){Bl(r,i,{then:function(){},status:"rejected",reason:ke},Ir())}finally{V.p=v,T!==null&&j.types!==null&&(T.types=j.types),z.T=T}}function S7(){}function nd(r,i,l,u){if(r.tag!==5)throw Error(a(476));var p=$1(r).queue;P1(r,p,i,ne,l===null?S7:function(){return G1(r),l(u)})}function $1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:ne},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function G1(r){var i=$1(r);i.next===null&&(i=r.alternate.memoizedState),Bl(r,i.next.queue,{},Ir())}function rd(){return Gn(to)}function K1(){return kn().memoizedState}function V1(){return kn().memoizedState}function k7(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=Ir();r=ri(l);var u=ai(i,r,l);u!==null&&(vr(u,i,l),Ol(u,i,l)),i={cache:M0()},r.payload=i;return}i=i.return}}function E7(r,i,l){var u=Ir();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fc(r)?X1(i,l):(l=w0(r,i,l,u),l!==null&&(vr(l,r,u),Z1(l,i,u)))}function Y1(r,i,l){var u=Ir();Bl(r,i,l,u)}function Bl(r,i,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fc(r))X1(i,p);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var T=i.lastRenderedState,j=v(T,l);if(p.hasEagerState=!0,p.eagerState=j,Tr(j,T))return Ko(r,i,p,0),Qt===null&&Go(),!1}catch{}if(l=w0(r,i,p,u),l!==null)return vr(l,r,u),Z1(l,i,u),!0}return!1}function ad(r,i,l,u){if(u={lane:2,revertLane:Ld(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},fc(r)){if(i)throw Error(a(479))}else i=w0(r,l,u,2),i!==null&&vr(i,r,2)}function fc(r){var i=r.alternate;return r===ft||i!==null&&i===ft}function X1(r,i){Is=ic=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function Z1(r,i,l){if((l&4194048)!==0){var u=i.lanes;u&=r.pendingLanes,l|=u,i.lanes=l,Ve(r,l)}}var Ul={readContext:Gn,use:oc,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useLayoutEffect:hn,useInsertionEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useSyncExternalStore:hn,useId:hn,useHostTransitionStatus:hn,useFormState:hn,useActionState:hn,useOptimistic:hn,useMemoCache:hn,useCacheRefresh:hn};Ul.useEffectEvent=hn;var Q1={readContext:Gn,use:oc,useCallback:function(r,i){return ar().memoizedState=[r,i===void 0?null:i],r},useContext:Gn,useEffect:D1,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,uc(4194308,4,B1.bind(null,i,r),l)},useLayoutEffect:function(r,i){return uc(4194308,4,r,i)},useInsertionEffect:function(r,i){uc(4,2,r,i)},useMemo:function(r,i){var l=ar();i=i===void 0?null:i;var u=r();if(Vi){cn(!0);try{r()}finally{cn(!1)}}return l.memoizedState=[u,i],u},useReducer:function(r,i,l){var u=ar();if(l!==void 0){var p=l(i);if(Vi){cn(!0);try{l(i)}finally{cn(!1)}}}else p=i;return u.memoizedState=u.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},u.queue=r,r=r.dispatch=E7.bind(null,ft,r),[u.memoizedState,r]},useRef:function(r){var i=ar();return r={current:r},i.memoizedState=r},useState:function(r){r=Q0(r);var i=r.queue,l=Y1.bind(null,ft,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:ed,useDeferredValue:function(r,i){var l=ar();return td(l,r,i)},useTransition:function(){var r=Q0(!1);return r=P1.bind(null,ft,r.queue,!0,!1),ar().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var u=ft,p=ar();if(Rt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),Qt===null)throw Error(a(349));(Nt&127)!==0||v1(u,i,l)}p.memoizedState=l;var v={value:l,getSnapshot:i};return p.queue=v,D1(x1.bind(null,u,v,r),[r]),u.flags|=2048,Os(9,{destroy:void 0},y1.bind(null,u,v,l,i),null),l},useId:function(){var r=ar(),i=Qt.identifierPrefix;if(Rt){var l=aa,u=ra;l=(u&~(1<<32-gt(u)-1)).toString(32)+l,i="_"+i+"R_"+l,l=sc++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=b7++,i="_"+i+"r_"+l.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:rd,useFormState:R1,useActionState:R1,useOptimistic:function(r){var i=ar();i.memoizedState=i.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=ad.bind(null,ft,!0,l),l.dispatch=i,[r,i]},useMemoCache:Y0,useCacheRefresh:function(){return ar().memoizedState=k7.bind(null,ft)},useEffectEvent:function(r){var i=ar(),l={impl:r};return i.memoizedState=l,function(){if((zt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},id={readContext:Gn,use:oc,useCallback:q1,useContext:Gn,useEffect:J0,useImperativeHandle:U1,useInsertionEffect:L1,useLayoutEffect:z1,useMemo:H1,useReducer:cc,useRef:O1,useState:function(){return cc(Ea)},useDebugValue:ed,useDeferredValue:function(r,i){var l=kn();return F1(l,Vt.memoizedState,r,i)},useTransition:function(){var r=cc(Ea)[0],i=kn().memoizedState;return[typeof r=="boolean"?r:zl(r),i]},useSyncExternalStore:b1,useId:K1,useHostTransitionStatus:rd,useFormState:_1,useActionState:_1,useOptimistic:function(r,i){var l=kn();return k1(l,Vt,r,i)},useMemoCache:Y0,useCacheRefresh:V1};id.useEffectEvent=j1;var W1={readContext:Gn,use:oc,useCallback:q1,useContext:Gn,useEffect:J0,useImperativeHandle:U1,useInsertionEffect:L1,useLayoutEffect:z1,useMemo:H1,useReducer:Z0,useRef:O1,useState:function(){return Z0(Ea)},useDebugValue:ed,useDeferredValue:function(r,i){var l=kn();return Vt===null?td(l,r,i):F1(l,Vt.memoizedState,r,i)},useTransition:function(){var r=Z0(Ea)[0],i=kn().memoizedState;return[typeof r=="boolean"?r:zl(r),i]},useSyncExternalStore:b1,useId:K1,useHostTransitionStatus:rd,useFormState:M1,useActionState:M1,useOptimistic:function(r,i){var l=kn();return Vt!==null?k1(l,Vt,r,i):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:Y0,useCacheRefresh:V1};W1.useEffectEvent=j1;function sd(r,i,l,u){i=r.memoizedState,l=l(u,i),l=l==null?i:b({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var ld={enqueueSetState:function(r,i,l){r=r._reactInternals;var u=Ir(),p=ri(u);p.payload=i,l!=null&&(p.callback=l),i=ai(r,p,u),i!==null&&(vr(i,r,u),Ol(i,r,u))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var u=Ir(),p=ri(u);p.tag=1,p.payload=i,l!=null&&(p.callback=l),i=ai(r,p,u),i!==null&&(vr(i,r,u),Ol(i,r,u))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=Ir(),u=ri(l);u.tag=2,i!=null&&(u.callback=i),i=ai(r,u,l),i!==null&&(vr(i,r,l),Ol(i,r,l))}};function J1(r,i,l,u,p,v,T){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,v,T):i.prototype&&i.prototype.isPureReactComponent?!Tl(l,u)||!Tl(p,v):!0}function eg(r,i,l,u){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,u),i.state!==r&&ld.enqueueReplaceState(i,i.state,null)}function Yi(r,i){var l=i;if("ref"in i){l={};for(var u in i)u!=="ref"&&(l[u]=i[u])}if(r=r.defaultProps){l===i&&(l=b({},l));for(var p in r)l[p]===void 0&&(l[p]=r[p])}return l}function tg(r){$o(r)}function ng(r){console.error(r)}function rg(r){$o(r)}function mc(r,i){try{var l=r.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function ag(r,i,l){try{var u=r.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function od(r,i,l){return l=ri(l),l.tag=3,l.payload={element:null},l.callback=function(){mc(r,i)},l}function ig(r){return r=ri(r),r.tag=3,r}function sg(r,i,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var v=u.value;r.payload=function(){return p(v)},r.callback=function(){ag(i,l,u)}}var T=l.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){ag(i,l,u),typeof p!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var j=u.stack;this.componentDidCatch(u.value,{componentStack:j!==null?j:""})})}function T7(r,i,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=l.alternate,i!==null&&Ts(i,l,p,!0),l=Cr.current,l!==null){switch(l.tag){case 31:case 13:return Gr===null?Tc():l.alternate===null&&pn===0&&(pn=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===ec?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([u]):i.add(u),Od(r,u,p)),!1;case 22:return l.flags|=65536,u===ec?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([u]):l.add(u)),Od(r,u,p)),!1}throw Error(a(435,l.tag))}return Od(r,u,p),Tc(),!1}if(Rt)return i=Cr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,u!==C0&&(r=Error(a(422),{cause:u}),Al(Hr(r,l)))):(u!==C0&&(i=Error(a(423),{cause:u}),Al(Hr(i,l))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,u=Hr(u,l),p=od(r.stateNode,u,p),B0(r,p),pn!==4&&(pn=2)),!1;var v=Error(a(520),{cause:u});if(v=Hr(v,l),Vl===null?Vl=[v]:Vl.push(v),pn!==4&&(pn=2),i===null)return!0;u=Hr(u,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,r=p&-p,l.lanes|=r,r=od(l.stateNode,u,r),B0(l,r),!1;case 1:if(i=l.type,v=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ui===null||!ui.has(v))))return l.flags|=65536,p&=-p,l.lanes|=p,p=ig(p),sg(p,r,l,u),B0(l,p),!1}l=l.return}while(l!==null);return!1}var cd=Error(a(461)),_n=!1;function Kn(r,i,l,u){i.child=r===null?u1(i,null,l,u):Ki(i,r.child,l,u)}function lg(r,i,l,u,p){l=l.render;var v=i.ref;if("ref"in u){var T={};for(var j in u)j!=="ref"&&(T[j]=u[j])}else T=u;return Fi(i),u=$0(r,i,l,T,v,p),j=G0(),r!==null&&!_n?(K0(r,i,p),Ta(r,i,p)):(Rt&&j&&T0(i),i.flags|=1,Kn(r,i,u,p),i.child)}function og(r,i,l,u,p){if(r===null){var v=l.type;return typeof v=="function"&&!S0(v)&&v.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=v,cg(r,i,v,u,p)):(r=Yo(l.type,null,u,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!bd(r,p)){var T=v.memoizedProps;if(l=l.compare,l=l!==null?l:Tl,l(T,u)&&r.ref===i.ref)return Ta(r,i,p)}return i.flags|=1,r=ya(v,u),r.ref=i.ref,r.return=i,i.child=r}function cg(r,i,l,u,p){if(r!==null){var v=r.memoizedProps;if(Tl(v,u)&&r.ref===i.ref)if(_n=!1,i.pendingProps=u=v,bd(r,p))(r.flags&131072)!==0&&(_n=!0);else return i.lanes=r.lanes,Ta(r,i,p)}return ud(r,i,l,u,p)}function ug(r,i,l,u){var p=u.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|l:l,r!==null){for(u=i.child=r.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~v}else u=0,i.child=null;return dg(r,i,v,l,u)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Wo(i,v!==null?v.cachePool:null),v!==null?m1(i,v):q0(),h1(i);else return u=i.lanes=536870912,dg(r,i,v!==null?v.baseLanes|l:l,l,u)}else v!==null?(Wo(i,v.cachePool),m1(i,v),si(),i.memoizedState=null):(r!==null&&Wo(i,null),q0(),si());return Kn(r,i,p,l),i.child}function ql(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function dg(r,i,l,u,p){var v=D0();return v=v===null?null:{parent:An._currentValue,pool:v},i.memoizedState={baseLanes:l,cachePool:v},r!==null&&Wo(i,null),q0(),h1(i),r!==null&&Ts(r,i,u,!0),i.childLanes=p,null}function hc(r,i){return i=gc({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function fg(r,i,l){return Ki(i,r.child,null,l),r=hc(i,i.pendingProps),r.flags|=2,Ar(i),i.memoizedState=null,r}function N7(r,i,l){var u=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Rt){if(u.mode==="hidden")return r=hc(i,u),i.lanes=536870912,ql(null,r);if(F0(i),(r=rn)?(r=Eb(r,$r),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Wa!==null?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},l=Xp(r),l.return=i,i.child=l,$n=i,rn=null)):r=null,r===null)throw ei(i);return i.lanes=536870912,null}return hc(i,u)}var v=r.memoizedState;if(v!==null){var T=v.dehydrated;if(F0(i),p)if(i.flags&256)i.flags&=-257,i=fg(r,i,l);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(_n||Ts(r,i,l,!1),p=(l&r.childLanes)!==0,_n||p){if(u=Qt,u!==null&&(T=Mt(u,l),T!==0&&T!==v.retryLane))throw v.retryLane=T,Bi(r,T),vr(u,r,T),cd;Tc(),i=fg(r,i,l)}else r=v.treeContext,rn=Kr(T.nextSibling),$n=i,Rt=!0,Ja=null,$r=!1,r!==null&&Wp(i,r),i=hc(i,u),i.flags|=4096;return i}return r=ya(r.child,{mode:u.mode,children:u.children}),r.ref=i.ref,i.child=r,r.return=i,r}function pc(r,i){var l=i.ref;if(l===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(r===null||r.ref!==l)&&(i.flags|=4194816)}}function ud(r,i,l,u,p){return Fi(i),l=$0(r,i,l,u,void 0,p),u=G0(),r!==null&&!_n?(K0(r,i,p),Ta(r,i,p)):(Rt&&u&&T0(i),i.flags|=1,Kn(r,i,l,p),i.child)}function mg(r,i,l,u,p,v){return Fi(i),i.updateQueue=null,l=g1(i,u,l,p),p1(r),u=G0(),r!==null&&!_n?(K0(r,i,v),Ta(r,i,v)):(Rt&&u&&T0(i),i.flags|=1,Kn(r,i,l,v),i.child)}function hg(r,i,l,u,p){if(Fi(i),i.stateNode===null){var v=ws,T=l.contextType;typeof T=="object"&&T!==null&&(v=Gn(T)),v=new l(u,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=ld,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=u,v.state=i.memoizedState,v.refs={},L0(i),T=l.contextType,v.context=typeof T=="object"&&T!==null?Gn(T):ws,v.state=i.memoizedState,T=l.getDerivedStateFromProps,typeof T=="function"&&(sd(i,l,T,u),v.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(T=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),T!==v.state&&ld.enqueueReplaceState(v,v.state,null),jl(i,u,v,p),Dl(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(r===null){v=i.stateNode;var j=i.memoizedProps,J=Yi(l,j);v.props=J;var de=v.context,ye=l.contextType;T=ws,typeof ye=="object"&&ye!==null&&(T=Gn(ye));var ke=l.getDerivedStateFromProps;ye=typeof ke=="function"||typeof v.getSnapshotBeforeUpdate=="function",j=i.pendingProps!==j,ye||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j||de!==T)&&eg(i,v,u,T),ni=!1;var me=i.memoizedState;v.state=me,jl(i,u,v,p),Dl(),de=i.memoizedState,j||me!==de||ni?(typeof ke=="function"&&(sd(i,l,ke,u),de=i.memoizedState),(J=ni||J1(i,l,J,u,me,de,T))?(ye||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=de),v.props=u,v.state=de,v.context=T,u=J):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{v=i.stateNode,z0(r,i),T=i.memoizedProps,ye=Yi(l,T),v.props=ye,ke=i.pendingProps,me=v.context,de=l.contextType,J=ws,typeof de=="object"&&de!==null&&(J=Gn(de)),j=l.getDerivedStateFromProps,(de=typeof j=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==ke||me!==J)&&eg(i,v,u,J),ni=!1,me=i.memoizedState,v.state=me,jl(i,u,v,p),Dl();var pe=i.memoizedState;T!==ke||me!==pe||ni||r!==null&&r.dependencies!==null&&Zo(r.dependencies)?(typeof j=="function"&&(sd(i,l,j,u),pe=i.memoizedState),(ye=ni||J1(i,l,ye,u,me,pe,J)||r!==null&&r.dependencies!==null&&Zo(r.dependencies))?(de||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(u,pe,J),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(u,pe,J)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=pe),v.props=u,v.state=pe,v.context=J,u=ye):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=1024),u=!1)}return v=u,pc(r,i),u=(i.flags&128)!==0,v||u?(v=i.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&u?(i.child=Ki(i,r.child,null,p),i.child=Ki(i,null,l,p)):Kn(r,i,l,p),i.memoizedState=v.state,r=i.child):r=Ta(r,i,p),r}function pg(r,i,l,u){return qi(),i.flags|=256,Kn(r,i,l,u),i.child}var dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fd(r){return{baseLanes:r,cachePool:a1()}}function md(r,i,l){return r=r!==null?r.childLanes&~l:0,i&&(r|=_r),r}function gg(r,i,l){var u=i.pendingProps,p=!1,v=(i.flags&128)!==0,T;if((T=v)||(T=r!==null&&r.memoizedState===null?!1:(Sn.current&2)!==0),T&&(p=!0,i.flags&=-129),T=(i.flags&32)!==0,i.flags&=-33,r===null){if(Rt){if(p?ii(i):si(),(r=rn)?(r=Eb(r,$r),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Wa!==null?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},l=Xp(r),l.return=i,i.child=l,$n=i,rn=null)):r=null,r===null)throw ei(i);return Xd(r)?i.lanes=32:i.lanes=536870912,null}var j=u.children;return u=u.fallback,p?(si(),p=i.mode,j=gc({mode:"hidden",children:j},p),u=Ui(u,p,l,null),j.return=i,u.return=i,j.sibling=u,i.child=j,u=i.child,u.memoizedState=fd(l),u.childLanes=md(r,T,l),i.memoizedState=dd,ql(null,u)):(ii(i),hd(i,j))}var J=r.memoizedState;if(J!==null&&(j=J.dehydrated,j!==null)){if(v)i.flags&256?(ii(i),i.flags&=-257,i=pd(r,i,l)):i.memoizedState!==null?(si(),i.child=r.child,i.flags|=128,i=null):(si(),j=u.fallback,p=i.mode,u=gc({mode:"visible",children:u.children},p),j=Ui(j,p,l,null),j.flags|=2,u.return=i,j.return=i,u.sibling=j,i.child=u,Ki(i,r.child,null,l),u=i.child,u.memoizedState=fd(l),u.childLanes=md(r,T,l),i.memoizedState=dd,i=ql(null,u));else if(ii(i),Xd(j)){if(T=j.nextSibling&&j.nextSibling.dataset,T)var de=T.dgst;T=de,u=Error(a(419)),u.stack="",u.digest=T,Al({value:u,source:null,stack:null}),i=pd(r,i,l)}else if(_n||Ts(r,i,l,!1),T=(l&r.childLanes)!==0,_n||T){if(T=Qt,T!==null&&(u=Mt(T,l),u!==0&&u!==J.retryLane))throw J.retryLane=u,Bi(r,u),vr(T,r,u),cd;Yd(j)||Tc(),i=pd(r,i,l)}else Yd(j)?(i.flags|=192,i.child=r.child,i=null):(r=J.treeContext,rn=Kr(j.nextSibling),$n=i,Rt=!0,Ja=null,$r=!1,r!==null&&Wp(i,r),i=hd(i,u.children),i.flags|=4096);return i}return p?(si(),j=u.fallback,p=i.mode,J=r.child,de=J.sibling,u=ya(J,{mode:"hidden",children:u.children}),u.subtreeFlags=J.subtreeFlags&65011712,de!==null?j=ya(de,j):(j=Ui(j,p,l,null),j.flags|=2),j.return=i,u.return=i,u.sibling=j,i.child=u,ql(null,u),u=i.child,j=r.child.memoizedState,j===null?j=fd(l):(p=j.cachePool,p!==null?(J=An._currentValue,p=p.parent!==J?{parent:J,pool:J}:p):p=a1(),j={baseLanes:j.baseLanes|l,cachePool:p}),u.memoizedState=j,u.childLanes=md(r,T,l),i.memoizedState=dd,ql(r.child,u)):(ii(i),l=r.child,r=l.sibling,l=ya(l,{mode:"visible",children:u.children}),l.return=i,l.sibling=null,r!==null&&(T=i.deletions,T===null?(i.deletions=[r],i.flags|=16):T.push(r)),i.child=l,i.memoizedState=null,l)}function hd(r,i){return i=gc({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function gc(r,i){return r=Nr(22,r,null,i),r.lanes=0,r}function pd(r,i,l){return Ki(i,r.child,null,l),r=hd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function bg(r,i,l){r.lanes|=i;var u=r.alternate;u!==null&&(u.lanes|=i),_0(r.return,i,l)}function gd(r,i,l,u,p,v){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:v}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=u,T.tail=l,T.tailMode=p,T.treeForkCount=v)}function vg(r,i,l){var u=i.pendingProps,p=u.revealOrder,v=u.tail;u=u.children;var T=Sn.current,j=(T&2)!==0;if(j?(T=T&1|2,i.flags|=128):T&=1,_(Sn,T),Kn(r,i,u,l),u=Rt?Cl:0,!j&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&bg(r,l,i);else if(r.tag===19)bg(r,l,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":for(l=i.child,p=null;l!==null;)r=l.alternate,r!==null&&ac(r)===null&&(p=l),l=l.sibling;l=p,l===null?(p=i.child,i.child=null):(p=l.sibling,l.sibling=null),gd(i,!1,p,l,v,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&ac(r)===null){i.child=p;break}r=p.sibling,p.sibling=l,l=p,p=r}gd(i,!0,l,null,v,u);break;case"together":gd(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function Ta(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),ci|=i.lanes,(l&i.childLanes)===0)if(r!==null){if(Ts(r,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,l=ya(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=ya(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function bd(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Zo(r)))}function C7(r,i,l){switch(i.tag){case 3:ge(i,i.stateNode.containerInfo),ti(i,An,r.memoizedState.cache),qi();break;case 27:case 5:Ie(i);break;case 4:ge(i,i.stateNode.containerInfo);break;case 10:ti(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,F0(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(ii(i),i.flags|=128,null):(l&i.child.childLanes)!==0?gg(r,i,l):(ii(i),r=Ta(r,i,l),r!==null?r.sibling:null);ii(i);break;case 19:var p=(r.flags&128)!==0;if(u=(l&i.childLanes)!==0,u||(Ts(r,i,l,!1),u=(l&i.childLanes)!==0),p){if(u)return vg(r,i,l);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),_(Sn,Sn.current),u)break;return null;case 22:return i.lanes=0,ug(r,i,l,i.pendingProps);case 24:ti(i,An,r.memoizedState.cache)}return Ta(r,i,l)}function yg(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps)_n=!0;else{if(!bd(r,l)&&(i.flags&128)===0)return _n=!1,C7(r,i,l);_n=(r.flags&131072)!==0}else _n=!1,Rt&&(i.flags&1048576)!==0&&Qp(i,Cl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(r=$i(i.elementType),i.type=r,typeof r=="function")S0(r)?(u=Yi(r,u),i.tag=1,i=hg(null,i,r,u,l)):(i.tag=0,i=ud(null,i,r,u,l));else{if(r!=null){var p=r.$$typeof;if(p===H){i.tag=11,i=lg(null,i,r,u,l);break e}else if(p===$){i.tag=14,i=og(null,i,r,u,l);break e}}throw i=W(r)||r,Error(a(306,i,""))}}return i;case 0:return ud(r,i,i.type,i.pendingProps,l);case 1:return u=i.type,p=Yi(u,i.pendingProps),hg(r,i,u,p,l);case 3:e:{if(ge(i,i.stateNode.containerInfo),r===null)throw Error(a(387));u=i.pendingProps;var v=i.memoizedState;p=v.element,z0(r,i),jl(i,u,null,l);var T=i.memoizedState;if(u=T.cache,ti(i,An,u),u!==v.cache&&I0(i,[An],l,!0),Dl(),u=T.element,v.isDehydrated)if(v={element:u,isDehydrated:!1,cache:T.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=pg(r,i,u,l);break e}else if(u!==p){p=Hr(Error(a(424)),i),Al(p),i=pg(r,i,u,l);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,rn=Kr(r.firstChild),$n=i,Rt=!0,Ja=null,$r=!0,l=u1(i,null,u,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(qi(),u===p){i=Ta(r,i,l);break e}Kn(r,i,u,l)}i=i.child}return i;case 26:return pc(r,i),r===null?(l=_b(i.type,null,i.pendingProps,null))?i.memoizedState=l:Rt||(l=i.type,r=i.pendingProps,u=Mc(ie.current).createElement(l),u[xn]=i,u[Zn]=r,Vn(u,l,r),Nn(u),i.stateNode=u):i.memoizedState=_b(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Ie(i),r===null&&Rt&&(u=i.stateNode=Cb(i.type,i.pendingProps,ie.current),$n=i,$r=!0,p=rn,hi(i.type)?(Zd=p,rn=Kr(u.firstChild)):rn=p),Kn(r,i,i.pendingProps.children,l),pc(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Rt&&((p=u=rn)&&(u=rx(u,i.type,i.pendingProps,$r),u!==null?(i.stateNode=u,$n=i,rn=Kr(u.firstChild),$r=!1,p=!0):p=!1),p||ei(i)),Ie(i),p=i.type,v=i.pendingProps,T=r!==null?r.memoizedProps:null,u=v.children,Gd(p,v)?u=null:T!==null&&Gd(p,T)&&(i.flags|=32),i.memoizedState!==null&&(p=$0(r,i,v7,null,null,l),to._currentValue=p),pc(r,i),Kn(r,i,u,l),i.child;case 6:return r===null&&Rt&&((r=l=rn)&&(l=ax(l,i.pendingProps,$r),l!==null?(i.stateNode=l,$n=i,rn=null,r=!0):r=!1),r||ei(i)),null;case 13:return gg(r,i,l);case 4:return ge(i,i.stateNode.containerInfo),u=i.pendingProps,r===null?i.child=Ki(i,null,u,l):Kn(r,i,u,l),i.child;case 11:return lg(r,i,i.type,i.pendingProps,l);case 7:return Kn(r,i,i.pendingProps,l),i.child;case 8:return Kn(r,i,i.pendingProps.children,l),i.child;case 12:return Kn(r,i,i.pendingProps.children,l),i.child;case 10:return u=i.pendingProps,ti(i,i.type,u.value),Kn(r,i,u.children,l),i.child;case 9:return p=i.type._context,u=i.pendingProps.children,Fi(i),p=Gn(p),u=u(p),i.flags|=1,Kn(r,i,u,l),i.child;case 14:return og(r,i,i.type,i.pendingProps,l);case 15:return cg(r,i,i.type,i.pendingProps,l);case 19:return vg(r,i,l);case 31:return N7(r,i,l);case 22:return ug(r,i,l,i.pendingProps);case 24:return Fi(i),u=Gn(An),r===null?(p=D0(),p===null&&(p=Qt,v=M0(),p.pooledCache=v,v.refCount++,v!==null&&(p.pooledCacheLanes|=l),p=v),i.memoizedState={parent:u,cache:p},L0(i),ti(i,An,p)):((r.lanes&l)!==0&&(z0(r,i),jl(i,null,null,l),Dl()),p=r.memoizedState,v=i.memoizedState,p.parent!==u?(p={parent:u,cache:u},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),ti(i,An,u)):(u=v.cache,ti(i,An,u),u!==p.cache&&I0(i,[An],l,!0))),Kn(r,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Na(r){r.flags|=4}function vd(r,i,l,u,p){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(Kg())r.flags|=8192;else throw Gi=ec,j0}else r.flags&=-16777217}function xg(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!jb(i))if(Kg())r.flags|=8192;else throw Gi=ec,j0}function bc(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?et():536870912,r.lanes|=i,zs|=i)}function Hl(r,i){if(!Rt)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function an(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,u=0;if(i)for(var p=r.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=u,r.childLanes=l,i}function A7(r,i,l){var u=i.pendingProps;switch(N0(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(i),null;case 1:return an(i),null;case 3:return l=i.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),Sa(An),ve(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Es(i)?Na(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,A0())),an(i),null;case 26:var p=i.type,v=i.memoizedState;return r===null?(Na(i),v!==null?(an(i),xg(i,v)):(an(i),vd(i,p,null,u,l))):v?v!==r.memoizedState?(Na(i),an(i),xg(i,v)):(an(i),i.flags&=-16777217):(r=r.memoizedProps,r!==u&&Na(i),an(i),vd(i,p,r,u,l)),null;case 27:if(He(i),l=ie.current,p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==u&&Na(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return an(i),null}r=ce.current,Es(i)?Jp(i):(r=Cb(p,u,l),i.stateNode=r,Na(i))}return an(i),null;case 5:if(He(i),p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==u&&Na(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return an(i),null}if(v=ce.current,Es(i))Jp(i);else{var T=Mc(ie.current);switch(v){case 1:v=T.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:v=T.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":v=T.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":v=T.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":v=T.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?T.createElement("select",{is:u.is}):T.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?T.createElement(p,{is:u.is}):T.createElement(p)}}v[xn]=i,v[Zn]=u;e:for(T=i.child;T!==null;){if(T.tag===5||T.tag===6)v.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===i)break e;for(;T.sibling===null;){if(T.return===null||T.return===i)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}i.stateNode=v;e:switch(Vn(v,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Na(i)}}return an(i),vd(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,l),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==u&&Na(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(r=ie.current,Es(i)){if(r=i.stateNode,l=i.memoizedProps,u=null,p=$n,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}r[xn]=i,r=!!(r.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||gb(r.nodeValue,l)),r||ei(i,!0)}else r=Mc(r).createTextNode(u),r[xn]=i,i.stateNode=r}return an(i),null;case 31:if(l=i.memoizedState,r===null||r.memoizedState!==null){if(u=Es(i),l!==null){if(r===null){if(!u)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[xn]=i}else qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;an(i),r=!1}else l=A0(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return i.flags&256?(Ar(i),i):(Ar(i),null);if((i.flags&128)!==0)throw Error(a(558))}return an(i),null;case 13:if(u=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=Es(i),u!==null&&u.dehydrated!==null){if(r===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[xn]=i}else qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;an(i),p=!1}else p=A0(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(Ar(i),i):(Ar(i),null)}return Ar(i),(i.flags&128)!==0?(i.lanes=l,i):(l=u!==null,r=r!==null&&r.memoizedState!==null,l&&(u=i.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==p&&(u.flags|=2048)),l!==r&&l&&(i.child.flags|=8192),bc(i,i.updateQueue),an(i),null);case 4:return ve(),r===null&&qd(i.stateNode.containerInfo),an(i),null;case 10:return Sa(i.type),an(i),null;case 19:if(Y(Sn),u=i.memoizedState,u===null)return an(i),null;if(p=(i.flags&128)!==0,v=u.rendering,v===null)if(p)Hl(u,!1);else{if(pn!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=ac(r),v!==null){for(i.flags|=128,Hl(u,!1),r=v.updateQueue,i.updateQueue=r,bc(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)Yp(l,r),l=l.sibling;return _(Sn,Sn.current&1|2),Rt&&xa(i,u.treeForkCount),i.child}r=r.sibling}u.tail!==null&&Fe()>Sc&&(i.flags|=128,p=!0,Hl(u,!1),i.lanes=4194304)}else{if(!p)if(r=ac(v),r!==null){if(i.flags|=128,p=!0,r=r.updateQueue,i.updateQueue=r,bc(i,r),Hl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!Rt)return an(i),null}else 2*Fe()-u.renderingStartTime>Sc&&l!==536870912&&(i.flags|=128,p=!0,Hl(u,!1),i.lanes=4194304);u.isBackwards?(v.sibling=i.child,i.child=v):(r=u.last,r!==null?r.sibling=v:i.child=v,u.last=v)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=Fe(),r.sibling=null,l=Sn.current,_(Sn,p?l&1|2:l&1),Rt&&xa(i,u.treeForkCount),r):(an(i),null);case 22:case 23:return Ar(i),H0(),u=i.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(l&536870912)!==0&&(i.flags&128)===0&&(an(i),i.subtreeFlags&6&&(i.flags|=8192)):an(i),l=i.updateQueue,l!==null&&bc(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==l&&(i.flags|=2048),r!==null&&Y(Pi),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Sa(An),an(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function R7(r,i){switch(N0(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Sa(An),ve(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return He(i),null;case 31:if(i.memoizedState!==null){if(Ar(i),i.alternate===null)throw Error(a(340));qi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Ar(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));qi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Y(Sn),null;case 4:return ve(),null;case 10:return Sa(i.type),null;case 22:case 23:return Ar(i),H0(),r!==null&&Y(Pi),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Sa(An),null;case 25:return null;default:return null}}function wg(r,i){switch(N0(i),i.tag){case 3:Sa(An),ve();break;case 26:case 27:case 5:He(i);break;case 4:ve();break;case 31:i.memoizedState!==null&&Ar(i);break;case 13:Ar(i);break;case 19:Y(Sn);break;case 10:Sa(i.type);break;case 22:case 23:Ar(i),H0(),r!==null&&Y(Pi);break;case 24:Sa(An)}}function Fl(r,i){try{var l=i.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&r)===r){u=void 0;var v=l.create,T=l.inst;u=v(),T.destroy=u}l=l.next}while(l!==p)}}catch(j){Gt(i,i.return,j)}}function li(r,i,l){try{var u=i.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var v=p.next;u=v;do{if((u.tag&r)===r){var T=u.inst,j=T.destroy;if(j!==void 0){T.destroy=void 0,p=i;var J=l,de=j;try{de()}catch(ye){Gt(p,J,ye)}}}u=u.next}while(u!==v)}}catch(ye){Gt(i,i.return,ye)}}function Sg(r){var i=r.updateQueue;if(i!==null){var l=r.stateNode;try{f1(i,l)}catch(u){Gt(r,r.return,u)}}}function kg(r,i,l){l.props=Yi(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(u){Gt(r,i,u)}}function Pl(r,i){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof l=="function"?r.refCleanup=l(u):l.current=u}}catch(p){Gt(r,i,p)}}function ia(r,i){var l=r.ref,u=r.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){Gt(r,i,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){Gt(r,i,p)}else l.current=null}function Eg(r){var i=r.type,l=r.memoizedProps,u=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){Gt(r,r.return,p)}}function yd(r,i,l){try{var u=r.stateNode;Q7(u,r.type,l,i),u[Zn]=i}catch(p){Gt(r,r.return,p)}}function Tg(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&hi(r.type)||r.tag===4}function xd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Tg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&hi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function wd(r,i,l){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(r),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=je));else if(u!==4&&(u===27&&hi(r.type)&&(l=r.stateNode,i=null),r=r.child,r!==null))for(wd(r,i,l),r=r.sibling;r!==null;)wd(r,i,l),r=r.sibling}function vc(r,i,l){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(u!==4&&(u===27&&hi(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(vc(r,i,l),r=r.sibling;r!==null;)vc(r,i,l),r=r.sibling}function Ng(r){var i=r.stateNode,l=r.memoizedProps;try{for(var u=r.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);Vn(i,u,l),i[xn]=r,i[Zn]=l}catch(v){Gt(r,r.return,v)}}var Ca=!1,In=!1,Sd=!1,Cg=typeof WeakSet=="function"?WeakSet:Set,Hn=null;function _7(r,i){if(r=r.containerInfo,Pd=Uc,r=Up(r),p0(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var T=0,j=-1,J=-1,de=0,ye=0,ke=r,me=null;t:for(;;){for(var pe;ke!==l||p!==0&&ke.nodeType!==3||(j=T+p),ke!==v||u!==0&&ke.nodeType!==3||(J=T+u),ke.nodeType===3&&(T+=ke.nodeValue.length),(pe=ke.firstChild)!==null;)me=ke,ke=pe;for(;;){if(ke===r)break t;if(me===l&&++de===p&&(j=T),me===v&&++ye===u&&(J=T),(pe=ke.nextSibling)!==null)break;ke=me,me=ke.parentNode}ke=pe}l=j===-1||J===-1?null:{start:j,end:J}}else l=null}l=l||{start:0,end:0}}else l=null;for($d={focusedElem:r,selectionRange:l},Uc=!1,Hn=i;Hn!==null;)if(i=Hn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Hn=r;else for(;Hn!==null;){switch(i=Hn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)p=r[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,l=i,p=v.memoizedProps,v=v.memoizedState,u=l.stateNode;try{var Pe=Yi(l.type,p);r=u.getSnapshotBeforeUpdate(Pe,v),u.__reactInternalSnapshotBeforeUpdate=r}catch(rt){Gt(l,l.return,rt)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,l=r.nodeType,l===9)Vd(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Vd(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Hn=r;break}Hn=i.return}}function Ag(r,i,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Ra(r,l),u&4&&Fl(5,l);break;case 1:if(Ra(r,l),u&4)if(r=l.stateNode,i===null)try{r.componentDidMount()}catch(T){Gt(l,l.return,T)}else{var p=Yi(l.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(p,i,r.__reactInternalSnapshotBeforeUpdate)}catch(T){Gt(l,l.return,T)}}u&64&&Sg(l),u&512&&Pl(l,l.return);break;case 3:if(Ra(r,l),u&64&&(r=l.updateQueue,r!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{f1(r,i)}catch(T){Gt(l,l.return,T)}}break;case 27:i===null&&u&4&&Ng(l);case 26:case 5:Ra(r,l),i===null&&u&4&&Eg(l),u&512&&Pl(l,l.return);break;case 12:Ra(r,l);break;case 31:Ra(r,l),u&4&&Ig(r,l);break;case 13:Ra(r,l),u&4&&Mg(r,l),u&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=U7.bind(null,l),ix(r,l))));break;case 22:if(u=l.memoizedState!==null||Ca,!u){i=i!==null&&i.memoizedState!==null||In,p=Ca;var v=In;Ca=u,(In=i)&&!v?_a(r,l,(l.subtreeFlags&8772)!==0):Ra(r,l),Ca=p,In=v}break;case 30:break;default:Ra(r,l)}}function Rg(r){var i=r.alternate;i!==null&&(r.alternate=null,Rg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&ml(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var sn=null,hr=!1;function Aa(r,i,l){for(l=l.child;l!==null;)_g(r,i,l),l=l.sibling}function _g(r,i,l){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(At,l)}catch{}switch(l.tag){case 26:In||ia(l,i),Aa(r,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:In||ia(l,i);var u=sn,p=hr;hi(l.type)&&(sn=l.stateNode,hr=!1),Aa(r,i,l),Wl(l.stateNode),sn=u,hr=p;break;case 5:In||ia(l,i);case 6:if(u=sn,p=hr,sn=null,Aa(r,i,l),sn=u,hr=p,sn!==null)if(hr)try{(sn.nodeType===9?sn.body:sn.nodeName==="HTML"?sn.ownerDocument.body:sn).removeChild(l.stateNode)}catch(v){Gt(l,i,v)}else try{sn.removeChild(l.stateNode)}catch(v){Gt(l,i,v)}break;case 18:sn!==null&&(hr?(r=sn,Sb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),Gs(r)):Sb(sn,l.stateNode));break;case 4:u=sn,p=hr,sn=l.stateNode.containerInfo,hr=!0,Aa(r,i,l),sn=u,hr=p;break;case 0:case 11:case 14:case 15:li(2,l,i),In||li(4,l,i),Aa(r,i,l);break;case 1:In||(ia(l,i),u=l.stateNode,typeof u.componentWillUnmount=="function"&&kg(l,i,u)),Aa(r,i,l);break;case 21:Aa(r,i,l);break;case 22:In=(u=In)||l.memoizedState!==null,Aa(r,i,l),In=u;break;default:Aa(r,i,l)}}function Ig(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Gs(r)}catch(l){Gt(i,i.return,l)}}}function Mg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Gs(r)}catch(l){Gt(i,i.return,l)}}function I7(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Cg),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Cg),i;default:throw Error(a(435,r.tag))}}function yc(r,i){var l=I7(r);i.forEach(function(u){if(!l.has(u)){l.add(u);var p=q7.bind(null,r,u);u.then(p,p)}})}function pr(r,i){var l=i.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],v=r,T=i,j=T;e:for(;j!==null;){switch(j.tag){case 27:if(hi(j.type)){sn=j.stateNode,hr=!1;break e}break;case 5:sn=j.stateNode,hr=!1;break e;case 3:case 4:sn=j.stateNode.containerInfo,hr=!0;break e}j=j.return}if(sn===null)throw Error(a(160));_g(v,T,p),sn=null,hr=!1,v=p.alternate,v!==null&&(v.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Og(i,r),i=i.sibling}var Wr=null;function Og(r,i){var l=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:pr(i,r),gr(r),u&4&&(li(3,r,r.return),Fl(3,r),li(5,r,r.return));break;case 1:pr(i,r),gr(r),u&512&&(In||l===null||ia(l,l.return)),u&64&&Ca&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=Wr;if(pr(i,r),gr(r),u&512&&(In||l===null||ia(l,l.return)),u&4){var v=l!==null?l.memoizedState:null;if(u=r.memoizedState,l===null)if(u===null)if(r.stateNode===null){e:{u=r.type,l=r.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":v=p.getElementsByTagName("title")[0],(!v||v[Mi]||v[xn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=p.createElement(u),p.head.insertBefore(v,p.querySelector("head > title"))),Vn(v,u,l),v[xn]=r,Nn(v),u=v;break e;case"link":var T=Ob("link","href",p).get(u+(l.href||""));if(T){for(var j=0;j<T.length;j++)if(v=T[j],v.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&v.getAttribute("rel")===(l.rel==null?null:l.rel)&&v.getAttribute("title")===(l.title==null?null:l.title)&&v.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){T.splice(j,1);break t}}v=p.createElement(u),Vn(v,u,l),p.head.appendChild(v);break;case"meta":if(T=Ob("meta","content",p).get(u+(l.content||""))){for(j=0;j<T.length;j++)if(v=T[j],v.getAttribute("content")===(l.content==null?null:""+l.content)&&v.getAttribute("name")===(l.name==null?null:l.name)&&v.getAttribute("property")===(l.property==null?null:l.property)&&v.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&v.getAttribute("charset")===(l.charSet==null?null:l.charSet)){T.splice(j,1);break t}}v=p.createElement(u),Vn(v,u,l),p.head.appendChild(v);break;default:throw Error(a(468,u))}v[xn]=r,Nn(v),u=v}r.stateNode=u}else Db(p,r.type,r.stateNode);else r.stateNode=Mb(p,u,r.memoizedProps);else v!==u?(v===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):v.count--,u===null?Db(p,r.type,r.stateNode):Mb(p,u,r.memoizedProps)):u===null&&r.stateNode!==null&&yd(r,r.memoizedProps,l.memoizedProps)}break;case 27:pr(i,r),gr(r),u&512&&(In||l===null||ia(l,l.return)),l!==null&&u&4&&yd(r,r.memoizedProps,l.memoizedProps);break;case 5:if(pr(i,r),gr(r),u&512&&(In||l===null||ia(l,l.return)),r.flags&32){p=r.stateNode;try{at(p,"")}catch(Pe){Gt(r,r.return,Pe)}}u&4&&r.stateNode!=null&&(p=r.memoizedProps,yd(r,p,l!==null?l.memoizedProps:p)),u&1024&&(Sd=!0);break;case 6:if(pr(i,r),gr(r),u&4){if(r.stateNode===null)throw Error(a(162));u=r.memoizedProps,l=r.stateNode;try{l.nodeValue=u}catch(Pe){Gt(r,r.return,Pe)}}break;case 3:if(jc=null,p=Wr,Wr=Oc(i.containerInfo),pr(i,r),Wr=p,gr(r),u&4&&l!==null&&l.memoizedState.isDehydrated)try{Gs(i.containerInfo)}catch(Pe){Gt(r,r.return,Pe)}Sd&&(Sd=!1,Dg(r));break;case 4:u=Wr,Wr=Oc(r.stateNode.containerInfo),pr(i,r),gr(r),Wr=u;break;case 12:pr(i,r),gr(r);break;case 31:pr(i,r),gr(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,yc(r,u)));break;case 13:pr(i,r),gr(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(wc=Fe()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,yc(r,u)));break;case 22:p=r.memoizedState!==null;var J=l!==null&&l.memoizedState!==null,de=Ca,ye=In;if(Ca=de||p,In=ye||J,pr(i,r),In=ye,Ca=de,gr(r),u&8192)e:for(i=r.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(l===null||J||Ca||In||Xi(r)),l=null,i=r;;){if(i.tag===5||i.tag===26){if(l===null){J=l=i;try{if(v=J.stateNode,p)T=v.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{j=J.stateNode;var ke=J.memoizedProps.style,me=ke!=null&&ke.hasOwnProperty("display")?ke.display:null;j.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Pe){Gt(J,J.return,Pe)}}}else if(i.tag===6){if(l===null){J=i;try{J.stateNode.nodeValue=p?"":J.memoizedProps}catch(Pe){Gt(J,J.return,Pe)}}}else if(i.tag===18){if(l===null){J=i;try{var pe=J.stateNode;p?kb(pe,!0):kb(J.stateNode,!1)}catch(Pe){Gt(J,J.return,Pe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=r.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,yc(r,l))));break;case 19:pr(i,r),gr(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,yc(r,u)));break;case 30:break;case 21:break;default:pr(i,r),gr(r)}}function gr(r){var i=r.flags;if(i&2){try{for(var l,u=r.return;u!==null;){if(Tg(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,v=xd(r);vc(r,v,p);break;case 5:var T=l.stateNode;l.flags&32&&(at(T,""),l.flags&=-33);var j=xd(r);vc(r,j,T);break;case 3:case 4:var J=l.stateNode.containerInfo,de=xd(r);wd(r,de,J);break;default:throw Error(a(161))}}catch(ye){Gt(r,r.return,ye)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Dg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Dg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Ra(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Ag(r,i.alternate,i),i=i.sibling}function Xi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:li(4,i,i.return),Xi(i);break;case 1:ia(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&kg(i,i.return,l),Xi(i);break;case 27:Wl(i.stateNode);case 26:case 5:ia(i,i.return),Xi(i);break;case 22:i.memoizedState===null&&Xi(i);break;case 30:Xi(i);break;default:Xi(i)}r=r.sibling}}function _a(r,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,p=r,v=i,T=v.flags;switch(v.tag){case 0:case 11:case 15:_a(p,v,l),Fl(4,v);break;case 1:if(_a(p,v,l),u=v,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(de){Gt(u,u.return,de)}if(u=v,p=u.updateQueue,p!==null){var j=u.stateNode;try{var J=p.shared.hiddenCallbacks;if(J!==null)for(p.shared.hiddenCallbacks=null,p=0;p<J.length;p++)d1(J[p],j)}catch(de){Gt(u,u.return,de)}}l&&T&64&&Sg(v),Pl(v,v.return);break;case 27:Ng(v);case 26:case 5:_a(p,v,l),l&&u===null&&T&4&&Eg(v),Pl(v,v.return);break;case 12:_a(p,v,l);break;case 31:_a(p,v,l),l&&T&4&&Ig(p,v);break;case 13:_a(p,v,l),l&&T&4&&Mg(p,v);break;case 22:v.memoizedState===null&&_a(p,v,l),Pl(v,v.return);break;case 30:break;default:_a(p,v,l)}i=i.sibling}}function kd(r,i){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&Rl(l))}function Ed(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Rl(r))}function Jr(r,i,l,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)jg(r,i,l,u),i=i.sibling}function jg(r,i,l,u){var p=i.flags;switch(i.tag){case 0:case 11:case 15:Jr(r,i,l,u),p&2048&&Fl(9,i);break;case 1:Jr(r,i,l,u);break;case 3:Jr(r,i,l,u),p&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Rl(r)));break;case 12:if(p&2048){Jr(r,i,l,u),r=i.stateNode;try{var v=i.memoizedProps,T=v.id,j=v.onPostCommit;typeof j=="function"&&j(T,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(J){Gt(i,i.return,J)}}else Jr(r,i,l,u);break;case 31:Jr(r,i,l,u);break;case 13:Jr(r,i,l,u);break;case 23:break;case 22:v=i.stateNode,T=i.alternate,i.memoizedState!==null?v._visibility&2?Jr(r,i,l,u):$l(r,i):v._visibility&2?Jr(r,i,l,u):(v._visibility|=2,Ds(r,i,l,u,(i.subtreeFlags&10256)!==0||!1)),p&2048&&kd(T,i);break;case 24:Jr(r,i,l,u),p&2048&&Ed(i.alternate,i);break;default:Jr(r,i,l,u)}}function Ds(r,i,l,u,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,T=i,j=l,J=u,de=T.flags;switch(T.tag){case 0:case 11:case 15:Ds(v,T,j,J,p),Fl(8,T);break;case 23:break;case 22:var ye=T.stateNode;T.memoizedState!==null?ye._visibility&2?Ds(v,T,j,J,p):$l(v,T):(ye._visibility|=2,Ds(v,T,j,J,p)),p&&de&2048&&kd(T.alternate,T);break;case 24:Ds(v,T,j,J,p),p&&de&2048&&Ed(T.alternate,T);break;default:Ds(v,T,j,J,p)}i=i.sibling}}function $l(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=r,u=i,p=u.flags;switch(u.tag){case 22:$l(l,u),p&2048&&kd(u.alternate,u);break;case 24:$l(l,u),p&2048&&Ed(u.alternate,u);break;default:$l(l,u)}i=i.sibling}}var Gl=8192;function js(r,i,l){if(r.subtreeFlags&Gl)for(r=r.child;r!==null;)Lg(r,i,l),r=r.sibling}function Lg(r,i,l){switch(r.tag){case 26:js(r,i,l),r.flags&Gl&&r.memoizedState!==null&&bx(l,Wr,r.memoizedState,r.memoizedProps);break;case 5:js(r,i,l);break;case 3:case 4:var u=Wr;Wr=Oc(r.stateNode.containerInfo),js(r,i,l),Wr=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=Gl,Gl=16777216,js(r,i,l),Gl=u):js(r,i,l));break;default:js(r,i,l)}}function zg(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Kl(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var u=i[l];Hn=u,Ug(u,r)}zg(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Bg(r),r=r.sibling}function Bg(r){switch(r.tag){case 0:case 11:case 15:Kl(r),r.flags&2048&&li(9,r,r.return);break;case 3:Kl(r);break;case 12:Kl(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,xc(r)):Kl(r);break;default:Kl(r)}}function xc(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var u=i[l];Hn=u,Ug(u,r)}zg(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:li(8,i,i.return),xc(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,xc(i));break;default:xc(i)}r=r.sibling}}function Ug(r,i){for(;Hn!==null;){var l=Hn;switch(l.tag){case 0:case 11:case 15:li(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Rl(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,Hn=u;else e:for(l=r;Hn!==null;){u=Hn;var p=u.sibling,v=u.return;if(Rg(u),u===l){Hn=null;break e}if(p!==null){p.return=v,Hn=p;break e}Hn=v}}}var M7={getCacheForType:function(r){var i=Gn(An),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l},cacheSignal:function(){return Gn(An).controller.signal}},O7=typeof WeakMap=="function"?WeakMap:Map,zt=0,Qt=null,St=null,Nt=0,$t=0,Rr=null,oi=!1,Ls=!1,Td=!1,Ia=0,pn=0,ci=0,Zi=0,Nd=0,_r=0,zs=0,Vl=null,br=null,Cd=!1,wc=0,qg=0,Sc=1/0,kc=null,ui=null,zn=0,di=null,Bs=null,Ma=0,Ad=0,Rd=null,Hg=null,Yl=0,_d=null;function Ir(){return(zt&2)!==0&&Nt!==0?Nt&-Nt:z.T!==null?Ld():ur()}function Fg(){if(_r===0)if((Nt&536870912)===0||Rt){var r=bt;bt<<=1,(bt&3932160)===0&&(bt=262144),_r=r}else _r=536870912;return r=Cr.current,r!==null&&(r.flags|=32),_r}function vr(r,i,l){(r===Qt&&($t===2||$t===9)||r.cancelPendingCommit!==null)&&(Us(r,0),fi(r,Nt,_r,!1)),Le(r,l),((zt&2)===0||r!==Qt)&&(r===Qt&&((zt&2)===0&&(Zi|=l),pn===4&&fi(r,Nt,_r,!1)),sa(r))}function Pg(r,i,l){if((zt&6)!==0)throw Error(a(327));var u=!l&&(i&127)===0&&(i&r.expiredLanes)===0||xe(r,i),p=u?L7(r,i):Md(r,i,!0),v=u;do{if(p===0){Ls&&!u&&fi(r,i,0,!1);break}else{if(l=r.current.alternate,v&&!D7(l)){p=Md(r,i,!1),v=!1;continue}if(p===2){if(v=i,r.errorRecoveryDisabledLanes&v)var T=0;else T=r.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){i=T;e:{var j=r;p=Vl;var J=j.current.memoizedState.isDehydrated;if(J&&(Us(j,T).flags|=256),T=Md(j,T,!1),T!==2){if(Td&&!J){j.errorRecoveryDisabledLanes|=v,Zi|=v,p=4;break e}v=br,br=p,v!==null&&(br===null?br=v:br.push.apply(br,v))}p=T}if(v=!1,p!==2)continue}}if(p===1){Us(r,0),fi(r,i,0,!0);break}e:{switch(u=r,v=p,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:fi(u,i,_r,!oi);break e;case 2:br=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=wc+300-Fe(),10<p)){if(fi(u,i,_r,!oi),Q(u,0,!0)!==0)break e;Ma=i,u.timeoutHandle=xb($g.bind(null,u,l,br,kc,Cd,i,_r,Zi,zs,oi,v,"Throttled",-0,0),p);break e}$g(u,l,br,kc,Cd,i,_r,Zi,zs,oi,v,null,-0,0)}}break}while(!0);sa(r)}function $g(r,i,l,u,p,v,T,j,J,de,ye,ke,me,pe){if(r.timeoutHandle=-1,ke=i.subtreeFlags,ke&8192||(ke&16785408)===16785408){ke={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:je},Lg(i,v,ke);var Pe=(v&62914560)===v?wc-Fe():(v&4194048)===v?qg-Fe():0;if(Pe=vx(ke,Pe),Pe!==null){Ma=v,r.cancelPendingCommit=Pe(Wg.bind(null,r,i,v,l,u,p,T,j,J,ye,ke,null,me,pe)),fi(r,v,T,!de);return}}Wg(r,i,v,l,u,p,T,j,J)}function D7(r){for(var i=r;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],v=p.getSnapshot;p=p.value;try{if(!Tr(v(),p))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function fi(r,i,l,u){i&=~Nd,i&=~Zi,r.suspendedLanes|=i,r.pingedLanes&=~i,u&&(r.warmLanes|=i),u=r.expirationTimes;for(var p=i;0<p;){var v=31-gt(p),T=1<<v;u[v]=-1,p&=~T}l!==0&&Oe(r,l,i)}function Ec(){return(zt&6)===0?(Xl(0),!1):!0}function Id(){if(St!==null){if($t===0)var r=St.return;else r=St,wa=Hi=null,V0(r),Rs=null,Il=0,r=St;for(;r!==null;)wg(r.alternate,r),r=r.return;St=null}}function Us(r,i){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,ex(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Ma=0,Id(),Qt=r,St=l=ya(r.current,null),Nt=i,$t=0,Rr=null,oi=!1,Ls=xe(r,i),Td=!1,zs=_r=Nd=Zi=ci=pn=0,br=Vl=null,Cd=!1,(i&8)!==0&&(i|=i&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=i;0<u;){var p=31-gt(u),v=1<<p;i|=r[p],u&=~v}return Ia=i,Go(),l}function Gg(r,i){ft=null,z.H=Ul,i===As||i===Jo?(i=l1(),$t=3):i===j0?(i=l1(),$t=4):$t=i===cd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Rr=i,St===null&&(pn=1,mc(r,Hr(i,r.current)))}function Kg(){var r=Cr.current;return r===null?!0:(Nt&4194048)===Nt?Gr===null:(Nt&62914560)===Nt||(Nt&536870912)!==0?r===Gr:!1}function Vg(){var r=z.H;return z.H=Ul,r===null?Ul:r}function Yg(){var r=z.A;return z.A=M7,r}function Tc(){pn=4,oi||(Nt&4194048)!==Nt&&Cr.current!==null||(Ls=!0),(ci&134217727)===0&&(Zi&134217727)===0||Qt===null||fi(Qt,Nt,_r,!1)}function Md(r,i,l){var u=zt;zt|=2;var p=Vg(),v=Yg();(Qt!==r||Nt!==i)&&(kc=null,Us(r,i)),i=!1;var T=pn;e:do try{if($t!==0&&St!==null){var j=St,J=Rr;switch($t){case 8:Id(),T=6;break e;case 3:case 2:case 9:case 6:Cr.current===null&&(i=!0);var de=$t;if($t=0,Rr=null,qs(r,j,J,de),l&&Ls){T=0;break e}break;default:de=$t,$t=0,Rr=null,qs(r,j,J,de)}}j7(),T=pn;break}catch(ye){Gg(r,ye)}while(!0);return i&&r.shellSuspendCounter++,wa=Hi=null,zt=u,z.H=p,z.A=v,St===null&&(Qt=null,Nt=0,Go()),T}function j7(){for(;St!==null;)Xg(St)}function L7(r,i){var l=zt;zt|=2;var u=Vg(),p=Yg();Qt!==r||Nt!==i?(kc=null,Sc=Fe()+500,Us(r,i)):Ls=xe(r,i);e:do try{if($t!==0&&St!==null){i=St;var v=Rr;t:switch($t){case 1:$t=0,Rr=null,qs(r,i,v,1);break;case 2:case 9:if(i1(v)){$t=0,Rr=null,Zg(i);break}i=function(){$t!==2&&$t!==9||Qt!==r||($t=7),sa(r)},v.then(i,i);break e;case 3:$t=7;break e;case 4:$t=5;break e;case 7:i1(v)?($t=0,Rr=null,Zg(i)):($t=0,Rr=null,qs(r,i,v,7));break;case 5:var T=null;switch(St.tag){case 26:T=St.memoizedState;case 5:case 27:var j=St;if(T?jb(T):j.stateNode.complete){$t=0,Rr=null;var J=j.sibling;if(J!==null)St=J;else{var de=j.return;de!==null?(St=de,Nc(de)):St=null}break t}}$t=0,Rr=null,qs(r,i,v,5);break;case 6:$t=0,Rr=null,qs(r,i,v,6);break;case 8:Id(),pn=6;break e;default:throw Error(a(462))}}z7();break}catch(ye){Gg(r,ye)}while(!0);return wa=Hi=null,z.H=u,z.A=p,zt=l,St!==null?0:(Qt=null,Nt=0,Go(),pn)}function z7(){for(;St!==null&&!xt();)Xg(St)}function Xg(r){var i=yg(r.alternate,r,Ia);r.memoizedProps=r.pendingProps,i===null?Nc(r):St=i}function Zg(r){var i=r,l=i.alternate;switch(i.tag){case 15:case 0:i=mg(l,i,i.pendingProps,i.type,void 0,Nt);break;case 11:i=mg(l,i,i.pendingProps,i.type.render,i.ref,Nt);break;case 5:V0(i);default:wg(l,i),i=St=Yp(i,Ia),i=yg(l,i,Ia)}r.memoizedProps=r.pendingProps,i===null?Nc(r):St=i}function qs(r,i,l,u){wa=Hi=null,V0(i),Rs=null,Il=0;var p=i.return;try{if(T7(r,p,i,l,Nt)){pn=1,mc(r,Hr(l,r.current)),St=null;return}}catch(v){if(p!==null)throw St=p,v;pn=1,mc(r,Hr(l,r.current)),St=null;return}i.flags&32768?(Rt||u===1?r=!0:Ls||(Nt&536870912)!==0?r=!1:(oi=r=!0,(u===2||u===9||u===3||u===6)&&(u=Cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Qg(i,r)):Nc(i)}function Nc(r){var i=r;do{if((i.flags&32768)!==0){Qg(i,oi);return}r=i.return;var l=A7(i.alternate,i,Ia);if(l!==null){St=l;return}if(i=i.sibling,i!==null){St=i;return}St=i=r}while(i!==null);pn===0&&(pn=5)}function Qg(r,i){do{var l=R7(r.alternate,r);if(l!==null){l.flags&=32767,St=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(r=r.sibling,r!==null)){St=r;return}St=r=l}while(r!==null);pn=6,St=null}function Wg(r,i,l,u,p,v,T,j,J){r.cancelPendingCommit=null;do Cc();while(zn!==0);if((zt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=x0,ze(r,l,v,T,j,J),r===Qt&&(St=Qt=null,Nt=0),Bs=i,di=r,Ma=l,Ad=v,Rd=p,Hg=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,H7(Ue,function(){return rb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=z.T,z.T=null,p=V.p,V.p=2,T=zt,zt|=4;try{_7(r,i,l)}finally{zt=T,V.p=p,z.T=u}}zn=1,Jg(),eb(),tb()}}function Jg(){if(zn===1){zn=0;var r=di,i=Bs,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var u=V.p;V.p=2;var p=zt;zt|=4;try{Og(i,r);var v=$d,T=Up(r.containerInfo),j=v.focusedElem,J=v.selectionRange;if(T!==j&&j&&j.ownerDocument&&Bp(j.ownerDocument.documentElement,j)){if(J!==null&&p0(j)){var de=J.start,ye=J.end;if(ye===void 0&&(ye=de),"selectionStart"in j)j.selectionStart=de,j.selectionEnd=Math.min(ye,j.value.length);else{var ke=j.ownerDocument||document,me=ke&&ke.defaultView||window;if(me.getSelection){var pe=me.getSelection(),Pe=j.textContent.length,rt=Math.min(J.start,Pe),Xt=J.end===void 0?rt:Math.min(J.end,Pe);!pe.extend&&rt>Xt&&(T=Xt,Xt=rt,rt=T);var se=zp(j,rt),te=zp(j,Xt);if(se&&te&&(pe.rangeCount!==1||pe.anchorNode!==se.node||pe.anchorOffset!==se.offset||pe.focusNode!==te.node||pe.focusOffset!==te.offset)){var ue=ke.createRange();ue.setStart(se.node,se.offset),pe.removeAllRanges(),rt>Xt?(pe.addRange(ue),pe.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),pe.addRange(ue))}}}}for(ke=[],pe=j;pe=pe.parentNode;)pe.nodeType===1&&ke.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<ke.length;j++){var Se=ke[j];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}Uc=!!Pd,$d=Pd=null}finally{zt=p,V.p=u,z.T=l}}r.current=i,zn=2}}function eb(){if(zn===2){zn=0;var r=di,i=Bs,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var u=V.p;V.p=2;var p=zt;zt|=4;try{Ag(r,i.alternate,i)}finally{zt=p,V.p=u,z.T=l}}zn=3}}function tb(){if(zn===4||zn===3){zn=0,jt();var r=di,i=Bs,l=Ma,u=Hg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?zn=5:(zn=0,Bs=di=null,nb(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(ui=null),Ln(l),i=i.stateNode,lt&&typeof lt.onCommitFiberRoot=="function")try{lt.onCommitFiberRoot(At,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=z.T,p=V.p,V.p=2,z.T=null;try{for(var v=r.onRecoverableError,T=0;T<u.length;T++){var j=u[T];v(j.value,{componentStack:j.stack})}}finally{z.T=i,V.p=p}}(Ma&3)!==0&&Cc(),sa(r),p=r.pendingLanes,(l&261930)!==0&&(p&42)!==0?r===_d?Yl++:(Yl=0,_d=r):Yl=0,Xl(0)}}function nb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Rl(i)))}function Cc(){return Jg(),eb(),tb(),rb()}function rb(){if(zn!==5)return!1;var r=di,i=Ad;Ad=0;var l=Ln(Ma),u=z.T,p=V.p;try{V.p=32>l?32:l,z.T=null,l=Rd,Rd=null;var v=di,T=Ma;if(zn=0,Bs=di=null,Ma=0,(zt&6)!==0)throw Error(a(331));var j=zt;if(zt|=4,Bg(v.current),jg(v,v.current,T,l),zt=j,Xl(0,!1),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(At,v)}catch{}return!0}finally{V.p=p,z.T=u,nb(r,i)}}function ab(r,i,l){i=Hr(l,i),i=od(r.stateNode,i,2),r=ai(r,i,2),r!==null&&(Le(r,2),sa(r))}function Gt(r,i,l){if(r.tag===3)ab(r,r,l);else for(;i!==null;){if(i.tag===3){ab(i,r,l);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ui===null||!ui.has(u))){r=Hr(l,r),l=ig(2),u=ai(i,l,2),u!==null&&(sg(l,u,i,r),Le(u,2),sa(u));break}}i=i.return}}function Od(r,i,l){var u=r.pingCache;if(u===null){u=r.pingCache=new O7;var p=new Set;u.set(i,p)}else p=u.get(i),p===void 0&&(p=new Set,u.set(i,p));p.has(l)||(Td=!0,p.add(l),r=B7.bind(null,r,i,l),i.then(r,r))}function B7(r,i,l){var u=r.pingCache;u!==null&&u.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,Qt===r&&(Nt&l)===l&&(pn===4||pn===3&&(Nt&62914560)===Nt&&300>Fe()-wc?(zt&2)===0&&Us(r,0):Nd|=l,zs===Nt&&(zs=0)),sa(r)}function ib(r,i){i===0&&(i=et()),r=Bi(r,i),r!==null&&(Le(r,i),sa(r))}function U7(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),ib(r,l)}function q7(r,i){var l=0;switch(r.tag){case 31:case 13:var u=r.stateNode,p=r.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),ib(r,l)}function H7(r,i){return Ht(r,i)}var Ac=null,Hs=null,Dd=!1,Rc=!1,jd=!1,mi=0;function sa(r){r!==Hs&&r.next===null&&(Hs===null?Ac=Hs=r:Hs=Hs.next=r),Rc=!0,Dd||(Dd=!0,P7())}function Xl(r,i){if(!jd&&Rc){jd=!0;do for(var l=!1,u=Ac;u!==null;){if(r!==0){var p=u.pendingLanes;if(p===0)var v=0;else{var T=u.suspendedLanes,j=u.pingedLanes;v=(1<<31-gt(42|r)+1)-1,v&=p&~(T&~j),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,cb(u,v))}else v=Nt,v=Q(u,u===Qt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||xe(u,v)||(l=!0,cb(u,v));u=u.next}while(l);jd=!1}}function F7(){sb()}function sb(){Rc=Dd=!1;var r=0;mi!==0&&J7()&&(r=mi);for(var i=Fe(),l=null,u=Ac;u!==null;){var p=u.next,v=lb(u,i);v===0?(u.next=null,l===null?Ac=p:l.next=p,p===null&&(Hs=l)):(l=u,(r!==0||(v&3)!==0)&&(Rc=!0)),u=p}zn!==0&&zn!==5||Xl(r),mi!==0&&(mi=0)}function lb(r,i){for(var l=r.suspendedLanes,u=r.pingedLanes,p=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var T=31-gt(v),j=1<<T,J=p[T];J===-1?((j&l)===0||(j&u)!==0)&&(p[T]=De(j,i)):J<=i&&(r.expiredLanes|=j),v&=~j}if(i=Qt,l=Nt,l=Q(r,r===i?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,l===0||r===i&&($t===2||$t===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&We(u),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||xe(r,l)){if(i=l&-l,i===r.callbackPriority)return i;switch(u!==null&&We(u),Ln(l)){case 2:case 8:l=be;break;case 32:l=Ue;break;case 268435456:l=Je;break;default:l=Ue}return u=ob.bind(null,r),l=Ht(l,u),r.callbackPriority=i,r.callbackNode=l,i}return u!==null&&u!==null&&We(u),r.callbackPriority=2,r.callbackNode=null,2}function ob(r,i){if(zn!==0&&zn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(Cc()&&r.callbackNode!==l)return null;var u=Nt;return u=Q(r,r===Qt?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(Pg(r,u,i),lb(r,Fe()),r.callbackNode!=null&&r.callbackNode===l?ob.bind(null,r):null)}function cb(r,i){if(Cc())return null;Pg(r,i,!0)}function P7(){tx(function(){(zt&6)!==0?Ht(fe,F7):sb()})}function Ld(){if(mi===0){var r=Ns;r===0&&(r=Ge,Ge<<=1,(Ge&261888)===0&&(Ge=256)),mi=r}return mi}function ub(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Za(""+r)}function db(r,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,r.id&&l.setAttribute("form",r.id),i.parentNode.insertBefore(l,i),r=new FormData(r),l.parentNode.removeChild(l),r}function $7(r,i,l,u,p){if(i==="submit"&&l&&l.stateNode===p){var v=ub((p[Zn]||null).action),T=u.submitter;T&&(i=(i=T[Zn]||null)?ub(i.formAction):T.getAttribute("formAction"),i!==null&&(v=i,T=null));var j=new Ho("action","action",null,u,p);r.push({event:j,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(mi!==0){var J=T?db(p,T):new FormData(p);nd(l,{pending:!0,data:J,method:p.method,action:v},null,J)}}else typeof v=="function"&&(j.preventDefault(),J=T?db(p,T):new FormData(p),nd(l,{pending:!0,data:J,method:p.method,action:v},v,J))},currentTarget:p}]})}}for(var zd=0;zd<y0.length;zd++){var Bd=y0[zd],G7=Bd.toLowerCase(),K7=Bd[0].toUpperCase()+Bd.slice(1);Qr(G7,"on"+K7)}Qr(Fp,"onAnimationEnd"),Qr(Pp,"onAnimationIteration"),Qr($p,"onAnimationStart"),Qr("dblclick","onDoubleClick"),Qr("focusin","onFocus"),Qr("focusout","onBlur"),Qr(o7,"onTransitionRun"),Qr(c7,"onTransitionStart"),Qr(u7,"onTransitionCancel"),Qr(Gp,"onTransitionEnd"),Ce("onMouseEnter",["mouseout","mouseover"]),Ce("onMouseLeave",["mouseout","mouseover"]),Ce("onPointerEnter",["pointerout","pointerover"]),Ce("onPointerLeave",["pointerout","pointerover"]),ga("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ga("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ga("onBeforeInput",["compositionend","keypress","textInput","paste"]),ga("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ga("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ga("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),V7=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zl));function fb(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var u=r[l],p=u.event;u=u.listeners;e:{var v=void 0;if(i)for(var T=u.length-1;0<=T;T--){var j=u[T],J=j.instance,de=j.currentTarget;if(j=j.listener,J!==v&&p.isPropagationStopped())break e;v=j,p.currentTarget=de;try{v(p)}catch(ye){$o(ye)}p.currentTarget=null,v=J}else for(T=0;T<u.length;T++){if(j=u[T],J=j.instance,de=j.currentTarget,j=j.listener,J!==v&&p.isPropagationStopped())break e;v=j,p.currentTarget=de;try{v(p)}catch(ye){$o(ye)}p.currentTarget=null,v=J}}}}function kt(r,i){var l=i[fl];l===void 0&&(l=i[fl]=new Set);var u=r+"__bubble";l.has(u)||(mb(i,r,2,!1),l.add(u))}function Ud(r,i,l){var u=0;i&&(u|=4),mb(l,r,u,i)}var _c="_reactListening"+Math.random().toString(36).slice(2);function qd(r){if(!r[_c]){r[_c]=!0,Oo.forEach(function(l){l!=="selectionchange"&&(V7.has(l)||Ud(l,!1,r),Ud(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[_c]||(i[_c]=!0,Ud("selectionchange",!1,i))}}function mb(r,i,l,u){switch(Fb(i)){case 2:var p=wx;break;case 8:p=Sx;break;default:p=tf}l=p.bind(null,i,l,r),p=void 0,!s0||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),u?p!==void 0?r.addEventListener(i,l,{capture:!0,passive:p}):r.addEventListener(i,l,!0):p!==void 0?r.addEventListener(i,l,{passive:p}):r.addEventListener(i,l,!1)}function Hd(r,i,l,u,p){var v=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var T=u.tag;if(T===3||T===4){var j=u.stateNode.containerInfo;if(j===p)break;if(T===4)for(T=u.return;T!==null;){var J=T.tag;if((J===3||J===4)&&T.stateNode.containerInfo===p)return;T=T.return}for(;j!==null;){if(T=rr(j),T===null)return;if(J=T.tag,J===5||J===6||J===26||J===27){u=v=T;continue e}j=j.parentNode}}u=u.return}zo(function(){var de=v,ye=dt(l),ke=[];e:{var me=Kp.get(r);if(me!==void 0){var pe=Ho,Pe=r;switch(r){case"keypress":if(Uo(l)===0)break e;case"keydown":case"keyup":pe=q6;break;case"focusin":Pe="focus",pe=u0;break;case"focusout":Pe="blur",pe=u0;break;case"beforeblur":case"afterblur":pe=u0;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=wp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=A6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=P6;break;case Fp:case Pp:case $p:pe=I6;break;case Gp:pe=G6;break;case"scroll":case"scrollend":pe=N6;break;case"wheel":pe=V6;break;case"copy":case"cut":case"paste":pe=O6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=kp;break;case"toggle":case"beforetoggle":pe=X6}var rt=(i&4)!==0,Xt=!rt&&(r==="scroll"||r==="scrollend"),se=rt?me!==null?me+"Capture":null:me;rt=[];for(var te=de,ue;te!==null;){var Se=te;if(ue=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||ue===null||se===null||(Se=vl(te,se),Se!=null&&rt.push(Ql(te,Se,ue))),Xt)break;te=te.return}0<rt.length&&(me=new pe(me,Pe,null,l,ye),ke.push({event:me,listeners:rt}))}}if((i&7)===0){e:{if(me=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",me&&l!==$e&&(Pe=l.relatedTarget||l.fromElement)&&(rr(Pe)||Pe[Ka]))break e;if((pe||me)&&(me=ye.window===ye?ye:(me=ye.ownerDocument)?me.defaultView||me.parentWindow:window,pe?(Pe=l.relatedTarget||l.toElement,pe=de,Pe=Pe?rr(Pe):null,Pe!==null&&(Xt=o(Pe),rt=Pe.tag,Pe!==Xt||rt!==5&&rt!==27&&rt!==6)&&(Pe=null)):(pe=null,Pe=de),pe!==Pe)){if(rt=wp,Se="onMouseLeave",se="onMouseEnter",te="mouse",(r==="pointerout"||r==="pointerover")&&(rt=kp,Se="onPointerLeave",se="onPointerEnter",te="pointer"),Xt=pe==null?me:Va(pe),ue=Pe==null?me:Va(Pe),me=new rt(Se,te+"leave",pe,l,ye),me.target=Xt,me.relatedTarget=ue,Se=null,rr(ye)===de&&(rt=new rt(se,te+"enter",Pe,l,ye),rt.target=ue,rt.relatedTarget=Xt,Se=rt),Xt=Se,pe&&Pe)t:{for(rt=Y7,se=pe,te=Pe,ue=0,Se=se;Se;Se=rt(Se))ue++;Se=0;for(var Qe=te;Qe;Qe=rt(Qe))Se++;for(;0<ue-Se;)se=rt(se),ue--;for(;0<Se-ue;)te=rt(te),Se--;for(;ue--;){if(se===te||te!==null&&se===te.alternate){rt=se;break t}se=rt(se),te=rt(te)}rt=null}else rt=null;pe!==null&&hb(ke,me,pe,rt,!1),Pe!==null&&Xt!==null&&hb(ke,Xt,Pe,rt,!0)}}e:{if(me=de?Va(de):window,pe=me.nodeName&&me.nodeName.toLowerCase(),pe==="select"||pe==="input"&&me.type==="file")var Ot=Ip;else if(Rp(me))if(Mp)Ot=i7;else{Ot=r7;var Ke=n7}else pe=me.nodeName,!pe||pe.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?de&&Xa(de.elementType)&&(Ot=Ip):Ot=a7;if(Ot&&(Ot=Ot(r,de))){_p(ke,Ot,l,ye);break e}Ke&&Ke(r,me,de),r==="focusout"&&de&&me.type==="number"&&de.memoizedProps.value!=null&&ps(me,"number",me.value)}switch(Ke=de?Va(de):window,r){case"focusin":(Rp(Ke)||Ke.contentEditable==="true")&&(vs=Ke,g0=de,Nl=null);break;case"focusout":Nl=g0=vs=null;break;case"mousedown":b0=!0;break;case"contextmenu":case"mouseup":case"dragend":b0=!1,qp(ke,l,ye);break;case"selectionchange":if(l7)break;case"keydown":case"keyup":qp(ke,l,ye)}var ht;if(f0)e:{switch(r){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else bs?Cp(r,l)&&(Ct="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Ct="onCompositionStart");Ct&&(Ep&&l.locale!=="ko"&&(bs||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&bs&&(ht=yp()):(Qa=ye,l0="value"in Qa?Qa.value:Qa.textContent,bs=!0)),Ke=Ic(de,Ct),0<Ke.length&&(Ct=new Sp(Ct,r,null,l,ye),ke.push({event:Ct,listeners:Ke}),ht?Ct.data=ht:(ht=Ap(l),ht!==null&&(Ct.data=ht)))),(ht=Q6?W6(r,l):J6(r,l))&&(Ct=Ic(de,"onBeforeInput"),0<Ct.length&&(Ke=new Sp("onBeforeInput","beforeinput",null,l,ye),ke.push({event:Ke,listeners:Ct}),Ke.data=ht)),$7(ke,r,de,l,ye)}fb(ke,i)})}function Ql(r,i,l){return{instance:r,listener:i,currentTarget:l}}function Ic(r,i){for(var l=i+"Capture",u=[];r!==null;){var p=r,v=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||v===null||(p=vl(r,l),p!=null&&u.unshift(Ql(r,p,v)),p=vl(r,i),p!=null&&u.push(Ql(r,p,v))),r.tag===3)return u;r=r.return}return[]}function Y7(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function hb(r,i,l,u,p){for(var v=i._reactName,T=[];l!==null&&l!==u;){var j=l,J=j.alternate,de=j.stateNode;if(j=j.tag,J!==null&&J===u)break;j!==5&&j!==26&&j!==27||de===null||(J=de,p?(de=vl(l,v),de!=null&&T.unshift(Ql(l,de,J))):p||(de=vl(l,v),de!=null&&T.push(Ql(l,de,J)))),l=l.return}T.length!==0&&r.push({event:i,listeners:T})}var X7=/\r\n?/g,Z7=/\u0000|\uFFFD/g;function pb(r){return(typeof r=="string"?r:""+r).replace(X7,`
9
- `).replace(Z7,"")}function gb(r,i){return i=pb(i),pb(r)===i}function Yt(r,i,l,u,p,v){switch(l){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||at(r,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&at(r,""+u);break;case"className":kr(r,"class",u);break;case"tabIndex":kr(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(r,l,u);break;case"style":Pt(r,u,v);break;case"data":if(i!=="object"){kr(r,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||l!=="href")){r.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(l);break}u=Za(""+u),r.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(l==="formAction"?(i!=="input"&&Yt(r,i,"name",p.name,p,null),Yt(r,i,"formEncType",p.formEncType,p,null),Yt(r,i,"formMethod",p.formMethod,p,null),Yt(r,i,"formTarget",p.formTarget,p,null)):(Yt(r,i,"encType",p.encType,p,null),Yt(r,i,"method",p.method,p,null),Yt(r,i,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(l);break}u=Za(""+u),r.setAttribute(l,u);break;case"onClick":u!=null&&(r.onclick=je);break;case"onScroll":u!=null&&kt("scroll",r);break;case"onScrollEnd":u!=null&&kt("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}l=Za(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,""+u):r.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":u===!0?r.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,u):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(l,u):r.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(l):r.setAttribute(l,u);break;case"popover":kt("beforetoggle",r),kt("toggle",r),Qn(r,"popover",u);break;case"xlinkActuate":dr(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":dr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":dr(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":dr(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":dr(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":dr(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":dr(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":dr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":dr(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Qn(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=ba.get(l)||l,Qn(r,l,u))}}function Fd(r,i,l,u,p,v){switch(l){case"style":Pt(r,u,v);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof u=="string"?at(r,u):(typeof u=="number"||typeof u=="bigint")&&at(r,""+u);break;case"onScroll":u!=null&&kt("scroll",r);break;case"onScrollEnd":u!=null&&kt("scrollend",r);break;case"onClick":u!=null&&(r.onclick=je);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oi.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),i=l.slice(2,p?l.length-7:void 0),v=r[Zn]||null,v=v!=null?v[l]:null,typeof v=="function"&&r.removeEventListener(i,v,p),typeof u=="function")){typeof v!="function"&&v!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,u,p);break e}l in r?r[l]=u:u===!0?r.setAttribute(l,""):Qn(r,l,u)}}}function Vn(r,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":kt("error",r),kt("load",r);var u=!1,p=!1,v;for(v in l)if(l.hasOwnProperty(v)){var T=l[v];if(T!=null)switch(v){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Yt(r,i,v,T,l,null)}}p&&Yt(r,i,"srcSet",l.srcSet,l,null),u&&Yt(r,i,"src",l.src,l,null);return;case"input":kt("invalid",r);var j=v=T=p=null,J=null,de=null;for(u in l)if(l.hasOwnProperty(u)){var ye=l[u];if(ye!=null)switch(u){case"name":p=ye;break;case"type":T=ye;break;case"checked":J=ye;break;case"defaultChecked":de=ye;break;case"value":v=ye;break;case"defaultValue":j=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(a(137,i));break;default:Yt(r,i,u,ye,l,null)}}Di(r,v,j,J,de,T,p,!1);return;case"select":kt("invalid",r),u=T=v=null;for(p in l)if(l.hasOwnProperty(p)&&(j=l[p],j!=null))switch(p){case"value":v=j;break;case"defaultValue":T=j;break;case"multiple":u=j;default:Yt(r,i,p,j,l,null)}i=v,l=T,r.multiple=!!u,i!=null?Pn(r,!!u,i,!1):l!=null&&Pn(r,!!u,l,!0);return;case"textarea":kt("invalid",r),v=p=u=null;for(T in l)if(l.hasOwnProperty(T)&&(j=l[T],j!=null))switch(T){case"value":u=j;break;case"defaultValue":p=j;break;case"children":v=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(a(91));break;default:Yt(r,i,T,j,l,null)}gs(r,u,p,v);return;case"option":for(J in l)l.hasOwnProperty(J)&&(u=l[J],u!=null)&&(J==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":Yt(r,i,J,u,l,null));return;case"dialog":kt("beforetoggle",r),kt("toggle",r),kt("cancel",r),kt("close",r);break;case"iframe":case"object":kt("load",r);break;case"video":case"audio":for(u=0;u<Zl.length;u++)kt(Zl[u],r);break;case"image":kt("error",r),kt("load",r);break;case"details":kt("toggle",r);break;case"embed":case"source":case"link":kt("error",r),kt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in l)if(l.hasOwnProperty(de)&&(u=l[de],u!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Yt(r,i,de,u,l,null)}return;default:if(Xa(i)){for(ye in l)l.hasOwnProperty(ye)&&(u=l[ye],u!==void 0&&Fd(r,i,ye,u,l,void 0));return}}for(j in l)l.hasOwnProperty(j)&&(u=l[j],u!=null&&Yt(r,i,j,u,l,null))}function Q7(r,i,l,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,v=null,T=null,j=null,J=null,de=null,ye=null;for(pe in l){var ke=l[pe];if(l.hasOwnProperty(pe)&&ke!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":J=ke;default:u.hasOwnProperty(pe)||Yt(r,i,pe,null,u,ke)}}for(var me in u){var pe=u[me];if(ke=l[me],u.hasOwnProperty(me)&&(pe!=null||ke!=null))switch(me){case"type":v=pe;break;case"name":p=pe;break;case"checked":de=pe;break;case"defaultChecked":ye=pe;break;case"value":T=pe;break;case"defaultValue":j=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,i));break;default:pe!==ke&&Yt(r,i,me,pe,u,ke)}}pl(r,T,j,J,de,ye,v,p);return;case"select":pe=T=j=me=null;for(v in l)if(J=l[v],l.hasOwnProperty(v)&&J!=null)switch(v){case"value":break;case"multiple":pe=J;default:u.hasOwnProperty(v)||Yt(r,i,v,null,u,J)}for(p in u)if(v=u[p],J=l[p],u.hasOwnProperty(p)&&(v!=null||J!=null))switch(p){case"value":me=v;break;case"defaultValue":j=v;break;case"multiple":T=v;default:v!==J&&Yt(r,i,p,v,u,J)}i=j,l=T,u=pe,me!=null?Pn(r,!!l,me,!1):!!u!=!!l&&(i!=null?Pn(r,!!l,i,!0):Pn(r,!!l,l?[]:"",!1));return;case"textarea":pe=me=null;for(j in l)if(p=l[j],l.hasOwnProperty(j)&&p!=null&&!u.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Yt(r,i,j,null,u,p)}for(T in u)if(p=u[T],v=l[T],u.hasOwnProperty(T)&&(p!=null||v!=null))switch(T){case"value":me=p;break;case"defaultValue":pe=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==v&&Yt(r,i,T,p,u,v)}jo(r,me,pe);return;case"option":for(var Pe in l)me=l[Pe],l.hasOwnProperty(Pe)&&me!=null&&!u.hasOwnProperty(Pe)&&(Pe==="selected"?r.selected=!1:Yt(r,i,Pe,null,u,me));for(J in u)me=u[J],pe=l[J],u.hasOwnProperty(J)&&me!==pe&&(me!=null||pe!=null)&&(J==="selected"?r.selected=me&&typeof me!="function"&&typeof me!="symbol":Yt(r,i,J,me,u,pe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var rt in l)me=l[rt],l.hasOwnProperty(rt)&&me!=null&&!u.hasOwnProperty(rt)&&Yt(r,i,rt,null,u,me);for(de in u)if(me=u[de],pe=l[de],u.hasOwnProperty(de)&&me!==pe&&(me!=null||pe!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,i));break;default:Yt(r,i,de,me,u,pe)}return;default:if(Xa(i)){for(var Xt in l)me=l[Xt],l.hasOwnProperty(Xt)&&me!==void 0&&!u.hasOwnProperty(Xt)&&Fd(r,i,Xt,void 0,u,me);for(ye in u)me=u[ye],pe=l[ye],!u.hasOwnProperty(ye)||me===pe||me===void 0&&pe===void 0||Fd(r,i,ye,me,u,pe);return}}for(var se in l)me=l[se],l.hasOwnProperty(se)&&me!=null&&!u.hasOwnProperty(se)&&Yt(r,i,se,null,u,me);for(ke in u)me=u[ke],pe=l[ke],!u.hasOwnProperty(ke)||me===pe||me==null&&pe==null||Yt(r,i,ke,me,u,pe)}function bb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function W7(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],v=p.transferSize,T=p.initiatorType,j=p.duration;if(v&&j&&bb(T)){for(T=0,j=p.responseEnd,u+=1;u<l.length;u++){var J=l[u],de=J.startTime;if(de>j)break;var ye=J.transferSize,ke=J.initiatorType;ye&&bb(ke)&&(J=J.responseEnd,T+=ye*(J<j?1:(j-de)/(J-de)))}if(--u,i+=8*(v+T)/(p.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Pd=null,$d=null;function Mc(r){return r.nodeType===9?r:r.ownerDocument}function vb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Gd(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Kd=null;function J7(){var r=window.event;return r&&r.type==="popstate"?r===Kd?!1:(Kd=r,!0):(Kd=null,!1)}var xb=typeof setTimeout=="function"?setTimeout:void 0,ex=typeof clearTimeout=="function"?clearTimeout:void 0,wb=typeof Promise=="function"?Promise:void 0,tx=typeof queueMicrotask=="function"?queueMicrotask:typeof wb<"u"?function(r){return wb.resolve(null).then(r).catch(nx)}:xb;function nx(r){setTimeout(function(){throw r})}function hi(r){return r==="head"}function Sb(r,i){var l=i,u=0;do{var p=l.nextSibling;if(r.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){r.removeChild(p),Gs(i);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Wl(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,Wl(l);for(var v=l.firstChild;v;){var T=v.nextSibling,j=v.nodeName;v[Mi]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=T}}else l==="body"&&Wl(r.ownerDocument.body);l=p}while(l);Gs(i)}function kb(r,i){var l=r;r=0;do{var u=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=u}while(l)}function Vd(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Vd(l),ml(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function rx(r,i,l,u){for(;r.nodeType===1;){var p=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Mi])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Kr(r.nextSibling),r===null)break}return null}function ax(r,i,l){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=Kr(r.nextSibling),r===null))return null;return r}function Eb(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Kr(r.nextSibling),r===null))return null;return r}function Yd(r){return r.data==="$?"||r.data==="$~"}function Xd(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function ix(r,i){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||l.readyState!=="loading")i();else{var u=function(){i(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Kr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Zd=null;function Tb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(i===0)return Kr(r.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}r=r.nextSibling}return null}function Nb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return r;i--}else l!=="/$"&&l!=="/&"||i++}r=r.previousSibling}return null}function Cb(r,i,l){switch(i=Mc(l),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Wl(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);ml(r)}var Vr=new Map,Ab=new Set;function Oc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Oa=V.d;V.d={f:sx,r:lx,D:ox,C:cx,L:ux,m:dx,X:mx,S:fx,M:hx};function sx(){var r=Oa.f(),i=Ec();return r||i}function lx(r){var i=pa(r);i!==null&&i.tag===5&&i.type==="form"?G1(i):Oa.r(r)}var Fs=typeof document>"u"?null:document;function Rb(r,i,l){var u=Fs;if(u&&typeof i=="string"&&i){var p=fr(i);p='link[rel="'+r+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),Ab.has(p)||(Ab.add(p),r={rel:r,crossOrigin:l,href:i},u.querySelector(p)===null&&(i=u.createElement("link"),Vn(i,"link",r),Nn(i),u.head.appendChild(i)))}}function ox(r){Oa.D(r),Rb("dns-prefetch",r,null)}function cx(r,i){Oa.C(r,i),Rb("preconnect",r,i)}function ux(r,i,l){Oa.L(r,i,l);var u=Fs;if(u&&r&&i){var p='link[rel="preload"][as="'+fr(i)+'"]';i==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+fr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+fr(l.imageSizes)+'"]')):p+='[href="'+fr(r)+'"]';var v=p;switch(i){case"style":v=Ps(r);break;case"script":v=$s(r)}Vr.has(v)||(r=b({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),Vr.set(v,r),u.querySelector(p)!==null||i==="style"&&u.querySelector(Jl(v))||i==="script"&&u.querySelector(eo(v))||(i=u.createElement("link"),Vn(i,"link",r),Nn(i),u.head.appendChild(i)))}}function dx(r,i){Oa.m(r,i);var l=Fs;if(l&&r){var u=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+fr(u)+'"][href="'+fr(r)+'"]',v=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=$s(r)}if(!Vr.has(v)&&(r=b({rel:"modulepreload",href:r},i),Vr.set(v,r),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(eo(v)))return}u=l.createElement("link"),Vn(u,"link",r),Nn(u),l.head.appendChild(u)}}}function fx(r,i,l){Oa.S(r,i,l);var u=Fs;if(u&&r){var p=Ya(u).hoistableStyles,v=Ps(r);i=i||"default";var T=p.get(v);if(!T){var j={loading:0,preload:null};if(T=u.querySelector(Jl(v)))j.loading=5;else{r=b({rel:"stylesheet",href:r,"data-precedence":i},l),(l=Vr.get(v))&&Qd(r,l);var J=T=u.createElement("link");Nn(J),Vn(J,"link",r),J._p=new Promise(function(de,ye){J.onload=de,J.onerror=ye}),J.addEventListener("load",function(){j.loading|=1}),J.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Dc(T,i,u)}T={type:"stylesheet",instance:T,count:1,state:j},p.set(v,T)}}}function mx(r,i){Oa.X(r,i);var l=Fs;if(l&&r){var u=Ya(l).hoistableScripts,p=$s(r),v=u.get(p);v||(v=l.querySelector(eo(p)),v||(r=b({src:r,async:!0},i),(i=Vr.get(p))&&Wd(r,i),v=l.createElement("script"),Nn(v),Vn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(p,v))}}function hx(r,i){Oa.M(r,i);var l=Fs;if(l&&r){var u=Ya(l).hoistableScripts,p=$s(r),v=u.get(p);v||(v=l.querySelector(eo(p)),v||(r=b({src:r,async:!0,type:"module"},i),(i=Vr.get(p))&&Wd(r,i),v=l.createElement("script"),Nn(v),Vn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(p,v))}}function _b(r,i,l,u){var p=(p=ie.current)?Oc(p):null;if(!p)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Ps(l.href),l=Ya(p).hoistableStyles,u=l.get(i),u||(u={type:"style",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=Ps(l.href);var v=Ya(p).hoistableStyles,T=v.get(r);if(T||(p=p.ownerDocument||p,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,T),(v=p.querySelector(Jl(r)))&&!v._p&&(T.instance=v,T.state.loading=5),Vr.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Vr.set(r,l),v||px(p,r,l,T.state))),i&&u===null)throw Error(a(528,""));return T}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=$s(l),l=Ya(p).hoistableScripts,u=l.get(i),u||(u={type:"script",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ps(r){return'href="'+fr(r)+'"'}function Jl(r){return'link[rel="stylesheet"]['+r+"]"}function Ib(r){return b({},r,{"data-precedence":r.precedence,precedence:null})}function px(r,i,l,u){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=r.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),Vn(i,"link",l),Nn(i),r.head.appendChild(i))}function $s(r){return'[src="'+fr(r)+'"]'}function eo(r){return"script[async]"+r}function Mb(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var u=r.querySelector('style[data-href~="'+fr(l.href)+'"]');if(u)return i.instance=u,Nn(u),u;var p=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),Nn(u),Vn(u,"style",p),Dc(u,l.precedence,r),i.instance=u;case"stylesheet":p=Ps(l.href);var v=r.querySelector(Jl(p));if(v)return i.state.loading|=4,i.instance=v,Nn(v),v;u=Ib(l),(p=Vr.get(p))&&Qd(u,p),v=(r.ownerDocument||r).createElement("link"),Nn(v);var T=v;return T._p=new Promise(function(j,J){T.onload=j,T.onerror=J}),Vn(v,"link",u),i.state.loading|=4,Dc(v,l.precedence,r),i.instance=v;case"script":return v=$s(l.src),(p=r.querySelector(eo(v)))?(i.instance=p,Nn(p),p):(u=l,(p=Vr.get(v))&&(u=b({},l),Wd(u,p)),r=r.ownerDocument||r,p=r.createElement("script"),Nn(p),Vn(p,"link",u),r.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Dc(u,l.precedence,r));return i.instance}function Dc(r,i,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,v=p,T=0;T<u.length;T++){var j=u[T];if(j.dataset.precedence===i)v=j;else if(v!==p)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function Qd(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Wd(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var jc=null;function Ob(r,i,l){if(jc===null){var u=new Map,p=jc=new Map;p.set(l,u)}else p=jc,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(r))return u;for(u.set(r,null),l=l.getElementsByTagName(r),p=0;p<l.length;p++){var v=l[p];if(!(v[Mi]||v[xn]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var T=v.getAttribute(i)||"";T=r+T;var j=u.get(T);j?j.push(v):u.set(T,[v])}}return u}function Db(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i==="title"?r.querySelector("head > title"):null)}function gx(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function jb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function bx(r,i,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=Ps(u.href),v=i.querySelector(Jl(p));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Lc.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=v,Nn(v);return}v=i.ownerDocument||i,u=Ib(u),(p=Vr.get(p))&&Qd(u,p),v=v.createElement("link"),Nn(v);var T=v;T._p=new Promise(function(j,J){T.onload=j,T.onerror=J}),Vn(v,"link",u),l.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=Lc.bind(r),i.addEventListener("load",l),i.addEventListener("error",l))}}var Jd=0;function vx(r,i){return r.stylesheets&&r.count===0&&Bc(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var u=setTimeout(function(){if(r.stylesheets&&Bc(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&Jd===0&&(Jd=62500*W7());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Bc(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Jd?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Lc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var zc=null;function Bc(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,zc=new Map,i.forEach(yx,r),zc=null,Lc.call(r))}function yx(r,i){if(!(i.state.loading&4)){var l=zc.get(r);if(l)var u=l.get(null);else{l=new Map,zc.set(r,l);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<p.length;v++){var T=p[v];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(l.set(T.dataset.precedence,T),u=T)}u&&l.set(null,u)}p=i.instance,T=p.getAttribute("data-precedence"),v=l.get(T)||u,v===u&&l.set(null,p),l.set(T,p),this.count++,u=Lc.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),v?v.parentNode.insertBefore(p,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),i.state.loading|=4}}var to={$$typeof:A,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function xx(r,i,l,u,p,v,T,j,J){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oe(0),this.hiddenUpdates=oe(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=v,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function Lb(r,i,l,u,p,v,T,j,J,de,ye,ke){return r=new xx(r,i,l,T,J,de,ye,ke,j),i=1,v===!0&&(i|=24),v=Nr(3,null,null,i),r.current=v,v.stateNode=r,i=M0(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:u,isDehydrated:l,cache:i},L0(v),r}function zb(r){return r?(r=ws,r):ws}function Bb(r,i,l,u,p,v){p=zb(p),u.context===null?u.context=p:u.pendingContext=p,u=ri(i),u.payload={element:l},v=v===void 0?null:v,v!==null&&(u.callback=v),l=ai(r,u,i),l!==null&&(vr(l,r,i),Ol(l,r,i))}function Ub(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function ef(r,i){Ub(r,i),(r=r.alternate)&&Ub(r,i)}function qb(r){if(r.tag===13||r.tag===31){var i=Bi(r,67108864);i!==null&&vr(i,r,67108864),ef(r,67108864)}}function Hb(r){if(r.tag===13||r.tag===31){var i=Ir();i=wt(i);var l=Bi(r,i);l!==null&&vr(l,r,i),ef(r,i)}}var Uc=!0;function wx(r,i,l,u){var p=z.T;z.T=null;var v=V.p;try{V.p=2,tf(r,i,l,u)}finally{V.p=v,z.T=p}}function Sx(r,i,l,u){var p=z.T;z.T=null;var v=V.p;try{V.p=8,tf(r,i,l,u)}finally{V.p=v,z.T=p}}function tf(r,i,l,u){if(Uc){var p=nf(u);if(p===null)Hd(r,i,u,qc,l),Pb(r,u);else if(Ex(p,r,i,l,u))u.stopPropagation();else if(Pb(r,u),i&4&&-1<kx.indexOf(r)){for(;p!==null;){var v=pa(p);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var T=Lt(v.pendingLanes);if(T!==0){var j=v;for(j.pendingLanes|=2,j.entangledLanes|=2;T;){var J=1<<31-gt(T);j.entanglements[1]|=J,T&=~J}sa(v),(zt&6)===0&&(Sc=Fe()+500,Xl(0))}}break;case 31:case 13:j=Bi(v,2),j!==null&&vr(j,v,2),Ec(),ef(v,2)}if(v=nf(u),v===null&&Hd(r,i,u,qc,l),v===p)break;p=v}p!==null&&u.stopPropagation()}else Hd(r,i,u,null,l)}}function nf(r){return r=dt(r),rf(r)}var qc=null;function rf(r){if(qc=null,r=rr(r),r!==null){var i=o(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=c(i),r!==null)return r;r=null}else if(l===31){if(r=d(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return qc=r,null}function Fb(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Kt()){case fe:return 2;case be:return 8;case Ue:case Ze:return 32;case Je:return 268435456;default:return 32}default:return 32}}var af=!1,pi=null,gi=null,bi=null,no=new Map,ro=new Map,vi=[],kx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Pb(r,i){switch(r){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":no.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ro.delete(i.pointerId)}}function ao(r,i,l,u,p,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:l,eventSystemFlags:u,nativeEvent:v,targetContainers:[p]},i!==null&&(i=pa(i),i!==null&&qb(i)),r):(r.eventSystemFlags|=u,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function Ex(r,i,l,u,p){switch(i){case"focusin":return pi=ao(pi,r,i,l,u,p),!0;case"dragenter":return gi=ao(gi,r,i,l,u,p),!0;case"mouseover":return bi=ao(bi,r,i,l,u,p),!0;case"pointerover":var v=p.pointerId;return no.set(v,ao(no.get(v)||null,r,i,l,u,p)),!0;case"gotpointercapture":return v=p.pointerId,ro.set(v,ao(ro.get(v)||null,r,i,l,u,p)),!0}return!1}function $b(r){var i=rr(r.target);if(i!==null){var l=o(i);if(l!==null){if(i=l.tag,i===13){if(i=c(l),i!==null){r.blockedOn=i,Xn(r.priority,function(){Hb(l)});return}}else if(i===31){if(i=d(l),i!==null){r.blockedOn=i,Xn(r.priority,function(){Hb(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Hc(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=nf(r.nativeEvent);if(l===null){l=r.nativeEvent;var u=new l.constructor(l.type,l);$e=u,l.target.dispatchEvent(u),$e=null}else return i=pa(l),i!==null&&qb(i),r.blockedOn=l,!1;i.shift()}return!0}function Gb(r,i,l){Hc(r)&&l.delete(i)}function Tx(){af=!1,pi!==null&&Hc(pi)&&(pi=null),gi!==null&&Hc(gi)&&(gi=null),bi!==null&&Hc(bi)&&(bi=null),no.forEach(Gb),ro.forEach(Gb)}function Fc(r,i){r.blockedOn===i&&(r.blockedOn=null,af||(af=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Tx)))}var Pc=null;function Kb(r){Pc!==r&&(Pc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pc===r&&(Pc=null);for(var i=0;i<r.length;i+=3){var l=r[i],u=r[i+1],p=r[i+2];if(typeof u!="function"){if(rf(u||l)===null)continue;break}var v=pa(l);v!==null&&(r.splice(i,3),i-=3,nd(v,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function Gs(r){function i(J){return Fc(J,r)}pi!==null&&Fc(pi,r),gi!==null&&Fc(gi,r),bi!==null&&Fc(bi,r),no.forEach(i),ro.forEach(i);for(var l=0;l<vi.length;l++){var u=vi[l];u.blockedOn===r&&(u.blockedOn=null)}for(;0<vi.length&&(l=vi[0],l.blockedOn===null);)$b(l),l.blockedOn===null&&vi.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],v=l[u+1],T=p[Zn]||null;if(typeof v=="function")T||Kb(l);else if(T){var j=null;if(v&&v.hasAttribute("formAction")){if(p=v,T=v[Zn]||null)j=T.formAction;else if(rf(p)!==null)continue}else j=T.action;typeof j=="function"?l[u+1]=j:(l.splice(u,3),u-=3),Kb(l)}}}function Vb(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(T){return p=T})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function sf(r){this._internalRoot=r}$c.prototype.render=sf.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,u=Ir();Bb(l,u,r,i,null,null)},$c.prototype.unmount=sf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Bb(r.current,2,null,r,null,null),Ec(),i[Ka]=null}};function $c(r){this._internalRoot=r}$c.prototype.unstable_scheduleHydration=function(r){if(r){var i=ur();r={blockedOn:null,target:r,priority:i};for(var l=0;l<vi.length&&i!==0&&i<vi[l].priority;l++);vi.splice(l,0,r),l===0&&$b(r)}};var Yb=t.version;if(Yb!=="19.2.8")throw Error(a(527,Yb,"19.2.8"));V.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var Nx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{At=Gc.inject(Nx),lt=Gc}catch{}}return so.createRoot=function(r,i){if(!s(r))throw Error(a(299));var l=!1,u="",p=tg,v=ng,T=rg;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError)),i=Lb(r,1,!1,null,null,l,u,null,p,v,T,Vb),r[Ka]=i.current,qd(r),new sf(i)},so.hydrateRoot=function(r,i,l){if(!s(r))throw Error(a(299));var u=!1,p="",v=tg,T=ng,j=rg,J=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(T=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError),l.formState!==void 0&&(J=l.formState)),i=Lb(r,1,!0,i,l??null,u,p,J,v,T,j,Vb),i.context=zb(null),l=i.current,u=Ir(),u=wt(u),p=ri(u),p.callback=null,ai(l,p,u),l=u,i.current.lanes=l,Le(i,l),sa(i),r[Ka]=i.current,qd(r),new $c(i)},so.version="19.2.8",so}var a4;function jx(){if(a4)return cf.exports;a4=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),cf.exports=Dx(),cf.exports}var Lx=jx();function Qi(e){if(e==null)return null;if(typeof e=="string")return e.trim()||null;if(typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="object"){const t=e;if(typeof t.text=="string"&&t.text.trim())return t.text.trim();if(typeof t.errorMessage=="string"&&t.errorMessage.trim())return t.errorMessage.trim();if(Array.isArray(t.content)){const n=t.content.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;if(typeof s.text=="string")return s.text}return""}).filter(Boolean);if(n.length)return n.join(`
10
- `).slice(0,240)}if(typeof t.role=="string")return`${t.role} 消息`}return null}function zx(e){const t=Qi(e.at)??Qi(e.timestamp)??Qi(e.recordedAt)??"",n=Qi(e.errorMessage)??Qi(e.label)??Qi(e.type)??Qi(e.message)??"运行事件";return t?`${t} · ${n}`:n}function mo(e){return String(e.nodeId??e.id??"").trim()}function mf(e){const t=mo(e);return String(e.label??e.name??(t||"未命名节点"))}function i4(e,t){if(e.length===0)return;const n=t?.trim();if(n){const o=e.find(c=>mo(c)===n);if(o)return o}const a=e.find(o=>{const c=String(o.status??"").toLowerCase();return c.includes("fail")||c.includes("error")||c==="blocked"});return a||(e.find(o=>{const c=String(o.status??"").toLowerCase();return c==="running"||c==="in_progress"||c==="active"})??e[0])}function Bx({dagRunId:e,nodeId:t,onClose:n,onOpenFull:a}){const s=N.useRef(null),[o,c]=N.useState(null),[d,m]=N.useState([]),[h,g]=N.useState(null),[b,x]=N.useState(!0);N.useEffect(()=>{s.current?.focus();const C=R=>{R.key==="Escape"&&n()};return document.addEventListener("keydown",C),document.title=`检视 · DAG ${e} · Loop Operator`,()=>document.removeEventListener("keydown",C)},[e,n]),N.useEffect(()=>{const C=new AbortController;return x(!0),g(null),m([]),(async()=>{try{const R=await fetch(`/api/dag-runs/${encodeURIComponent(e)}`,{signal:C.signal,credentials:"same-origin"});if(!R.ok)throw new Error(`DAG 查询失败(HTTP ${R.status})`);const A=await R.json();if(C.signal.aborted)return;c(A);const H=Array.isArray(A.nodes)?A.nodes:[],F=i4(H,t),D=F?mo(F):t?.trim();if(D){const $=await fetch(`/api/dag-runs/${encodeURIComponent(e)}/nodes/${encodeURIComponent(D)}/session-events`,{signal:C.signal,credentials:"same-origin"});if($.ok){const P=await $.json();C.signal.aborted||m((P.events??[]).slice(-20))}}}catch(R){C.signal.aborted||g(R instanceof Error?R.message:String(R))}finally{C.signal.aborted||x(!1)}})(),()=>C.abort()},[e,t]);const y=N.useMemo(()=>Array.isArray(o?.nodes)?o.nodes:[],[o]),S=i4(y,t),E=S?mo(S):"",M=String(o?.effectiveStatus??o?.status??(b?"加载中…":"未知"));return f.jsxs("aside",{className:"inspect-split-panel","aria-label":"DAG 紧凑检视",children:[f.jsxs("div",{className:"inspect-split-header",children:[f.jsxs("div",{children:[f.jsx("p",{className:"inspect-split-kicker",children:"Inspect"}),f.jsx("h2",{children:"检视 DAG"})]}),f.jsx("button",{ref:s,type:"button","aria-label":"关闭检视面板",onClick:n,children:"关闭"})]}),f.jsx("p",{className:"inspect-split-id",children:f.jsx("code",{children:e})}),h?f.jsx("p",{className:"error",children:h}):null,b&&!o?f.jsx("p",{className:"muted",children:"正在加载 DAG…"}):null,f.jsxs("dl",{className:"inspect-split-facts",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"状态"}),f.jsx("dd",{children:M})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"当前节点"}),f.jsx("dd",{children:S?mf(S):"暂无节点"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"节点状态"}),f.jsx("dd",{children:S?.status??"—"})]}),S?.errorPreview?f.jsxs("div",{children:[f.jsx("dt",{children:"错误摘要"}),f.jsx("dd",{children:S.errorPreview})]}):null]}),f.jsxs("section",{children:[f.jsxs("h3",{children:["节点(",y.length,")"]}),y.length?f.jsx("ul",{className:"inspect-split-nodes",children:y.slice(0,24).map(C=>{const R=mo(C)||mf(C),A=R===E;return f.jsxs("li",{"data-active":A?"true":void 0,className:A?"is-active":void 0,children:[f.jsx("span",{children:mf(C)}),f.jsx("code",{children:C.status??"—"})]},R)})}):f.jsx("p",{className:"muted",children:b?"加载节点中…":"该运行暂无节点。"})]}),f.jsxs("section",{children:[f.jsxs("h3",{children:["最近事件",E?` · ${E}`:""]}),d.length?f.jsx("ul",{className:"inspect-split-events",children:d.map((C,R)=>f.jsx("li",{children:zx(C)},`${C.at??R}-${R}`))}):f.jsx("p",{className:"muted",children:b?"加载事件中…":"节点事件将在可用时显示。"})]}),f.jsx("button",{type:"button",className:"btn btn-secondary",onClick:a,children:"全屏观测"}),f.jsx("p",{className:"muted",children:"全屏后点顶栏「返回操作台」可回来。"})]})}function Ux(e){const{board:t,busy:n}=e;return f.jsxs("details",{className:"night-advanced","data-testid":"night-advanced",open:t.advancedOpen,onToggle:a=>t.setAdvancedOpen(a.target.open),children:[f.jsx("summary",{children:"高级 / Inspect"}),f.jsxs("p",{className:"muted",children:["只读深链:"," ",f.jsx("a",{className:"external-link",href:"/inspect/#/night",children:"/inspect/#/night"})]}),f.jsx("div",{className:"cta-row",children:f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-morning-btn",onClick:()=>{t.onMorningReport()},children:"早晨 night 报告"})}),t.morningPreview?f.jsx("pre",{className:"cmd","data-testid":"night-morning-preview",children:t.morningPreview}):null]})}function Kc(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function En(e,t){const n=e[t];return typeof n=="string"&&n.trim()?n.trim():void 0}function s4(e,t){const n=e[t];if(!Array.isArray(n))return;const a=n.filter(s=>typeof s=="string");return a.length>0?a:void 0}function qx(e){const t=Kc(e);if(!t)return null;const n=Kc(t.result),a=[Kc(t.reviewPacket),n?Kc(n.reviewPacket):null,n,t].filter(Boolean);for(const s of a){const o=En(s,"scheduleId")??En(s,"id"),c=En(s,"gateToken")??En(s,"approveGate")??En(s,"writeSetGateToken");if(!(!o||!c))return{scheduleId:o,gateToken:c,...En(s,"featureId")?{featureId:En(s,"featureId")}:{},...En(s,"taskId")?{taskId:En(s,"taskId")}:{},...s4(s,"writeSet")?{writeSet:s4(s,"writeSet")}:{},...En(s,"worktreePath")?{worktreePath:En(s,"worktreePath")}:{},...En(s,"branch")?{branch:En(s,"branch")}:{},...En(s,"baseBranch")?{baseBranch:En(s,"baseBranch")}:{},...En(s,"baseCommit")?{baseCommit:En(s,"baseCommit")}:{},...En(s,"executeAtUtc")?{executeAtUtc:En(s,"executeAtUtc")}:{},...En(s,"taskCard")?{taskCard:En(s,"taskCard")}:{}}}return null}function l4(e){return`docs/features/${e.trim().replace(/^\/+|\/+$/g,"")}`}function Hx(e){const t=e.trim(),n=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})/.exec(t);return n?`${n[1]} ${n[2]}`:null}function o4(){const e=new Date;e.setHours(20,0,0,0);const t=n=>String(n).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`}function vy(e){if(!e)return"—";const t=Date.parse(e);if(Number.isNaN(t))return e;try{return new Intl.DateTimeFormat("zh-CN",{dateStyle:"short",timeStyle:"short",timeZone:"Asia/Shanghai"}).format(new Date(t))}catch{return e}}function Fx(e){return e.mergeState==="pending-harvest"||/\bscheduler harvest\b/i.test(e.nextAction)}function Px(e){return e.status==="failed"||e.status==="human_required"||e.status==="cancelled"||/\bscheduler discard\b/i.test(e.nextAction)}function du(e){return e==="failed"||e==="human_required"}function $x(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function yy(e){return{submitted:"已提交",validating:"校验中",validated:"待预约确认",scheduled:"已预约",waiting:"等待触发",dispatching:"派发中",running:"执行中",succeeded:"成功",failed:"失败",human_required:"需人工",cancelled:"已取消",rejected:"已拒绝",cancel_requested:"取消中"}[e]??e}function Gx(e){const{target:t,reason:n,onReasonChange:a,force:s,onForceChange:o,busy:c}=e;return f.jsxs("div",{className:"night-discard-card","data-testid":"night-discard-card",children:[f.jsx("h3",{children:"确认 Discard"}),f.jsxs("p",{className:"muted",children:[t.featureId,"/",t.taskId,"(",yy(t.status),")"]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"原因"}),f.jsx("input",{"data-testid":"night-discard-reason",value:n,disabled:c,placeholder:"human discard reason",onChange:d=>a(d.target.value)})]}),du(t.status)?f.jsxs("label",{className:"field checkbox-field",children:[f.jsx("input",{type:"checkbox","data-testid":"night-discard-force",checked:s,disabled:c,onChange:d=>o(d.target.checked)}),f.jsx("span",{className:"muted",children:"强制 Discard(failed / human_required)"})]}):null,f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:c||du(t.status)&&!s,"data-testid":"night-discard-confirm",onClick:e.onConfirm,children:"确认 Discard"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:c,onClick:e.onCancel,children:"返回"})]})]})}function Kx(e){const{board:t}=e,{doctor:n,list:a,clockHint:s,doctorIssues:o,auxTicker:c}=t;return f.jsxs("div",{className:"night-health","data-testid":"night-health-bar",children:[f.jsxs("div",{className:"night-health-main",children:[f.jsx("span",{className:`night-health-pill${n?.ok===!1?" is-bad":""}`,children:n?.ok===!1?"Scheduler 异常":"Scheduler 健康"}),f.jsxs("span",{className:"muted",children:["计划 ",n?.scheduleCount??a?.summary.total??"—"," · 活动"," ",n?.activeCount??a?.summary.active??"—"]})]}),s?f.jsxs("p",{className:"muted night-health-hint","data-testid":"night-clock-hint",children:["时钟:",s.message,"(安装/启停请用 CLI:",f.jsx("code",{children:"agent-worker scheduler clock status --repo ."}),")"]}):f.jsxs("p",{className:"muted night-health-hint",children:["到点执行依赖本机 clock / tick,不在此面板安装。详见"," ",f.jsx("a",{className:"external-link",href:"/inspect/#/night",children:"/inspect/#/night"})]}),f.jsxs("div",{className:"night-aux-ticker","data-testid":"night-aux-ticker",children:[f.jsxs("p",{className:"night-aux-ticker-label",children:["开着 Console 时辅助 tick(每 ",c?.intervalSec??60,"s)"]}),f.jsx("p",{className:"muted night-health-hint","data-testid":"night-aux-ticker-disclaimer",children:c?.disclaimer??"仅在本 Console 进程开着时有效;过夜无人值守仍需 OS clock。"}),c?.lastOutcome?f.jsxs("p",{className:"muted","data-testid":"night-aux-ticker-last",children:["上次:",c.lastOutcome,c.running?"(进行中)":"",c.lastSummary?` · ${c.lastSummary}`:"",c.lastError?` · ${c.lastError}`:""]}):null]}),o.length>0?f.jsx("ul",{className:"night-doctor-list","data-testid":"night-doctor-findings",children:o.slice(0,4).map(d=>f.jsxs("li",{children:[f.jsx("strong",{children:d.severity})," ",d.message]},`${d.code}-${d.scheduleId??""}-${d.message}`))}):null]})}function Vx(e){const{board:t,busy:n,onHarvest:a,onOpenDiscard:s}=e,{list:o}=t;return f.jsxs(f.Fragment,{children:[o?f.jsxs("div",{className:"night-kpi","data-testid":"night-kpi",children:[f.jsxs("span",{children:["合计 ",o.summary.total]}),f.jsxs("span",{children:["活动 ",o.summary.active]}),f.jsxs("span",{children:["待收成 ",o.summary.pendingHarvest]}),f.jsxs("span",{children:["需人工 ",o.summary.humanRequired]}),f.jsxs("span",{children:["失败 ",o.summary.failed]})]}):null,f.jsxs("div",{className:"night-board","data-testid":"night-board",children:[f.jsx("h3",{children:"计划列表"}),!o||o.schedules.length===0?f.jsxs("div",{className:"empty-state","data-testid":"night-board-empty",children:[f.jsx("p",{className:"empty-title",children:"暂无夜间计划"}),f.jsx("p",{className:"muted",children:"用下方向导预约第一个任务。"})]}):f.jsx("ul",{className:"night-schedule-list",children:o.schedules.map(c=>f.jsxs("li",{className:"night-schedule-row","data-testid":"night-schedule-row","data-status":c.status,children:[f.jsxs("div",{className:"night-schedule-head",children:[f.jsxs("strong",{children:[c.featureId,"/",c.taskId]}),f.jsx("span",{className:"night-status-chip",children:yy(c.status)})]}),f.jsxs("p",{className:"muted",children:["执行 ",vy(c.executeAtUtc),c.mergeState?` · merge ${c.mergeState}`:"",c.taskCard?` · ${c.taskCard}`:""]}),c.waitingReason?f.jsxs("p",{className:"muted",children:["等待原因:",c.waitingReason]}):null,f.jsxs("p",{className:"muted night-next-action",children:["下一步:",c.nextAction]}),f.jsxs("div",{className:"cta-row",children:[Fx(c)?f.jsx("button",{type:"button",className:"btn btn-primary",disabled:n,"data-testid":"night-row-harvest",onClick:()=>a(c),children:"Harvest"}):null,Px(c)?f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-row-discard",onClick:()=>s(c),children:"Discard"}):null,f.jsx("a",{className:"external-link",href:`/inspect/#/night/${encodeURIComponent(c.scheduleId)}`,children:"Inspect"})]})]},c.scheduleId))})]})]})}function Yx(e){const{wizard:t,busy:n}=e;return f.jsxs("div",{className:"night-wizard","data-testid":"night-wizard",children:[f.jsx("h3",{children:"预约夜间任务"}),t.phase==="pick"?f.jsxs(f.Fragment,{children:[t.selectableTasks.length===0?f.jsxs("div",{className:"empty-state","data-testid":"night-task-empty",children:[f.jsx("p",{className:"empty-title",children:"没有可选任务"}),f.jsx("p",{className:"muted",children:"请先在 Feature Packet / Task Pool 中创建任务,再回到此处刷新。"})]}):f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"Feature / Task"}),f.jsxs("select",{"data-testid":"night-task-select",value:t.selectedKey,disabled:n,onChange:a=>t.setSelectedKey(a.target.value),children:[f.jsx("option",{value:"",children:"选择任务…"}),t.selectableTasks.map(a=>{const s=`${a.featureId}::${a.taskId}`;return f.jsxs("option",{value:s,children:[a.featureId,"/",a.taskId,a.status?` · ${a.status}`:""]},s)})]})]}),t.derivedFeatureDir?f.jsxs("p",{className:"muted","data-testid":"night-feature-dir",children:["Feature 目录:",f.jsx("code",{children:t.derivedFeatureDir})]}):null,f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"本地执行时间"}),f.jsx("input",{type:"datetime-local","data-testid":"night-at",value:t.nightAt,disabled:n,onChange:a=>t.setNightAt(a.target.value)})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"任务卡片(可选)"}),f.jsx("input",{"data-testid":"night-task-card",value:t.taskCard,disabled:n,placeholder:"UCP-LOOP#11",onChange:a=>t.setTaskCard(a.target.value)})]}),f.jsx("div",{className:"cta-row",children:f.jsx("button",{type:"button",className:"btn btn-primary",disabled:n||!t.selectedKey||!t.nightAt,"data-testid":"night-prepare-btn",onClick:()=>{t.onPrepare()},children:"准备并审阅"})})]}):f.jsxs("div",{className:"night-review-card","data-testid":"night-review-card",children:[f.jsx("p",{className:"muted",children:"请确认 writeSet 与执行环境后预约。Token 已隐藏。"}),f.jsxs("dl",{className:"kv",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"Schedule"}),f.jsx("dd",{children:f.jsx("code",{children:t.review?.scheduleId})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"任务"}),f.jsxs("dd",{children:[t.review?.featureId,"/",t.review?.taskId]})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"执行时间 (UTC)"}),f.jsx("dd",{children:vy(t.review?.executeAtUtc)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Worktree"}),f.jsx("dd",{children:f.jsx("code",{children:t.review?.worktreePath??"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"分支"}),f.jsx("dd",{children:f.jsx("code",{children:t.review?.branch??"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Base"}),f.jsx("dd",{children:f.jsxs("code",{children:[t.review?.baseBranch??"—","@",(t.review?.baseCommit??"").slice(0,12)||"—"]})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"WriteSet"}),f.jsx("dd",{children:t.review?.writeSet&&t.review.writeSet.length>0?f.jsx("ul",{className:"night-writeset",children:t.review.writeSet.map(a=>f.jsx("li",{children:f.jsx("code",{children:a})},a))}):f.jsx("span",{className:"muted",children:"(未返回显式 writeSet)"})})]})]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:n||!t.review,"data-testid":"night-confirm-add-btn",onClick:()=>{t.onConfirmAdd()},children:"确认预约"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-review-back-btn",onClick:t.onCancelWizard,children:"返回修改"})]})]})]})}function Xx(e){const{setOpError:t}=e,[n,a]=N.useState(null),[s,o]=N.useState(null),[c,d]=N.useState([]),[m,h]=N.useState(null),[g,b]=N.useState(!1),[x,y]=N.useState(!1),[S,E]=N.useState(null),[M,C]=N.useState(null),R=N.useCallback(async()=>{b(!0),h(null);try{const[D,$,P,ee]=await Promise.all([fetch("/api/night-jobs",{credentials:"same-origin"}),fetch("/api/night-jobs/doctor",{credentials:"same-origin"}),fetch("/api/tasks",{credentials:"same-origin"}),fetch("/api/operator/v1/night-aux-ticker",{credentials:"same-origin"})]);if(!D.ok)throw new Error(`加载计划列表失败(HTTP ${D.status})`);const q=await D.json();if(a(q),$.ok?o(await $.json()):o(null),P.ok){const Z=await P.json();d(Array.isArray(Z)?Z:[])}else d([]);if(ee.ok){const Z=await ee.json();Z.ticker&&C(Z.ticker)}}catch(D){h(D instanceof Error?D.message:String(D))}finally{b(!1)}},[]);N.useEffect(()=>{R()},[R]);const A=N.useCallback(async()=>{try{const D=await fetch("/api/night-jobs/morning",{credentials:"same-origin"});if(!D.ok){t(`早晨报告加载失败(HTTP ${D.status})`);return}const $=await D.json();E(JSON.stringify($,null,2).slice(0,4e3)),y(!0)}catch(D){t(D instanceof Error?D.message:String(D))}},[t]),H=(s?.findings??[]).filter(D=>D.severity==="error"||D.severity==="warning"),F=(s?.findings??[]).find(D=>/clock/i.test(D.code)||/clock/i.test(D.message));return{list:n,doctor:s,tasks:c,loadError:m,loadingBoard:g,advancedOpen:x,setAdvancedOpen:y,morningPreview:S,auxTicker:M,refreshBoard:R,onMorningReport:A,doctorIssues:H,clockHint:F}}function Zx(e){const{board:t,runAction:n,isActionSuccess:a,setOpError:s}=e,{tasks:o,refreshBoard:c}=t,[d,m]=N.useState("pick"),[h,g]=N.useState(""),[b,x]=N.useState(o4),[y,S]=N.useState(""),[E,M]=N.useState(null),[C,R]=N.useState(""),[A,H]=N.useState(null),[F,D]=N.useState(!1),$=N.useMemo(()=>{const V=o.filter(ne=>typeof ne.featureId=="string"&&ne.featureId.trim()&&ne.taskId);return V.sort((ne,we)=>{const O=ne.featureId??"",B=we.featureId??"";return O!==B?O.localeCompare(B):ne.taskId.localeCompare(we.taskId)}),V},[o]),P=N.useMemo(()=>h?$.find(V=>`${V.featureId}::${V.taskId}`===h)??null:null,[$,h]),ee=P?.featureId?l4(P.featureId):"",q=N.useCallback(async(V,ne,we)=>{const O=await n("prepareMutationGate",{action:V,actionParams:ne});if(!a(O))return;const B=O?.result??O,Y=B.receiptId?B:B.result??B;if(!Y.receiptId||!Y.humanGateToken){s("prepareMutationGate 未返回可消费的 Human Gate receipt");return}return n(V,{...ne,confirmationId:Y.receiptId,humanGateToken:Y.humanGateToken},{clientRequestId:$x(we)})},[a,n,s]),Z=N.useCallback(async()=>{if(!P?.featureId){s("请先点选 Feature / Task");return}const V=Hx(b);if(!V){s("执行时间格式无效,请使用日期时间选择器");return}const ne={featureDir:l4(P.featureId),taskId:P.taskId,at:V,tz:"Asia/Shanghai",...y.trim()?{taskCard:y.trim()}:{}},we=await q("workerAdmissionPrepare",ne,"night-prepare");if(!a(we))return;const O=qx(we?.result??we);if(!O){s("准备成功但未解析到 scheduleId / gateToken。请刷新后重试,或查看 Inspect。");return}M(O),m("review")},[a,b,q,P,s,y]),G=N.useCallback(async()=>{if(!E)return;const V=await q("workerSchedulerAdd",{scheduleId:E.scheduleId,approveGate:E.gateToken},"night-add");a(V)&&(M(null),m("pick"),g(""),S(""),x(o4()),await c())},[a,c,E,q]),le=N.useCallback(()=>{m("pick"),M(null)},[]),W=N.useCallback(async V=>{const ne=await q("workerSchedulerHarvest",{scheduleId:V.scheduleId},"night-harvest");a(ne)&&await c()},[a,c,q]),U=N.useCallback(async()=>{if(!A)return;const V=C.trim()||"discard from console night workbench",ne=du(A.status),we=await q("workerSchedulerDiscard",{scheduleId:A.scheduleId,reason:V,...ne||F?{force:!0}:{}},"night-discard");a(we)&&(H(null),R(""),D(!1),await c())},[C,A,F,a,c,q]),z=N.useCallback(V=>{H(V),D(du(V.status)),R("")},[]);return{phase:d,selectedKey:h,setSelectedKey:g,nightAt:b,setNightAt:x,taskCard:y,setTaskCard:S,review:E,discardReason:C,setDiscardReason:R,discardTarget:A,setDiscardTarget:H,forceDiscard:F,setForceDiscard:D,selectableTasks:$,derivedFeatureDir:ee,onPrepare:Z,onConfirmAdd:G,onCancelWizard:le,onHarvest:W,onDiscard:U,openDiscard:z}}function Qx({busy:e,runAction:t,isActionSuccess:n,setOpError:a}){const s=Xx({setOpError:a}),o=Zx({board:s,runAction:t,isActionSuccess:n,setOpError:a});return f.jsxs("section",{className:"panel night-workbench","aria-labelledby":"night-title","data-testid":"night-jobs-panel",children:[f.jsx("h2",{id:"night-title",children:"夜间任务"}),f.jsx("p",{className:"panel-lead",children:"白天点选任务并预约;列表查看状态;早晨在行内收成或丢弃。写操作仍经 Human Gate,列表复用 Inspect 投影。"}),f.jsx(Kx,{board:s,busy:e}),f.jsx("div",{className:"cta-row",children:f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:e||s.loadingBoard,"data-testid":"night-refresh-btn",onClick:()=>{s.refreshBoard()},children:"刷新看板"})}),s.loadError?f.jsx("p",{className:"error","data-testid":"night-load-error",children:s.loadError}):null,f.jsx(Vx,{board:s,busy:e,onHarvest:c=>{o.onHarvest(c)},onOpenDiscard:o.openDiscard}),o.discardTarget?f.jsx(Gx,{target:o.discardTarget,reason:o.discardReason,onReasonChange:o.setDiscardReason,force:o.forceDiscard,onForceChange:o.setForceDiscard,busy:e,onConfirm:()=>{o.onDiscard()},onCancel:()=>o.setDiscardTarget(null)}):null,f.jsx(Yx,{wizard:o,busy:e}),f.jsx(Ux,{board:s,busy:e})]})}var _h=by();const Wx=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M3 10H2V4.00293C2 3.44903 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.43788 22 4.00293V10H21V20.0015C21 20.553 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5525 3 20.0015V10ZM19 10H5V19H19V10ZM4 5V8H20V5H4ZM9 12H15V14H9V12Z"})),Jx=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})),e8=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"})),t8=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M6.41421 15.89L16.5563 5.74785L15.1421 4.33363L5 14.4758V15.89H6.41421ZM7.24264 17.89H3V13.6473L14.435 2.21231C14.8256 1.82179 15.4587 1.82179 15.8492 2.21231L18.6777 5.04074C19.0682 5.43126 19.0682 6.06443 18.6777 6.45495L7.24264 17.89ZM3 19.89H21V21.89H3V19.89Z"})),n8=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})),c4=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M13 9H21L11 24V15H4L13 0V9ZM11 11V7.22063L7.53238 13H13V17.3944L17.263 11H11Z"})),r8=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z"})),a8=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})),i8=({color:e="currentColor",size:t=24,className:n,...a})=>Fn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Fn.createElement("path",{d:"M18.793 5.79285 12.5859 12 18.793 18.2071 20.2072 16.7928 15.4143 12 20.2072 7.20706 18.793 5.79285ZM5.20694 18.2072 11.414 12.0001 5.20694 5.793 3.79272 7.20721 8.58562 12.0001 3.79272 16.793 5.20694 18.2072Z"})),s8=["command","query","operation","tool","server","symbol","path","file_path","filePath","pattern","glob","url"],l8=120,o8=800;function fu(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function c8(e){if(e!=null){if(typeof e=="string"){const t=e.trim();if(!t)return;try{return fu(JSON.parse(t))}catch{return}}return fu(e)}}function La(e,t){const n=e.replace(/\s+/g," ").trim();return n?n.length>t?`${n.slice(0,t)}…`:n:""}function Bn(e,t){const n=e[t];if(typeof n=="string"&&n.trim())return n.trim();if(typeof n=="number"&&Number.isFinite(n))return String(n)}function u8(e,t,n){const a=(e??"").toLowerCase();if(a==="bash"||a==="shell"){const s=Bn(t,"command");return s?La(s,n):void 0}if(a==="mcp"||a.startsWith("mcp_")){const s=Bn(t,"server"),o=Bn(t,"tool")??Bn(t,"name"),c=Bn(t,"query");return s&&o?La(`${s} · ${o}`,n):o?La(o,n):c?La(c,n):s?La(s,n):void 0}if(a==="lsp_navigation"||a.includes("lsp")){const s=[Bn(t,"operation"),Bn(t,"symbol"),Bn(t,"path")??Bn(t,"file_path")??Bn(t,"filePath")].filter(Boolean),o=Bn(t,"line")??Bn(t,"position");if(s.length===0&&!o)return;const c=s.join(" · ");return La(o?`${c}${c?":":""}${o}`:c,n)}if(a==="symbol_search"||a.includes("symbol_search")){const s=Bn(t,"query")??Bn(t,"symbol");return s?La(s,n):void 0}if(a==="read"||a==="read_symbol"||a==="read_enclosing"||a.startsWith("read_")){const s=Bn(t,"path")??Bn(t,"file_path")??Bn(t,"filePath"),o=Bn(t,"symbol"),c=Bn(t,"line");if(!s&&!o)return;const d=[s,o,c].filter(Boolean);return La(d.join(" · "),n)}}function d8(e,t){const n=t?.maxLen??l8,a=c8(e);if(!a){if(typeof e=="string"){const m=e.replace(/\s+/g," ").trim();return!m||m==="{}"?"":m.length>n?`${m.slice(0,n)}…`:m}return""}const s=u8(t?.toolName,a,n);if(s)return s;for(const m of s8){const h=a[m];if(typeof h=="string"&&h.trim())return La(h,n)}const o=Object.keys(a);if(o.length===0)return"";const c=a[o[0]],d=String(c??"").replace(/\s+/g," ").trim();return d?d.length>n?`${d.slice(0,n)}…`:d:""}function f8(e){const t=(e??"").toLowerCase();return t==="bash"||t==="shell"?{argsLabel:"命令",resultLabel:"输出"}:t==="mcp"||t.startsWith("mcp_")?{argsLabel:"参数",resultLabel:"结果"}:{argsLabel:"入参",resultLabel:"结果"}}function xy(e){if(e==null)return"";if(typeof e=="string"){const a=e.trim();if(!a)return"";if(a.startsWith("{")&&a.endsWith("}")||a.startsWith("[")&&a.endsWith("]"))try{return xy(JSON.parse(a))}catch{return e}return e}if(typeof e=="number"||typeof e=="boolean")return String(e);const t=fu(e);if(!t)try{return JSON.stringify(e,null,2)}catch{return String(e)}const n=t.content;if(Array.isArray(n)){const a=[];for(const s of n){const o=fu(s);o&&(o.type==="text"&&typeof o.text=="string"||typeof o.text=="string")&&a.push(o.text)}if(a.length>0)return a.join(`
11
- `)}if(typeof t.text=="string")return t.text;if(typeof t.output=="string")return t.output;if(typeof t.message=="string")return t.message;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function m8(e){if(e==null)return"";try{return typeof e=="string"?e:JSON.stringify(e,null,2)}catch{return String(e)}}function h8(e,t){if(e===void 0)return{text:"",truncated:!1};const n=t?.maxLen??o8;return e.length<=n?{text:e,truncated:!1}:{text:`${e.slice(0,n)}…`,truncated:!0}}function p8(e,t){if(t===void 0||!Number.isFinite(e)||!Number.isFinite(t))return;const n=Math.round((t-e)/1e3);return n>0?n:void 0}function wr(){return window.__CONSOLE_CONFIRMATION_TOKEN__??""}function rs(e){return`${e}-${Math.random().toString(36).slice(2,10)}`}function hf(e,t){return new Promise((n,a)=>{if(t?.aborted){a(new DOMException("Aborted","AbortError"));return}const s=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e),o=()=>{clearTimeout(s),a(new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",o)})}function Pm(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function pf(e){const t=new Date(e),n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()?"今天":t.toLocaleDateString([],{month:"long",day:"numeric"})}function g8(e,t){return e?e.taskId===t.taskId&&e.updatedAt===t.updatedAt&&e.lastEventId===t.lastEventId&&e.operations.length===t.operations.length:!1}const wy={status:"idle",snapshot:null,error:null,reloading:!1,reloadError:null,mutationBusy:!1,mutationToken:null};function Ih(e){if(!e||typeof e!="object")return{message:"runtime snapshot request failed"};const t=e,n=t.error;if(n&&typeof n=="object"){const a=n;return{...typeof a.code=="string"&&a.code?{code:a.code}:{},...typeof t.status=="number"?{status:t.status}:{},message:typeof a.message=="string"&&a.message?a.message:"runtime snapshot request failed"}}return{...typeof t.status=="number"?{status:t.status}:{},message:typeof t=="object"&&"message"in t&&typeof t.message=="string"&&t.message?t.message:"runtime snapshot request failed"}}function b8(e,t){switch(t.type){case"load-start":return{...e,sessionId:t.sessionId,status:"loading",error:null};case"load-success":return e.snapshot&&e.sessionId===t.sessionId&&t.snapshot.revision<e.snapshot.revision?e:{...e,sessionId:t.sessionId,status:"ready",snapshot:t.snapshot,error:null,reloadError:null,reloading:!1};case"load-failure":return{...e,sessionId:t.sessionId,status:"error",error:t.error,snapshot:null};case"reload-start":return e.reloading?e:{...e,reloading:!0,reloadError:null,...e.status==="error"?{error:null}:{}};case"reload-success":return{...e,status:"ready",snapshot:t.snapshot,reloading:!1,reloadError:null,error:null,sessionId:t.snapshot.sessionId||e.sessionId};case"reload-failure":return{...e,reloading:!1,reloadError:t.error};case"mutation-start":return{...e,mutationBusy:!0,mutationToken:t.token};case"mutation-adopt":return e.mutationToken!==t.token||e.sessionId!==void 0&&e.sessionId!==t.sessionId||e.snapshot&&t.snapshot.revision<e.snapshot.revision?e:{...e,sessionId:t.sessionId,status:"ready",snapshot:t.snapshot,error:null,reloadError:null,reloading:!1};case"mutation-settle":return e.mutationToken!==t.token?e:{...e,mutationBusy:!1,mutationToken:null};case"mutation-reset":return{...e,mutationBusy:!1,mutationToken:null};case"reset":return{...wy};default:return e}}function Sy(e){const t=e.selection;return{...t.model?{model:{provider:t.model.provider,modelId:t.model.id}}:{},...t.thinkingSelection==="auto"?t.effectiveThinkingLevel?{thinkingLevel:t.effectiveThinkingLevel}:{}:{thinkingLevel:t.thinkingSelection}}}function v8(e,t,n,a){const s=n&&n.sessionId===a?Sy(n):{},o=s.model??e?.model,c=s.thinkingLevel??e?.thinkingLevel;return{readOnly:t.readOnly,systemPrompt:t.systemPrompt,resources:t.resources,suffix:t.suffix,...o?{model:o}:{},...c?{thinkingLevel:c}:{}}}function y8(e=wy){let t=e;const n=new Set;return{getState:()=>t,dispatch:a=>{t=b8(t,a);for(const s of n)s();return t},subscribe:a=>(n.add(a),()=>n.delete(a))}}const bn=y8();let Ti;function ky(e){return`/api/operator/v1/chat/sessions/${encodeURIComponent(e)}`}function x8(e){const t=Ti;if(Ti=e,!(t&&t.sessionId===e.sessionId&&t.origin===e.origin)){if((!t||t.sessionId!==e.sessionId)&&bn.dispatch({type:"mutation-reset"}),!e.sessionId){bn.dispatch({type:"reset"});return}bn.dispatch({type:"load-start",sessionId:e.sessionId}),Ey(e.sessionId,e.origin)}}async function Ey(e,t){try{const n=await fetch(`${t}${ky(e)}/runtime-snapshot`,{credentials:"include"}),a=await n.json().catch(()=>({}));if(Ti?.sessionId!==e)return;if(!n.ok){bn.dispatch({type:"load-failure",sessionId:e,error:{...Ih(a),status:n.status}});return}if(!a.snapshot){bn.dispatch({type:"load-failure",sessionId:e,error:{status:n.status,message:"runtime snapshot missing in response"}});return}bn.dispatch({type:"load-success",sessionId:e,snapshot:a.snapshot})}catch(n){if(Ti?.sessionId!==e)return;bn.dispatch({type:"load-failure",sessionId:e,error:{message:n instanceof Error?n.message:String(n)}})}}async function Ws(){const e=Ti;if(!e?.sessionId||bn.getState().reloading)return!1;const t=e.sessionId;bn.dispatch({type:"reload-start"});try{const n=await fetch(`${e.origin}${ky(t)}/reload`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":wr()},body:"{}"}),a=await n.json().catch(()=>({}));return Ti?.sessionId!==t?!1:n.ok?a.snapshot?(bn.dispatch({type:"reload-success",snapshot:a.snapshot}),!0):(bn.dispatch({type:"reload-failure",error:{status:n.status,message:"reload succeeded but snapshot missing"}}),!1):(bn.dispatch({type:"reload-failure",error:{...Ih(a),status:n.status}}),!1)}catch(n){return Ti?.sessionId!==t||bn.dispatch({type:"reload-failure",error:{message:n instanceof Error?n.message:String(n)}}),!1}}async function Js(){const e=Ti;if(!e?.sessionId)return!1;const t=e.sessionId;return bn.dispatch({type:"load-start",sessionId:t}),Ey(t,e.origin),!0}function w8(e,t,n){return n?(bn.dispatch({type:"mutation-adopt",token:e,sessionId:t,snapshot:n}),bn.getState().snapshot===n):!1}function S8(e,t,n){return n.sessionRef.current?.sessionId!==t||bn.getState().mutationToken!==e?!1:(bn.dispatch({type:"mutation-settle",token:e}),!0)}function al(){return N.useSyncExternalStore(bn.subscribe,bn.getState)}function Ty(e){bn.dispatch(e)}function k8(){return bn.getState()}function E8(e,t,n){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}/auto-invocation`}async function T8(e){const t=e.fetchImpl??fetch;try{const n=await t(E8(e.origin,e.sessionId,e.resourceId),{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":e.confirmationToken},body:JSON.stringify({autoInvocationEnabled:e.autoInvocationEnabled})}),a=await n.json().catch(()=>({}));if(!n.ok||a.ok===!1)return{ok:!1,error:{...Ih(a),status:n.status}};const s=a.preferenceSaved===!0,o=a.reloadApplied===!0;if(!s)return{ok:!1,error:{status:n.status,code:"PI_RESOURCE_PREFERENCES_WRITE_FAILED",message:"preference was not saved"}};if(!o){const c=a.error?.code??"PI_SESSION_BUSY",d=a.error?.message??"preference saved; current session is busy and was not reloaded";return{ok:!0,preferenceSaved:!0,reloadApplied:!1,...a.snapshot?{snapshot:a.snapshot}:{},partialBusy:{code:c,message:d}}}return{ok:!0,preferenceSaved:!0,reloadApplied:!0,...a.snapshot?{snapshot:a.snapshot}:{}}}catch(n){return{ok:!1,error:{message:n instanceof Error?n.message:String(n)}}}}function N8(e){return e.autoInvocationEnabled?{badge:"允许自动使用",help:"模型可自动选择该技能,也可通过 /skill:<name> 手动调用。"}:{badge:"已隐藏自动使用",help:`已从模型自动技能列表隐藏,仍可通过 /skill:${e.name} 手动调用。`}}const $m=()=>window.__CONSOLE_CONFIRMATION_TOKEN__??"";function C8({origin:e}){const[t,n]=N.useState(null),[a,s]=N.useState(null),[o,c]=N.useState(null),[d,m]=N.useState(!1),h=al(),g=h.snapshot,b=h.reloading,x=h.reloadError,y=g?.diagnostics??[],S=async R=>{n(R),c(null);{s(null);try{const A=await fetch(`${e}/api/operator/v1/pi/models-config`,{credentials:"include"}),H=await A.json();if(!A.ok)throw new Error(H.error?.message??"读取失败");s(H.data)}catch(A){c(A instanceof Error?A.message:String(A))}}},E=async R=>{m(!0),c(null);try{const A=await fetch(`${e}/api/operator/v1/pi/models-config`,{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":$m()},body:JSON.stringify(R)}),H=await A.json();if(!A.ok)throw new Error(H.error?.message??"模型配置保存失败");s(H.data)}catch(A){c(A instanceof Error?A.message:String(A))}finally{m(!1)}},M=async(R,A)=>{m(!0),c(null);try{const H=await fetch(`${e}/api/operator/v1/pi/models-config/test`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":$m()},body:JSON.stringify({provider:R,modelId:A})}),F=await H.json();if(!H.ok)throw new Error(F.error?.message??"模型测试失败");return F.data?.available===!0}catch(H){return c(H instanceof Error?H.message:String(H)),!1}finally{m(!1)}},C=t==="models"?"Models":t==="skills"?"Skills":"Packages";return f.jsxs("div",{className:"oc-governance",children:[f.jsxs("div",{className:"oc-governance-links",children:[f.jsx("button",{type:"button",onClick:()=>{S("models")},children:"Models"}),f.jsx("button",{type:"button",className:t==="skills"?"is-active":"",onClick:()=>n("skills"),children:"Skills"}),f.jsx("button",{type:"button",className:t==="packages"?"is-active":"",onClick:()=>n("packages"),children:"Packages"})]}),t&&f.jsx("div",{className:"oc-resource-backdrop",onMouseDown:R=>{R.target===R.currentTarget&&n(null)},children:f.jsxs("section",{className:"oc-resource-panel",role:"dialog","aria-modal":"true","aria-label":C,children:[f.jsxs("header",{className:"oc-resource-panel-head",children:[f.jsxs("div",{className:"oc-resource-panel-head-copy",children:[f.jsx("strong",{children:C}),f.jsx("span",{className:"oc-resource-panel-meta",children:t==="models"?"models.json 管理(读写,经 mutation gate)":t==="skills"?"自动使用开关 · 当前 Pi session 实际加载的 Skills":"只读 · 当前 Pi session 实际解析的 Packages"})]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>n(null),children:"关闭"})]}),f.jsxs("div",{className:"oc-resource-panel-body",children:[y.length>0&&f.jsxs("div",{className:"oc-resource-diagnostics",children:[y.map((R,A)=>f.jsx("div",{className:`oc-resource-diagnostic${R.type==="error"?" is-error":""}`,role:R.type==="error"?"alert":void 0,children:f.jsxs("span",{children:[R.type,R.code?` ${R.code}`:"",":",R.message,R.path?`(${R.path})`:"",R.retryable?" · 可重试":""]})},A)),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Js()},children:"重试"})]}),o&&f.jsx("p",{className:"oc-resource-error",children:o}),t==="models"&&f.jsx(A8,{busy:d,data:a,onMutate:E,onTest:M}),t==="skills"&&f.jsx(R8,{origin:e,sessionId:g?.sessionId,status:h.status,loadError:h.error,skills:g?.skills,hasSession:!!g?.sessionId,hasDiagnostics:y.length>0}),t==="packages"&&f.jsx(M8,{status:h.status,loadError:h.error,packages:g?.packages,hasSession:!!g?.sessionId,hasDiagnostics:y.length>0})]}),f.jsxs("footer",{className:"oc-resource-panel-foot",children:[f.jsx("span",{className:"oc-resource-panel-meta",children:b?"正在重新加载会话…":x?`${x.code??"ERROR"}:${x.message}`:g?`revision ${g.revision} · ${g.loadedAt}`:"等待会话快照…"}),f.jsxs("div",{className:"oc-resource-panel-actions",children:[x&&f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:b,onClick:()=>{Ws()},children:"重试"}),h.status==="error"&&f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Js()},children:"重新读取快照"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:b,onClick:()=>{Ws()},children:"重新加载会话"})]})]})]})})]})}function A8({busy:e,data:t,onMutate:n,onTest:a}){const[s,o]=N.useState(""),[c,d]=N.useState(""),[m,h]=N.useState(""),[g,b]=N.useState(null),x=async y=>{y.preventDefault(),!(!t||!s.trim()||!c.trim())&&(await n({expectedRevision:t.revision,action:"upsert-model",provider:s.trim(),model:{id:c.trim(),...m.trim()?{name:m.trim()}:{}}}),d(""),h(""))};return t?f.jsxs("div",{className:"oc-models-config",children:[f.jsx("p",{className:"oc-resource-panel-meta",children:"Console 不读取或写入 API key;credential 请通过 Pi CLI 配置。"}),t.providers.length===0?f.jsx("p",{className:"oc-resource-empty",children:"models.json 中暂无 Provider(真实空态;用 Pi CLI 配置)。"}):null,t.providers.map(y=>f.jsxs("article",{className:"oc-model-provider",children:[f.jsxs("div",{className:"oc-model-provider-head",children:[f.jsx("strong",{children:y.name}),f.jsx("span",{children:y.credential.configured?"credential configured":"credential 未配置"})]}),y.models.map(S=>f.jsxs("div",{className:"oc-model-row",children:[f.jsx("span",{children:S.name?`${S.name} (${S.id})`:S.id}),f.jsxs("div",{className:"oc-model-row-actions",children:[f.jsx("button",{type:"button",disabled:e,onClick:()=>{a(y.name,S.id).then(E=>b(`${y.name}/${S.id}: ${E?"可用":"不可用"}`))},children:"测试"}),f.jsx("button",{type:"button",disabled:e,onClick:()=>{window.confirm(`确认删除模型 ${y.name}/${S.id}?`)&&n({expectedRevision:t.revision,action:"remove-model",provider:y.name,model:{id:S.id}})},children:"删除"})]})]},S.id)),f.jsx("button",{type:"button",className:"oc-model-provider-remove",disabled:e,onClick:()=>{window.confirm(`确认删除 Provider ${y.name}?`)&&n({expectedRevision:t.revision,action:"remove-provider",provider:y.name})},children:"删除 Provider"})]},y.name)),g&&f.jsx("p",{className:"oc-model-test-result",children:g}),f.jsxs("form",{className:"oc-model-form",onSubmit:y=>{x(y)},children:[f.jsx("strong",{children:"新增或更新模型"}),f.jsx("input",{required:!0,placeholder:"Provider",value:s,onChange:y=>o(y.target.value)}),f.jsx("input",{required:!0,placeholder:"Model ID",value:c,onChange:y=>d(y.target.value)}),f.jsx("input",{placeholder:"显示名称(可选)",value:m,onChange:y=>h(y.target.value)}),f.jsx("button",{type:"submit",disabled:e,children:e?"保存中…":"保存模型"})]})]}):f.jsx("p",{className:"oc-resource-empty",children:"正在读取模型配置…"})}function Ny(e){return e.status==="loading"?f.jsx("p",{className:"oc-resource-empty",children:"会话快照加载中…"}):e.status==="error"?f.jsxs("div",{className:"oc-resource-error",role:"alert",children:[f.jsxs("span",{children:[e.loadError?.code?`${e.loadError.code}:`:"",e.loadError?.message??"会话快照读取失败"]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Js()},children:"重试"})]}):e.hasSession?f.jsx("p",{className:"oc-resource-empty",children:e.emptyText}):f.jsx("p",{className:"oc-resource-empty",children:"当前没有活动会话;打开会话后显示真实资源清单(真实空态)。"})}function R8(e){const t=e.skills??[],[n,a]=N.useState(null),[s,o]=N.useState(null),[c,d]=N.useState(null),[m,h]=N.useState({});if(e.status!=="ready"||!e.hasSession)return f.jsx(Ny,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前 session 未加载任何 Skills(真实空态)"});if(t.length===0&&!e.hasDiagnostics)return f.jsx("p",{className:"oc-resource-empty",children:"当前 session 未加载任何 Skills(真实空态,未伪造列表)。"});const g=new Map;for(const y of t){const S=y.scope||"unknown",E=g.get(S)??[];E.push(y),g.set(S,E)}const b=y=>Object.prototype.hasOwnProperty.call(m,y.resourceId)?m[y.resourceId]:y.autoInvocationEnabled,x=async(y,S)=>{if(!e.sessionId||!y.resourceId||n)return;b(y),o(null),d(null),a(y.resourceId),h(M=>({...M,[y.resourceId]:S}));const E=await T8({origin:e.origin,sessionId:e.sessionId,resourceId:y.resourceId,autoInvocationEnabled:S,confirmationToken:$m()});if(a(null),!E.ok){h(M=>{const C={...M};return delete C[y.resourceId],C}),o(`${E.error.code?`${E.error.code}:`:""}${E.error.message}`);return}if(E.reloadApplied&&E.snapshot){Ty({type:"load-success",sessionId:e.sessionId,snapshot:E.snapshot}),h(M=>{const C={...M};return delete C[y.resourceId],C}),d(null);return}!E.reloadApplied&&E.partialBusy&&d(`设置已保存;当前会话正忙(${E.partialBusy.code}),请在本轮结束后点击「重新加载会话」。${E.partialBusy.message}`)};return f.jsxs("div",{className:"oc-resource-lists",children:[s?f.jsx("p",{className:"oc-resource-error",role:"alert",children:s}):null,c?f.jsx("p",{className:"oc-skill-partial-notice",role:"status",children:c}):null,[...g.entries()].map(([y,S])=>f.jsxs("section",{className:"oc-resource-group",children:[f.jsxs("header",{className:"oc-resource-group-head",children:[f.jsx("strong",{children:y}),f.jsxs("span",{children:[S.length," 项"]})]}),f.jsx("ul",{className:"oc-resource-list",children:S.map(E=>{const M=b(E),C=N8({name:E.name,autoInvocationEnabled:M}),R=n===E.resourceId;return f.jsxs("li",{className:`oc-resource-item${M?"":" is-auto-off"}`,children:[f.jsxs("div",{className:"oc-resource-item-head",children:[f.jsx("strong",{children:E.name}),f.jsx("span",{children:C.badge})]}),f.jsxs("label",{className:"oc-skill-auto-toggle",children:[f.jsx("input",{type:"checkbox",checked:M,disabled:R||!E.resourceId,"aria-label":`允许自动使用 ${E.name}`,onChange:A=>{x(E,A.target.checked)}}),f.jsx("span",{children:R?"保存中…":"允许自动使用"})]}),f.jsx("p",{className:"oc-skill-auto-help",children:C.help}),E.description?f.jsx("p",{children:E.description}):null,f.jsx("code",{children:E.path}),E.source?f.jsxs("span",{className:"oc-resource-panel-meta",children:["source: ",E.source]}):null,Array.isArray(E.diagnostics)&&E.diagnostics.length>0?f.jsx("span",{className:"oc-resource-diagnostic",children:E.diagnostics.join(";")}):null]},`${y}:${E.resourceId||E.path}`)})})]},y))]})}const _8={extension:"Extensions",skill:"Skills",prompt:"Prompts",theme:"Themes"};function I8(e){return Array.isArray(e.diagnostics)&&e.diagnostics.length>0?"error":e.enabled?e.version?"installed":"loaded":"disabled"}function M8(e){const t=e.packages??[];return e.status!=="ready"||!e.hasSession?f.jsx(Ny,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前 session 未配置 Packages(真实空态)"}):t.length===0&&!e.hasDiagnostics?f.jsx("p",{className:"oc-resource-empty",children:"当前 session 未配置 Packages(真实空态,未伪造列表)。"}):f.jsx("div",{className:"oc-resource-lists",children:t.map(n=>{const a=I8(n),s=new Map;for(const o of n.resolved??[]){const c=_8[o.type]??o.type,d=s.get(c)??[];d.push(o),s.set(c,d)}return f.jsxs("article",{className:"oc-resource-item oc-package",children:[f.jsxs("div",{className:"oc-resource-item-head",children:[f.jsx("strong",{children:n.spec}),f.jsx("span",{className:`oc-package-status is-${a}`,children:a})]}),f.jsxs("p",{className:"oc-resource-panel-meta",children:[n.scope," · ",n.enabled?"loaded":"disabled"]}),n.packageName?f.jsxs("p",{className:"oc-package-meta",children:[f.jsx("span",{children:"package"}),f.jsx("code",{children:n.packageName})]}):null,n.version?f.jsxs("p",{className:"oc-package-meta",children:[f.jsx("span",{children:"installed"}),f.jsxs("code",{children:["v",n.version]})]}):null,n.configuredVersion?f.jsxs("p",{className:"oc-package-meta",children:[f.jsx("span",{children:"configured"}),f.jsx("code",{children:n.configuredVersion})]}):null,n.installedPath?f.jsxs("p",{className:"oc-package-meta",children:[f.jsx("span",{children:"installed path"}),f.jsx("code",{children:n.installedPath})]}):null,n.cwd?f.jsxs("p",{className:"oc-package-meta",children:[f.jsx("span",{children:"cwd"}),f.jsx("code",{children:n.cwd})]}):null,s.size>0?f.jsx("div",{className:"oc-package-resources",children:[...s.entries()].map(([o,c])=>f.jsxs("section",{className:"oc-package-group",children:[f.jsxs("header",{className:"oc-resource-group-head",children:[f.jsx("strong",{children:o}),f.jsxs("span",{children:[c.length," 项"]})]}),f.jsx("ul",{className:"oc-resource-sub-list",children:c.map((d,m)=>f.jsxs("li",{children:[f.jsx("span",{children:d.name||d.path}),f.jsxs("span",{className:"oc-resource-panel-meta",children:[d.scope,d.source?` · ${d.source}`:""]}),f.jsx("code",{children:d.path})]},`${o}:${m}`))})]},o))}):f.jsx("p",{className:"oc-resource-panel-meta",children:"未解析出扩展/技能/提示词/主题(真实空态)"}),Array.isArray(n.diagnostics)&&n.diagnostics.length>0?f.jsx("div",{className:"oc-package-diagnostics",children:n.diagnostics.map((o,c)=>f.jsx("span",{children:o},c))}):null]},`${n.scope}:${n.spec}`)})})}const mu=10,Cy="loop-console.operator-chat.sidebar-split.v1",ss=45,Du=28,ju=70,u4=5,d4=10;function Zs(e){return Number.isFinite(e)?Math.min(ju,Math.max(Du,Math.round(e))):ss}function O8(e){if(e==null||e==="")return null;const t=Number(e);if(!Number.isFinite(t))return null;const n=Math.round(t);return n<Du||n>ju?null:n}function D8(e=Ay()){if(!e)return ss;try{return O8(e.getItem(Cy))??ss}catch{return ss}}function f4(e,t=Ay()){const n=Zs(e);if(!t)return n;try{t.setItem(Cy,String(n))}catch{}return n}function j8(e,t,n=!1){const a=Zs(e);switch(t){case"ArrowUp":return Zs(a-(n?d4:u4));case"ArrowDown":return Zs(a+(n?d4:u4));case"Home":return Du;case"End":return ju;case"Enter":return ss;default:return null}}function m4(e,t,n){if(!Number.isFinite(n)||n<=0)return ss;const a=(e-t)/n;return Zs(a*100)}function Ay(){try{return typeof globalThis>"u"?null:globalThis.localStorage??null}catch{return null}}const h4='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function Lu(e){const{open:t,containerRef:n,triggerRef:a,onEscape:s}=e,o=N.useRef(null),c=N.useRef(!1);N.useEffect(()=>{if(t){if(!c.current){const d=document.activeElement;o.current=a?.current??(d instanceof HTMLElement?d:null);const m=n.current;m&&(m.querySelector(h4)??m).focus?.(),c.current=!0}return()=>{if(!c.current)return;const d=a?.current??o.current;d&&document.contains(d)&&d.focus(),o.current=null,c.current=!1}}c.current=!1},[t,n,a]),N.useEffect(()=>{if(!t)return;const d=n.current;if(!d)return;const m=h=>{if(h.key==="Escape"){h.preventDefault(),s?.();return}if(h.key!=="Tab")return;const g=Array.from(d.querySelectorAll(h4)).filter(S=>!S.hasAttribute("disabled")&&S.tabIndex!==-1);if(g.length===0){h.preventDefault(),d.focus?.();return}const b=g[0],x=g[g.length-1],y=document.activeElement;h.shiftKey?(y===b||!d.contains(y))&&(h.preventDefault(),x.focus()):(y===x||!d.contains(y))&&(h.preventDefault(),b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,n,s])}function L8(e){const{item:t,active:n,streamingNow:a,state:s,deleteConfirming:o,deleting:c}=e,d=a||!!t.activeTurnId,m=t.title||t.displayTitle||"未命名对话",h=N.useRef(null),g=N.useRef(null),[b,x]=N.useState(null),y=N.useRef(null),S=()=>{y.current!==null&&(window.clearTimeout(y.current),y.current=null)},E=()=>{S(),x(null)},M=A=>{if(!(A.scrollWidth>A.clientWidth+1)){E();return}const F=A.getBoundingClientRect(),D=12,$=Math.min(360,window.innerWidth-D*2),P=F.left,ee=Math.max(D,Math.min(P,window.innerWidth-D-$));x({x:ee,y:F.top+F.height/2})},C=A=>{A&&(S(),y.current=window.setTimeout(()=>M(A),350))};N.useEffect(()=>{const A=()=>E(),H=F=>{F.key==="Escape"&&E()};return window.addEventListener("scroll",A,!0),window.addEventListener("keydown",H),()=>{window.removeEventListener("scroll",A,!0),window.removeEventListener("keydown",H),S()}},[]),N.useEffect(()=>{o&&g.current?.focus()},[o]);const R=`oc-session-tip-${t.sessionId}`;return f.jsxs("div",{className:`oc-session-item${n?" is-active":""}${o?" is-delete-confirming":""}`,"data-session-id":t.sessionId,children:[f.jsxs("button",{type:"button",className:"oc-session-main",disabled:c,onClick:e.onActivate,onMouseEnter:A=>{const H=A.currentTarget.querySelector("strong");H instanceof HTMLElement&&C(H)},onMouseLeave:E,onFocus:A=>{const H=A.currentTarget.querySelector("strong");H instanceof HTMLElement&&C(H)},onBlur:E,"aria-describedby":b?R:void 0,children:[f.jsx("strong",{ref:h,children:m}),f.jsx("span",{children:new Date(t.updatedAt).toLocaleString()})]}),d?f.jsx("span",{className:"oc-session-running","aria-label":"对话进行中",title:"对话进行中",children:f.jsx("span",{className:"oc-spinner","aria-hidden":"true"})}):null,f.jsx("div",{className:`oc-session-actions${o?" is-delete-confirm":""}`,children:o?f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",ref:g,className:"oc-session-delete-confirm",disabled:c,"aria-busy":c||void 0,"aria-label":`确认删除会话:${m}`,onClick:A=>{A.stopPropagation(),e.onConfirmDelete()},children:c?"删除中…":"删除"}),f.jsx("button",{type:"button",className:"oc-session-delete-cancel",disabled:c,"aria-label":"取消删除会话",onClick:A=>{A.stopPropagation(),e.onCancelDelete()},children:"取消"})]}):f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"oc-session-menu",title:"重命名会话","aria-label":"重命名会话",onClick:A=>{A.stopPropagation();const H=window.prompt("会话名称",t.title??"");H!==null&&e.onRename(H)},children:f.jsx(t8,{size:16,"aria-hidden":"true"})}),f.jsx("button",{type:"button",className:"oc-session-menu",title:s==="active"?"归档会话":"恢复会话","aria-label":s==="active"?"归档会话":"恢复会话",onClick:A=>{A.stopPropagation(),e.onSetState(s==="active"?"archived":"active")},children:s==="active"?f.jsx(Wx,{size:16,"aria-hidden":"true"}):f.jsx(r8,{size:16,"aria-hidden":"true"})}),f.jsx("button",{type:"button",className:"oc-session-menu oc-session-delete","data-session-delete-id":t.sessionId,title:"删除会话","aria-label":"删除会话",onClick:A=>{A.stopPropagation(),e.onRequestDelete()},children:f.jsx(e8,{size:16,"aria-hidden":"true"})})]})}),b?_h.createPortal(f.jsx("div",{id:R,role:"tooltip",className:"oc-session-title-tooltip",style:{position:"fixed",left:b.x,top:b.y,transform:"translateY(-50%)"},children:m}),document.body):null]})}function z8(e){return[...e].sort((t,n)=>t.kind!==n.kind?t.kind==="directory"?-1:1:t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))}function B8({open:e}){return f.jsx("svg",{className:`oc-tree-chevron${e?" is-open":""}`,width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.jsx("path",{d:"M4.2 2.4 7.8 6 4.2 9.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function U8({open:e}){return e?f.jsxs("svg",{className:"oc-tree-glyph is-folder-open",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[f.jsx("path",{d:"M1.5 4.2h3.1l1.1 1.2H12a.8.8 0 0 1 .8.8v5a.8.8 0 0 1-.8.8H2a.8.8 0 0 1-.8-.8V5a.8.8 0 0 1 .8-.8Z",fill:"currentColor",opacity:"0.88"}),f.jsx("path",{d:"M1.8 5.8h10.4l-.7 5.2H2.5L1.8 5.8Z",fill:"currentColor",opacity:"0.55"})]}):f.jsx("svg",{className:"oc-tree-glyph is-folder",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.jsx("path",{d:"M1.5 3.8h3.2l1 1.1H12a.8.8 0 0 1 .8.8v5.5a.8.8 0 0 1-.8.8H2a.8.8 0 0 1-.8-.8V4.6a.8.8 0 0 1 .8-.8Z",fill:"currentColor",opacity:"0.78"})})}function q8(){return f.jsxs("svg",{className:"oc-tree-glyph is-file",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[f.jsx("path",{d:"M3.2 1.6h5.1L10.8 4v8.4a.8.8 0 0 1-.8.8H3.2a.8.8 0 0 1-.8-.8V2.4a.8.8 0 0 1 .8-.8Z",fill:"currentColor",opacity:"0.55"}),f.jsx("path",{d:"M8.3 1.7v2.5h2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.1",strokeLinejoin:"round",opacity:"0.75"})]})}function H8(){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:f.jsx("path",{d:"M3 3.5h10v2H3v-2Zm0 3.5h10v2H3V7Zm0 3.5h7V13H3v-2Z",fill:"currentColor"})})}function F8(){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:f.jsx("path",{d:"M8 3v10M3 8h10",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function P8(){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:f.jsx("path",{d:"M8 2.2 13 4.5v3.2c0 3.1-2.1 5.5-5 6.3-2.9-.8-5-3.2-5-6.3V4.5L8 2.2Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})})}function $8(e){const t=e.sessions.slice(0,mu),[n,a]=N.useState(()=>D8()),[s,o]=N.useState(!1),[c,d]=N.useState(null),[m,h]=N.useState(null),g=N.useRef(null),b=N.useRef(null),x=N.useRef(!1),y=e.layoutMode==="comfortable"&&e.open,S=e.layoutMode==="compact",E=e.drawerOpen&&(e.layoutMode==="compact"||e.layoutMode==="narrow"),M=N.useCallback((le=!0)=>{if(m)return;const W=c;d(null),!(!le||!W)&&window.requestAnimationFrame(()=>{const U=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(W):W.replace(/["\\]/g,"\\$&");document.querySelector(`[data-session-delete-id="${U}"]`)?.focus()})},[m,c]),C=N.useCallback(()=>{m||(d(null),e.onCloseDrawer())},[m,e.onCloseDrawer]),R=N.useCallback(()=>{if(c){M();return}C()},[M,C,c]);Lu({open:E,containerRef:b,triggerRef:e.drawerTriggerRef,onEscape:R}),N.useEffect(()=>{x.current&&!E&&!m&&d(null),x.current=E},[m,E]),N.useEffect(()=>{if(E||!c)return;const le=W=>{W.key==="Escape"&&(W.preventDefault(),M())};return document.addEventListener("keydown",le),()=>document.removeEventListener("keydown",le)},[M,c,E]),N.useEffect(()=>{c&&!t.some(le=>le.sessionId===c)&&d(null),m&&!t.some(le=>le.sessionId===m)&&h(null)},[m,c,t]);const A=N.useCallback(async le=>{if(!(m||c!==le)){h(le);try{await e.onDelete(le)}finally{h(null),d(null)}}},[m,c,e.onDelete]),H=N.useCallback(()=>{m||(M(!1),e.onCreate())},[M,m,e.onCreate]),F=N.useCallback(()=>{m||(M(!1),e.onToggleOpen())},[M,m,e.onToggleOpen]),D=N.useCallback((le,W)=>{const U=Zs(le);a(U),W&&f4(U)},[]),$=N.useCallback(le=>{const W=j8(n,le.key,le.shiftKey);W!=null&&(le.preventDefault(),D(W,!0))},[D,n]),P=N.useCallback(le=>{le.preventDefault(),le.currentTarget.setPointerCapture(le.pointerId),o(!0);const U=g.current;if(!U)return;const z=U.getBoundingClientRect();D(m4(le.clientY,z.top,z.height),!1)},[D]),ee=N.useCallback(le=>{if(!le.currentTarget.hasPointerCapture(le.pointerId))return;const W=g.current;if(!W)return;const U=W.getBoundingClientRect();D(m4(le.clientY,U.top,U.height),!1)},[D]),q=N.useCallback(le=>{le.currentTarget.hasPointerCapture(le.pointerId)&&le.currentTarget.releasePointerCapture(le.pointerId),o(!1),f4(n)},[n]),Z=N.useCallback(()=>{D(ss,!0)},[D]),G=f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"oc-sidebar-split",ref:g,style:{"--oc-session-share":`${n}%`,"--oc-repo-share":`${100-n}%`},"data-dragging":s?"true":"false",children:[f.jsxs("section",{className:"oc-sidebar-section oc-sessions",children:[f.jsxs("header",{children:[f.jsx("strong",{children:"会话"}),f.jsxs("div",{className:"oc-sidebar-header-actions",children:[f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:H,disabled:e.creatingSession,"aria-busy":e.creatingSession||void 0,children:e.creatingSession?"创建中…":"新建"}),e.layoutMode==="comfortable"?f.jsx("button",{type:"button",className:"oc-sidebar-toggle",onClick:F,"aria-expanded":!0,"aria-label":"收起侧栏",title:"收起侧栏",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.jsx("path",{d:"M8.8 2.6 5.2 7l3.6 4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}):f.jsx("button",{type:"button",className:"oc-sidebar-toggle",onClick:C,"aria-label":"关闭侧栏抽屉",title:"关闭",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.jsx("path",{d:"M3.5 3.5 10.5 10.5M10.5 3.5 3.5 10.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})})]})]}),f.jsxs("div",{className:"oc-session-scroll",children:[["active","archived"].map(le=>{const W=t.filter(U=>U.state===le);return W.length?f.jsxs("div",{className:"oc-session-group",children:[f.jsx("small",{children:le==="active"?"进行中":"已归档"}),W.map(U=>f.jsx(L8,{item:U,active:e.activeSessionId===U.sessionId,streamingNow:e.activeSessionId===U.sessionId&&e.activeSessionStreaming===!0,state:le,deleteConfirming:c===U.sessionId,deleting:m===U.sessionId,onActivate:()=>{m||(M(!1),e.onActivate(U.sessionId))},onRename:z=>e.onRename(U.sessionId,z),onSetState:z=>e.onSetState(U.sessionId,z),onRequestDelete:()=>{m||d(U.sessionId)},onConfirmDelete:()=>{A(U.sessionId)},onCancelDelete:()=>M()},U.sessionId))]},le):null}),t.length===0?f.jsx("p",{className:"oc-tree-empty",children:"暂无会话,点击上方新建。"}):null]})]}),f.jsx("div",{className:"oc-sidebar-separator",role:"separator","aria-orientation":"horizontal","aria-valuemin":Du,"aria-valuemax":ju,"aria-valuenow":n,"aria-label":"调整会话与仓库高度比例",tabIndex:0,onKeyDown:$,onPointerDown:P,onPointerMove:ee,onPointerUp:q,onPointerCancel:q,onDoubleClick:Z}),f.jsxs("section",{className:"oc-sidebar-section oc-explorer",children:[f.jsxs("header",{children:[f.jsx("strong",{children:"仓库"}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:e.onRefreshTree,children:"刷新"})]}),f.jsx("p",{className:"oc-explorer-hint",children:"单击插入 @路径 · 双击预览"}),e.treeError&&f.jsx("p",{className:"oc-sidebar-error",children:e.treeError}),f.jsx("div",{className:"oc-tree-scroll",children:f.jsx(Ry,{entries:e.tree[""]??[],tree:e.tree,expanded:e.expanded,depth:0,onToggle:e.onToggleDir,onInsert:e.onInsert,onPreview:e.onPreview})})]})]}),f.jsx(C8,{origin:e.origin})]});return f.jsxs(f.Fragment,{children:[S?f.jsxs("nav",{className:"oc-sidebar-rail","aria-label":"紧凑侧栏",children:[f.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":"打开会话与仓库",title:"会话与仓库","aria-expanded":E,onClick:()=>E?C():e.onOpenDrawer(),children:f.jsx(H8,{})}),f.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":e.creatingSession?"创建会话中":"新建会话",title:e.creatingSession?"创建中…":"新建会话",onClick:H,disabled:e.creatingSession,"aria-busy":e.creatingSession||void 0,children:f.jsx(F8,{})}),f.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":"治理入口",title:"治理",onClick:()=>E?C():e.onOpenDrawer(),children:f.jsx(P8,{})})]}):null,e.layoutMode==="comfortable"?f.jsx("aside",{className:`oc-sidebar${y?"":" is-collapsed"}`,"aria-label":"会话与仓库",children:y?G:f.jsx("button",{type:"button",className:"oc-sidebar-toggle is-collapsed",onClick:F,"aria-expanded":!1,"aria-label":"展开侧栏",title:"展开侧栏",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.jsx("path",{d:"M5.2 2.6 8.8 7 5.2 11.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})})}):null,E?f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"oc-overlay-backdrop","aria-label":"关闭侧栏遮罩",onClick:C}),f.jsx("aside",{ref:b,className:"oc-sidebar oc-sidebar-drawer","aria-label":"会话与仓库抽屉",role:"dialog","aria-modal":"true",tabIndex:-1,children:G})]}):null]})}function Ry(e){const t=N.useMemo(()=>z8(e.entries),[e.entries]);return t.length?f.jsx("ul",{className:"oc-tree",role:e.depth===0?"tree":"group",children:t.map(n=>{const a=n.name.startsWith(".");if(n.kind==="directory"){const s=e.expanded.has(n.path);return f.jsxs("li",{className:`oc-tree-node is-dir${s?" is-open":""}${a?" is-dot":""}`,role:"treeitem","aria-expanded":s,children:[f.jsxs("button",{type:"button",className:"oc-tree-row oc-tree-dir",onClick:()=>e.onToggle(n.path),style:{paddingLeft:`${8+e.depth*12}px`},children:[f.jsx(B8,{open:s}),f.jsx(U8,{open:s}),f.jsx("span",{className:"oc-tree-label",children:n.name})]}),s?f.jsx("div",{className:"oc-tree-children",style:{"--oc-tree-guide":`${14+e.depth*12}px`},children:f.jsx(Ry,{entries:e.tree[n.path]??[],tree:e.tree,expanded:e.expanded,depth:e.depth+1,onToggle:e.onToggle,onInsert:e.onInsert,onPreview:e.onPreview})}):null]},n.path)}return f.jsx("li",{className:`oc-tree-node is-file${a?" is-dot":""}`,role:"treeitem",children:f.jsx(G8,{entry:n,depth:e.depth,onInsert:e.onInsert,onPreview:e.onPreview})},n.path)})}):f.jsx("p",{className:"oc-tree-empty",children:"此目录为空或没有可安全浏览的文件。"})}function G8(e){const t=N.useRef(null);return N.useEffect(()=>()=>{t.current!==null&&window.clearTimeout(t.current)},[]),f.jsxs("button",{type:"button",className:"oc-tree-row oc-tree-file",style:{paddingLeft:`${8+e.depth*12}px`},title:"单击插入引用;双击预览",onClick:()=>{t.current!==null&&window.clearTimeout(t.current),t.current=window.setTimeout(()=>{e.onInsert(e.entry.path),t.current=null},220)},onDoubleClick:()=>{t.current!==null&&window.clearTimeout(t.current),t.current=null,e.onPreview(e.entry.path)},children:[f.jsx("span",{className:"oc-tree-chevron-spacer","aria-hidden":"true"}),f.jsx(q8,{}),f.jsx("span",{className:"oc-tree-label",children:e.entry.name})]})}function K8(e){const t=e.previews.find(n=>n.path===e.activePath);return!t&&!e.loading?null:f.jsxs(f.Fragment,{children:[t&&f.jsxs("section",{className:"oc-file-preview","aria-label":`文件预览 ${t.path}`,children:[f.jsxs("header",{children:[f.jsx("div",{className:"oc-file-tabs",role:"tablist","aria-label":"文件预览 Tabs",children:e.previews.map(n=>f.jsx("button",{type:"button",role:"tab","aria-selected":n.path===t.path,className:n.path===t.path?"is-active":"",onClick:()=>e.onActivate(n.path),children:n.path},n.path))}),f.jsxs("span",{children:[t.bytes," bytes",t.truncated?" · 已截断":""]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>e.onClose(t.path),children:"关闭预览"})]}),f.jsx("pre",{children:f.jsx("code",{children:t.content})})]}),e.loading&&f.jsx("div",{className:"oc-file-preview-loading",children:"正在读取文件…"})]})}const _y=[{command:"/task",label:"Task context",description:"查看当前任务、Draft 与 assessment",action:"focus-panel:task",source:"operator"},{command:"/contract",label:"Contract",description:"查看 contract diff 与 apply gate",action:"focus-panel:contract",source:"operator"},{command:"/dag",label:"DAG",description:"查看 DAG spine、确认与运行状态",action:"focus-panel:dag",source:"operator"},{command:"/interview",label:"Interview",description:"打开 Requirement Interview",action:"focus:interview",source:"operator"},{command:"/reload",label:"Reload session",description:"重新加载当前 Pi 会话的设置、扩展、技能、提示词、主题与上下文文件(不产生消息)",action:"reload",source:"operator"}],Iy=[{command:"/compact",label:"压缩上下文",description:"压缩当前会话上下文,释放 token",action:"compact",source:"web"},{command:"/name",label:"重命名会话",description:"设置当前会话标题",action:"name",source:"web"},{command:"/session",label:"会话信息",description:"显示当前会话元信息",action:"session",source:"web"},{command:"/copy",label:"复制回复",description:"复制最后一条助手消息原文",action:"copy",source:"web"}],as={operator:0,web:1,extension:2,skill:3,prompt:4};function p4(e){const t=e.trim().split(/\s+/,1)[0]??"";return t?t.startsWith("/")?t.toLowerCase():`/${t.toLowerCase()}`:""}function g4(e){const t=e.trim().split(/\s+/,1)[0]?.toLowerCase();if(!t?.startsWith("/"))return;const n=[..._y,...Iy].find(a=>a.command===t);return n?{command:n.command,action:n.action}:{command:t,action:"unknown"}}function V8(e){if(e==="focus-panel:task"||e==="focus-panel:contract")return"tasks";if(e==="focus-panel:dag")return"recovery"}function Y8(e=[]){const t=new Map,n=a=>{const s=p4(a.command);if(!s)return;const o=t.get(s);if(!o){t.set(s,{...a,command:s});return}as[a.source]<as[o.source]&&t.set(s,{...a,command:s})};for(const a of _y)n({command:a.command,label:a.label,description:a.description,source:a.source,action:a.action});for(const a of Iy)n({command:a.command,label:a.label,description:a.description,source:a.source,action:a.action});for(const a of e){const s=p4(a.command);s&&n({command:s,label:a.label||s,description:a.description||"",source:a.source,action:"pi-prompt"})}return[...t.values()].sort((a,s)=>{const o=as[a.source]-as[s.source];return o!==0?o:a.command.localeCompare(s.command)})}function X8(e,t){const n=(t.trim().split(/\s+/,1)[0]??"").toLowerCase();if((/\s/.test(t.trimStart().slice(1))||t.includes(" "))&&t.trimStart().includes(" "))return[];const a=n.startsWith("/")?n:n?`/${n}`:"/",s=a==="/"?"":a.slice(1),o=[];for(const c of e){const d=c.command.toLowerCase(),m=d.startsWith("/")?d.slice(1):d,h=c.description.toLowerCase();let g=100;if(!s)g=10+as[c.source];else if(d===a||m===s)g=0;else if(d.startsWith(a)||m.startsWith(s))g=1;else if(m.includes(s)||d.includes(s))g=2;else if(h.includes(s))g=3;else continue;o.push({...c,score:g})}return o.sort((c,d)=>{if(c.score!==d.score)return c.score-d.score;const m=as[c.source]-as[d.source];return m!==0?m:c.command.localeCompare(d.command)})}const Z8={operator:"Operator",web:"Pi Web",extension:"Extensions",prompt:"Prompts",skill:"Skills"},Q8=new Set(["operatorCapabilities","operationList","operationGet","operationEventSummary","statsContext","sourceInstructions","spineCheck","inspect","observeLink"]);function W8(e){return Q8.has(e)?"technical-only":e==="doctor"?"inline-detail":"activity-detail"}const J8={newTask:"创建任务",importPrd:"任务需求",contractShow:"任务边界",contractApply:"更新任务契约",contractDiff:"任务契约差异",contractDraftSave:"任务契约草稿",contractValidate:"检查任务契约",taskAdvance:"推进任务准备",dagRunTask:"执行流程",dagValidate:"校验执行流程",prepareDagConfirmation:"执行确认",confirmDagConfirmation:"确认执行边界",prepareDagExecution:"执行边界",runDag:"任务执行",operationWait:"执行监督",operationGet:"任务活动详情",operationList:"会话活动",operationEventSummary:"执行进展摘要",dagStatus:"执行状态",dagDoctor:"执行诊断",dagReport:"执行结果",dagRerunPlan:"恢复评估",dagInterruptEligibility:"中止资格",standaloneTaskRerun:"恢复执行",workerTaskRetry:"重试任务",promoteRun:"任务推进",status:"任务状态"},ew={newTask:{running:"正在创建任务",success:"任务已经创建",error:"创建任务时遇到问题"},importPrd:{running:"正在整理并导入任务需求",success:"任务需求已经导入",error:"导入任务需求时遇到问题"},contractShow:{running:"正在读取任务目标和执行边界",success:"任务目标与执行边界已经读取",error:"读取任务边界时遇到问题"},taskAdvance:{running:"正在推进任务契约并准备执行流程",success:"任务已经推进到下一安全阶段",error:"任务推进被契约或执行边界阻塞"},dagRunTask:{running:"正在生成并校验执行流程",success:"执行流程已经准备好",error:"准备执行流程时遇到问题"},prepareDagExecution:{running:"正在确认任务可以安全执行",success:"执行边界已经确认",error:"执行边界尚未通过确认"},runDag:{running:"正在启动任务执行",success:"任务执行已经启动",error:"启动任务执行时遇到问题"},dagReport:{running:"正在读取本次执行结果",success:"本次执行结果已经读取",error:"读取执行结果时遇到问题"},dagRerunPlan:{running:"正在评估能否从失败位置继续",success:"恢复条件评估已经完成",error:"暂时无法确定安全的恢复方式"},dagInterruptEligibility:{running:"正在检查能否协作中止此运行",success:"中止资格已经确认",error:"当前运行不能协作中止"},standaloneTaskRerun:{running:"正在从失败位置恢复执行",success:"已经从失败位置继续执行",error:"从失败位置恢复执行时遇到问题"},promoteRun:{running:"正在推进任务状态",success:"任务状态已经更新",error:"推进任务状态时遇到问题"},status:{running:"正在读取任务状态",success:"任务状态已经更新",error:"读取任务状态时遇到问题"},contractApply:{running:"正在应用任务契约变更",success:"任务契约已经更新",error:"应用任务契约变更时遇到问题"},contractDiff:{running:"正在比较任务契约版本",success:"任务契约差异已经读取",error:"比较任务契约时遇到问题"},contractDraftSave:{running:"正在保存任务契约草稿",success:"任务契约草稿已经保存",error:"保存任务契约草稿时遇到问题"},contractValidate:{running:"正在检查任务契约",success:"任务契约检查已经完成",error:"任务契约检查没有通过"},dagValidate:{running:"正在校验执行流程",success:"执行流程校验已经通过",error:"执行流程校验没有通过"},prepareDagConfirmation:{running:"正在准备执行确认",success:"执行确认已经准备好",error:"准备执行确认时遇到问题"},confirmDagConfirmation:{running:"正在确认执行边界",success:"执行边界已经确认",error:"执行边界尚未通过确认"},operationGet:{running:"正在读取任务活动详情",success:"任务活动详情已经读取",error:"读取任务活动详情时遇到问题"},operationList:{running:"正在读取本次对话的活动",success:"本次对话的活动已经读取",error:"读取对话活动时遇到问题"},operationEventSummary:{running:"正在汇总执行进展",success:"执行进展已经汇总",error:"汇总执行进展时遇到问题"},dagStatus:{running:"正在读取执行状态",success:"执行状态已经更新",error:"读取执行状态时遇到问题"},dagDoctor:{running:"正在诊断本次任务执行",success:"任务执行诊断已经完成",error:"诊断任务执行时遇到问题"},workerTaskRetry:{running:"正在重试失败的任务",success:"失败任务已经重新开始",error:"重试失败任务时遇到问题"},doctor:{running:"正在检查运行环境",success:"运行环境检查已经完成",error:"运行环境检查发现问题"},inspect:{running:"正在读取详细运行信息",success:"详细运行信息已经读取",error:"读取详细运行信息时遇到问题"},observeLink:{running:"正在准备运行看板入口",success:"运行看板入口已经准备好",error:"准备运行看板入口时遇到问题"},operatorCapabilities:{running:"正在读取可用操作能力",success:"可用操作能力已经读取",error:"读取可用操作能力时遇到问题"},sourceInstructions:{running:"正在读取任务来源说明",success:"任务来源说明已经读取",error:"读取任务来源说明时遇到问题"},spineCheck:{running:"正在检查计划执行步骤",success:"计划执行步骤检查已经完成",error:"计划执行步骤检查发现问题"},statsContext:{running:"正在统计上下文使用情况",success:"上下文使用情况已经统计完成",error:"统计上下文使用情况时遇到问题"}},tw=[{pattern:/(?:^|-)contract(?:-pi)?$/i,running:"正在核对任务目标和执行边界",finished:"任务目标与执行边界已确认",error:"任务边界存在冲突,需要先处理"},{pattern:/scout-src/i,running:"正在梳理与任务相关的代码",finished:"相关代码范围已梳理",error:"梳理相关代码时遇到问题"},{pattern:/scout-tests/i,running:"正在检查现有测试和验证方式",finished:"现有测试与验证方式已确认",error:"检查现有测试时遇到问题"},{pattern:/plan/i,running:"正在整理具体实施步骤",finished:"实施步骤已经准备好",error:"实施方案还需要进一步完善"},{pattern:/implement|writer/i,running:"正在修改并保存相关文件",finished:"文件修改已经完成",error:"修改文件时遇到问题"},{pattern:/verify|reverify/i,running:"正在验证本次修改",finished:"本次修改已通过验证",error:"验证没有通过,正在检查原因"},{pattern:/review/i,running:"正在检查改动是否完整",finished:"改动完整性检查已通过",error:"发现需要补充或修正的内容"},{pattern:/closeout/i,running:"正在整理交付结果",finished:"任务已经完成并形成交付记录",error:"交付结果尚未整理完整"}];function My(e){if(!(!e||typeof e!="object"))return e}function Mh(e){if(e&&typeof e=="object")return e;if(typeof e=="string")try{return My(JSON.parse(e))}catch{return}}function gf(e){const n=Mh(e)?.operationId;return typeof n=="string"&&n?n:void 0}function nw(e){const n=Mh(e)?.maxWaitMs;if(!(typeof n!="number"||!Number.isFinite(n)||n<=0))return Math.max(1,Math.round(n/1e3))}function Oy(e){const t=e.operationId??gf(e.args)??gf(e.result)??gf(e.resultText);return t?`operation:${t}`:`tool:${e.id}`}function rw(e){return e==="running"?"progress":e==="error"?"error":"success"}function aw(e){return Mh(e.resultText??e.result)}function iw(e){return Array.isArray(e.events)?e.events.flatMap(t=>{const n=My(t);if(!n)return[];const a=n.messagePreview??n.message;return typeof a=="string"?[a]:[]}):[]}function sw(e,t,n){const a=[];for(const m of e)for(const h of m.matchAll(/node-(started|finished)[^\n]*?node=([^\s,]+)/gi)){const g=h[1]?.toLowerCase(),b=h[2]??"",x=m.match(/status=([^\s,]+)/i)?.[1]?.toUpperCase();let y="finished";x==="ERROR"||x==="FAILED"?y="error":g==="started"&&(y="running"),a.push({node:b,status:y})}const s=a.at(-1);if(!s)return;const o=a.some(m=>/scout-src/i.test(m.node)&&m.status==="finished"),c=a.some(m=>/scout-tests/i.test(m.node)&&m.status==="finished");if(o&&c)return{id:t,kind:"success",title:"代码与测试的影响范围已确认",activityRef:n};const d=tw.find(m=>m.pattern.test(s.node));return d?s.status==="running"?{id:t,kind:"progress",title:d.running,activityRef:n}:s.status==="error"?{id:t,kind:"error",title:d.error,activityRef:n}:{id:t,kind:"success",title:d.finished,activityRef:n}:{id:t,kind:"success",title:"执行状态已经更新",activityRef:n}}function lw(e){const t=Oy(e),n=`activity:${e.id}`,a=nw(e.args);if(e.status==="running")return{id:n,kind:"progress",title:a?`正在等待新的执行进展,最长等待时间 ${a} 秒`:"正在等待新的执行进展",activityRef:t};if(e.status==="error")return{id:n,kind:"error",title:"等待执行进展时遇到问题",activityRef:t};let s="";typeof e.resultText=="string"?s=e.resultText:typeof e.result=="string"&&(s=e.result);const o=aw(e),c=sw([s,...o?iw(o):[]],n,t);if(c)return c;if(o){if(o.timedOut===!0||o.changed===!1)return{id:n,kind:"warning",title:"等待期间没有新的执行进展",activityRef:t};if(o.changed===!0)return{id:n,kind:"success",title:"已经收到新的执行进展",activityRef:t}}return{id:n,kind:"success",title:"执行状态已经更新",activityRef:t}}function ow(e){const t=W8(e.toolName);if(t==="technical-only"||t==="inline-detail")return;if(e.toolName==="operationWait")return lw(e);const n=ew[e.toolName];if(!n)return;let a=n.success;return e.status==="running"?a=n.running:e.status==="error"&&(a=n.error),{id:`activity:${e.id}`,kind:rw(e.status),title:a,activityRef:Oy(e)}}function Dy(e){return J8[e]??"任务活动"}function Oh(e){switch(e){case"starting":return{label:"正在启动",kind:"progress"};case"running":return{label:"运行中",kind:"progress"};case"succeeded":case"finished":case"FINISHED":case"pass":return{label:"已完成",kind:"success"};case"failed":case"partial_failed":case"ERROR":case"FAILED":case"timed-out":return{label:"未完成",kind:"error"};case"needs-reconcile":return{label:"需要同步",kind:"warning"};case"cancelled":case"abandoned":case"superseded":return{label:"已停止",kind:"warning"};default:return{label:"状态已更新",kind:"success"}}}function jy(e){return[e.activityRef??`operation:${e.operationId}`,`operation:${e.operationId}`,...e.toolCallId?[`tool:${e.toolCallId}`]:[]]}function Ly(e){return[e.activityRef??`gate:${e.cardId}`]}function zy(e){return[e.activityRef??`artifact:${e.artifactId}`]}function cw(e){return new Set([...e.operations.flatMap(jy),...e.gates.flatMap(Ly),...e.artifacts.flatMap(zy)])}function b4(e){return e.updatedSeq??e.eventSeq}function v4(e){const t=Date.parse(e.updatedAt);return Number.isFinite(t)?t:0}function Dh(e,t){const n=b4(e),a=b4(t);return n!==void 0&&a!==void 0?n-a:v4(e)-v4(t)}function uw(e){return e.taskId?`task:${e.taskId}`:e.dagRunId?`run:${e.dagRunId}`:`operation:${e.operationId}`}function dw(e){return e.taskId?e.taskId.replace(/^\d{4}-\d{2}-\d{2}-/,"").replace(/[-_]+/g," ").trim()||e.taskId:Dy(e.action)}function fw(e){return[...new Set(e)]}function mw(e){const t=new Map;for(const n of e)t.set(n.action,n);return[...t.values()].sort(Dh).map(n=>{const a=Oh(n.state);return{id:n.operationId,label:Dy(n.action),stateLabel:a.label,kind:a.kind,at:n.updatedAt}})}function hw(e){const t=new Map;for(const n of e){const a=n.dagRunId??n.runSummary?.runId;if(!a)continue;const s=t.get(a)??[];s.push(n),t.set(a,s)}return[...t.entries()].flatMap(([n,a])=>{const s=[...a].sort((h,g)=>Dh(g,h)),o=s[0];if(!o)return[];const c=s.find(h=>h.runSummary)?.runSummary,d=c?.status??o.state,m=Oh(d);return[{runId:n,state:d,stateLabel:m.label,kind:m.kind,updatedAt:o.updatedAt,operationCount:a.length,firstFailedNode:c?.nodes.find(h=>h.status==="ERROR")?.id,failureCategory:c?.failureCategory,inspectHref:o.inspectHref}]}).sort((n,a)=>Date.parse(a.updatedAt)-Date.parse(n.updatedAt))}function By(e){const t=new Map;for(const n of e){const a=uw(n),s=t.get(a)??[];s.push(n),t.set(a,s)}return[...t.entries()].flatMap(([n,a])=>{const s=[...a].sort(Dh),o=s.at(-1);if(!o)return[];const c=Oh(o.state);return[{key:n,taskId:o.taskId,displayTitle:dw(o),state:o.state,stateLabel:c.label,kind:c.kind,updatedAt:o.updatedAt,latestOperation:o,operations:s,steps:mw(s),runs:hw(s),activityRefs:fw(s.flatMap(jy)),compactEligible:c.kind==="success"}]}).sort((n,a)=>{const s=n.kind==="progress"||n.kind==="error"?0:1,o=a.kind==="progress"||a.kind==="error"?0:1;return s!==o?s-o:Date.parse(a.updatedAt)-Date.parse(n.updatedAt)})}const pw={operation:"执行记录",contract:"任务契约",dag:"执行流程",report:"报告",html:"HTML 预览"};function gw(e){const{artifact:t}=e,n=!!(t.reportText||t.htmlPreview);return f.jsxs("section",{className:"oc-artifact-card","aria-label":`任务产物:${t.title??t.artifactId}`,"data-activity-ref":t.activityRef??`artifact:${t.artifactId}`,children:[f.jsxs("header",{children:[f.jsxs("div",{children:[f.jsx("small",{children:"任务产物"}),f.jsx("strong",{children:t.title??t.artifactId}),f.jsx("code",{children:t.artifactId})]}),f.jsx("span",{children:pw[t.kind]})]}),t.summary?f.jsx("p",{children:t.summary}):null,n?f.jsxs("details",{className:"oc-artifact-details",children:[f.jsx("summary",{children:"预览与技术详情"}),t.reportText?f.jsx("pre",{children:t.reportText}):null,t.htmlPreview?f.jsx("iframe",{title:`${t.title??t.artifactId} preview`,sandbox:"",srcDoc:t.htmlPreview}):null]}):null,t.inspectHref?f.jsx("footer",{children:f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>window.open(t.inspectHref,"_blank","noopener,noreferrer"),children:"打开产物"})}):null]})}const y4={prepared:"等待确认",confirmed:"已经确认",dispatched:"正在执行",consumed:"已经完成",stale:"已经失效",expired:"已经过期",error:"处理失败"};function x4(e){return e.gateType==="contract-apply"?"确认任务契约变更":e.gateType==="mutation"?"确认执行工作区修改":"确认启动任务执行"}function bw({card:e,origin:t,sessionId:n}){const[a,s]=N.useState(!1),[o,c]=N.useState(),d=async()=>{s(!0),c(void 0);try{let b="contract-apply";e.gateType==="dag-run"?b=e.state==="prepared"?"dag-confirm":"dag-run":e.gateType==="mutation"&&(b="mutation-apply");const x=e.gateType==="dag-run"?{confirmationId:e.confirmationId,...e.state==="prepared"?{humanGateToken:e.humanGateToken}:{}}:{receiptId:e.receiptId,humanGateToken:e.humanGateToken},y=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/human-gate/${b}`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},body:JSON.stringify(x)}),S=await y.json();if(!y.ok)throw new Error(S.error?.message??`HTTP ${y.status}`)}catch(b){c(b instanceof Error?b.message:String(b))}finally{s(!1)}},m=e.state==="prepared"||e.gateType==="dag-run"&&e.state==="confirmed";let h="确认接受";e.gateType==="mutation"?h="确认执行":e.gateType==="dag-run"&&(h=e.state==="prepared"?"确认边界":"启动执行");const g=(e.displayOnlyChallenges?.length??0)+(e.dagSpine?.length??0);return f.jsxs("section",{className:`oc-human-gate-card is-${e.state}`,"aria-label":`${x4(e)}:${y4[e.state]}`,"data-activity-ref":e.activityRef??`gate:${e.cardId}`,children:[f.jsxs("header",{children:[f.jsxs("div",{children:[f.jsx("small",{children:"人工门禁"}),f.jsx("strong",{children:x4(e)}),f.jsx("code",{children:e.taskId})]}),f.jsx("span",{children:y4[e.state]})]}),e.contractDiffSummary?f.jsx("p",{className:"oc-human-gate-summary",children:e.contractDiffSummary}):null,g>0||e.errorMessage?f.jsxs("details",{className:"oc-human-gate-details",children:[f.jsxs("summary",{children:["门禁详情 · ",g," 项"]}),e.displayOnlyChallenges?.length?f.jsxs("div",{className:"oc-human-gate-challenges",children:[f.jsx("b",{children:"确认前请检查"}),f.jsx("ul",{children:e.displayOnlyChallenges.map(b=>f.jsx("li",{children:b},b))})]}):null,e.dagSpine?.length?f.jsxs("div",{children:[f.jsx("b",{children:"计划执行步骤"}),f.jsx("ol",{children:e.dagSpine.map(b=>f.jsx("li",{children:f.jsx("code",{children:b})},b))})]}):null,e.errorMessage?f.jsx("p",{className:"oc-human-gate-error",children:e.errorMessage}):null]}):null,f.jsxs("footer",{children:[f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>window.open(e.inspectHref,"_blank","noopener,noreferrer"),children:"查看记录"}),f.jsx("button",{className:"btn btn-primary",type:"button",disabled:!m||a,onClick:()=>{d()},children:a?"提交中…":h})]}),o?f.jsx("div",{className:"oc-human-gate-error",children:o}):null]})}const ta="loop-console.operator-chat.active-session.v1",vw="loop-console.operator-chat.default-landing.v1";function hu(e){const t=e?.trim().toLowerCase();if(t==="chat")return"chat";if(t==="tasks")return"tasks"}function Uy(e){const t=e?.trim().toLowerCase();if(t==="chat"||t==="tasks"||t==="recovery"||t==="night"||t==="models"||t==="settings")return t}function qy(e){const t=n=>e.get(n)?.trim()||void 0;return{...t("taskId")?{taskId:t("taskId")}:{},...t("dagRunId")?{dagRunId:t("dagRunId")}:{},...t("fromNodeId")?{fromNodeId:t("fromNodeId")}:{},...t("featureId")?{featureId:t("featureId")}:{},...t("intent")?{intent:t("intent")}:{}}}function Hy(e){const t=String(e??"").replace(/^#/,"");if(!t)return null;const n=t.indexOf("?"),a=n>=0?t.slice(0,n):t,s=n>=0?t.slice(n+1):"",o=(a||"/").split("?")[0]||"/";if(o==="/"||o==="")return null;const c=o.replace(/^\//,"").split("/")[0],d=Uy(c);return d?{workspace:d,...qy(new URLSearchParams(s))}:null}function yw(e){const t=new URLSearchParams(e.search),n=e.hash.startsWith("#")?e.hash.slice(1):e.hash,a=new URLSearchParams(n),s=Uy(t.get("workspace")??t.get("landing")??a.get("workspace"));return s?{workspace:s,...qy(t)}:null}function xw(e){if(!e)return;const t=Hy(e.hash);if(t)return t.workspace;const n=new URLSearchParams(e.search),a=hu(n.get("landing")??n.get("workspace"));if(a)return a;const s=e.hash.startsWith("#")?e.hash.slice(1):e.hash;return hu(new URLSearchParams(s).get("workspace"))}function Fy(e){return xw(e.location)??hu(e.storage?.getItem(vw))??hu(e.env)??"chat"}function Py(e,t={}){const n=new URLSearchParams;for(const[o,c]of Object.entries(t))c?.trim()&&n.set(o,c.trim());const a=n.toString(),s=`/${e}`;return a?`${s}?${a}`:s}function ww(e,t={}){return`#${Py(e,t)}`}function Sw(e){return Hy(e.hash)??yw(e)}function w4(e,t=900){if(e)return e.length>t?`${e.slice(0,t)}…`:e}function bf(e){return new Date(e).toLocaleString()}function S4(e){if(!e)return;const t=e.trim();if(/taskId[^\n]*(?:placeholder|占位)|["']?<id>["']?/i.test(t))return"任务编号仍是占位符;请提供实际的 YYYY-MM-DD-<slug> 任务编号后重试。";if(/ENOENT|no such file or directory/i.test(t))return"任务活动缺少所需文件或目录,可进入 DAG 查看详情。";if(/command failed|exited with code/i.test(t))return"相关命令没有成功完成,可进入 DAG 查看详情。";if(!(t.length>220||t.startsWith("{")||t.startsWith("[")||t.includes("[dag execute]")||t.includes("schemaVersion")||/[A-Za-z]:\\/.test(t)))return t}function kw(e){const t=e.latestOperation,n=t.runSummary;if(n?.next?.description)return n.next.description;const a=n?.nodes.find(o=>o.status==="ERROR")?.id;if(a){const o=n?.failureCategory?`,原因分类为 ${n.failureCategory}`:"";return`执行在 ${a} 阶段未完成${o}。`}const s=S4(t.stderrPreview)??S4(t.summaryPreview);if(s)return s;if(e.kind==="error")return"本次任务活动没有完成,可进入 DAG 查看详情或使用恢复选项。";if(e.kind==="warning")return"本次任务活动需要进一步确认,请查看相关记录。"}function Ew(e){const{journey:t}=e,n=t.latestOperation,a=t.runs[0],s=t.runs.slice(1),o=n.inspectHref.startsWith("/")?`${e.origin}${n.inspectHref}`:n.inspectHref,c=kw(t),d=t.kind==="error"||t.kind==="warning",m=(h,g)=>{e.onNavigateWorkspace?e.onNavigateWorkspace(h,g):window.location.assign(ww(h,g))};return e.compact?f.jsxs("details",{className:"oc-journey-compact",children:[f.jsxs("summary",{children:[f.jsx("span",{className:`oc-journey-dot is-${t.kind}`,"aria-hidden":"true"}),f.jsxs("span",{children:[f.jsx("strong",{children:t.displayTitle}),f.jsxs("small",{children:[t.stateLabel," · ",bf(t.updatedAt)]})]}),f.jsx("span",{"aria-hidden":"true",children:"›"})]}),f.jsxs("div",{className:"oc-journey-compact-body",children:[t.taskId?f.jsx("code",{children:t.taskId}):null,f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>window.open(o,"_blank","noopener,noreferrer"),children:"查看记录"})]})]}):f.jsxs("section",{className:`oc-task-journey-card is-${t.kind}`,"aria-label":`${t.displayTitle}:${t.stateLabel}`,children:[f.jsxs("header",{className:"oc-journey-head",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"oc-journey-state-line",children:[f.jsx("span",{className:`oc-journey-dot is-${t.kind}`,"aria-hidden":"true"}),f.jsx("span",{children:t.stateLabel})]}),f.jsx("strong",{children:t.displayTitle}),t.taskId?f.jsxs("small",{children:["Task · ",f.jsx("code",{children:t.taskId})]}):null]}),f.jsx("time",{dateTime:t.updatedAt,children:bf(t.updatedAt)})]}),f.jsx("div",{className:"oc-journey-steps","aria-label":"任务旅程",children:t.steps.slice(-6).map(h=>f.jsxs("div",{className:"oc-journey-step",children:[f.jsx("span",{className:`oc-journey-step-icon is-${h.kind}`,"aria-hidden":"true",children:h.kind==="success"?"✓":h.kind==="error"?"!":"•"}),f.jsx("span",{children:h.label}),f.jsx("small",{children:h.stateLabel})]},h.id))}),c?f.jsxs("div",{className:`oc-journey-outcome is-${t.kind}`,children:[f.jsx("strong",{children:d?"当前问题":"最新结果"}),f.jsx("p",{children:c})]}):null,a?f.jsxs("div",{className:"oc-journey-latest-run",children:[f.jsx("span",{children:"最新执行"}),f.jsx("code",{children:a.runId}),f.jsx("b",{className:`is-${a.kind}`,children:a.stateLabel}),a.firstFailedNode?f.jsxs("small",{children:["失败阶段 · ",a.firstFailedNode]}):null]}):null,s.length>0?f.jsxs("details",{className:"oc-journey-history",children:[f.jsxs("summary",{children:["执行历史 ",t.runs.length," 次"]}),f.jsx("div",{children:t.runs.map(h=>f.jsxs("div",{className:"oc-journey-run-row",children:[f.jsx("code",{children:h.runId}),f.jsx("span",{className:`is-${h.kind}`,children:h.stateLabel}),h.firstFailedNode?f.jsx("small",{children:h.firstFailedNode}):null,f.jsx("time",{dateTime:h.updatedAt,children:bf(h.updatedAt)})]},h.runId))})]}):null,f.jsxs("footer",{className:"oc-journey-actions",children:[f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>{const h=n.dagRunId??a?.runId,g=h?n.inspectHref.startsWith("/")?`${e.origin}/inspect/#/dag/${encodeURIComponent(h)}`:`/inspect/#/dag/${encodeURIComponent(h)}`:o;window.open(g,"_blank","noopener,noreferrer")},children:"进入 DAG"}),d&&(t.taskId||n.dagRunId)?f.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>m("recovery",{taskId:t.taskId,dagRunId:n.dagRunId}),children:"恢复选项"}):null]}),f.jsxs("details",{className:"oc-journey-technical",children:[f.jsxs("summary",{children:["技术详情 · ",t.operations.length," 项活动"]}),f.jsx("div",{className:"oc-journey-technical-body",children:t.operations.map(h=>f.jsxs("div",{className:"oc-journey-operation-row",children:[f.jsxs("div",{children:[f.jsx("code",{children:h.operationId}),f.jsx("span",{children:h.action})]}),h.dagRunId?f.jsxs("small",{children:["run · ",h.dagRunId]}):null,h.controller?f.jsxs("small",{children:["controller · ",h.controller]}):null,h.stderrPreview?f.jsx("pre",{className:"is-error",children:w4(h.stderrPreview)}):null,h.summaryPreview?f.jsx("pre",{children:w4(h.summaryPreview)}):null]},h.operationId))})]})]})}function k4(e){return e.state==="prepared"||e.state==="confirmed"?0:e.state==="dispatched"?1:e.state==="error"?2:3}function vf(e,t){return e!==null&&t.includes(e)}function Tw(e){return e.operations>0?"operations":e.gates>0?"gates":"artifacts"}function Nw(e){const t=e.presentation==="sidecar",n=t||e.open,a=N.useRef(null),[s,o]=N.useState("operations"),c=N.useMemo(()=>By(e.operationCards),[e.operationCards]),d=c.length+e.humanGateCards.length+e.artifactCards.length,m=N.useMemo(()=>[...e.humanGateCards].sort((y,S)=>{const E=k4(y)-k4(S);return E!==0?E:(S.eventSeq??0)-(y.eventSeq??0)}),[e.humanGateCards]),h=N.useMemo(()=>[...e.artifactCards].sort((y,S)=>(S.eventSeq??0)-(y.eventSeq??0)),[e.artifactCards]);if(Lu({open:n&&!t,containerRef:a,triggerRef:e.triggerRef,onEscape:e.onClose}),N.useEffect(()=>{o(Tw({operations:c.length,gates:e.humanGateCards.length,artifacts:e.artifactCards.length}))},[e.sessionId]),N.useEffect(()=>{e.focusRef&&(e.focusRef.startsWith("gate:")?o("gates"):e.focusRef.startsWith("artifact:")?o("artifacts"):o("operations"))},[e.focusRef]),N.useEffect(()=>{if(!n||!e.focusRef)return;const y=window.requestAnimationFrame(()=>{const S=a.current;if(!S)return;Array.from(S.querySelectorAll("[data-activity-ref], [data-tool-call-id], [data-activity-refs]")).find(C=>{const R=C.dataset.activityRefs?.split(" ")??[];return C.dataset.activityRef===e.focusRef||R.includes(e.focusRef??"")||C.dataset.toolCallId&&`tool:${C.dataset.toolCallId}`===e.focusRef})?.scrollIntoView({block:"nearest",behavior:"smooth"})});return()=>window.cancelAnimationFrame(y)},[n,s,e.focusRef]),!n||d===0)return null;let g="is-drawer";t?g="is-sidecar":e.presentation==="sheet"&&(g="is-sheet");const b=t&&e.sidecarRect?{top:e.sidecarRect.top,left:e.sidecarRect.left,height:e.sidecarRect.height,width:e.sidecarRect.width}:void 0,x=f.jsxs("aside",{ref:a,id:"oc-activity-rail",className:`oc-activity-rail ${g} is-${e.phase}`,style:b,"aria-label":"本次对话的活动","aria-busy":e.phase==="switching",tabIndex:-1,children:[f.jsxs("header",{className:"oc-activity-rail-head",children:[f.jsxs("div",{children:[f.jsx("strong",{children:"本次对话的活动"}),f.jsx("small",{children:"运行、门禁与任务产物"})]}),f.jsx("span",{className:"oc-activity-count",children:d}),t?null:f.jsx("button",{type:"button",className:"oc-activity-close","aria-label":"关闭运行活动",onClick:e.onClose,children:"×"})]}),f.jsxs("div",{className:"oc-activity-content",children:[f.jsxs("div",{className:"oc-activity-tabs",role:"tablist","aria-label":"活动类型",children:[f.jsxs("button",{type:"button",role:"tab","aria-selected":s==="operations",className:s==="operations"?"is-active":"",onClick:()=>o("operations"),children:["运行 ",f.jsx("span",{children:c.length})]}),f.jsxs("button",{type:"button",role:"tab","aria-selected":s==="gates",className:s==="gates"?"is-active":"",onClick:()=>o("gates"),children:["门禁 ",f.jsx("span",{children:m.length})]}),f.jsxs("button",{type:"button",role:"tab","aria-selected":s==="artifacts",className:s==="artifacts"?"is-active":"",onClick:()=>o("artifacts"),children:["产物 ",f.jsx("span",{children:h.length})]})]}),f.jsxs("div",{className:"oc-activity-list",children:[s==="operations"&&c.length===0?f.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有任务执行记录。"}):null,s==="operations"?c.map((y,S)=>{const E=y.activityRefs;return f.jsxs("div",{"data-activity-refs":E.join(" "),className:`oc-activity-card-wrap${vf(e.focusRef,E)?" is-focused":""}`,children:[f.jsx(Ew,{journey:y,compact:S>0&&y.compactEligible,origin:e.origin,onNavigateWorkspace:e.onNavigateWorkspace}),f.jsx("button",{type:"button",className:"oc-activity-locate",onClick:()=>e.onLocateConversation(E),children:"查看对话位置"})]},y.key)}):null,s==="gates"&&m.length===0?f.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有需要展示的门禁。"}):null,s==="gates"?m.map(y=>{const S=Ly(y);return f.jsx("div",{className:`oc-activity-card-wrap${vf(e.focusRef,S)?" is-focused":""}`,children:f.jsx(bw,{card:y,origin:e.origin,sessionId:e.sessionId})},y.cardId)}):null,s==="artifacts"&&h.length===0?f.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有任务产物。"}):null,s==="artifacts"?h.map(y=>{const S=zy(y);return f.jsx("div",{className:`oc-activity-card-wrap${vf(e.focusRef,S)?" is-focused":""}`,children:f.jsx(gw,{artifact:y})},y.artifactId)}):null]})]},e.sessionId)]});return t?_h.createPortal(x,document.body):x}const $y=420,Gy=12;function Cw(e){if(e.layoutMode==="narrow")return"sheet";const t=e.railWidth??$y,n=e.gap??Gy;return e.viewportWidth-e.mainRight>=t+n?"sidecar":"drawer"}const Aw={presentation:"drawer",sidecarRect:null};function Rw(e,t,n){const[a,s]=N.useState(Aw);return N.useLayoutEffect(()=>{const o=e.current;if(!o)return;const c=o.closest(".panel--chat")??o;let d=0;const m=()=>{window.cancelAnimationFrame(d),d=window.requestAnimationFrame(()=>{const g=o.getBoundingClientRect(),b=c.getBoundingClientRect(),x=Cw({layoutMode:t,viewportWidth:window.innerWidth,mainRight:g.right}),y=x==="sidecar"?{top:b.top,left:g.right+Gy,height:b.height,width:$y}:null;s(S=>S.presentation===x&&S.sidecarRect?.top===y?.top&&S.sidecarRect?.left===y?.left&&S.sidecarRect?.height===y?.height&&S.sidecarRect?.width===y?.width?S:{presentation:x,sidecarRect:y})})};m();const h=new ResizeObserver(m);return h.observe(o),c!==o&&h.observe(c),window.addEventListener("resize",m),()=>{window.cancelAnimationFrame(d),h.disconnect(),window.removeEventListener("resize",m)}},[t,e,n]),a}const E4={comfortableMin:620,compactMin:480};function _w(e){return!Number.isFinite(e)||e<0?"extra-compact":e>=E4.comfortableMin?"comfortable":e>=E4.compactMin?"compact":"extra-compact"}function Iw(e){return`is-landing-${e}`}const Mw=[{label:"新建任务",hint:"先走需求分析 skills,再导入创建任务",prompt:["我要新建任务。请先做需求分析,不要用一句话直接 bootstrapFromPrd。","1. 先问我需求内容和范围(frontend / backend / both,默认 both)。","2. 读取并严格执行 `.agents/skills/analyze-product-requirements/SKILL.md`(`loop-agent init --profile full` 会投影该 skill):按规程澄清访谈、校验,并把产物写到 `docs/product-analysis/<requirement-id>/`(product-analysis.md、requirement-clarification.md、product-requirement.md)。","3. product-requirement 为 complete 且校验通过后,再严格执行 `.agents/skills/analyze-product-dependencies/SKILL.md`,生成 dependency-analysis.md 和按需的 api-documentation.md。","4. 两套产物都校验通过后,再用这些文件 bootstrapFromPrd 创建任务,并建议 taskKind。","若上述 skill 不存在,先说明缺失,并提示运行 `loop-agent init --repo-root . --profile full --merge`。"].join(`
12
- `)},{label:"查看任务状态",hint:"列出任务与就绪/阻塞状态",prompt:"列出当前所有 task 及其状态,重点说明哪些是 Ready 可以推进、哪些 Blocked 及阻塞原因。"},{label:"诊断 DAG 运行",hint:"对失败运行跑 Doctor",prompt:"帮我诊断最近失败或异常的 DAG 运行:先列出最近的 DAG 运行,对有问题的运行执行 doctor,总结根因和可执行的恢复方案。"},{label:"恢复或重跑任务",hint:"默认从节点续跑,勿无故新开 task",prompt:"我要恢复失败或卡住的 DAG。请先 dagReport/doctor 看 primaryFailure.nodeId 与 primaryRecovery;默认用 dagRerunPlan→dagRerun 从失败/安全上游节点续跑(plan 合格后直接 dagRerun,不要 prepareMutationGate)。不要新建 task-id。plan 不合格时:Worker-owned 用 workerTaskRetry;独立 run 用 standaloneTaskRerun。paused 走 approve/resume。确定后直接帮我发起。"}];function Ky(e){const t=e.readiness==="setup-required",n=!!e.disabled||t,a=e.density??"comfortable",s=e.mode==="no-session"?"开始一段新的对话":"今天想推进什么?",o=e.mode==="no-session"?"用自然语言编排 loop-agent:查询状态、诊断问题、创建与恢复任务。可先点选下方建议,或新建空白对话。":"会话已就绪。点选建议快速开场,或在下方输入框直接描述目标。业务写入仍经受治理 DAG。";return f.jsxs("div",{className:`oc-empty ${Iw(a)}`,role:"status","data-landing-density":a,children:[f.jsxs("div",{className:"oc-empty-hero",children:[f.jsx("img",{className:"oc-empty-icon oc-empty-brand",src:"/favicon.svg",alt:"","aria-hidden":"true",draggable:!1}),f.jsxs("div",{className:"oc-empty-copy",children:[f.jsx("h3",{children:s}),f.jsx("p",{children:o})]})]}),f.jsx("div",{className:"oc-suggestions","aria-label":"开场建议",children:Mw.map(c=>f.jsxs("button",{type:"button",className:"oc-suggestion",onClick:()=>e.onSuggest(c.prompt),disabled:n,children:[f.jsx("strong",{children:c.label}),f.jsx("span",{children:a==="extra-compact"?c.hint.replace(/[,,].*$/,""):c.hint})]},c.label))}),f.jsxs("ul",{className:"oc-empty-tips",children:[f.jsxs("li",{children:[f.jsx("kbd",{children:"@"}),f.jsx("span",{children:"引用仓库文件"})]}),f.jsxs("li",{children:[f.jsx("kbd",{children:"/"}),f.jsx("span",{children:"快捷命令"})]}),f.jsxs("li",{children:[f.jsx("kbd",{children:"Enter"}),f.jsx("span",{children:"发送 · Shift+Enter 换行"})]})]}),e.mode==="no-session"&&e.onCreateSession?f.jsx("button",{type:"button",className:"btn btn-primary oc-empty-cta",onClick:e.onCreateSession,disabled:n,"aria-busy":e.disabled||void 0,children:t?"需先完成 Pi setup":e.disabled?"创建中…":"新建空白对话"}):null]})}function Ow(e){const{interview:t,interviewAnswer:n,onAnswerChange:a,onAnswer:s}=e;return f.jsxs("section",{className:"oc-draft-card","aria-label":"Requirement Interview",children:[f.jsxs("header",{children:[f.jsx("strong",{children:"Requirement Interview"}),f.jsx("span",{children:t.state})]}),t.question&&f.jsxs("div",{className:"oc-interview-bubble",children:[f.jsx("strong",{children:t.question.text}),f.jsxs("p",{children:["建议:",t.question.recommendation]}),f.jsx("textarea",{value:n,onChange:o=>a(o.target.value),placeholder:"输入答案"}),f.jsxs("div",{children:[f.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>s("override"),disabled:!n.trim(),children:"提交答案"}),f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>s("accept-recommendation"),children:"接受建议"})]})]}),t.draft&&f.jsxs("details",{open:!0,children:[f.jsxs("summary",{children:["TaskContractDraftV1 · ",t.draftSha256?.slice(0,12)]}),f.jsx("pre",{children:JSON.stringify(t.draft,null,2)})]}),t.assessment&&f.jsxs("div",{className:`oc-assessment${t.assessment.fresh?" is-fresh":""}`,children:[f.jsxs("strong",{children:["完整性:",t.assessment.outcome]}),(t.assessment.missingFields??[]).length>0&&f.jsxs("p",{children:["缺失:",t.assessment.missingFields?.join("、")]})]}),t.taskKindRecommendation&&f.jsxs("div",{className:"oc-task-kind-card",children:[f.jsx("span",{children:"taskKind 建议"}),f.jsx("strong",{children:t.taskKindRecommendation}),f.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>e.onConfirmTaskKind(),children:"由我确认"}),f.jsx("small",{children:"模型不能代替人类确认。"})]}),t.confirmedTaskKind&&f.jsxs("div",{className:"oc-task-kind-card is-confirmed",children:["已由人类确认:",f.jsx("strong",{children:t.confirmedTaskKind})]})]})}function Or(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toLocaleString()}function Dw(e){const t=[],n=e.inputTokens??0,a=e.outputTokens??0,s=e.cacheReadTokens??0,o=e.cacheWriteTokens??0,c=e.cost??0;if(n>0&&t.push(`${Or(n)} in`),a>0&&t.push(`${Or(a)} out`),s>0&&t.push(`${Or(s)} cache R`),o>0&&t.push(`${Or(o)} cache W`),c>0&&t.push(c>=.01?`$${c.toFixed(2)}`:"<$0.01"),t.length===0){const d=e.totalTokens??0;return d>0?`${Or(d)} tokens`:"—"}return t.join(" · ")}const jw="modulepreload",Lw=function(e){return"/"+e},T4={},zw=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let m=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=m(n.map(h=>{if(h=Lw(h),h in T4)return;T4[h]=!0;const g=h.endsWith(".css"),b=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const x=document.createElement("link");if(x.rel=g?"stylesheet":jw,g||(x.as="script"),x.crossOrigin="",x.href=h,d&&x.setAttribute("nonce",d),document.head.appendChild(x),g)return new Promise((y,S)=>{x.addEventListener("load",y),x.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})};function N4(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const c=n.slice(s,a).trim();(c||!o)&&t.push(c),s=a+1,a=n.indexOf(",",s)}return t}function Bw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hw={};function C4(e,t){return(Hw.jsx?qw:Uw).test(e)}const Fw=/[ \t\n\f\r]/g;function Pw(e){return typeof e=="object"?e.type==="text"?A4(e.value):!1:A4(e)}function A4(e){return e.replace(Fw,"")===""}class To{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}To.prototype.normal={};To.prototype.property={};To.prototype.space=void 0;function Vy(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new To(n,a,t)}function xo(e){return e.toLowerCase()}class Sr{constructor(t,n){this.attribute=n,this.property=t}}Sr.prototype.attribute="";Sr.prototype.booleanish=!1;Sr.prototype.boolean=!1;Sr.prototype.commaOrSpaceSeparated=!1;Sr.prototype.commaSeparated=!1;Sr.prototype.defined=!1;Sr.prototype.mustUseProperty=!1;Sr.prototype.number=!1;Sr.prototype.overloadedBoolean=!1;Sr.prototype.property="";Sr.prototype.spaceSeparated=!1;Sr.prototype.space=void 0;let $w=0;const ot=cs(),Mn=cs(),Gm=cs(),Re=cs(),Wt=cs(),ls=cs(),Mr=cs();function cs(){return 2**++$w}const Km=Object.freeze(Object.defineProperty({__proto__:null,boolean:ot,booleanish:Mn,commaOrSpaceSeparated:Mr,commaSeparated:ls,number:Re,overloadedBoolean:Gm,spaceSeparated:Wt},Symbol.toStringTag,{value:"Module"})),yf=Object.keys(Km);class jh extends Sr{constructor(t,n,a,s){let o=-1;if(super(t,n),R4(this,"space",s),typeof a=="number")for(;++o<yf.length;){const c=yf[o];R4(this,yf[o],(a&Km[c])===Km[c])}}}jh.prototype.defined=!0;function R4(e,t,n){n&&(e[t]=n)}function il(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new jh(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[xo(a)]=a,n[xo(o.attribute)]=a}return new To(t,n,e.space)}const Yy=il({properties:{ariaActiveDescendant:null,ariaAtomic:Mn,ariaAutoComplete:null,ariaBusy:Mn,ariaChecked:Mn,ariaColCount:Re,ariaColIndex:Re,ariaColSpan:Re,ariaControls:Wt,ariaCurrent:null,ariaDescribedBy:Wt,ariaDetails:null,ariaDisabled:Mn,ariaDropEffect:Wt,ariaErrorMessage:null,ariaExpanded:Mn,ariaFlowTo:Wt,ariaGrabbed:Mn,ariaHasPopup:null,ariaHidden:Mn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wt,ariaLevel:Re,ariaLive:null,ariaModal:Mn,ariaMultiLine:Mn,ariaMultiSelectable:Mn,ariaOrientation:null,ariaOwns:Wt,ariaPlaceholder:null,ariaPosInSet:Re,ariaPressed:Mn,ariaReadOnly:Mn,ariaRelevant:null,ariaRequired:Mn,ariaRoleDescription:Wt,ariaRowCount:Re,ariaRowIndex:Re,ariaRowSpan:Re,ariaSelected:Mn,ariaSetSize:Re,ariaSort:null,ariaValueMax:Re,ariaValueMin:Re,ariaValueNow:Re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Xy(e,t){return t in e?e[t]:t}function Zy(e,t){return Xy(e,t.toLowerCase())}const Gw=il({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:Wt,accessKey:Wt,action:null,allow:null,allowFullScreen:ot,allowPaymentRequest:ot,allowUserMedia:ot,alpha:ot,alt:null,as:null,async:ot,autoCapitalize:null,autoComplete:Wt,autoFocus:ot,autoPlay:ot,blocking:Wt,capture:null,charSet:null,checked:ot,cite:null,className:Wt,closedBy:null,colorSpace:null,cols:Re,colSpan:Re,command:null,commandFor:null,content:null,contentEditable:Mn,controls:ot,controlsList:Wt,coords:Re|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ot,defer:ot,dir:null,dirName:null,disabled:ot,download:Gm,draggable:Mn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ot,formTarget:null,headers:Wt,height:Re,hidden:Gm,high:Re,href:null,hrefLang:null,htmlFor:Wt,httpEquiv:Wt,id:null,imageSizes:null,imageSrcSet:null,inert:ot,inputMode:null,integrity:null,is:null,isMap:ot,itemId:null,itemProp:Wt,itemRef:Wt,itemScope:ot,itemType:Wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ot,low:Re,manifest:null,max:null,maxLength:Re,media:null,method:null,min:null,minLength:Re,multiple:ot,muted:ot,name:null,nonce:null,noModule:ot,noValidate:ot,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ot,optimum:Re,pattern:null,ping:Wt,placeholder:null,playsInline:ot,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ot,referrerPolicy:null,rel:Wt,required:ot,reversed:ot,rows:Re,rowSpan:Re,sandbox:Wt,scope:null,scoped:ot,seamless:ot,selected:ot,shadowRootClonable:ot,shadowRootCustomElementRegistry:ot,shadowRootDelegatesFocus:ot,shadowRootMode:null,shadowRootSerializable:ot,shape:null,size:Re,sizes:null,slot:null,span:Re,spellCheck:Mn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Re,step:null,style:null,tabIndex:Re,target:null,title:null,translate:null,type:null,typeMustMatch:ot,useMap:null,value:Mn,width:Re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Wt,axis:null,background:null,bgColor:null,border:Re,borderColor:null,bottomMargin:Re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ot,declare:ot,event:null,face:null,frame:null,frameBorder:null,hSpace:Re,leftMargin:Re,link:null,longDesc:null,lowSrc:null,marginHeight:Re,marginWidth:Re,noResize:ot,noHref:ot,noShade:ot,noWrap:ot,object:null,profile:null,prompt:null,rev:null,rightMargin:Re,rules:null,scheme:null,scrolling:Mn,standby:null,summary:null,text:null,topMargin:Re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Re,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ot,disablePictureInPicture:ot,disableRemotePlayback:ot,exportParts:ls,part:Wt,prefix:null,property:null,results:Re,security:null,unselectable:null},space:"html",transform:Zy}),Kw=il({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Mr,accentHeight:Re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Re,amplitude:Re,arabicForm:null,ascent:Re,attributeName:null,attributeType:null,azimuth:Re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Re,by:null,calcMode:null,capHeight:Re,className:Wt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Re,diffuseConstant:Re,direction:null,display:null,dur:null,divisor:Re,dominantBaseline:null,download:ot,dx:null,dy:null,edgeMode:null,editable:null,elevation:Re,enableBackground:null,end:null,event:null,exponent:Re,externalResourcesRequired:null,fill:null,fillOpacity:Re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ls,g2:ls,glyphName:ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Re,horizOriginX:Re,horizOriginY:Re,id:null,ideographic:Re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Re,k:Re,k1:Re,k2:Re,k3:Re,k4:Re,kernelMatrix:Mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Re,overlineThickness:Re,paintOrder:null,panose1:null,path:null,pathLength:Re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Re,pointsAtY:Re,pointsAtZ:Re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mr,rev:Mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mr,requiredFeatures:Mr,requiredFonts:Mr,requiredFormats:Mr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Re,specularExponent:Re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Re,strikethroughThickness:Re,string:null,stroke:null,strokeDashArray:Mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Re,strokeOpacity:Re,strokeWidth:null,style:null,surfaceScale:Re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mr,tabIndex:Re,tableValues:null,target:null,targetX:Re,targetY:Re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Re,underlineThickness:Re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Re,values:null,vAlphabetic:Re,vMathematical:Re,vectorEffect:null,vHanging:Re,vIdeographic:Re,version:null,vertAdvY:Re,vertOriginX:Re,vertOriginY:Re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Xy}),Qy=il({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Wy=il({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zy}),Jy=il({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Yw=/[A-Z]/g,_4=/-[a-z]/g,Xw=/^data[-\w.:]+$/i;function e3(e,t){const n=xo(t);let a=t,s=Sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Xw.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(_4,Qw);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!_4.test(o)){let c=o.replace(Yw,Zw);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=jh}return new s(a,t)}function Zw(e){return"-"+e.toLowerCase()}function Qw(e){return e.charAt(1).toUpperCase()}const t3=Vy([Yy,Gw,Qy,Wy,Jy],"html"),zu=Vy([Yy,Kw,Qy,Wy,Jy],"svg");function I4(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ww(e){return e.join(" ").trim()}var Ks={},xf,M4;function Jw(){if(M4)return xf;M4=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
13
- `,h="/",g="*",b="",x="comment",y="declaration";function S(M,C){if(typeof M!="string")throw new TypeError("First argument must be a string");if(!M)return[];C=C||{};var R=1,A=1;function H(W){var U=W.match(t);U&&(R+=U.length);var z=W.lastIndexOf(m);A=~z?W.length-z:A+W.length}function F(){var W={line:R,column:A};return function(U){return U.position=new D(W),ee(),U}}function D(W){this.start=W,this.end={line:R,column:A},this.source=C.source}D.prototype.content=M;function $(W){var U=new Error(C.source+":"+R+":"+A+": "+W);if(U.reason=W,U.filename=C.source,U.line=R,U.column=A,U.source=M,!C.silent)throw U}function P(W){var U=W.exec(M);if(U){var z=U[0];return H(z),M=M.slice(z.length),U}}function ee(){P(n)}function q(W){var U;for(W=W||[];U=Z();)U!==!1&&W.push(U);return W}function Z(){var W=F();if(!(h!=M.charAt(0)||g!=M.charAt(1))){for(var U=2;b!=M.charAt(U)&&(g!=M.charAt(U)||h!=M.charAt(U+1));)++U;if(U+=2,b===M.charAt(U-1))return $("End of comment missing");var z=M.slice(2,U-2);return A+=2,H(z),M=M.slice(U),A+=2,W({type:x,comment:z})}}function G(){var W=F(),U=P(a);if(U){if(Z(),!P(s))return $("property missing ':'");var z=P(o),V=W({type:y,property:E(U[0].replace(e,b)),value:z?E(z[0].replace(e,b)):b});return P(c),V}}function le(){var W=[];q(W);for(var U;U=G();)U!==!1&&(W.push(U),q(W));return W}return ee(),le()}function E(M){return M?M.replace(d,b):b}return xf=S,xf}var O4;function e9(){if(O4)return Ks;O4=1;var e=Ks&&Ks.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.default=n;const t=e(Jw());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:g}=m;d?s(h,g,m):g&&(o=o||{},o[h]=g)}),o}return Ks}var lo={},D4;function t9(){if(D4)return lo;D4=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},c=function(h,g){return g.toUpperCase()},d=function(h,g){return"".concat(g,"-")},m=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,c))};return lo.camelCase=m,lo}var oo,j4;function n9(){if(j4)return oo;j4=1;var e=oo&&oo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(e9()),n=t9();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,m){d&&m&&(c[(0,n.camelCase)(d,o)]=m)}),c}return a.default=a,oo=a,oo}var r9=n9();const a9=Ou(r9),n3=r3("end"),Lh=r3("start");function r3(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function i9(e){const t=Lh(e),n=n3(e);if(t&&n)return{start:t,end:n}}function ho(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?L4(e.position):"start"in e||"end"in e?L4(e):"line"in e||"column"in e?Vm(e):""}function Vm(e){return z4(e&&e.line)+":"+z4(e&&e.column)}function L4(e){return Vm(e&&e.start)+"-"+Vm(e&&e.end)}function z4(e){return e&&typeof e=="number"?e:1}class tr extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?o.ruleId=a:(o.source=a.slice(0,m),o.ruleId=a.slice(m+1))}if(!o.place&&o.ancestors&&o.ancestors){const m=o.ancestors[o.ancestors.length-1];m&&(o.place=m.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=ho(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tr.prototype.file="";tr.prototype.name="";tr.prototype.reason="";tr.prototype.message="";tr.prototype.stack="";tr.prototype.column=void 0;tr.prototype.line=void 0;tr.prototype.ancestors=void 0;tr.prototype.cause=void 0;tr.prototype.fatal=void 0;tr.prototype.place=void 0;tr.prototype.ruleId=void 0;tr.prototype.source=void 0;const zh={}.hasOwnProperty,s9=new Map,l9=/[A-Z]/g,o9=new Set(["table","tbody","thead","tfoot","tr"]),c9=new Set(["td","th"]),a3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function u9(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=v9(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=b9(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?zu:t3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=i3(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function i3(e,t,n){if(t.type==="element")return d9(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return f9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return h9(e,t,n);if(t.type==="mdxjsEsm")return m9(e,t);if(t.type==="root")return p9(e,t,n);if(t.type==="text")return g9(e,t)}function d9(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=zu,e.schema=s),e.ancestors.push(t);const o=l3(e,t.tagName,!1),c=y9(e,t);let d=Uh(e,t);return o9.has(t.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!Pw(m):!0})),s3(e,c,o,t),Bh(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function f9(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}wo(e,t.position)}function m9(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wo(e,t.position)}function h9(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=zu,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:l3(e,t.name,!0),c=x9(e,t),d=Uh(e,t);return s3(e,c,o,t),Bh(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function p9(e,t,n){const a={};return Bh(a,Uh(e,t)),e.create(t,e.Fragment,a,n)}function g9(e,t){return t.value}function s3(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Bh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function b9(e,t,n){return a;function a(s,o,c,d){const h=Array.isArray(c.children)?n:t;return d?h(o,c,d):h(o,c)}}function v9(e,t){return n;function n(a,s,o,c){const d=Array.isArray(o.children),m=Lh(a);return t(s,o,c,d,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function y9(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&zh.call(t.properties,s)){const o=w9(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&c9.has(t.tagName)?a=d:n[c]=d}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function x9(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else wo(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else wo(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function Uh(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:s9;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const m=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(m){const h=s.get(m)||0;c=m+"-"+h,s.set(m,h+1)}}const d=i3(e,o,c);d!==void 0&&n.push(d)}return n}function w9(e,t,n){const a=e3(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Bw(n):Ww(n)),a.property==="style"){let s=typeof n=="object"?n:S9(e,String(n));return e.stylePropertyNameCase==="css"&&(s=k9(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?Vw[a.property]||a.property:a.attribute,n]}}function S9(e,t){try{return a9(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new tr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=a3+"#cannot-parse-style-attribute",s}}function l3(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const d=C4(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=c}else a=C4(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return zh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);wo(e)}function wo(e,t){const n=new tr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=a3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function k9(e){const t={};let n;for(n in e)zh.call(e,n)&&(t[E9(n)]=e[n]);return t}function E9(e){let t=e.replace(l9,T9);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function T9(e){return"-"+e.toLowerCase()}const wf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},N9={};function qh(e,t){const n=N9,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return o3(e,a,s)}function o3(e,t,n){if(C9(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return B4(e.children,t,n)}return Array.isArray(e)?B4(e,t,n):""}function B4(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=o3(e[s],t,n);return a.join("")}function C9(e){return!!(e&&typeof e=="object")}const U4=document.createElement("i");function Hh(e){const t="&"+e+";";U4.innerHTML=t;const n=U4.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dr(e,t,n,a){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function Yr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}const q4={}.hasOwnProperty;function c3(e){const t={};let n=-1;for(;++n<e.length;)A9(t,e[n]);return t}function A9(e,t){let n;for(n in t){const s=(q4.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){q4.call(s,c)||(s[c]=[]);const d=o[c];R9(s[c],Array.isArray(d)?d:d?[d]:[])}}}function R9(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Dr(e,0,0,a)}function u3(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function na(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=_i(/[A-Za-z]/),Jn=_i(/[\dA-Za-z]/),_9=_i(/[#-'*+\--9=?A-Z^-~]/);function pu(e){return e!==null&&(e<32||e===127)}const Ym=_i(/\d/),I9=_i(/[\dA-Fa-f]/),M9=_i(/[!-/:-@[-`{-~]/);function Ye(e){return e!==null&&e<-2}function Jt(e){return e!==null&&(e<0||e===32)}function Et(e){return e===-2||e===-1||e===32}const Bu=_i(new RegExp("\\p{P}|\\p{S}","u")),os=_i(/\s/);function _i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function sl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&Jn(e.charCodeAt(n+1))&&Jn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function yt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(m){return Et(m)?(e.enter(n),d(m)):t(m)}function d(m){return Et(m)&&o++<s?(e.consume(m),d):(e.exit(n),t(m))}}const O9={tokenize:D9};function D9(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),yt(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const m=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=m),n=m,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ye(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),c)}}const j9={tokenize:L9},H4={tokenize:z9};function L9(e){const t=this,n=[];let a=0,s,o,c;return d;function d(A){if(a<n.length){const H=n[a];return t.containerState=H[1],e.attempt(H[0].continuation,m,h)(A)}return h(A)}function m(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const H=t.events.length;let F=H,D;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){D=t.events[F][1].end;break}C(a);let $=H;for(;$<t.events.length;)t.events[$][1].end={...D},$++;return Dr(t.events,F+1,0,t.events.slice(H)),t.events.length=$,h(A)}return d(A)}function h(A){if(a===n.length){if(!s)return x(A);if(s.currentConstruct&&s.currentConstruct.concrete)return S(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(H4,g,b)(A)}function g(A){return s&&R(),C(a),x(A)}function b(A){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,S(A)}function x(A){return t.containerState={},e.attempt(H4,y,S)(A)}function y(A){return a++,n.push([t.currentConstruct,t.containerState]),x(A)}function S(A){if(A===null){s&&R(),C(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),E(A)}function E(A){if(A===null){M(e.exit("chunkFlow"),!0),C(0),e.consume(A);return}return Ye(A)?(e.consume(A),M(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(A),E)}function M(A,H){const F=t.sliceStream(A);if(H&&F.push(null),A.previous=o,o&&(o.next=A),o=A,s.defineSkip(A.start),s.write(F),t.parser.lazy[A.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<c&&(!s.events[D][1].end||s.events[D][1].end.offset>c))return;const $=t.events.length;let P=$,ee,q;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(ee){q=t.events[P][1].end;break}ee=!0}for(C(a),D=$;D<t.events.length;)t.events[D][1].end={...q},D++;Dr(t.events,P+1,0,t.events.slice($)),t.events.length=D}}function C(A){let H=n.length;for(;H-- >A;){const F=n[H];t.containerState=F[1],F[0].exit.call(t,e)}n.length=A}function R(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function z9(e,t,n){return yt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function el(e){if(e===null||Jt(e)||os(e))return 1;if(Bu(e))return 2}function Uu(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Xm={name:"attention",resolveAll:B9,tokenize:U9};function B9(e,t){let n=-1,a,s,o,c,d,m,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;m=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const b={...e[a][1].end},x={...e[n][1].start};F4(b,-m),F4(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:b,end:{...e[a][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:m>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=Yr(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=Yr(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=Yr(h,Uu(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=Yr(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Yr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Dr(e,a-1,n-a+3,h),n=a+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function U9(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=el(a);let o;return c;function c(m){return o=m,e.enter("attentionSequence"),d(m)}function d(m){if(m===o)return e.consume(m),d;const h=e.exit("attentionSequence"),g=el(m),b=!g||g===2&&s||n.includes(m),x=!s||s===2&&g||n.includes(a);return h._open=!!(o===42?b:b&&(s||!x)),h._close=!!(o===42?x:x&&(g||!b)),t(m)}}function F4(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const q9={name:"autolink",tokenize:H9};function H9(e,t,n){let a=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return lr(y)?(e.consume(y),c):y===64?n(y):h(y)}function c(y){return y===43||y===45||y===46||Jn(y)?(a=1,d(y)):h(y)}function d(y){return y===58?(e.consume(y),a=0,m):(y===43||y===45||y===46||Jn(y))&&a++<32?(e.consume(y),d):(a=0,h(y))}function m(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||pu(y)?n(y):(e.consume(y),m)}function h(y){return y===64?(e.consume(y),g):_9(y)?(e.consume(y),h):n(y)}function g(y){return Jn(y)?b(y):n(y)}function b(y){return y===46?(e.consume(y),a=0,g):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):x(y)}function x(y){if((y===45||Jn(y))&&a++<63){const S=y===45?x:b;return e.consume(y),S}return n(y)}}const No={partial:!0,tokenize:F9};function F9(e,t,n){return a;function a(o){return Et(o)?yt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Ye(o)?t(o):n(o)}}const d3={continuation:{tokenize:$9},exit:G9,name:"blockQuote",tokenize:P9};function P9(e,t,n){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Et(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function $9(e,t,n){const a=this;return s;function s(c){return Et(c)?yt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(d3,t,n)(c)}}function G9(e){e.exit("blockQuote")}const f3={name:"characterEscape",tokenize:K9};function K9(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return M9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const m3={name:"characterReference",tokenize:V9};function V9(e,t,n){const a=this;let s=0,o,c;return d;function d(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),m}function m(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,c=Jn,g(b))}function h(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=I9,g):(e.enter("characterReferenceValue"),o=7,c=Ym,g(b))}function g(b){if(b===59&&s){const x=e.exit("characterReferenceValue");return c===Jn&&!Hh(a.sliceSerialize(x))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(b)&&s++<o?(e.consume(b),g):n(b)}}const P4={partial:!0,tokenize:X9},$4={concrete:!0,name:"codeFenced",tokenize:Y9};function Y9(e,t,n){const a=this,s={partial:!0,tokenize:F};let o=0,c=0,d;return m;function m(D){return h(D)}function h(D){const $=a.events[a.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,d=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===d?(c++,e.consume(D),g):c<3?n(D):(e.exit("codeFencedFenceSequence"),Et(D)?yt(e,b,"whitespace")(D):b(D))}function b(D){return D===null||Ye(D)?(e.exit("codeFencedFence"),a.interrupt?t(D):e.check(P4,E,H)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||Ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(D)):Et(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),yt(e,y,"whitespace")(D)):D===96&&D===d?n(D):(e.consume(D),x)}function y(D){return D===null||Ye(D)?b(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||Ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(D)):D===96&&D===d?n(D):(e.consume(D),S)}function E(D){return e.attempt(s,H,M)(D)}function M(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return o>0&&Et(D)?yt(e,R,"linePrefix",o+1)(D):R(D)}function R(D){return D===null||Ye(D)?e.check(P4,E,H)(D):(e.enter("codeFlowValue"),A(D))}function A(D){return D===null||Ye(D)?(e.exit("codeFlowValue"),R(D)):(e.consume(D),A)}function H(D){return e.exit("codeFenced"),t(D)}function F(D,$,P){let ee=0;return q;function q(U){return D.enter("lineEnding"),D.consume(U),D.exit("lineEnding"),Z}function Z(U){return D.enter("codeFencedFence"),Et(U)?yt(D,G,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):G(U)}function G(U){return U===d?(D.enter("codeFencedFenceSequence"),le(U)):P(U)}function le(U){return U===d?(ee++,D.consume(U),le):ee>=c?(D.exit("codeFencedFenceSequence"),Et(U)?yt(D,W,"whitespace")(U):W(U)):P(U)}function W(U){return U===null||Ye(U)?(D.exit("codeFencedFence"),$(U)):P(U)}}}function X9(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Sf={name:"codeIndented",tokenize:Q9},Z9={partial:!0,tokenize:W9};function Q9(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),yt(e,o,"linePrefix",5)(h)}function o(h){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?m(h):Ye(h)?e.attempt(Z9,c,m)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Ye(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function m(h){return e.exit("codeIndented"),t(h)}}function W9(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Ye(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):yt(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Ye(c)?s(c):n(c)}}const J9={name:"codeText",previous:tS,resolve:eS,tokenize:nS};function eS(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function tS(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nS(e,t,n){let a=0,s,o;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),d(b)}function d(b){return b===96?(e.consume(b),a++,d):(e.exit("codeTextSequence"),m(b))}function m(b){return b===null?n(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),m):b===96?(o=e.enter("codeTextSequence"),s=0,g(b)):Ye(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(b))}function h(b){return b===null||b===32||b===96||Ye(b)?(e.exit("codeTextData"),m(b)):(e.consume(b),h)}function g(b){return b===96?(e.consume(b),s++,g):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(o.type="codeTextData",h(b))}}class rS{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&co(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),co(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),co(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);co(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);co(this.left,n.reverse())}}}function co(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function h3(e){const t={};let n=-1,a,s,o,c,d,m,h;const g=new rS(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(a=g.get(n),n&&a[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(m=a[1]._tokenizer.events,o=0,o<m.length&&m[o][1].type==="lineEndingBlank"&&(o+=2),o<m.length&&m[o][1].type==="content"))for(;++o<m.length&&m[o][1].type!=="content";)m[o][1].type==="chunkText"&&(m[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,aS(g,n)),n=t[n],h=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...g.get(s)[1].start},d=g.slice(s,n),d.unshift(a),g.splice(s,n-s+1,d))}}return Dr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function aS(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],h={};let g,b,x=-1,y=n,S=0,E=0;const M=[E];for(;y;){for(;e.get(++s)[1]!==y;);o.push(s),y._tokenizer||(g=a.sliceStream(y),y.next||g.push(null),b&&c.defineSkip(y.start),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=y,y=y.next}for(y=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(E=x+1,M.push(E),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(c.events=[],y?(y._tokenizer=void 0,y.previous=void 0):M.pop(),x=M.length;x--;){const C=d.slice(M[x],M[x+1]),R=o.pop();m.push([R,R+C.length-1]),e.splice(R,2,C)}for(m.reverse(),x=-1;++x<m.length;)h[S+m[x][0]]=S+m[x][1],S+=m[x][1]-m[x][0]-1;return h}const iS={resolve:lS,tokenize:oS},sS={partial:!0,tokenize:cS};function lS(e){return h3(e),e}function oS(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):Ye(d)?e.check(sS,c,o)(d):(e.consume(d),s)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function cS(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),yt(e,o,"linePrefix")}function o(c){if(c===null||Ye(c))return n(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function p3(e,t,n,a,s,o,c,d,m){const h=m||Number.POSITIVE_INFINITY;let g=0;return b;function b(C){return C===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(C),e.exit(o),x):C===null||C===32||C===41||pu(C)?n(C):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),E(C))}function x(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(d),x(C)):C===null||C===60||Ye(C)?n(C):(e.consume(C),C===92?S:y)}function S(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function E(C){return!g&&(C===null||C===41||Jt(C))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(C)):g<h&&C===40?(e.consume(C),g++,E):C===41?(e.consume(C),g--,E):C===null||C===32||C===40||pu(C)?n(C):(e.consume(C),C===92?M:E)}function M(C){return C===40||C===41||C===92?(e.consume(C),E):E(C)}}function g3(e,t,n,a,s,o){const c=this;let d=0,m;return h;function h(y){return e.enter(a),e.enter(s),e.consume(y),e.exit(s),e.enter(o),g}function g(y){return d>999||y===null||y===91||y===93&&!m||y===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(y):y===93?(e.exit(o),e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):Ye(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===null||y===91||y===93||Ye(y)||d++>999?(e.exit("chunkString"),g(y)):(e.consume(y),m||(m=!Et(y)),y===92?x:b)}function x(y){return y===91||y===92||y===93?(e.consume(y),d++,b):b(y)}}function b3(e,t,n,a,s,o){let c;return d;function d(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,m):n(x)}function m(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(o),h(x))}function h(x){return x===c?(e.exit(o),m(c)):x===null?n(x):Ye(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),yt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||Ye(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?b:g)}function b(x){return x===c||x===92?(e.consume(x),g):g(x)}}function po(e,t){let n;return a;function a(s){return Ye(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Et(s)?yt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const uS={name:"definition",tokenize:fS},dS={partial:!0,tokenize:mS};function fS(e,t,n){const a=this;let s;return o;function o(y){return e.enter("definition"),c(y)}function c(y){return g3.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function d(y){return s=na(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),m):n(y)}function m(y){return Jt(y)?po(e,h)(y):h(y)}function h(y){return p3(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return e.attempt(dS,b,b)(y)}function b(y){return Et(y)?yt(e,x,"whitespace")(y):x(y)}function x(y){return y===null||Ye(y)?(e.exit("definition"),a.parser.defined.push(s),t(y)):n(y)}}function mS(e,t,n){return a;function a(d){return Jt(d)?po(e,s)(d):n(d)}function s(d){return b3(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Et(d)?yt(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Ye(d)?t(d):n(d)}}const hS={name:"hardBreakEscape",tokenize:pS};function pS(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Ye(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const gS={name:"headingAtx",resolve:bS,tokenize:vS};function bS(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Dr(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function vS(e,t,n){let a=0;return s;function s(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Jt(g)?(e.exit("atxHeadingSequence"),d(g)):n(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),m(g)):g===null||Ye(g)?(e.exit("atxHeading"),t(g)):Et(g)?yt(e,d,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function m(g){return g===35?(e.consume(g),m):(e.exit("atxHeadingSequence"),d(g))}function h(g){return g===null||g===35||Jt(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),h)}}const yS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],G4=["pre","script","style","textarea"],xS={concrete:!0,name:"htmlFlow",resolveTo:kS,tokenize:ES},wS={partial:!0,tokenize:NS},SS={partial:!0,tokenize:TS};function kS(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ES(e,t,n){const a=this;let s,o,c,d,m;return h;function h(_){return g(_)}function g(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),b}function b(_){return _===33?(e.consume(_),x):_===47?(e.consume(_),o=!0,E):_===63?(e.consume(_),s=3,a.interrupt?t:O):lr(_)?(e.consume(_),c=String.fromCharCode(_),M):n(_)}function x(_){return _===45?(e.consume(_),s=2,y):_===91?(e.consume(_),s=5,d=0,S):lr(_)?(e.consume(_),s=4,a.interrupt?t:O):n(_)}function y(_){return _===45?(e.consume(_),a.interrupt?t:O):n(_)}function S(_){const ce="CDATA[";return _===ce.charCodeAt(d++)?(e.consume(_),d===ce.length?a.interrupt?t:G:S):n(_)}function E(_){return lr(_)?(e.consume(_),c=String.fromCharCode(_),M):n(_)}function M(_){if(_===null||_===47||_===62||Jt(_)){const ce=_===47,he=c.toLowerCase();return!ce&&!o&&G4.includes(he)?(s=1,a.interrupt?t(_):G(_)):yS.includes(c.toLowerCase())?(s=6,ce?(e.consume(_),C):a.interrupt?t(_):G(_)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(_):o?R(_):A(_))}return _===45||Jn(_)?(e.consume(_),c+=String.fromCharCode(_),M):n(_)}function C(_){return _===62?(e.consume(_),a.interrupt?t:G):n(_)}function R(_){return Et(_)?(e.consume(_),R):q(_)}function A(_){return _===47?(e.consume(_),q):_===58||_===95||lr(_)?(e.consume(_),H):Et(_)?(e.consume(_),A):q(_)}function H(_){return _===45||_===46||_===58||_===95||Jn(_)?(e.consume(_),H):F(_)}function F(_){return _===61?(e.consume(_),D):Et(_)?(e.consume(_),F):A(_)}function D(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),m=_,$):Et(_)?(e.consume(_),D):P(_)}function $(_){return _===m?(e.consume(_),m=null,ee):_===null||Ye(_)?n(_):(e.consume(_),$)}function P(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Jt(_)?F(_):(e.consume(_),P)}function ee(_){return _===47||_===62||Et(_)?A(_):n(_)}function q(_){return _===62?(e.consume(_),Z):n(_)}function Z(_){return _===null||Ye(_)?G(_):Et(_)?(e.consume(_),Z):n(_)}function G(_){return _===45&&s===2?(e.consume(_),z):_===60&&s===1?(e.consume(_),V):_===62&&s===4?(e.consume(_),B):_===63&&s===3?(e.consume(_),O):_===93&&s===5?(e.consume(_),we):Ye(_)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(wS,Y,le)(_)):_===null||Ye(_)?(e.exit("htmlFlowData"),le(_)):(e.consume(_),G)}function le(_){return e.check(SS,W,Y)(_)}function W(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),U}function U(_){return _===null||Ye(_)?le(_):(e.enter("htmlFlowData"),G(_))}function z(_){return _===45?(e.consume(_),O):G(_)}function V(_){return _===47?(e.consume(_),c="",ne):G(_)}function ne(_){if(_===62){const ce=c.toLowerCase();return G4.includes(ce)?(e.consume(_),B):G(_)}return lr(_)&&c.length<8?(e.consume(_),c+=String.fromCharCode(_),ne):G(_)}function we(_){return _===93?(e.consume(_),O):G(_)}function O(_){return _===62?(e.consume(_),B):_===45&&s===2?(e.consume(_),O):G(_)}function B(_){return _===null||Ye(_)?(e.exit("htmlFlowData"),Y(_)):(e.consume(_),B)}function Y(_){return e.exit("htmlFlow"),t(_)}}function TS(e,t,n){const a=this;return s;function s(c){return Ye(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function NS(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(No,t,n)}}const CS={name:"htmlText",tokenize:AS};function AS(e,t,n){const a=this;let s,o,c;return d;function d(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),F):O===63?(e.consume(O),A):lr(O)?(e.consume(O),P):n(O)}function h(O){return O===45?(e.consume(O),g):O===91?(e.consume(O),o=0,S):lr(O)?(e.consume(O),R):n(O)}function g(O){return O===45?(e.consume(O),y):n(O)}function b(O){return O===null?n(O):O===45?(e.consume(O),x):Ye(O)?(c=b,V(O)):(e.consume(O),b)}function x(O){return O===45?(e.consume(O),y):b(O)}function y(O){return O===62?z(O):O===45?x(O):b(O)}function S(O){const B="CDATA[";return O===B.charCodeAt(o++)?(e.consume(O),o===B.length?E:S):n(O)}function E(O){return O===null?n(O):O===93?(e.consume(O),M):Ye(O)?(c=E,V(O)):(e.consume(O),E)}function M(O){return O===93?(e.consume(O),C):E(O)}function C(O){return O===62?z(O):O===93?(e.consume(O),C):E(O)}function R(O){return O===null||O===62?z(O):Ye(O)?(c=R,V(O)):(e.consume(O),R)}function A(O){return O===null?n(O):O===63?(e.consume(O),H):Ye(O)?(c=A,V(O)):(e.consume(O),A)}function H(O){return O===62?z(O):A(O)}function F(O){return lr(O)?(e.consume(O),D):n(O)}function D(O){return O===45||Jn(O)?(e.consume(O),D):$(O)}function $(O){return Ye(O)?(c=$,V(O)):Et(O)?(e.consume(O),$):z(O)}function P(O){return O===45||Jn(O)?(e.consume(O),P):O===47||O===62||Jt(O)?ee(O):n(O)}function ee(O){return O===47?(e.consume(O),z):O===58||O===95||lr(O)?(e.consume(O),q):Ye(O)?(c=ee,V(O)):Et(O)?(e.consume(O),ee):z(O)}function q(O){return O===45||O===46||O===58||O===95||Jn(O)?(e.consume(O),q):Z(O)}function Z(O){return O===61?(e.consume(O),G):Ye(O)?(c=Z,V(O)):Et(O)?(e.consume(O),Z):ee(O)}function G(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,le):Ye(O)?(c=G,V(O)):Et(O)?(e.consume(O),G):(e.consume(O),W)}function le(O){return O===s?(e.consume(O),s=void 0,U):O===null?n(O):Ye(O)?(c=le,V(O)):(e.consume(O),le)}function W(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Jt(O)?ee(O):(e.consume(O),W)}function U(O){return O===47||O===62||Jt(O)?ee(O):n(O)}function z(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function V(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ne}function ne(O){return Et(O)?yt(e,we,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):we(O)}function we(O){return e.enter("htmlTextData"),c(O)}}const Fh={name:"labelEnd",resolveAll:MS,resolveTo:OS,tokenize:DS},RS={tokenize:jS},_S={tokenize:LS},IS={tokenize:zS};function MS(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&Dr(e,0,e.length,n),e}function OS(e,t){let n=e.length,a=0,s,o,c,d;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const m={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",m,t],["enter",h,t]],d=Yr(d,e.slice(o+1,o+a+3)),d=Yr(d,[["enter",g,t]]),d=Yr(d,Uu(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),d=Yr(d,[["exit",g,t],e[c-2],e[c-1],["exit",h,t]]),d=Yr(d,e.slice(c+1)),d=Yr(d,[["exit",m,t]]),Dr(e,o,e.length,d),e}function DS(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return d;function d(x){return o?o._inactive?b(x):(c=a.parser.defined.includes(na(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),m):n(x)}function m(x){return x===40?e.attempt(RS,g,c?g:b)(x):x===91?e.attempt(_S,g,c?h:b)(x):c?g(x):b(x)}function h(x){return e.attempt(IS,g,b)(x)}function g(x){return t(x)}function b(x){return o._balanced=!0,n(x)}}function jS(e,t,n){return a;function a(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return Jt(b)?po(e,o)(b):o(b)}function o(b){return b===41?g(b):p3(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return Jt(b)?po(e,m)(b):g(b)}function d(b){return n(b)}function m(b){return b===34||b===39||b===40?b3(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):g(b)}function h(b){return Jt(b)?po(e,g)(b):g(b)}function g(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):n(b)}}function LS(e,t,n){const a=this;return s;function s(d){return g3.call(a,e,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(na(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function zS(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const BS={name:"labelStartImage",resolveAll:Fh.resolveAll,tokenize:US};function US(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const qS={name:"labelStartLink",resolveAll:Fh.resolveAll,tokenize:HS};function HS(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const kf={name:"lineEnding",tokenize:FS};function FS(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),yt(e,t,"linePrefix")}}const lu={name:"thematicBreak",tokenize:PS};function PS(e,t,n){let a=0,s;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,d(h)}function d(h){return h===s?(e.enter("thematicBreakSequence"),m(h)):a>=3&&(h===null||Ye(h))?(e.exit("thematicBreak"),t(h)):n(h)}function m(h){return h===s?(e.consume(h),a++,m):(e.exit("thematicBreakSequence"),Et(h)?yt(e,d,"whitespace")(h):d(h))}}const yr={continuation:{tokenize:VS},exit:XS,name:"list",tokenize:KS},$S={partial:!0,tokenize:ZS},GS={partial:!0,tokenize:YS};function KS(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(y){const S=a.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||y===a.containerState.marker:Ym(y)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(lu,n,h)(y):h(y);if(!a.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(y)}return n(y)}function m(y){return Ym(y)&&++c<10?(e.consume(y),m):(!a.interrupt||c<2)&&(a.containerState.marker?y===a.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||y,e.check(No,a.interrupt?n:g,e.attempt($S,x,b))}function g(y){return a.containerState.initialBlankLine=!0,o++,x(y)}function b(y){return Et(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),x):n(y)}function x(y){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function VS(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(No,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,yt(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!Et(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(GS,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,yt(e,e.attempt(yr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function YS(e,t,n){const a=this;return yt(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function XS(e){e.exit(this.containerState.type)}function ZS(e,t,n){const a=this;return yt(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!Et(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const K4={name:"setextUnderline",resolveTo:QS,tokenize:WS};function QS(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function WS(e,t,n){const a=this;let s;return o;function o(h){let g=a.events.length,b;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){b=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||b)?(e.enter("setextHeadingLine"),s=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Et(h)?yt(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||Ye(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const JS={tokenize:ek};function ek(e){const t=this,n=e.attempt(No,a,e.attempt(this.parser.constructs.flowInitial,s,yt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(iS,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tk={resolveAll:y3()},nk=v3("string"),rk=v3("text");function v3(e){return{resolveAll:y3(e==="text"?ak:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,d);return c;function c(g){return h(g)?o(g):d(g)}function d(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),m}function m(g){return h(g)?(n.exit("data"),o(g)):(n.consume(g),m)}function h(g){if(g===null)return!0;const b=s[g];let x=-1;if(b)for(;++x<b.length;){const y=b[x];if(!y.previous||y.previous.call(a,a.previous))return!0}return!1}}}function y3(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function ak(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,d=0,m;for(;o--;){const h=s[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)m=!0,d++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const ik={42:yr,43:yr,45:yr,48:yr,49:yr,50:yr,51:yr,52:yr,53:yr,54:yr,55:yr,56:yr,57:yr,62:d3},sk={91:uS},lk={[-2]:Sf,[-1]:Sf,32:Sf},ok={35:gS,42:lu,45:[K4,lu],60:xS,61:K4,95:lu,96:$4,126:$4},ck={38:m3,92:f3},uk={[-5]:kf,[-4]:kf,[-3]:kf,33:BS,38:m3,42:Xm,60:[q9,CS],91:qS,92:[hS,f3],93:Fh,95:Xm,96:J9},dk={null:[Xm,tk]},fk={null:[42,95]},mk={null:[]},hk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fk,contentInitial:sk,disable:mk,document:ik,flow:ok,flowInitial:lk,insideSpan:dk,string:ck,text:uk},Symbol.toStringTag,{value:"Module"}));function pk(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],d=[];const m={attempt:$(F),check:$(D),consume:R,enter:A,exit:H,interrupt:$(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:b};let g=t.tokenize.call(h,m);return t.resolveAll&&o.push(t),h;function b(Z){return c=Yr(c,Z),M(),c[c.length-1]!==null?[]:(P(t,0),h.events=Uu(o,h.events,h),h.events)}function x(Z,G){return bk(y(Z),G)}function y(Z){return gk(c,Z)}function S(){const{_bufferIndex:Z,_index:G,line:le,column:W,offset:U}=a;return{_bufferIndex:Z,_index:G,line:le,column:W,offset:U}}function E(Z){s[Z.line]=Z.column,q()}function M(){let Z;for(;a._index<c.length;){const G=c[a._index];if(typeof G=="string")for(Z=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Z&&a._bufferIndex<G.length;)C(G.charCodeAt(a._bufferIndex));else C(G)}}function C(Z){g=g(Z)}function R(Z){Ye(Z)?(a.line++,a.column=1,a.offset+=Z===-3?2:1,q()):Z!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=Z}function A(Z,G){const le=G||{};return le.type=Z,le.start=S(),h.events.push(["enter",le,h]),d.push(le),le}function H(Z){const G=d.pop();return G.end=S(),h.events.push(["exit",G,h]),G}function F(Z,G){P(Z,G.from)}function D(Z,G){G.restore()}function $(Z,G){return le;function le(W,U,z){let V,ne,we,O;return Array.isArray(W)?Y(W):"tokenize"in W?Y([W]):B(W);function B(ie){return ae;function ae(ge){const ve=ge!==null&&ie[ge],Ie=ge!==null&&ie.null,He=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return Y(He)(ge)}}function Y(ie){return V=ie,ne=0,ie.length===0?z:_(ie[ne])}function _(ie){return ae;function ae(ge){return O=ee(),we=ie,ie.partial||(h.currentConstruct=ie),ie.name&&h.parser.constructs.disable.null.includes(ie.name)?he():ie.tokenize.call(G?Object.assign(Object.create(h),G):h,m,ce,he)(ge)}}function ce(ie){return Z(we,O),U}function he(ie){return O.restore(),++ne<V.length?_(V[ne]):z}}}function P(Z,G){Z.resolveAll&&!o.includes(Z)&&o.push(Z),Z.resolve&&Dr(h.events,G,h.events.length-G,Z.resolve(h.events.slice(G),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function ee(){const Z=S(),G=h.previous,le=h.currentConstruct,W=h.events.length,U=Array.from(d);return{from:W,restore:z};function z(){a=Z,h.previous=G,h.currentConstruct=le,h.events.length=W,d=U,q()}}function q(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function gk(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function bk(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
14
- `;break}case-3:{c=`\r
15
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function vk(e){const a={constructs:c3([hk,...(e||{}).extensions||[]]),content:s(O9),defined:[],document:s(j9),flow:s(JS),lazy:{},string:s(nk),text:s(rk)};return a;function s(o){return c;function c(d){return pk(a,o,d)}}}function yk(e){for(;!h3(e););return e}const V4=/[\0\t\n\r]/g;function xk(){let e=1,t="",n=!0,a;return s;function s(o,c,d){const m=[];let h,g,b,x,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),b=0,t="",n&&(o.charCodeAt(0)===65279&&b++,n=void 0);b<o.length;){if(V4.lastIndex=b,h=V4.exec(o),x=h&&h.index!==void 0?h.index:o.length,y=o.charCodeAt(x),!h){t=o.slice(b);break}if(y===10&&b===x&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),b<x&&(m.push(o.slice(b,x)),e+=x-b),y){case 0:{m.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,m.push(-2);e++<g;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:a=!0,e=1}b=x+1}return d&&(a&&m.push(-5),t&&m.push(t),m.push(null)),m}}const wk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sk(e){return e.replace(wk,kk)}function kk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return u3(n.slice(o?2:1),o?16:10)}return Hh(n)||e}const x3={}.hasOwnProperty;function Ek(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Tk(n)(yk(vk(n).document().write(xk()(e,t,!0))))}function Tk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(mn),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:o(qt),blockQuote:o(Ie),characterEscape:ee,characterReference:ee,codeFenced:o(He),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(He,c),codeText:o(Ee,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:o(nt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(mt),hardBreakEscape:o(Zt),hardBreakTrailing:o(Zt),htmlFlow:o(vn,c),htmlFlowData:ee,htmlText:o(vn,c),htmlTextData:ee,image:o(Tn),label:c,link:o(mn),listItem:o(We),listItemValue:x,listOrdered:o(Ht,b),listUnordered:o(Ht),paragraph:o(xt),reference:_,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(qt),strong:o(jt),thematicBreak:o(Kt)},exit:{atxHeading:m(),atxHeadingSequence:F,autolink:m(),autolinkEmail:ve,autolinkProtocol:ge,blockQuote:m(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ie,characterReference:ae,codeFenced:m(M),codeFencedFence:E,codeFencedFenceInfo:y,codeFencedFenceMeta:S,codeFlowValue:q,codeIndented:m(C),codeText:m(U),codeTextData:q,data:q,definition:m(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:A,emphasis:m(),hardBreakEscape:m(G),hardBreakTrailing:m(G),htmlFlow:m(le),htmlFlowData:q,htmlText:m(W),htmlTextData:q,image:m(V),label:we,labelText:ne,lineEnding:Z,link:m(z),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ce,resourceDestinationString:O,resourceTitleString:B,resource:Y,setextHeading:m(P),setextHeadingLineSequence:$,setextHeadingText:D,strong:m(),thematicBreak:m()}};w3(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(fe){let be={type:"root",children:[]};const Ue={stack:[be],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:g,data:n},Ze=[];let Je=-1;for(;++Je<fe.length;)if(fe[Je][1].type==="listOrdered"||fe[Je][1].type==="listUnordered")if(fe[Je][0]==="enter")Ze.push(Je);else{const It=Ze.pop();Je=s(fe,It,Je)}for(Je=-1;++Je<fe.length;){const It=t[fe[Je][0]];x3.call(It,fe[Je][1].type)&&It[fe[Je][1].type].call(Object.assign({sliceSerialize:fe[Je][2].sliceSerialize},Ue),fe[Je][1])}if(Ue.tokenStack.length>0){const It=Ue.tokenStack[Ue.tokenStack.length-1];(It[1]||Y4).call(Ue,void 0,It[0])}for(be.position={start:xi(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:xi(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)be=t.transforms[Je](be)||be;return be}function s(fe,be,Ue){let Ze=be-1,Je=-1,It=!1,nn,At,lt,cn;for(;++Ze<=Ue;){const gt=fe[Ze];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?Je++:Je--,cn=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(nn&&!cn&&!Je&&!lt&&(lt=Ze),cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:cn=void 0}if(!Je&&gt[0]==="enter"&&gt[1].type==="listItemPrefix"||Je===-1&&gt[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(nn){let Yn=Ze;for(At=void 0;Yn--;){const yn=fe[Yn];if(yn[1].type==="lineEnding"||yn[1].type==="lineEndingBlank"){if(yn[0]==="exit")continue;At&&(fe[At][1].type="lineEndingBlank",It=!0),yn[1].type="lineEnding",At=Yn}else if(!(yn[1].type==="linePrefix"||yn[1].type==="blockQuotePrefix"||yn[1].type==="blockQuotePrefixWhitespace"||yn[1].type==="blockQuoteMarker"||yn[1].type==="listItemIndent"))break}lt&&(!At||lt<At)&&(nn._spread=!0),nn.end=Object.assign({},At?fe[At][1].start:gt[1].end),fe.splice(At||Ze,0,["exit",nn,gt[2]]),Ze++,Ue++}if(gt[1].type==="listItemPrefix"){const Yn={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};nn=Yn,fe.splice(Ze,0,["enter",Yn,gt[2]]),Ze++,Ue++,lt=void 0,cn=!0}}}return fe[be][1]._spread=It,Ue}function o(fe,be){return Ue;function Ue(Ze){d.call(this,fe(Ze),Ze),be&&be.call(this,Ze)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(fe,be,Ue){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([be,Ue||void 0]),fe.position={start:xi(be.start),end:void 0}}function m(fe){return be;function be(Ue){fe&&fe.call(this,Ue),h.call(this,Ue)}}function h(fe,be){const Ue=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==fe.type&&(be?be.call(this,fe,Ze[0]):(Ze[1]||Y4).call(this,fe,Ze[0]));else throw new Error("Cannot close `"+fe.type+"` ("+ho({start:fe.start,end:fe.end})+"): it’s not open");Ue.position.end=xi(fe.end)}function g(){return qh(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function x(fe){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.lang=fe}function S(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.meta=fe}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function M(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.value=fe.replace(/(\r?\n|\r)$/g,"")}function R(fe){const be=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=be,Ue.identifier=na(this.sliceSerialize(fe)).toLowerCase()}function A(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.title=fe}function H(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.url=fe}function F(fe){const be=this.stack[this.stack.length-1];if(!be.depth){const Ue=this.sliceSerialize(fe).length;be.depth=Ue}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function $(fe){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(fe){const Ue=this.stack[this.stack.length-1].children;let Ze=Ue[Ue.length-1];(!Ze||Ze.type!=="text")&&(Ze=Fe(),Ze.position={start:xi(fe.start),end:void 0},Ue.push(Ze)),this.stack.push(Ze)}function q(fe){const be=this.stack.pop();be.value+=this.sliceSerialize(fe),be.position.end=xi(fe.end)}function Z(fe){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=be.children[be.children.length-1];Ue.position.end=xi(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(be.type)&&(ee.call(this,fe),q.call(this,fe))}function G(){this.data.atHardBreak=!0}function le(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.value=fe}function W(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.value=fe}function U(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.value=fe}function z(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=be,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function V(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=be,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function ne(fe){const be=this.sliceSerialize(fe),Ue=this.stack[this.stack.length-2];Ue.label=Sk(be),Ue.identifier=na(be).toLowerCase()}function we(){const fe=this.stack[this.stack.length-1],be=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const Ze=fe.children;Ue.children=Ze}else Ue.alt=be}function O(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.url=fe}function B(){const fe=this.resume(),be=this.stack[this.stack.length-1];be.title=fe}function Y(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ce(fe){const be=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=be,Ue.identifier=na(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function he(fe){this.data.characterReferenceType=fe.type}function ie(fe){const be=this.sliceSerialize(fe),Ue=this.data.characterReferenceType;let Ze;Ue?(Ze=u3(be,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=Hh(be);const Je=this.stack[this.stack.length-1];Je.value+=Ze}function ae(fe){const be=this.stack.pop();be.position.end=xi(fe.end)}function ge(fe){q.call(this,fe);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(fe)}function ve(fe){q.call(this,fe);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(fe)}function Ie(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function Ee(){return{type:"inlineCode",value:""}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mt(){return{type:"emphasis",children:[]}}function qt(){return{type:"heading",depth:0,children:[]}}function Zt(){return{type:"break"}}function vn(){return{type:"html",value:""}}function Tn(){return{type:"image",title:null,url:"",alt:null}}function mn(){return{type:"link",title:null,url:"",children:[]}}function Ht(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function We(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function xt(){return{type:"paragraph",children:[]}}function jt(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function Kt(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function w3(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?w3(e,a):Nk(e,a)}}function Nk(e,t){let n;for(n in t)if(x3.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function Y4(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ho({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ho({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ho({start:t.start,end:t.end})+") is still open")}function Ck(e){const t=this;t.parser=n;function n(a){return Ek(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ak(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Rk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
16
- `}]}function _k(e,t){const n=t.value?t.value+`
17
- `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Ik(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ok(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=sl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,d+=1,e.footnoteCounts.set(a,d);const m={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,h),e.applyData(t,h)}function Dk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function S3(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function Lk(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return S3(e,t);const s={src:sl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function zk(e,t){const n={src:sl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function Bk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function Uk(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return S3(e,t);const s={href:sl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function qk(e,t){const n={href:sl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Hk(e,t,n){const a=e.all(t),s=n?Fk(n):k3(t),o={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let b;g&&g.type==="element"&&g.tagName==="p"?b=g:(b={type:"element",tagName:"p",properties:{},children:[]},a.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(s||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
18
- `}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const m=a[a.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
19
- `});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function Fk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=k3(n[a])}return t}function k3(e){const t=e.spread;return t??e.children.length>1}function Pk(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function $k(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Kk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vk(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Lh(t.children[1]),m=n3(t.children[t.children.length-1]);d&&m&&(c.position={start:d,end:m}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function Yk(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let m=-1;const h=[];for(;++m<d;){const b=t.children[m],x={},y=c?c[m]:void 0;y&&(x.align=y);let S={type:"element",tagName:o,properties:x,children:[]};b&&(S.children=e.all(b),e.patch(b,S),S=e.applyData(b,S)),h.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function Xk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const X4=9,Z4=32;function Zk(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(Q4(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(Q4(t.slice(s),s>0,!1)),o.join("")}function Q4(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===X4||o===Z4;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===X4||o===Z4;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function Qk(e,t){const n={type:"text",value:Zk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Wk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Jk={blockquote:Ak,break:Rk,code:_k,delete:Ik,emphasis:Mk,footnoteReference:Ok,heading:Dk,html:jk,imageReference:Lk,image:zk,inlineCode:Bk,linkReference:Uk,link:qk,listItem:Hk,list:Pk,paragraph:$k,root:Gk,strong:Kk,table:Vk,tableCell:Xk,tableRow:Yk,text:Qk,thematicBreak:Wk,toml:Vc,yaml:Vc,definition:Vc,footnoteDefinition:Vc};function Vc(){}const E3=-1,qu=0,go=1,gu=2,Ph=3,$h=4,Gh=5,Kh=6,T3=7,N3=8,C3=typeof self=="object"?self:globalThis,W4=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new C3[e](t)},eE=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case qu:case E3:return n(c,s);case go:{const d=n([],s);for(const m of c)d.push(a(m));return d}case gu:{const d=n({},s);for(const[m,h]of c)d[a(m)]=a(h);return d}case Ph:return n(new Date(c),s);case $h:{const{source:d,flags:m}=c;return n(new RegExp(d,m),s)}case Gh:{const d=n(new Map,s);for(const[m,h]of c)d.set(a(m),a(h));return d}case Kh:{const d=n(new Set,s);for(const m of c)d.add(a(m));return d}case T3:{const{name:d,message:m}=c;return n(typeof C3[d]=="function"?W4(d,m):new Error(m),s)}case N3:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(W4(o,c),s)};return a},J4=e=>eE(new Map,e)(0),ts="",{toString:tE}={},{keys:nE}=Object,uo=e=>{const t=typeof e;if(t!=="object"||!e)return[qu,t];const n=tE.call(e).slice(8,-1);switch(n){case"Array":return[go,ts];case"Object":return[gu,ts];case"Date":return[Ph,ts];case"RegExp":return[$h,ts];case"Map":return[Gh,ts];case"Set":return[Kh,ts];case"DataView":return[go,n]}return n.includes("Array")?[go,n]:e instanceof Error?[T3,e.name||"Error"]:[gu,n]},Yc=([e,t])=>e===qu&&(t==="function"||t==="symbol"),rE=(e,t,n,a)=>{const s=(c,d)=>{const m=a.push(c)-1;return n.set(d,m),m},o=c=>{if(n.has(c))return n.get(c);let[d,m]=uo(c);switch(d){case qu:{let g=c;switch(m){case"bigint":d=N3,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return s([E3],c)}return s([d,g],c)}case go:{if(m){let x=c;return m==="DataView"?x=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(c)),s([m,[...x]],c)}const g=[],b=s([d,g],c);for(const x of c)g.push(o(x));return b}case gu:{if(m)switch(m){case"BigInt":return s([m,c.toString()],c);case"Boolean":case"Number":case"String":return s([m,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const g=[],b=s([d,g],c);for(const x of nE(c))(e||!Yc(uo(c[x])))&&g.push([o(x),o(c[x])]);return b}case Ph:return s([d,isNaN(c.getTime())?ts:c.toISOString()],c);case $h:{const{source:g,flags:b}=c;return s([d,{source:g,flags:b}],c)}case Gh:{const g=[],b=s([d,g],c);for(const[x,y]of c)(e||!(Yc(uo(x))||Yc(uo(y))))&&g.push([o(x),o(y)]);return b}case Kh:{const g=[],b=s([d,g],c);for(const x of c)(e||!Yc(uo(x)))&&g.push(o(x));return b}}const{message:h}=c;return s([d,{name:m,message:h}],c)};return o},ev=(e,{json:t,lossy:n}={})=>{const a=[];return rE(!(t||n),!!t,new Map,a)(e),a},bu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?J4(ev(e,t)):structuredClone(e):(e,t)=>J4(ev(e,t));function aE(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function iE(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sE(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||aE,a=e.options.footnoteBackLabel||iE,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let m=-1;for(;++m<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[m]);if(!h)continue;const g=e.all(h),b=String(h.identifier).toUpperCase(),x=sl(b.toLowerCase());let y=0;const S=[],E=e.footnoteCounts.get(b);for(;E!==void 0&&++y<=E;){S.length>0&&S.push({type:"text",value:" "});let R=typeof n=="string"?n:n(m,y);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,y),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const M=g[g.length-1];if(M&&M.type==="element"&&M.tagName==="p"){const R=M.children[M.children.length-1];R&&R.type==="text"?R.value+=" ":M.children.push({type:"text",value:" "}),M.children.push(...S)}else g.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(g,!0)};e.patch(h,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...bu(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
20
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
21
- `}]}}const Co=(function(e){if(e==null)return uE;if(typeof e=="function")return Hu(e);if(typeof e=="object")return Array.isArray(e)?lE(e):oE(e);if(typeof e=="string")return cE(e);throw new Error("Expected function, string, or object as test")});function lE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Co(e[n]);return Hu(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function oE(e){const t=e;return Hu(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function cE(e){return Hu(t);function t(n){return n&&n.type===e}}function Hu(e){return t;function t(n,a,s){return!!(dE(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function uE(){return!0}function dE(e){return e!==null&&typeof e=="object"&&"type"in e}const A3=[],fE=!0,Zm=!1,R3="skip";function Vh(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=Co(s),c=a?-1:1;d(e,void 0,[])();function d(m,h,g){const b=m&&typeof m=="object"?m:{};if(typeof b.type=="string"){const y=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(y?"<"+y+">":""))+")"})}return x;function x(){let y=A3,S,E,M;if((!t||o(m,h,g[g.length-1]||void 0))&&(y=mE(n(m,g)),y[0]===Zm))return y;if("children"in m&&m.children){const C=m;if(C.children&&y[0]!==R3)for(E=(a?C.children.length:-1)+c,M=g.concat(C);E>-1&&E<C.children.length;){const R=C.children[E];if(S=d(R,E,M)(),S[0]===Zm)return S;E=typeof S[1]=="number"?S[1]:E+c}}return y}}}function mE(e){return Array.isArray(e)?e:typeof e=="number"?[fE,e]:e==null?A3:[e]}function Yh(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),Vh(e,o,d,s);function d(m,h){const g=h[h.length-1],b=g?g.children.indexOf(m):void 0;return c(m,b,g)}}const Qm={}.hasOwnProperty,hE={};function pE(e,t){const n=t||hE,a=new Map,s=new Map,o=new Map,c={...Jk,...n.handlers},d={all:h,applyData:bE,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:m,options:n,patch:gE,wrap:yE};return Yh(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const b=g.type==="definition"?a:s,x=String(g.identifier).toUpperCase();b.has(x)||b.set(x,g)}}),d;function m(g,b){const x=g.type,y=d.handlers[x];if(Qm.call(d.handlers,x)&&y)return y(d,g,b);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in g){const{children:E,...M}=g,C=bu(M);return C.children=d.all(g),C}return bu(g)}return(d.options.unknownHandler||vE)(d,g,b)}function h(g){const b=[];if("children"in g){const x=g.children;let y=-1;for(;++y<x.length;){const S=d.one(x[y],g);if(S){if(y&&x[y-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=tv(S.value)),!Array.isArray(S)&&S.type==="element")){const E=S.children[0];E&&E.type==="text"&&(E.value=tv(E.value))}Array.isArray(S)?b.push(...S):b.push(S)}}}return b}}function gE(e,t){e.position&&(t.position=i9(e))}function bE(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&o&&Object.assign(n.properties,bu(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function vE(e,t){const n=t.data||{},a="value"in t&&!(Qm.call(n,"hProperties")||Qm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function yE(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
22
- `});++a<e.length;)a&&n.push({type:"text",value:`
23
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
24
- `}),n}function tv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nv(e,t){const n=pE(e,t),a=n.one(e,void 0),s=sE(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
25
- `},s),o}function xE(e,t){return e&&"run"in e?async function(n,a){const s=nv(n,{file:a,...t});await e.run(s,a)}:function(n,a){return nv(n,{file:a,...e||t})}}function rv(e){if(e)throw e}var Ef,av;function wE(){if(av)return Ef;av=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),b=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!b)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},c=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},d=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(a)return a(h,g).value}else return;return h[g]};return Ef=function m(){var h,g,b,x,y,S,E=arguments[0],M=1,C=arguments.length,R=!1;for(typeof E=="boolean"&&(R=E,E=arguments[1]||{},M=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});M<C;++M)if(h=arguments[M],h!=null)for(g in h)b=d(E,g),x=d(h,g),E!==x&&(R&&x&&(o(x)||(y=s(x)))?(y?(y=!1,S=b&&s(b)?b:[]):S=b&&o(b)?b:{},c(E,{name:g,newValue:m(R,S,x)})):typeof x<"u"&&c(E,{name:g,newValue:x}));return E},Ef}var SE=wE();const Tf=Ou(SE);function Wm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kE(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(m,...h){const g=e[++o];let b=-1;if(m){c(m);return}for(;++b<s.length;)(h[b]===null||h[b]===void 0)&&(h[b]=s[b]);s=h,g?EE(g,d)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function EE(e,t){let n;return a;function a(...c){const d=e.length>c.length;let m;d&&c.push(s);try{m=e.apply(this,c)}catch(h){const g=h;if(d&&n)throw g;return s(g)}d||(m&&m.then&&typeof m.then=="function"?m.then(o,s):m instanceof Error?s(m):o(m))}function s(c,...d){n||(n=!0,t(c,...d))}function o(c){s(null,c)}}const oa={basename:TE,dirname:NE,extname:CE,join:AE,sep:"/"};function TE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ao(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function NE(e){if(Ao(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function CE(e){Ao(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function AE(...e){let t=-1,n;for(;++t<e.length;)Ao(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":RE(n)}function RE(e){Ao(e);const t=e.codePointAt(0)===47;let n=_E(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _E(e,t){let n="",a=0,s=-1,o=0,c=-1,d,m;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(m=n.lastIndexOf("/"),m!==n.length-1){m<0?(n="",a=0):(n=n.slice(0,m),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else d===46&&o>-1?o++:o=-1}return n}function Ao(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IE={cwd:ME};function ME(){return"/"}function Jm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function OE(e){if(typeof e=="string")e=new URL(e);else if(!Jm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return DE(e)}function DE(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Nf=["history","path","basename","stem","extname","dirname"];class _3{constructor(t){let n;t?Jm(t)?n={path:t}:typeof t=="string"||jE(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Nf.length;){const o=Nf[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Nf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?oa.basename(this.path):void 0}set basename(t){Af(t,"basename"),Cf(t,"basename"),this.path=oa.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?oa.dirname(this.path):void 0}set dirname(t){iv(this.basename,"dirname"),this.path=oa.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?oa.extname(this.path):void 0}set extname(t){if(Cf(t,"extname"),iv(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=oa.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Jm(t)&&(t=OE(t)),Af(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?oa.basename(this.path,this.extname):void 0}set stem(t){Af(t,"stem"),Cf(t,"stem"),this.path=oa.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new tr(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Cf(e,t){if(e&&e.includes(oa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+oa.sep+"`")}function Af(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function iv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const LE=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),zE={}.hasOwnProperty;class Xh extends LE{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=kE()}copy(){const t=new Xh;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Tf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(If("data",this.frozen),this.namespace[t]=n,this):zE.call(this.namespace,t)&&this.namespace[t]||void 0:t?(If("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xc(t),a=this.parser||this.Parser;return Rf("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Rf("process",this.parser||this.Parser),_f("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const d=Xc(t),m=a.parse(d);a.run(m,d,function(g,b,x){if(g||!b||!x)return h(g);const y=b,S=a.stringify(y,x);qE(S)?x.value=S:x.result=S,h(g,x)});function h(g,b){g||!b?c(g):o?o(b):n(void 0,b)}}}processSync(t){let n=!1,a;return this.freeze(),Rf("processSync",this.parser||this.Parser),_f("processSync",this.compiler||this.Compiler),this.process(t,s),lv("processSync","process",n),a;function s(o,c){n=!0,rv(o),a=c}}run(t,n,a){sv(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,d){const m=Xc(n);s.run(t,m,h);function h(g,b,x){const y=b||t;g?d(g):c?c(y):a(void 0,y,x)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),lv("runSync","run",a),s;function o(c,d){rv(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=Xc(n),s=this.compiler||this.Compiler;return _f("stringify",s),sv(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(If("use",this.frozen),t!=null)if(typeof t=="function")m(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...b]=h;m(g,b)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(s.settings=Tf(!0,s.settings,h.settings))}function d(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const b=h[g];o(b)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,g){let b=-1,x=-1;for(;++b<a.length;)if(a[b][0]===h){x=b;break}if(x===-1)a.push([h,...g]);else if(g.length>0){let[y,...S]=g;const E=a[x][1];Wm(E)&&Wm(y)&&(y=Tf(!0,E,y)),a[x]=[h,y,...S]}}}}const BE=new Xh().freeze();function Rf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _f(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function If(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function sv(e){if(!Wm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function lv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xc(e){return UE(e)?e:new _3(e)}function UE(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qE(e){return typeof e=="string"||HE(e)}function HE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ov=[],cv={allowDangerousHtml:!0},PE=/^(https?|ircs?|mailto|xmpp)$/i,$E=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function GE(e){const t=KE(e),n=VE(e);return YE(t.runSync(t.parse(n),n),e)}function KE(e){const t=e.rehypePlugins||ov,n=e.remarkPlugins||ov,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cv}:cv;return BE().use(Ck).use(n).use(xE,a).use(t)}function VE(e){const t=e.children||"",n=new _3;return typeof t=="string"&&(n.value=t),n}function YE(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,m=t.urlTransform||XE;for(const g of $E)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+FE+g.id,void 0);return Yh(e,h),u9(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function h(g,b,x){if(g.type==="raw"&&x&&typeof b=="number")return c?x.children.splice(b,1):x.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let y;for(y in wf)if(Object.hasOwn(wf,y)&&Object.hasOwn(g.properties,y)){const S=g.properties[y],E=wf[y];(E===null||E.includes(g.tagName))&&(g.properties[y]=m(String(S||""),y,g))}}if(g.type==="element"){let y=n?!n.includes(g.tagName):o?o.includes(g.tagName):!1;if(!y&&a&&typeof b=="number"&&(y=!a(g,b,x)),y&&x&&typeof b=="number")return d&&g.children?x.children.splice(b,1,...g.children):x.children.splice(b,1),b}}}function XE(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||PE.test(e.slice(0,t))?e:""}function uv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function ZE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function QE(e,t,n){const s=Co((n||{}).ignore||[]),o=WE(t);let c=-1;for(;++c<o.length;)Vh(e,"text",d);function d(h,g){let b=-1,x;for(;++b<g.length;){const y=g[b],S=x?x.children:void 0;if(s(y,S?S.indexOf(y):void 0,x))return;x=y}if(x)return m(h,g)}function m(h,g){const b=g[g.length-1],x=o[c][0],y=o[c][1];let S=0;const M=b.children.indexOf(h);let C=!1,R=[];x.lastIndex=0;let A=x.exec(h.value);for(;A;){const H=A.index,F={index:A.index,input:A.input,stack:[...g,h]};let D=y(...A,F);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?x.lastIndex=H+1:(S!==H&&R.push({type:"text",value:h.value.slice(S,H)}),Array.isArray(D)?R.push(...D):D&&R.push(D),S=H+A[0].length,C=!0),!x.global)break;A=x.exec(h.value)}return C?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),b.children.splice(M,1,...R)):R=[h],M+R.length}}function WE(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([JE(s[0]),eT(s[1])])}return t}function JE(e){return typeof e=="string"?new RegExp(ZE(e),"g"):e}function eT(e){return typeof e=="function"?e:function(){return e}}const Mf="phrasing",Of=["autolink","link","image","label"];function tT(){return{transforms:[oT],enter:{literalAutolink:rT,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:lT,literalAutolinkEmail:sT,literalAutolinkHttp:aT,literalAutolinkWww:iT}}}function nT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mf,notInConstruct:Of},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mf,notInConstruct:Of},{character:":",before:"[ps]",after:"\\/",inConstruct:Mf,notInConstruct:Of}]}}function rT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Df(e){this.config.enter.autolinkProtocol.call(this,e)}function aT(e){this.config.exit.autolinkProtocol.call(this,e)}function iT(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function sT(e){this.config.exit.autolinkEmail.call(this,e)}function lT(e){this.exit(e)}function oT(e){QE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uT]],{ignore:["link","linkReference"]})}function cT(e,t,n,a,s){let o="";if(!I3(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!dT(n)))return!1;const c=fT(n+a);if(!c[0])return!1;const d={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function uT(e,t,n,a){return!I3(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function dT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=uv(e,"(");let o=uv(e,")");for(;a!==-1&&s>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function I3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||Bu(n))&&(!t||n!==47)}M3.peek=wT;function mT(){this.buffer()}function hT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pT(){this.buffer()}function gT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vT(e){this.exit(e)}function yT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xT(e){this.exit(e)}function wT(){return"["}function M3(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),d=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function ST(){return{enter:{gfmFootnoteCallString:mT,gfmFootnoteCall:hT,gfmFootnoteDefinitionLabelString:pT,gfmFootnoteDefinition:gT},exit:{gfmFootnoteCallString:bT,gfmFootnoteCall:vT,gfmFootnoteDefinitionLabelString:yT,gfmFootnoteDefinition:xT}}}function kT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:M3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const d=o.createTracker(c);let m=d.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return m+=d.move(o.safe(o.associationId(a),{before:m,after:"]"})),g(),m+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),m+=d.move((t?`
26
- `:" ")+o.indentLines(o.containerFlow(a,d.current()),t?O3:ET))),h(),m}}function ET(e,t,n){return t===0?e:O3(e,t,n)}function O3(e,t,n){return(n?"":" ")+e}const TT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];D3.peek=_T;function NT(){return{canContainEols:["delete"],enter:{strikethrough:AT},exit:{strikethrough:RT}}}function CT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:TT}],handlers:{delete:D3}}}function AT(e){this.enter({type:"delete",children:[]},e)}function RT(e){this.exit(e)}function D3(e,t,n,a){const s=n.createTracker(a),o=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function _T(){return"~"}function IT(e){return e.length}function MT(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||IT,o=[],c=[],d=[],m=[];let h=0,g=-1;for(;++g<e.length;){const E=[],M=[];let C=-1;for(e[g].length>h&&(h=e[g].length);++C<e[g].length;){const R=OT(e[g][C]);if(n.alignDelimiters!==!1){const A=s(R);M[C]=A,(m[C]===void 0||A>m[C])&&(m[C]=A)}E.push(R)}c[g]=E,d[g]=M}let b=-1;if(typeof a=="object"&&"length"in a)for(;++b<h;)o[b]=dv(a[b]);else{const E=dv(a);for(;++b<h;)o[b]=E}b=-1;const x=[],y=[];for(;++b<h;){const E=o[b];let M="",C="";E===99?(M=":",C=":"):E===108?M=":":E===114&&(C=":");let R=n.alignDelimiters===!1?1:Math.max(1,m[b]-M.length-C.length);const A=M+"-".repeat(R)+C;n.alignDelimiters!==!1&&(R=M.length+R+C.length,R>m[b]&&(m[b]=R),y[b]=R),x[b]=A}c.splice(1,0,x),d.splice(1,0,y),g=-1;const S=[];for(;++g<c.length;){const E=c[g],M=d[g];b=-1;const C=[];for(;++b<h;){const R=E[b]||"";let A="",H="";if(n.alignDelimiters!==!1){const F=m[b]-(M[b]||0),D=o[b];D===114?A=" ".repeat(F):D===99?F%2?(A=" ".repeat(F/2+.5),H=" ".repeat(F/2-.5)):(A=" ".repeat(F/2),H=A):H=" ".repeat(F)}n.delimiterStart!==!1&&!b&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||b)&&C.push(" "),n.alignDelimiters!==!1&&C.push(A),C.push(R),n.alignDelimiters!==!1&&C.push(H),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||b!==h-1)&&C.push("|")}S.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return S.join(`
27
- `)}function OT(e){return e==null?"":String(e)}function dv(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function DT(e,t,n,a){const s=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),jT);return s(),c}function jT(e,t,n){return">"+(n?"":" ")+e}function LT(e,t){return fv(e,t.inConstruct,!0)&&!fv(e,t.notInConstruct,!1)}function fv(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function mv(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
28
- `&&LT(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
29
- `}function j3(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function zT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function BT(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function UT(e,t,n,a){const s=BT(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(zT(e,n)){const b=n.enter("codeIndented"),x=n.indentLines(o,qT);return b(),x}const d=n.createTracker(a),m=s.repeat(Math.max(j3(o,s)+1,3)),h=n.enter("codeFenced");let g=d.move(m);if(e.lang){const b=n.enter(`codeFencedLang${c}`);g+=d.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...d.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${c}`);g+=d.move(" "),g+=d.move(n.safe(e.meta,{before:g,after:`
30
- `,encode:["`"],...d.current()})),b()}return g+=d.move(`
31
- `),o&&(g+=d.move(o+`
32
- `)),g+=d.move(m),h(),g}function qT(e,t,n){return(n?"":" ")+e}function Zh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function HT(e,t,n,a){const s=Zh(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let d=n.enter("label");const m=n.createTracker(a);let h=m.move("[");return h+=m.move(n.safe(n.associationId(e),{before:h,after:"]",...m.current()})),h+=m.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(d=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":`
33
- `,...m.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),d()),c(),h}function FT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function So(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vu(e,t,n){const a=el(e),s=el(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}L3.peek=PT;function L3(e,t,n,a){const s=FT(n),o=n.enter("emphasis"),c=n.createTracker(a),d=c.move(s);let m=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=m.charCodeAt(0),g=vu(a.before.charCodeAt(a.before.length-1),h,s);g.inside&&(m=So(h)+m.slice(1));const b=m.charCodeAt(m.length-1),x=vu(a.after.charCodeAt(0),b,s);x.inside&&(m=m.slice(0,-1)+So(b));const y=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},d+m+y}function PT(e,t,n){return n.options.emphasis||"*"}function $T(e,t){let n=!1;return Yh(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Zm}),!!((!e.depth||e.depth<3)&&qh(e)&&(t.options.setext||n))}function GT(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if($T(e,n)){const g=n.enter("headingSetext"),b=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
34
- `,after:`
35
- `});return b(),g(),x+`
36
- `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
37
- `))+1))}const c="#".repeat(s),d=n.enter("headingAtx"),m=n.enter("phrasing");o.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
38
- `,...o.current()});return/^[\t ]/.test(h)&&(h=So(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),m(),d(),h}z3.peek=KT;function z3(e){return e.value||""}function KT(){return"<"}B3.peek=VT;function B3(e,t,n,a){const s=Zh(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let d=n.enter("label");const m=n.createTracker(a);let h=m.move("![");return h+=m.move(n.safe(e.alt,{before:h,after:"]",...m.current()})),h+=m.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(d=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":")",...m.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),d()),h+=m.move(")"),c(),h}function VT(){return"!"}U3.peek=YT;function U3(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const d=n.createTracker(a);let m=d.move("![");const h=n.safe(e.alt,{before:m,after:"]",...d.current()});m+=d.move(h+"]["),c();const g=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:m,after:"]",...d.current()});return c(),n.stack=g,o(),s==="full"||!h||h!==b?m+=d.move(b+"]"):s==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function YT(){return"!"}q3.peek=XT;function q3(e,t,n){let a=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],d=n.compilePattern(c);let m;if(c.atBreak)for(;m=d.exec(a);){let h=m.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(m.index+1)}}return s+a+s}function XT(){return"`"}function H3(e,t){const n=qh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}F3.peek=ZT;function F3(e,t,n,a){const s=Zh(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let d,m;if(H3(e,n)){const g=n.stack;n.stack=[],d=n.enter("autolink");let b=c.move("<");return b+=c.move(n.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),d(),n.stack=g,b}d=n.enter("link"),m=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(m=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=n.enter(`title${o}`),h+=c.move(" "+s),h+=c.move(n.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),m()),h+=c.move(")"),d(),h}function ZT(e,t,n){return H3(e,n)?"<":"["}P3.peek=QT;function P3(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const d=n.createTracker(a);let m=d.move("[");const h=n.containerPhrasing(e,{before:m,after:"]",...d.current()});m+=d.move(h+"]["),c();const g=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:m,after:"]",...d.current()});return c(),n.stack=g,o(),s==="full"||!h||h!==b?m+=d.move(b+"]"):s==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function QT(){return"["}function Qh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function WT(e){const t=Qh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function JT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function eN(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?JT(n):Qh(n);const d=e.ordered?c==="."?")":".":WT(n);let m=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(m=!0),$3(n)===c&&g){let b=-1;for(;++b<e.children.length;){const x=e.children[b];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=d),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),h}function tN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nN(e,t,n,a){const s=tN(n);let o=n.bulletCurrent||Qh(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const d=n.createTracker(a);d.move(o+" ".repeat(c-o.length)),d.shift(c);const m=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),g);return m(),h;function g(b,x,y){return x?(y?"":" ".repeat(c))+b:(y?o:o+" ".repeat(c-o.length))+b}}function rN(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const aN=Co(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iN(e,t,n,a){return(e.children.some(function(c){return aN(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function sN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}G3.peek=lN;function G3(e,t,n,a){const s=sN(n),o=n.enter("strong"),c=n.createTracker(a),d=c.move(s+s);let m=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=m.charCodeAt(0),g=vu(a.before.charCodeAt(a.before.length-1),h,s);g.inside&&(m=So(h)+m.slice(1));const b=m.charCodeAt(m.length-1),x=vu(a.after.charCodeAt(0),b,s);x.inside&&(m=m.slice(0,-1)+So(b));const y=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},d+m+y}function lN(e,t,n){return n.options.strong||"*"}function oN(e,t,n,a){return n.safe(e.value,a)}function cN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function uN(e,t,n){const a=($3(n)+(n.options.ruleSpaces?" ":"")).repeat(cN(n));return n.options.ruleSpaces?a.slice(0,-1):a}const K3={blockquote:DT,break:mv,code:UT,definition:HT,emphasis:L3,hardBreak:mv,heading:GT,html:z3,image:B3,imageReference:U3,inlineCode:q3,link:F3,linkReference:P3,list:eN,listItem:nN,paragraph:rN,root:iN,strong:G3,text:oN,thematicBreak:uN};function dN(){return{enter:{table:fN,tableData:hv,tableHeader:hv,tableRow:hN},exit:{codeText:pN,table:mN,tableData:jf,tableHeader:jf,tableRow:jf}}}function fN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function mN(e){this.exit(e),this.data.inTable=void 0}function hN(e){this.enter({type:"tableRow",children:[]},e)}function jf(e){this.exit(e)}function hv(e){this.enter({type:"tableCell",children:[]},e)}function pN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gN(e,t){return t==="|"?t:e}function bN(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
39
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:m,tableRow:d}};function c(y,S,E,M){return h(g(y,E,M),y.align)}function d(y,S,E,M){const C=b(y,E,M),R=h([C]);return R.slice(0,R.indexOf(`
40
- `))}function m(y,S,E,M){const C=E.enter("tableCell"),R=E.enter("phrasing"),A=E.containerPhrasing(y,{...M,before:o,after:o});return R(),C(),A}function h(y,S){return MT(y,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function g(y,S,E){const M=y.children;let C=-1;const R=[],A=S.enter("table");for(;++C<M.length;)R[C]=b(M[C],S,E);return A(),R}function b(y,S,E){const M=y.children;let C=-1;const R=[],A=S.enter("tableRow");for(;++C<M.length;)R[C]=m(M[C],y,S,E);return A(),R}function x(y,S,E){let M=K3.inlineCode(y,S,E);return E.stack.includes("tableCell")&&(M=M.replace(/\|/g,"\\$&")),M}}function vN(){return{exit:{taskListCheckValueChecked:pv,taskListCheckValueUnchecked:pv,paragraph:xN}}}function yN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wN}}}function pv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function xN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const d=s[o];if(d.type==="paragraph"){c=d;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function wN(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",d=n.createTracker(a);o&&d.move(c);let m=K3.listItem(e,t,n,{...a,...d.current()});return o&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(g){return g+c}}function SN(){return[tT(),ST(),NT(),dN(),vN()]}function kN(e){return{extensions:[nT(),kT(e),CT(),bN(e),yN()]}}const EN={tokenize:_N,partial:!0},V3={tokenize:IN,partial:!0},Y3={tokenize:MN,partial:!0},X3={tokenize:ON,partial:!0},TN={tokenize:DN,partial:!0},Z3={name:"wwwAutolink",tokenize:AN,previous:W3},Q3={name:"protocolAutolink",tokenize:RN,previous:J3},Fa={name:"emailAutolink",tokenize:CN,previous:e5},da={};function NN(){return{text:da}}let Wi=48;for(;Wi<123;)da[Wi]=Fa,Wi++,Wi===58?Wi=65:Wi===91&&(Wi=97);da[43]=Fa;da[45]=Fa;da[46]=Fa;da[95]=Fa;da[72]=[Fa,Q3];da[104]=[Fa,Q3];da[87]=[Fa,Z3];da[119]=[Fa,Z3];function CN(e,t,n){const a=this;let s,o;return c;function c(b){return!eh(b)||!e5.call(a,a.previous)||Wh(a.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(b))}function d(b){return eh(b)?(e.consume(b),d):b===64?(e.consume(b),m):n(b)}function m(b){return b===46?e.check(TN,g,h)(b):b===45||b===95||Jn(b)?(o=!0,e.consume(b),m):g(b)}function h(b){return e.consume(b),s=!0,m}function g(b){return o&&s&&lr(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function AN(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!W3.call(a,a.previous)||Wh(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(EN,e.attempt(V3,e.attempt(Y3,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function RN(e,t,n){const a=this;let s="",o=!1;return c;function c(b){return(b===72||b===104)&&J3.call(a,a.previous)&&!Wh(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),d):n(b)}function d(b){if(lr(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),d;if(b===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(b),m}return n(b)}function m(b){return b===47?(e.consume(b),o?h:(o=!0,m)):n(b)}function h(b){return b===null||pu(b)||Jt(b)||os(b)||Bu(b)?n(b):e.attempt(V3,e.attempt(Y3,g),n)(b)}function g(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function _N(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),o):n(c)}function o(c){return c===null?n(c):t(c)}}function IN(e,t,n){let a,s,o;return c;function c(h){return h===46||h===95?e.check(X3,m,d)(h):h===null||Jt(h)||os(h)||h!==45&&Bu(h)?m(h):(o=!0,e.consume(h),c)}function d(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function m(h){return s||a||!o?n(h):t(h)}}function MN(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(X3,t,o)(c):c===null||Jt(c)||os(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function ON(e,t,n){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),o):d===93?(e.consume(d),s):d===60||d===null||Jt(d)||os(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||Jt(d)||os(d)?t(d):a(d)}function o(d){return lr(d)?c(d):n(d)}function c(d){return d===59?(e.consume(d),a):lr(d)?(e.consume(d),c):n(d)}}function DN(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return Jn(o)?n(o):t(o)}}function W3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Jt(e)}function J3(e){return!lr(e)}function e5(e){return!(e===47||eh(e))}function eh(e){return e===43||e===45||e===46||e===95||Jn(e)}function Wh(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const jN={tokenize:PN,partial:!0};function LN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qN,continuation:{tokenize:HN},exit:FN}},text:{91:{name:"gfmFootnoteCall",tokenize:UN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zN,resolveTo:BN}}}}function zN(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const m=a.events[s][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return d;function d(m){if(!c||!c._balanced)return n(m);const h=na(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function BN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function UN(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return d;function d(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),m}function m(b){return b!==94?n(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(b){if(o>999||b===93&&!c||b===null||b===91||Jt(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(na(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return Jt(b)||(c=!0),o++,e.consume(b),b===92?g:h}function g(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}}function qN(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,d;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(c>999||S===93&&!d||S===null||S===91||Jt(S))return n(S);if(S===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=na(a.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Jt(S)||(d=!0),c++,e.consume(S),S===92?b:g}function b(S){return S===91||S===92||S===93?(e.consume(S),c++,g):g(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),yt(e,y,"gfmFootnoteDefinitionWhitespace")):n(S)}function y(S){return t(S)}}function HN(e,t,n){return e.check(No,t,e.attempt(jN,t,n))}function FN(e){e.exit("gfmFootnoteDefinition")}function PN(e,t,n){const a=this;return yt(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function $N(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,d){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let h=m;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[m][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[m][1].end)},b={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[m][1].start)},x=[["enter",g,d],["enter",c[h][1],d],["exit",c[h][1],d],["enter",b,d]],y=d.parser.constructs.insideSpan.null;y&&Dr(x,x.length,0,Uu(y,c.slice(h+1,m),d)),Dr(x,x.length,0,[["exit",b,d],["enter",c[m][1],d],["exit",c[m][1],d],["exit",g,d]]),Dr(c,h-1,m-h+3,x),m=h+x.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function o(c,d,m){const h=this.previous,g=this.events;let b=0;return x;function x(S){return h===126&&g[g.length-1][1].type!=="characterEscape"?m(S):(c.enter("strikethroughSequenceTemporary"),y(S))}function y(S){const E=el(h);if(S===126)return b>1?m(S):(c.consume(S),b++,y);if(b<2&&!n)return m(S);const M=c.exit("strikethroughSequenceTemporary"),C=el(S);return M._open=!C||C===2&&!!E,M._close=!E||E===2&&!!C,d(S)}}}class GN{constructor(){this.map=[]}add(t,n,a){KN(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const o of s)t.push(o);s=a.pop()}this.map.length=0}}function KN(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function VN(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function YN(){return{flow:{null:{name:"table",tokenize:XN,resolveAll:ZN}}}}function XN(e,t,n){const a=this;let s=0,o=0,c;return d;function d(q){let Z=a.events.length-1;for(;Z>-1;){const W=a.events[Z][1].type;if(W==="lineEnding"||W==="linePrefix")Z--;else break}const G=Z>-1?a.events[Z][1].type:null,le=G==="tableHead"||G==="tableRow"?D:m;return le===D&&a.parser.lazy[a.now().line]?n(q):le(q)}function m(q){return e.enter("tableHead"),e.enter("tableRow"),h(q)}function h(q){return q===124||(c=!0,o+=1),g(q)}function g(q){return q===null?n(q):Ye(q)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),y):n(q):Et(q)?yt(e,g,"whitespace")(q):(o+=1,c&&(c=!1,s+=1),q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),b(q)))}function b(q){return q===null||q===124||Jt(q)?(e.exit("data"),g(q)):(e.consume(q),q===92?x:b)}function x(q){return q===92||q===124?(e.consume(q),b):b(q)}function y(q){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(q):(e.enter("tableDelimiterRow"),c=!1,Et(q)?yt(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):S(q))}function S(q){return q===45||q===58?M(q):q===124?(c=!0,e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),E):F(q)}function E(q){return Et(q)?yt(e,M,"whitespace")(q):M(q)}function M(q){return q===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),C):q===45?(o+=1,C(q)):q===null||Ye(q)?H(q):F(q)}function C(q){return q===45?(e.enter("tableDelimiterFiller"),R(q)):F(q)}function R(q){return q===45?(e.consume(q),R):q===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(q))}function A(q){return Et(q)?yt(e,H,"whitespace")(q):H(q)}function H(q){return q===124?S(q):q===null||Ye(q)?!c||s!==o?F(q):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(q)):F(q)}function F(q){return n(q)}function D(q){return e.enter("tableRow"),$(q)}function $(q){return q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),$):q===null||Ye(q)?(e.exit("tableRow"),t(q)):Et(q)?yt(e,$,"whitespace")(q):(e.enter("data"),P(q))}function P(q){return q===null||q===124||Jt(q)?(e.exit("data"),$(q)):(e.consume(q),q===92?ee:P)}function ee(q){return q===92||q===124?(e.consume(q),P):P(q)}}function ZN(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,m=0,h,g,b;const x=new GN;for(;++n<e.length;){const y=e[n],S=y[1];y[0]==="enter"?S.type==="tableHead"?(d=!1,m!==0&&(gv(x,t,m,h,g),g=void 0,m=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(a=!0,b=void 0,o=[0,0,0,0],c=[0,n+1,0,0],d&&(d=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",g,t]])),s=S.type==="tableDelimiterRow"?2:g?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],b=Zc(x,t,o,s,void 0,b),o=[0,0,0,0]),c[2]=n)):S.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],b=Zc(x,t,o,s,void 0,b)),o=c,c=[o[1],n,0,0])):S.type==="tableHead"?(d=!0,m=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=n,o[1]!==0?(c[0]=c[1],b=Zc(x,t,o,s,n,b)):c[1]!==0&&(b=Zc(x,t,c,s,n,b)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=n)}for(m!==0&&gv(x,t,m,h,g),x.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=VN(t.events,n))}return e}function Zc(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},Xs(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const m=Xs(t.events,n[1]);if(o={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Xs(t.events,n[2]),g=Xs(t.events,n[3]),b={type:d,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",b,t]]),a!==2){const x=t.events[n[2]],y=t.events[n[3]];if(x[1].end=Object.assign({},y[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,E=n[3]-n[2]-1;e.add(S,E,[])}}e.add(n[3]+1,0,[["exit",b,t]])}return s!==void 0&&(o.end=Object.assign({},Xs(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function gv(e,t,n,a,s){const o=[],c=Xs(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function Xs(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const QN={name:"tasklistCheck",tokenize:JN};function WN(){return{text:{91:QN}}}function JN(e,t,n){const a=this;return s;function s(m){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),o)}function o(m){return Jt(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):n(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(m)}function d(m){return Ye(m)?t(m):Et(m)?e.check({tokenize:eC},t,n)(m):n(m)}}function eC(e,t,n){return yt(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function tC(e){return c3([NN(),LN(),$N(e),YN(),WN()])}const nC={};function rC(e){const t=this,n=e||nC,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(tC(n)),o.push(SN()),c.push(kN(n))}function aC(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:s,mathFlowFence:a,mathFlowFenceMeta:n,mathFlowValue:d,mathText:c,mathTextData:d}};function e(m){const h={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[h]}},m)}function t(){this.buffer()}function n(){const m=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=m}function a(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(m){const h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),g=this.stack[this.stack.length-1];g.type,this.exit(m),g.value=h;const b=g.data.hChildren[0];b.type,b.tagName,b.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function o(m){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},m),this.buffer()}function c(m){const h=this.resume(),g=this.stack[this.stack.length-1];g.type,this.exit(m),g.value=h,g.data.hChildren.push({type:"text",value:h})}function d(m){this.config.enter.data.call(this,m),this.config.exit.data.call(this,m)}}function iC(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),a.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
41
- `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:a}};function n(o,c,d,m){const h=o.value||"",g=d.createTracker(m),b="$".repeat(Math.max(j3(h,"$")+1,2)),x=d.enter("mathFlow");let y=g.move(b);if(o.meta){const S=d.enter("mathFlowMeta");y+=g.move(d.safe(o.meta,{after:`
42
- `,before:y,encode:["$"],...g.current()})),S()}return y+=g.move(`
43
- `),h&&(y+=g.move(h+`
44
- `)),y+=g.move(b),x(),y}function a(o,c,d){let m=o.value||"",h=1;for(t||h++;new RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(m);)h++;const g="$".repeat(h);/[^ \r\n]/.test(m)&&(/^[ \r\n]/.test(m)&&/[ \r\n]$/.test(m)||/^\$|\$$/.test(m))&&(m=" "+m+" ");let b=-1;for(;++b<d.unsafe.length;){const x=d.unsafe[b];if(!x.atBreak)continue;const y=d.compilePattern(x);let S;for(;S=y.exec(m);){let E=S.index;m.codePointAt(E)===10&&m.codePointAt(E-1)===13&&E--,m=m.slice(0,E)+" "+m.slice(S.index+1)}}return g+m+g}function s(){return"$"}}const sC={tokenize:lC,concrete:!0,name:"mathFlow"},bv={tokenize:oC,partial:!0};function lC(e,t,n){const a=this,s=a.events[a.events.length-1],o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let c=0;return d;function d(R){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),m(R)}function m(R){return R===36?(e.consume(R),c++,m):c<2?n(R):(e.exit("mathFlowFenceSequence"),yt(e,h,"whitespace")(R))}function h(R){return R===null||Ye(R)?b(R):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(R))}function g(R){return R===null||Ye(R)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),b(R)):R===36?n(R):(e.consume(R),g)}function b(R){return e.exit("mathFlowFence"),a.interrupt?t(R):e.attempt(bv,x,M)(R)}function x(R){return e.attempt({tokenize:C,partial:!0},M,y)(R)}function y(R){return(o?yt(e,S,"linePrefix",o+1):S)(R)}function S(R){return R===null?M(R):Ye(R)?e.attempt(bv,x,M)(R):(e.enter("mathFlowValue"),E(R))}function E(R){return R===null||Ye(R)?(e.exit("mathFlowValue"),S(R)):(e.consume(R),E)}function M(R){return e.exit("mathFlow"),t(R)}function C(R,A,H){let F=0;return yt(R,D,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function D(ee){return R.enter("mathFlowFence"),R.enter("mathFlowFenceSequence"),$(ee)}function $(ee){return ee===36?(F++,R.consume(ee),$):F<c?H(ee):(R.exit("mathFlowFenceSequence"),yt(R,P,"whitespace")(ee))}function P(ee){return ee===null||Ye(ee)?(R.exit("mathFlowFence"),A(ee)):H(ee)}}}function oC(e,t,n){const a=this;return s;function s(c){return c===null?t(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function cC(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:uC,previous:dC,name:"mathText"};function a(s,o,c){let d=0,m,h;return g;function g(E){return s.enter("mathText"),s.enter("mathTextSequence"),b(E)}function b(E){return E===36?(s.consume(E),d++,b):d<2&&!n?c(E):(s.exit("mathTextSequence"),x(E))}function x(E){return E===null?c(E):E===36?(h=s.enter("mathTextSequence"),m=0,S(E)):E===32?(s.enter("space"),s.consume(E),s.exit("space"),x):Ye(E)?(s.enter("lineEnding"),s.consume(E),s.exit("lineEnding"),x):(s.enter("mathTextData"),y(E))}function y(E){return E===null||E===32||E===36||Ye(E)?(s.exit("mathTextData"),x(E)):(s.consume(E),y)}function S(E){return E===36?(s.consume(E),m++,S):m===d?(s.exit("mathTextSequence"),s.exit("mathText"),o(E)):(h.type="mathTextData",y(E))}}}function uC(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="mathTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function dC(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function fC(e){return{flow:{36:sC},text:{36:cC(e)}}}class Ae extends Error{constructor(t,n){var a="KaTeX parse error: "+t,s,o,c=n&&n.loc;if(c&&c.start<=c.end){var d=c.lexer.input;s=c.start,o=c.end,s===d.length?a+=" at end of input: ":a+=" at position "+(s+1)+": ";var m=d.slice(s,o).replace(/[^]/g,"$&̲"),h;s>15?h="…"+d.slice(s-15,s):h=d.slice(0,s);var g;o+15<d.length?g=d.slice(o,o+15)+"…":g=d.slice(o),a+=h+m+g}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Ae.prototype),this.position=s,s!=null&&o!=null&&(this.length=o-s),this.rawMessage=t}}var mC=/([A-Z])/g,hC=e=>e.replace(mC,"-$1").toLowerCase(),pC={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},gC=/[&><"']/g,er=e=>String(e).replace(gC,t=>pC[t]),ou=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?ou(e.body[0]):e:e.type==="font"?ou(e.body):e,bC=new Set(["mathord","textord","atom"]),Pa=e=>bC.has(ou(e).type),vC=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},yu={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:e=>"#"+e},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:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <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:e=>Math.max(0,e),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:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function yC(e){if(typeof e!="string")return e.enum[0];switch(e){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 xC(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return yC(t)}function wC(e,t,n,a){var s=n[t];e[t]=s!==void 0?a.processor?a.processor(s):s:xC(a)}class Jh{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n of Object.keys(yu)){var a=yu[n];a&&wC(this,n,t,a)}}reportNonstrict(t,n,a){var s=this.strict;if(typeof s=="function"&&(s=s(t,n,a)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Ae("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),a);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,a){var s=this.strict;if(typeof s=="function")try{s=s(t,n,a)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=vC(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}class wi{constructor(t,n,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=a}sup(){return ca[SC[this.id]]}sub(){return ca[kC[this.id]]}fracNum(){return ca[EC[this.id]]}fracDen(){return ca[TC[this.id]]}cramp(){return ca[NC[this.id]]}text(){return ca[CC[this.id]]}isTight(){return this.size>=2}}var ep=0,xu=1,Qs=2,qa=3,ko=4,Xr=5,tl=6,or=7,ca=[new wi(ep,0,!1),new wi(xu,0,!0),new wi(Qs,1,!1),new wi(qa,1,!0),new wi(ko,2,!1),new wi(Xr,2,!0),new wi(tl,3,!1),new wi(or,3,!0)],SC=[ko,Xr,ko,Xr,tl,or,tl,or],kC=[Xr,Xr,Xr,Xr,or,or,or,or],EC=[Qs,qa,ko,Xr,tl,or,tl,or],TC=[qa,qa,Xr,Xr,or,or,or,or],NC=[xu,xu,qa,qa,Xr,Xr,or,or],CC=[ep,xu,Qs,qa,Qs,qa,Qs,qa],ct={DISPLAY:ca[ep],TEXT:ca[Qs],SCRIPT:ca[ko],SCRIPTSCRIPT:ca[tl]},th=[{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 AC(e){for(var t=0;t<th.length;t++)for(var n=th[t],a=0;a<n.blocks.length;a++){var s=n.blocks[a];if(e>=s[0]&&e<=s[1])return n.name}return null}var cu=[];th.forEach(e=>e.blocks.forEach(t=>cu.push(...t)));function t5(e){for(var t=0;t<cu.length;t+=2)if(e>=cu[t]&&e<=cu[t+1])return!0;return!1}var Un=e=>e+" "+e,Vs=80,RC=function(t,n){return"M95,"+(622+t+n)+`
45
- c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
46
- c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
47
- 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
48
- s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
49
- c69,-144,104.5,-217.7,106.5,-221
50
- l`+t/2.075+" -"+t+`
51
- c5.3,-9.3,12,-14,20,-14
52
- H400000v`+(40+t)+`H845.2724
53
- s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
54
- c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
55
- M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},_C=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
56
- c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
57
- c340,-704.7,510.7,-1060.3,512,-1067
58
- l`+t/2.084+" -"+t+`
59
- c4.7,-7.3,11,-11,19,-11
60
- H40000v`+(40+t)+`H1012.3
61
- s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
62
- 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
63
- s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
64
- c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
65
- M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},IC=function(t,n){return"M983 "+(10+t+n)+`
66
- l`+t/3.13+" -"+t+`
67
- c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
68
- 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
69
- 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
70
- c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
71
- c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
72
- c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
73
- c53.7,-170.3,84.5,-266.8,92.5,-289.5z
74
- M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},MC=function(t,n){return"M424,"+(2398+t+n)+`
75
- c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
76
- 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
77
- s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
78
- s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
79
- l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
80
- v`+(40+t)+`H1014.6
81
- s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
82
- c-2,6,-10,9,-24,9
83
- c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
84
- h400000v`+(40+t)+"h-400000z"},OC=function(t,n){return"M473,"+(2713+t+n)+`
85
- c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
86
- c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
87
- s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
88
- 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
89
- 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
90
- s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
91
- 606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},DC=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},jC=function(t,n,a){var s=a-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
92
- H742v`+s+`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
93
- h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
94
- c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
95
- 219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},LC=function(t,n,a){n=1e3*n;var s="";switch(t){case"sqrtMain":s=RC(n,Vs);break;case"sqrtSize1":s=_C(n,Vs);break;case"sqrtSize2":s=IC(n,Vs);break;case"sqrtSize3":s=MC(n,Vs);break;case"sqrtSize4":s=OC(n,Vs);break;case"sqrtTall":s=jC(n,Vs,a)}return s},zC=function(t,n){switch(t){case"⎜":return Un("M291 0 H417 V"+n+" H291z");case"∣":return Un("M145 0 H188 V"+n+" H145z");case"∥":return Un("M145 0 H188 V"+n+" H145z")+Un("M367 0 H410 V"+n+" H367z");case"⎟":return Un("M457 0 H583 V"+n+" H457z");case"⎢":return Un("M319 0 H403 V"+n+" H319z");case"⎥":return Un("M263 0 H347 V"+n+" H263z");case"⎪":return Un("M384 0 H504 V"+n+" H384z");case"⏐":return Un("M312 0 H355 V"+n+" H312z");case"‖":return Un("M257 0 H300 V"+n+" H257z")+Un("M478 0 H521 V"+n+" H478z");default:return""}},vv={doubleleftarrow:`M262 157
96
- 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
97
- 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
98
- 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
99
- 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
100
- 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
101
- -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
102
- -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
103
- m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
104
- -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
105
- 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
106
- -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
107
- -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
108
- -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
109
- 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
110
- -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
111
- 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
112
- -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
113
- 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
114
- 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
115
- 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
116
- l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
117
- -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
118
- 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
119
- 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
120
- 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
121
- -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
122
- 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
123
- 435 0h399565z`,leftgroupunder:`M400000 262
124
- 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
125
- 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
126
- -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
127
- -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
128
- -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
129
- 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
130
- -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
131
- -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
132
- m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
133
- 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
134
- 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
135
- -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
136
- 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
137
- -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
138
- 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
139
- -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
140
- -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
141
- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Un("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Un("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Un("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Un("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
142
- -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
143
- 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
144
- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Un("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
145
- 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
146
- -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
147
- 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
148
- 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
149
- 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
150
- 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
151
- 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
152
- -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
153
- -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
154
- 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
155
- 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
156
- -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
157
- m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
158
- 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
159
- -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
160
- 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
161
- 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
162
- -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
163
- m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
164
- 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
165
- -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
166
- 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
167
- 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
168
- -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
169
- -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
170
- 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
171
- -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
172
- 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
173
- 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
174
- 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
175
- -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
176
- 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
177
- 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
178
- -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
179
- -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
180
- 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
181
- -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
182
- 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
183
- 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
184
- 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
185
- -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
186
- -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
187
- 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
188
- 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
189
- -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
190
- 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
191
- 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
192
- -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
193
- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Un("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Un("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Un("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
194
- 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
195
- -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
196
- -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
197
- 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
198
- -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
199
- -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
200
- -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
201
- 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
202
- 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
203
- 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
204
- 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
205
- -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
206
- 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
207
- -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
208
- 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
209
- 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
210
- -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
211
- -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
212
- 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
213
- 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
214
- 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
215
- -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
216
- 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
217
- 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
218
- -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
219
- -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
220
- 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
221
- 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
222
- -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
223
- 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
224
- 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
225
- -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
226
- -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
227
- H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
228
- 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
229
- 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
230
- -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
231
- -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
232
- -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,
233
- -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,
234
- -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,
235
- -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,
236
- -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
237
- c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
238
- 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
239
- 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
240
- 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
241
- 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
242
- c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
243
- M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
244
- -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
245
- 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
246
- -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
247
- -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
248
- -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
249
- 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
250
- c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
251
- 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
252
- c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
253
- c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
254
- M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
255
- 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,
256
- -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
257
- 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
258
- 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
259
- 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,
260
- 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,
261
- -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
262
- 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
263
- 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,
264
- -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
265
- 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
266
- M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},BC=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
267
- H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
268
- M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
269
- c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
270
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
271
- c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
272
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
273
- M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
274
- c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
275
- c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
276
- MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
277
- MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
278
- M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
279
- M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
280
- 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,
281
- -36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
282
- 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
283
- 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,
284
- -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
285
- l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
286
- -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,
287
- 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
288
- c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
289
- 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
290
- 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
291
- 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
292
- c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
293
- l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
294
- -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 UC(e){return"toText"in e}class ll{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){return this.children.map(t=>{if(UC(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var nh={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},qC={ex:!0,em:!0,mu:!0},n5=function(t){return typeof t!="string"&&(t=t.unit),t in nh||t in qC||t==="ex"},fn=function(t,n){var a;if(t.unit in nh)a=nh[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")a=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight()?s=n.havingStyle(n.style.text()):s=n,t.unit==="ex")a=s.fontMetrics().xHeight;else if(t.unit==="em")a=s.fontMetrics().quad;else throw new Ae("Invalid unit: '"+t.unit+"'");s!==n&&(a*=s.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*a,n.maxSize)},Me=function(t){return+t.toFixed(4)+"em"},Ni=function(t){return t.filter(n=>n).join(" ")},tp=function(t){var n="";for(var a of Object.keys(t)){var s=t[a];s!==void 0&&(n+=hC(a)+":"+s+";")}return n},r5=function(t,n,a){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},n){n.style.isTight()&&this.classes.push("mtight");var s=n.getColor();s&&(this.style.color=s)}},a5=function(t){var n=document.createElement(t);n.className=Ni(this.classes),Object.assign(n.style,this.style);for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},HC=/[\s"'>/=\x00-\x1f]/,i5=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+er(Ni(this.classes))+'"');var a=tp(this.style);a&&(n+=' style="'+er(a)+'"');for(var s of Object.keys(this.attributes)){if(HC.test(s))throw new Ae("Invalid attribute name '"+s+"'");n+=" "+s+'="'+er(this.attributes[s])+'"'}n+=">";for(var o=0;o<this.children.length;o++)n+=this.children[o].toMarkup();return n+="</"+t+">",n};class ol{constructor(t,n,a,s){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,r5.call(this,t,a,s),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return a5.call(this,"span")}toMarkup(){return i5.call(this,"span")}}class Fu{constructor(t,n,a,s){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,r5.call(this,n,s),this.children=a||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return a5.call(this,"a")}toMarkup(){return i5.call(this,"a")}}class FC{constructor(t,n,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=a}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+er(this.src)+'"'+(' alt="'+er(this.alt)+'"'),n=tp(this.style);return n&&(t+=' style="'+er(n)+'"'),t+="'/>",t}}var PC={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Lr{constructor(t,n,a,s,o,c,d,m){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=t,this.height=n||0,this.depth=a||0,this.italic=s||0,this.skew=o||0,this.width=c||0,this.classes=d||[],this.style=m||{},this.maxFontSize=0;var h=AC(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=PC[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=Me(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Ni(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=er(Ni(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+Me(this.italic)+";"),a+=tp(this.style),a&&(t=!0,n+=' style="'+er(a)+'"');var s=er(this.text);return t?(n+=">",n+=s,n+="</span>",n):s}}class Ha{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+er(this.attributes[n])+'"';t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</svg>",t}}class Ci{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",vv[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+er(this.alternate)+'"/>':'<path d="'+er(vv[this.pathName])+'"/>'}}class rh{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+er(this.attributes[n])+'"';return t+="/>",t}}function $C(e){if(e instanceof Lr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function GC(e){if(e instanceof ol)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var KC=e=>e instanceof ol||e instanceof Fu||e instanceof ll,ua={"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]}},Qc={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]},yv={Å:"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 s5(e,t){ua[e]=t}function np(e,t,n){if(!ua[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),s=ua[t][a];if(!s&&e[0]in yv&&(a=yv[e[0]].charCodeAt(0),s=ua[t][a]),!s&&n==="text"&&t5(a)&&(s=ua[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Lf={};function VC(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Lf[t]){var n=Lf[t]={cssEmPerMu:Qc.quad[t]/18};for(var a in Qc)Qc.hasOwnProperty(a)&&(n[a]=Qc[a][t])}return Lf[t]}var ln={math:{},text:{}};function w(e,t,n,a,s,o){ln[e][s]={font:t,group:n,replace:a},o&&a&&(ln[e][a]=ln[e][s])}var k="math",Te="text",I="main",K="ams",on="accent-token",qe="bin",cr="close",cl="inner",tt="mathord",jn="op-token",zr="open",Ro="punct",X="rel",$a="spacing",re="textord";w(k,I,X,"≡","\\equiv",!0);w(k,I,X,"≺","\\prec",!0);w(k,I,X,"≻","\\succ",!0);w(k,I,X,"∼","\\sim",!0);w(k,I,X,"⊥","\\perp");w(k,I,X,"⪯","\\preceq",!0);w(k,I,X,"⪰","\\succeq",!0);w(k,I,X,"≃","\\simeq",!0);w(k,I,X,"∣","\\mid",!0);w(k,I,X,"≪","\\ll",!0);w(k,I,X,"≫","\\gg",!0);w(k,I,X,"≍","\\asymp",!0);w(k,I,X,"∥","\\parallel");w(k,I,X,"⋈","\\bowtie",!0);w(k,I,X,"⌣","\\smile",!0);w(k,I,X,"⊑","\\sqsubseteq",!0);w(k,I,X,"⊒","\\sqsupseteq",!0);w(k,I,X,"≐","\\doteq",!0);w(k,I,X,"⌢","\\frown",!0);w(k,I,X,"∋","\\ni",!0);w(k,I,X,"∝","\\propto",!0);w(k,I,X,"⊢","\\vdash",!0);w(k,I,X,"⊣","\\dashv",!0);w(k,I,X,"∋","\\owns");w(k,I,Ro,".","\\ldotp");w(k,I,Ro,"⋅","\\cdotp");w(k,I,Ro,"⋅","·");w(Te,I,re,"⋅","·");w(k,I,re,"#","\\#");w(Te,I,re,"#","\\#");w(k,I,re,"&","\\&");w(Te,I,re,"&","\\&");w(k,I,re,"ℵ","\\aleph",!0);w(k,I,re,"∀","\\forall",!0);w(k,I,re,"ℏ","\\hbar",!0);w(k,I,re,"∃","\\exists",!0);w(k,I,re,"∇","\\nabla",!0);w(k,I,re,"♭","\\flat",!0);w(k,I,re,"ℓ","\\ell",!0);w(k,I,re,"♮","\\natural",!0);w(k,I,re,"♣","\\clubsuit",!0);w(k,I,re,"℘","\\wp",!0);w(k,I,re,"♯","\\sharp",!0);w(k,I,re,"♢","\\diamondsuit",!0);w(k,I,re,"ℜ","\\Re",!0);w(k,I,re,"♡","\\heartsuit",!0);w(k,I,re,"ℑ","\\Im",!0);w(k,I,re,"♠","\\spadesuit",!0);w(k,I,re,"§","\\S",!0);w(Te,I,re,"§","\\S");w(k,I,re,"¶","\\P",!0);w(Te,I,re,"¶","\\P");w(k,I,re,"†","\\dag");w(Te,I,re,"†","\\dag");w(Te,I,re,"†","\\textdagger");w(k,I,re,"‡","\\ddag");w(Te,I,re,"‡","\\ddag");w(Te,I,re,"‡","\\textdaggerdbl");w(k,I,cr,"⎱","\\rmoustache",!0);w(k,I,zr,"⎰","\\lmoustache",!0);w(k,I,cr,"⟯","\\rgroup",!0);w(k,I,zr,"⟮","\\lgroup",!0);w(k,I,qe,"∓","\\mp",!0);w(k,I,qe,"⊖","\\ominus",!0);w(k,I,qe,"⊎","\\uplus",!0);w(k,I,qe,"⊓","\\sqcap",!0);w(k,I,qe,"∗","\\ast");w(k,I,qe,"⊔","\\sqcup",!0);w(k,I,qe,"◯","\\bigcirc",!0);w(k,I,qe,"∙","\\bullet",!0);w(k,I,qe,"‡","\\ddagger");w(k,I,qe,"≀","\\wr",!0);w(k,I,qe,"⨿","\\amalg");w(k,I,qe,"&","\\And");w(k,I,X,"⟵","\\longleftarrow",!0);w(k,I,X,"⇐","\\Leftarrow",!0);w(k,I,X,"⟸","\\Longleftarrow",!0);w(k,I,X,"⟶","\\longrightarrow",!0);w(k,I,X,"⇒","\\Rightarrow",!0);w(k,I,X,"⟹","\\Longrightarrow",!0);w(k,I,X,"↔","\\leftrightarrow",!0);w(k,I,X,"⟷","\\longleftrightarrow",!0);w(k,I,X,"⇔","\\Leftrightarrow",!0);w(k,I,X,"⟺","\\Longleftrightarrow",!0);w(k,I,X,"↦","\\mapsto",!0);w(k,I,X,"⟼","\\longmapsto",!0);w(k,I,X,"↗","\\nearrow",!0);w(k,I,X,"↩","\\hookleftarrow",!0);w(k,I,X,"↪","\\hookrightarrow",!0);w(k,I,X,"↘","\\searrow",!0);w(k,I,X,"↼","\\leftharpoonup",!0);w(k,I,X,"⇀","\\rightharpoonup",!0);w(k,I,X,"↙","\\swarrow",!0);w(k,I,X,"↽","\\leftharpoondown",!0);w(k,I,X,"⇁","\\rightharpoondown",!0);w(k,I,X,"↖","\\nwarrow",!0);w(k,I,X,"⇌","\\rightleftharpoons",!0);w(k,K,X,"≮","\\nless",!0);w(k,K,X,"","\\@nleqslant");w(k,K,X,"","\\@nleqq");w(k,K,X,"⪇","\\lneq",!0);w(k,K,X,"≨","\\lneqq",!0);w(k,K,X,"","\\@lvertneqq");w(k,K,X,"⋦","\\lnsim",!0);w(k,K,X,"⪉","\\lnapprox",!0);w(k,K,X,"⊀","\\nprec",!0);w(k,K,X,"⋠","\\npreceq",!0);w(k,K,X,"⋨","\\precnsim",!0);w(k,K,X,"⪹","\\precnapprox",!0);w(k,K,X,"≁","\\nsim",!0);w(k,K,X,"","\\@nshortmid");w(k,K,X,"∤","\\nmid",!0);w(k,K,X,"⊬","\\nvdash",!0);w(k,K,X,"⊭","\\nvDash",!0);w(k,K,X,"⋪","\\ntriangleleft");w(k,K,X,"⋬","\\ntrianglelefteq",!0);w(k,K,X,"⊊","\\subsetneq",!0);w(k,K,X,"","\\@varsubsetneq");w(k,K,X,"⫋","\\subsetneqq",!0);w(k,K,X,"","\\@varsubsetneqq");w(k,K,X,"≯","\\ngtr",!0);w(k,K,X,"","\\@ngeqslant");w(k,K,X,"","\\@ngeqq");w(k,K,X,"⪈","\\gneq",!0);w(k,K,X,"≩","\\gneqq",!0);w(k,K,X,"","\\@gvertneqq");w(k,K,X,"⋧","\\gnsim",!0);w(k,K,X,"⪊","\\gnapprox",!0);w(k,K,X,"⊁","\\nsucc",!0);w(k,K,X,"⋡","\\nsucceq",!0);w(k,K,X,"⋩","\\succnsim",!0);w(k,K,X,"⪺","\\succnapprox",!0);w(k,K,X,"≆","\\ncong",!0);w(k,K,X,"","\\@nshortparallel");w(k,K,X,"∦","\\nparallel",!0);w(k,K,X,"⊯","\\nVDash",!0);w(k,K,X,"⋫","\\ntriangleright");w(k,K,X,"⋭","\\ntrianglerighteq",!0);w(k,K,X,"","\\@nsupseteqq");w(k,K,X,"⊋","\\supsetneq",!0);w(k,K,X,"","\\@varsupsetneq");w(k,K,X,"⫌","\\supsetneqq",!0);w(k,K,X,"","\\@varsupsetneqq");w(k,K,X,"⊮","\\nVdash",!0);w(k,K,X,"⪵","\\precneqq",!0);w(k,K,X,"⪶","\\succneqq",!0);w(k,K,X,"","\\@nsubseteqq");w(k,K,qe,"⊴","\\unlhd");w(k,K,qe,"⊵","\\unrhd");w(k,K,X,"↚","\\nleftarrow",!0);w(k,K,X,"↛","\\nrightarrow",!0);w(k,K,X,"⇍","\\nLeftarrow",!0);w(k,K,X,"⇏","\\nRightarrow",!0);w(k,K,X,"↮","\\nleftrightarrow",!0);w(k,K,X,"⇎","\\nLeftrightarrow",!0);w(k,K,X,"△","\\vartriangle");w(k,K,re,"ℏ","\\hslash");w(k,K,re,"▽","\\triangledown");w(k,K,re,"◊","\\lozenge");w(k,K,re,"Ⓢ","\\circledS");w(k,K,re,"®","\\circledR");w(Te,K,re,"®","\\circledR");w(k,K,re,"∡","\\measuredangle",!0);w(k,K,re,"∄","\\nexists");w(k,K,re,"℧","\\mho");w(k,K,re,"Ⅎ","\\Finv",!0);w(k,K,re,"⅁","\\Game",!0);w(k,K,re,"‵","\\backprime");w(k,K,re,"▲","\\blacktriangle");w(k,K,re,"▼","\\blacktriangledown");w(k,K,re,"■","\\blacksquare");w(k,K,re,"⧫","\\blacklozenge");w(k,K,re,"★","\\bigstar");w(k,K,re,"∢","\\sphericalangle",!0);w(k,K,re,"∁","\\complement",!0);w(k,K,re,"ð","\\eth",!0);w(Te,I,re,"ð","ð");w(k,K,re,"╱","\\diagup");w(k,K,re,"╲","\\diagdown");w(k,K,re,"□","\\square");w(k,K,re,"□","\\Box");w(k,K,re,"◊","\\Diamond");w(k,K,re,"¥","\\yen",!0);w(Te,K,re,"¥","\\yen",!0);w(k,K,re,"✓","\\checkmark",!0);w(Te,K,re,"✓","\\checkmark");w(k,K,re,"ℶ","\\beth",!0);w(k,K,re,"ℸ","\\daleth",!0);w(k,K,re,"ℷ","\\gimel",!0);w(k,K,re,"ϝ","\\digamma",!0);w(k,K,re,"ϰ","\\varkappa");w(k,K,zr,"┌","\\@ulcorner",!0);w(k,K,cr,"┐","\\@urcorner",!0);w(k,K,zr,"└","\\@llcorner",!0);w(k,K,cr,"┘","\\@lrcorner",!0);w(k,K,X,"≦","\\leqq",!0);w(k,K,X,"⩽","\\leqslant",!0);w(k,K,X,"⪕","\\eqslantless",!0);w(k,K,X,"≲","\\lesssim",!0);w(k,K,X,"⪅","\\lessapprox",!0);w(k,K,X,"≊","\\approxeq",!0);w(k,K,qe,"⋖","\\lessdot");w(k,K,X,"⋘","\\lll",!0);w(k,K,X,"≶","\\lessgtr",!0);w(k,K,X,"⋚","\\lesseqgtr",!0);w(k,K,X,"⪋","\\lesseqqgtr",!0);w(k,K,X,"≑","\\doteqdot");w(k,K,X,"≓","\\risingdotseq",!0);w(k,K,X,"≒","\\fallingdotseq",!0);w(k,K,X,"∽","\\backsim",!0);w(k,K,X,"⋍","\\backsimeq",!0);w(k,K,X,"⫅","\\subseteqq",!0);w(k,K,X,"⋐","\\Subset",!0);w(k,K,X,"⊏","\\sqsubset",!0);w(k,K,X,"≼","\\preccurlyeq",!0);w(k,K,X,"⋞","\\curlyeqprec",!0);w(k,K,X,"≾","\\precsim",!0);w(k,K,X,"⪷","\\precapprox",!0);w(k,K,X,"⊲","\\vartriangleleft");w(k,K,X,"⊴","\\trianglelefteq");w(k,K,X,"⊨","\\vDash",!0);w(k,K,X,"⊪","\\Vvdash",!0);w(k,K,X,"⌣","\\smallsmile");w(k,K,X,"⌢","\\smallfrown");w(k,K,X,"≏","\\bumpeq",!0);w(k,K,X,"≎","\\Bumpeq",!0);w(k,K,X,"≧","\\geqq",!0);w(k,K,X,"⩾","\\geqslant",!0);w(k,K,X,"⪖","\\eqslantgtr",!0);w(k,K,X,"≳","\\gtrsim",!0);w(k,K,X,"⪆","\\gtrapprox",!0);w(k,K,qe,"⋗","\\gtrdot");w(k,K,X,"⋙","\\ggg",!0);w(k,K,X,"≷","\\gtrless",!0);w(k,K,X,"⋛","\\gtreqless",!0);w(k,K,X,"⪌","\\gtreqqless",!0);w(k,K,X,"≖","\\eqcirc",!0);w(k,K,X,"≗","\\circeq",!0);w(k,K,X,"≜","\\triangleq",!0);w(k,K,X,"∼","\\thicksim");w(k,K,X,"≈","\\thickapprox");w(k,K,X,"⫆","\\supseteqq",!0);w(k,K,X,"⋑","\\Supset",!0);w(k,K,X,"⊐","\\sqsupset",!0);w(k,K,X,"≽","\\succcurlyeq",!0);w(k,K,X,"⋟","\\curlyeqsucc",!0);w(k,K,X,"≿","\\succsim",!0);w(k,K,X,"⪸","\\succapprox",!0);w(k,K,X,"⊳","\\vartriangleright");w(k,K,X,"⊵","\\trianglerighteq");w(k,K,X,"⊩","\\Vdash",!0);w(k,K,X,"∣","\\shortmid");w(k,K,X,"∥","\\shortparallel");w(k,K,X,"≬","\\between",!0);w(k,K,X,"⋔","\\pitchfork",!0);w(k,K,X,"∝","\\varpropto");w(k,K,X,"◀","\\blacktriangleleft");w(k,K,X,"∴","\\therefore",!0);w(k,K,X,"∍","\\backepsilon");w(k,K,X,"▶","\\blacktriangleright");w(k,K,X,"∵","\\because",!0);w(k,K,X,"⋘","\\llless");w(k,K,X,"⋙","\\gggtr");w(k,K,qe,"⊲","\\lhd");w(k,K,qe,"⊳","\\rhd");w(k,K,X,"≂","\\eqsim",!0);w(k,I,X,"⋈","\\Join");w(k,K,X,"≑","\\Doteq",!0);w(k,K,qe,"∔","\\dotplus",!0);w(k,K,qe,"∖","\\smallsetminus");w(k,K,qe,"⋒","\\Cap",!0);w(k,K,qe,"⋓","\\Cup",!0);w(k,K,qe,"⩞","\\doublebarwedge",!0);w(k,K,qe,"⊟","\\boxminus",!0);w(k,K,qe,"⊞","\\boxplus",!0);w(k,K,qe,"⋇","\\divideontimes",!0);w(k,K,qe,"⋉","\\ltimes",!0);w(k,K,qe,"⋊","\\rtimes",!0);w(k,K,qe,"⋋","\\leftthreetimes",!0);w(k,K,qe,"⋌","\\rightthreetimes",!0);w(k,K,qe,"⋏","\\curlywedge",!0);w(k,K,qe,"⋎","\\curlyvee",!0);w(k,K,qe,"⊝","\\circleddash",!0);w(k,K,qe,"⊛","\\circledast",!0);w(k,K,qe,"⋅","\\centerdot");w(k,K,qe,"⊺","\\intercal",!0);w(k,K,qe,"⋒","\\doublecap");w(k,K,qe,"⋓","\\doublecup");w(k,K,qe,"⊠","\\boxtimes",!0);w(k,K,X,"⇢","\\dashrightarrow",!0);w(k,K,X,"⇠","\\dashleftarrow",!0);w(k,K,X,"⇇","\\leftleftarrows",!0);w(k,K,X,"⇆","\\leftrightarrows",!0);w(k,K,X,"⇚","\\Lleftarrow",!0);w(k,K,X,"↞","\\twoheadleftarrow",!0);w(k,K,X,"↢","\\leftarrowtail",!0);w(k,K,X,"↫","\\looparrowleft",!0);w(k,K,X,"⇋","\\leftrightharpoons",!0);w(k,K,X,"↶","\\curvearrowleft",!0);w(k,K,X,"↺","\\circlearrowleft",!0);w(k,K,X,"↰","\\Lsh",!0);w(k,K,X,"⇈","\\upuparrows",!0);w(k,K,X,"↿","\\upharpoonleft",!0);w(k,K,X,"⇃","\\downharpoonleft",!0);w(k,I,X,"⊶","\\origof",!0);w(k,I,X,"⊷","\\imageof",!0);w(k,K,X,"⊸","\\multimap",!0);w(k,K,X,"↭","\\leftrightsquigarrow",!0);w(k,K,X,"⇉","\\rightrightarrows",!0);w(k,K,X,"⇄","\\rightleftarrows",!0);w(k,K,X,"↠","\\twoheadrightarrow",!0);w(k,K,X,"↣","\\rightarrowtail",!0);w(k,K,X,"↬","\\looparrowright",!0);w(k,K,X,"↷","\\curvearrowright",!0);w(k,K,X,"↻","\\circlearrowright",!0);w(k,K,X,"↱","\\Rsh",!0);w(k,K,X,"⇊","\\downdownarrows",!0);w(k,K,X,"↾","\\upharpoonright",!0);w(k,K,X,"⇂","\\downharpoonright",!0);w(k,K,X,"⇝","\\rightsquigarrow",!0);w(k,K,X,"⇝","\\leadsto");w(k,K,X,"⇛","\\Rrightarrow",!0);w(k,K,X,"↾","\\restriction");w(k,I,re,"‘","`");w(k,I,re,"$","\\$");w(Te,I,re,"$","\\$");w(Te,I,re,"$","\\textdollar");w(k,I,re,"%","\\%");w(Te,I,re,"%","\\%");w(k,I,re,"_","\\_");w(Te,I,re,"_","\\_");w(Te,I,re,"_","\\textunderscore");w(k,I,re,"∠","\\angle",!0);w(k,I,re,"∞","\\infty",!0);w(k,I,re,"′","\\prime");w(k,I,re,"△","\\triangle");w(k,I,re,"Γ","\\Gamma",!0);w(k,I,re,"Δ","\\Delta",!0);w(k,I,re,"Θ","\\Theta",!0);w(k,I,re,"Λ","\\Lambda",!0);w(k,I,re,"Ξ","\\Xi",!0);w(k,I,re,"Π","\\Pi",!0);w(k,I,re,"Σ","\\Sigma",!0);w(k,I,re,"Υ","\\Upsilon",!0);w(k,I,re,"Φ","\\Phi",!0);w(k,I,re,"Ψ","\\Psi",!0);w(k,I,re,"Ω","\\Omega",!0);w(k,I,re,"A","Α");w(k,I,re,"B","Β");w(k,I,re,"E","Ε");w(k,I,re,"Z","Ζ");w(k,I,re,"H","Η");w(k,I,re,"I","Ι");w(k,I,re,"K","Κ");w(k,I,re,"M","Μ");w(k,I,re,"N","Ν");w(k,I,re,"O","Ο");w(k,I,re,"P","Ρ");w(k,I,re,"T","Τ");w(k,I,re,"X","Χ");w(k,I,re,"¬","\\neg",!0);w(k,I,re,"¬","\\lnot");w(k,I,re,"⊤","\\top");w(k,I,re,"⊥","\\bot");w(k,I,re,"∅","\\emptyset");w(k,K,re,"∅","\\varnothing");w(k,I,tt,"α","\\alpha",!0);w(k,I,tt,"β","\\beta",!0);w(k,I,tt,"γ","\\gamma",!0);w(k,I,tt,"δ","\\delta",!0);w(k,I,tt,"ϵ","\\epsilon",!0);w(k,I,tt,"ζ","\\zeta",!0);w(k,I,tt,"η","\\eta",!0);w(k,I,tt,"θ","\\theta",!0);w(k,I,tt,"ι","\\iota",!0);w(k,I,tt,"κ","\\kappa",!0);w(k,I,tt,"λ","\\lambda",!0);w(k,I,tt,"μ","\\mu",!0);w(k,I,tt,"ν","\\nu",!0);w(k,I,tt,"ξ","\\xi",!0);w(k,I,tt,"ο","\\omicron",!0);w(k,I,tt,"π","\\pi",!0);w(k,I,tt,"ρ","\\rho",!0);w(k,I,tt,"σ","\\sigma",!0);w(k,I,tt,"τ","\\tau",!0);w(k,I,tt,"υ","\\upsilon",!0);w(k,I,tt,"ϕ","\\phi",!0);w(k,I,tt,"χ","\\chi",!0);w(k,I,tt,"ψ","\\psi",!0);w(k,I,tt,"ω","\\omega",!0);w(k,I,tt,"ε","\\varepsilon",!0);w(k,I,tt,"ϑ","\\vartheta",!0);w(k,I,tt,"ϖ","\\varpi",!0);w(k,I,tt,"ϱ","\\varrho",!0);w(k,I,tt,"ς","\\varsigma",!0);w(k,I,tt,"φ","\\varphi",!0);w(k,I,qe,"∗","*",!0);w(k,I,qe,"+","+");w(k,I,qe,"−","-",!0);w(k,I,qe,"⋅","\\cdot",!0);w(k,I,qe,"∘","\\circ",!0);w(k,I,qe,"÷","\\div",!0);w(k,I,qe,"±","\\pm",!0);w(k,I,qe,"×","\\times",!0);w(k,I,qe,"∩","\\cap",!0);w(k,I,qe,"∪","\\cup",!0);w(k,I,qe,"∖","\\setminus",!0);w(k,I,qe,"∧","\\land");w(k,I,qe,"∨","\\lor");w(k,I,qe,"∧","\\wedge",!0);w(k,I,qe,"∨","\\vee",!0);w(k,I,re,"√","\\surd");w(k,I,zr,"⟨","\\langle",!0);w(k,I,zr,"∣","\\lvert");w(k,I,zr,"∥","\\lVert");w(k,I,cr,"?","?");w(k,I,cr,"!","!");w(k,I,cr,"⟩","\\rangle",!0);w(k,I,cr,"∣","\\rvert");w(k,I,cr,"∥","\\rVert");w(k,I,X,"=","=");w(k,I,X,":",":");w(k,I,X,"≈","\\approx",!0);w(k,I,X,"≅","\\cong",!0);w(k,I,X,"≥","\\ge");w(k,I,X,"≥","\\geq",!0);w(k,I,X,"←","\\gets");w(k,I,X,">","\\gt",!0);w(k,I,X,"∈","\\in",!0);w(k,I,X,"","\\@not");w(k,I,X,"⊂","\\subset",!0);w(k,I,X,"⊃","\\supset",!0);w(k,I,X,"⊆","\\subseteq",!0);w(k,I,X,"⊇","\\supseteq",!0);w(k,K,X,"⊈","\\nsubseteq",!0);w(k,K,X,"⊉","\\nsupseteq",!0);w(k,I,X,"⊨","\\models");w(k,I,X,"←","\\leftarrow",!0);w(k,I,X,"≤","\\le");w(k,I,X,"≤","\\leq",!0);w(k,I,X,"<","\\lt",!0);w(k,I,X,"→","\\rightarrow",!0);w(k,I,X,"→","\\to");w(k,K,X,"≱","\\ngeq",!0);w(k,K,X,"≰","\\nleq",!0);w(k,I,$a," ","\\ ");w(k,I,$a," ","\\space");w(k,I,$a," ","\\nobreakspace");w(Te,I,$a," ","\\ ");w(Te,I,$a," "," ");w(Te,I,$a," ","\\space");w(Te,I,$a," ","\\nobreakspace");w(k,I,$a,"","\\nobreak");w(k,I,$a,"","\\allowbreak");w(k,I,Ro,",",",");w(k,I,Ro,";",";");w(k,K,qe,"⊼","\\barwedge",!0);w(k,K,qe,"⊻","\\veebar",!0);w(k,I,qe,"⊙","\\odot",!0);w(k,I,qe,"⊕","\\oplus",!0);w(k,I,qe,"⊗","\\otimes",!0);w(k,I,re,"∂","\\partial",!0);w(k,I,qe,"⊘","\\oslash",!0);w(k,K,qe,"⊚","\\circledcirc",!0);w(k,K,qe,"⊡","\\boxdot",!0);w(k,I,qe,"△","\\bigtriangleup");w(k,I,qe,"▽","\\bigtriangledown");w(k,I,qe,"†","\\dagger");w(k,I,qe,"⋄","\\diamond");w(k,I,qe,"⋆","\\star");w(k,I,qe,"◃","\\triangleleft");w(k,I,qe,"▹","\\triangleright");w(k,I,zr,"{","\\{");w(Te,I,re,"{","\\{");w(Te,I,re,"{","\\textbraceleft");w(k,I,cr,"}","\\}");w(Te,I,re,"}","\\}");w(Te,I,re,"}","\\textbraceright");w(k,I,zr,"{","\\lbrace");w(k,I,cr,"}","\\rbrace");w(k,I,zr,"[","\\lbrack",!0);w(Te,I,re,"[","\\lbrack",!0);w(k,I,cr,"]","\\rbrack",!0);w(Te,I,re,"]","\\rbrack",!0);w(k,I,zr,"(","\\lparen",!0);w(k,I,cr,")","\\rparen",!0);w(Te,I,re,"<","\\textless",!0);w(Te,I,re,">","\\textgreater",!0);w(k,I,zr,"⌊","\\lfloor",!0);w(k,I,cr,"⌋","\\rfloor",!0);w(k,I,zr,"⌈","\\lceil",!0);w(k,I,cr,"⌉","\\rceil",!0);w(k,I,re,"\\","\\backslash");w(k,I,re,"∣","|");w(k,I,re,"∣","\\vert");w(Te,I,re,"|","\\textbar",!0);w(k,I,re,"∥","\\|");w(k,I,re,"∥","\\Vert");w(Te,I,re,"∥","\\textbardbl");w(Te,I,re,"~","\\textasciitilde");w(Te,I,re,"\\","\\textbackslash");w(Te,I,re,"^","\\textasciicircum");w(k,I,X,"↑","\\uparrow",!0);w(k,I,X,"⇑","\\Uparrow",!0);w(k,I,X,"↓","\\downarrow",!0);w(k,I,X,"⇓","\\Downarrow",!0);w(k,I,X,"↕","\\updownarrow",!0);w(k,I,X,"⇕","\\Updownarrow",!0);w(k,I,jn,"∐","\\coprod");w(k,I,jn,"⋁","\\bigvee");w(k,I,jn,"⋀","\\bigwedge");w(k,I,jn,"⨄","\\biguplus");w(k,I,jn,"⋂","\\bigcap");w(k,I,jn,"⋃","\\bigcup");w(k,I,jn,"∫","\\int");w(k,I,jn,"∫","\\intop");w(k,I,jn,"∬","\\iint");w(k,I,jn,"∭","\\iiint");w(k,I,jn,"∏","\\prod");w(k,I,jn,"∑","\\sum");w(k,I,jn,"⨂","\\bigotimes");w(k,I,jn,"⨁","\\bigoplus");w(k,I,jn,"⨀","\\bigodot");w(k,I,jn,"∮","\\oint");w(k,I,jn,"∯","\\oiint");w(k,I,jn,"∰","\\oiiint");w(k,I,jn,"⨆","\\bigsqcup");w(k,I,jn,"∫","\\smallint");w(Te,I,cl,"…","\\textellipsis");w(k,I,cl,"…","\\mathellipsis");w(Te,I,cl,"…","\\ldots",!0);w(k,I,cl,"…","\\ldots",!0);w(k,I,cl,"⋯","\\@cdots",!0);w(k,I,cl,"⋱","\\ddots",!0);w(k,I,re,"⋮","\\varvdots");w(Te,I,re,"⋮","\\varvdots");w(k,I,on,"ˊ","\\acute");w(k,I,on,"ˋ","\\grave");w(k,I,on,"¨","\\ddot");w(k,I,on,"~","\\tilde");w(k,I,on,"ˉ","\\bar");w(k,I,on,"˘","\\breve");w(k,I,on,"ˇ","\\check");w(k,I,on,"^","\\hat");w(k,I,on,"⃗","\\vec");w(k,I,on,"˙","\\dot");w(k,I,on,"˚","\\mathring");w(k,I,tt,"","\\@imath");w(k,I,tt,"","\\@jmath");w(k,I,re,"ı","ı");w(k,I,re,"ȷ","ȷ");w(Te,I,re,"ı","\\i",!0);w(Te,I,re,"ȷ","\\j",!0);w(Te,I,re,"ß","\\ss",!0);w(Te,I,re,"æ","\\ae",!0);w(Te,I,re,"œ","\\oe",!0);w(Te,I,re,"ø","\\o",!0);w(Te,I,re,"Æ","\\AE",!0);w(Te,I,re,"Œ","\\OE",!0);w(Te,I,re,"Ø","\\O",!0);w(Te,I,on,"ˊ","\\'");w(Te,I,on,"ˋ","\\`");w(Te,I,on,"ˆ","\\^");w(Te,I,on,"˜","\\~");w(Te,I,on,"ˉ","\\=");w(Te,I,on,"˘","\\u");w(Te,I,on,"˙","\\.");w(Te,I,on,"¸","\\c");w(Te,I,on,"˚","\\r");w(Te,I,on,"ˇ","\\v");w(Te,I,on,"¨",'\\"');w(Te,I,on,"˝","\\H");w(Te,I,on,"◯","\\textcircled");var l5={"--":!0,"---":!0,"``":!0,"''":!0};w(Te,I,re,"–","--",!0);w(Te,I,re,"–","\\textendash");w(Te,I,re,"—","---",!0);w(Te,I,re,"—","\\textemdash");w(Te,I,re,"‘","`",!0);w(Te,I,re,"‘","\\textquoteleft");w(Te,I,re,"’","'",!0);w(Te,I,re,"’","\\textquoteright");w(Te,I,re,"“","``",!0);w(Te,I,re,"“","\\textquotedblleft");w(Te,I,re,"”","''",!0);w(Te,I,re,"”","\\textquotedblright");w(k,I,re,"°","\\degree",!0);w(Te,I,re,"°","\\degree");w(Te,I,re,"°","\\textdegree",!0);w(k,I,re,"£","\\pounds");w(k,I,re,"£","\\mathsterling",!0);w(Te,I,re,"£","\\pounds");w(Te,I,re,"£","\\textsterling",!0);w(k,K,re,"✠","\\maltese");w(Te,K,re,"✠","\\maltese");var xv='0123456789/@."';for(var zf=0;zf<xv.length;zf++){var wv=xv.charAt(zf);w(k,I,re,wv,wv)}var Sv='0123456789!@*()-=+";:?/.,';for(var Bf=0;Bf<Sv.length;Bf++){var kv=Sv.charAt(Bf);w(Te,I,re,kv,kv)}var wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Uf=0;Uf<wu.length;Uf++){var Wc=wu.charAt(Uf);w(k,I,tt,Wc,Wc),w(Te,I,re,Wc,Wc)}w(k,K,re,"C","ℂ");w(Te,K,re,"C","ℂ");w(k,K,re,"H","ℍ");w(Te,K,re,"H","ℍ");w(k,K,re,"N","ℕ");w(Te,K,re,"N","ℕ");w(k,K,re,"P","ℙ");w(Te,K,re,"P","ℙ");w(k,K,re,"Q","ℚ");w(Te,K,re,"Q","ℚ");w(k,K,re,"R","ℝ");w(Te,K,re,"R","ℝ");w(k,K,re,"Z","ℤ");w(Te,K,re,"Z","ℤ");w(k,I,tt,"h","ℎ");w(Te,I,tt,"h","ℎ");var st;for(var ir=0;ir<wu.length;ir++){var gn=wu.charAt(ir);st=String.fromCharCode(55349,56320+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56372+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56424+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56580+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56684+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56736+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56788+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56840+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56944+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),ir<26&&(st=String.fromCharCode(55349,56632+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st),st=String.fromCharCode(55349,56476+ir),w(k,I,tt,gn,st),w(Te,I,re,gn,st))}st="𝕜";w(k,I,tt,"k",st);w(Te,I,re,"k",st);for(var Ji=0;Ji<10;Ji++){var Si=Ji.toString();st=String.fromCharCode(55349,57294+Ji),w(k,I,tt,Si,st),w(Te,I,re,Si,st),st=String.fromCharCode(55349,57314+Ji),w(k,I,tt,Si,st),w(Te,I,re,Si,st),st=String.fromCharCode(55349,57324+Ji),w(k,I,tt,Si,st),w(Te,I,re,Si,st),st=String.fromCharCode(55349,57334+Ji),w(k,I,tt,Si,st),w(Te,I,re,Si,st)}var ah="ÐÞþ";for(var qf=0;qf<ah.length;qf++){var Jc=ah.charAt(qf);w(k,I,tt,Jc,Jc),w(Te,I,re,Jc,Jc)}var ih={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Ev={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Tv={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},YC={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},ns={mathClass:"",textClass:"",font:""},Nv={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Cv={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Av={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},sh={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},lh={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Rv={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},oh={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},_v=[ih,ih,Ev,Ev,Tv,Tv,YC,ns,ns,ns,Nv,Nv,Cv,Cv,Av,Av,sh,sh,lh,lh,Rv,Rv,ns,ns,oh,oh],XC=[ih,ns,sh,lh,oh],ZC=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),a=(t-55296)*1024+(n-56320)+65536;if(119808<=a&&a<120484){var s=Math.floor((a-119808)/26);return _v[s]}else if(120782<=a&&a<=120831){var o=Math.floor((a-120782)/10);return XC[o]}else{if(a===120485||a===120486)return _v[0];if(120486<a&&a<120782)return ns;throw new Ae("Unsupported character: "+e)}},Pu=function(t,n,a){if(ln[a][t]){var s=ln[a][t].replace;s&&(t=s)}return{value:t,metrics:np(t,n,a)}},sr=function(t,n,a,s,o){var c=Pu(t,n,a),d=c.metrics;t=c.value;var m;if(d){var h=d.italic;(a==="text"||s&&s.font==="mathit")&&(h=0),m=new Lr(t,d.height,d.depth,h,d.skew,d.width,o)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+a+"'")),m=new Lr(t,0,0,0,0,0,o);if(s){m.maxFontSize=s.sizeMultiplier,s.style.isTight()&&m.classes.push("mtight");var g=s.getColor();g&&(m.style.color=g)}return m},rp=function(t,n,a,s){return s===void 0&&(s=[]),a.font==="boldsymbol"&&Pu(t,"Main-Bold",n).metrics?sr(t,"Main-Bold",n,a,s.concat(["mathbf"])):t==="\\"||ln[n][t].font==="main"?sr(t,"Main-Regular",n,a,s):sr(t,"AMS-Regular",n,a,s.concat(["amsrm"]))},QC=function(t,n,a){return a!=="textord"&&Pu(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},$u=function(t,n,a){var s=t.mode,o=t.text,c=["mord"],{font:d,fontFamily:m,fontWeight:h,fontShape:g}=n,b=s==="math"||s==="text"&&!!d,x=b?d:m,y="",S="";if(o.charCodeAt(0)===55349){var E=ZC(o);y=E.font,S=E[s+"Class"]}if(y)return sr(o,y,s,n,c.concat(S));if(x){var M,C;if(x==="boldsymbol"){var R=QC(o,s,a);M=R.fontName,C=[R.fontClass]}else b?(M=ch[d].fontName,C=[d]):(M=eu(m,h,g),C=[m,h,g]);if(Pu(o,M,s).metrics)return sr(o,M,s,n,c.concat(C));if(l5.hasOwnProperty(o)&&M.slice(0,10)==="Typewriter"){for(var A=[],H=0;H<o.length;H++)A.push(sr(o[H],M,s,n,c.concat(C)));return Ga(A)}}if(a==="mathord")return sr(o,"Math-Italic",s,n,c.concat(["mathnormal"]));if(a==="textord"){var F=ln[s][o]&&ln[s][o].font;if(F==="ams"){var D=eu("amsrm",h,g);return sr(o,D,s,n,c.concat("amsrm",h,g))}else if(F==="main"||!F){var $=eu("textrm",h,g);return sr(o,$,s,n,c.concat(h,g))}else{var P=eu(F,h,g);return sr(o,P,s,n,c.concat(P,h,g))}}else throw new Error("unexpected type: "+a+" in makeOrd")},WC=(e,t)=>{if(Ni(e.classes)!==Ni(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},o5=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Lr&&a instanceof Lr&&WC(n,a)&&(n.text+=a.text,n.height=Math.max(n.height,a.height),n.depth=Math.max(n.depth,a.depth),n.italic=a.italic,e.splice(t+1,1),t--)}return e},ap=function(t){for(var n=0,a=0,s=0,o=0;o<t.children.length;o++){var c=t.children[o];c.height>n&&(n=c.height),c.depth>a&&(a=c.depth),c.maxFontSize>s&&(s=c.maxFontSize)}t.height=n,t.depth=a,t.maxFontSize=s},Ne=function(t,n,a,s){var o=new ol(t,n,a,s);return ap(o),o},Ai=(e,t,n,a)=>new ol(e,t,n,a),nl=function(t,n,a){var s=Ne([t],[],n);return s.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=Me(s.height),s.maxFontSize=1,s},JC=function(t,n,a,s){var o=new Fu(t,n,a,s);return ap(o),o},Ga=function(t){var n=new ll(t);return ap(n),n},rl=function(t,n){return t instanceof ll?Ne([],[t],n):t},eA=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],s=-n[0].shift-n[0].elem.depth,o=s,c=1;c<n.length;c++){var d=-n[c].shift-o-n[c].elem.depth,m=d-(n[c-1].elem.height+n[c-1].elem.depth);o=o+d,a.push({type:"kern",size:m}),a.push(n[c])}return{children:a,depth:s}}var h;if(t.positionType==="top"){for(var g=t.positionData,b=0;b<t.children.length;b++){var x=t.children[b];g-=x.type==="kern"?x.size:x.elem.height+x.elem.depth}h=g}else if(t.positionType==="bottom")h=-t.positionData;else{var y=t.children[0];if(y.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")h=-y.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")h=-y.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:h}},Bt=function(t,n){for(var{children:a,depth:s}=eA(t),o=0,c=0;c<a.length;c++){var d=a[c];if(d.type==="elem"){var m=d.elem;o=Math.max(o,m.maxFontSize,m.height)}}o+=2;var h=Ne(["pstrut"],[]);h.style.height=Me(o);for(var g=[],b=s,x=s,y=s,S=0;S<a.length;S++){var E=a[S];if(E.type==="kern")y+=E.size;else{var M=E.elem,C=E.wrapperClasses||[],R=E.wrapperStyle||{},A=Ne(C,[h,M],void 0,R);A.style.top=Me(-o-y-M.depth),E.marginLeft&&(A.style.marginLeft=E.marginLeft),E.marginRight&&(A.style.marginRight=E.marginRight),g.push(A),y+=M.height+M.depth}b=Math.min(b,y),x=Math.max(x,y)}var H=Ne(["vlist"],g);H.style.height=Me(x);var F;if(b<0){var D=Ne([],[]),$=Ne(["vlist"],[D]);$.style.height=Me(-b);var P=Ne(["vlist-s"],[new Lr("​")]);F=[Ne(["vlist-r"],[H,P]),Ne(["vlist-r"],[$])]}else F=[Ne(["vlist-r"],[H])];var ee=Ne(["vlist-t"],F);return F.length===2&&ee.classes.push("vlist-t2"),ee.height=x,ee.depth=-b,ee},c5=(e,t)=>{var n=Ne(["mspace"],[],t),a=fn(e,t);return n.style.marginRight=Me(a),n},eu=(e,t,n)=>{var a,s;switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return t==="textbf"&&n==="textit"?s="BoldItalic":t==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",a+"-"+s},ch={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"}},u5={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},d5=function(t,n){var[a,s,o]=u5[t],c=new Ci(a),d=new Ha([c],{width:Me(s),height:Me(o),style:"width:"+Me(s),viewBox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),m=Ai(["overlay"],[d],n);return m.height=o,m.style.height=Me(o),m.style.width=Me(s),m},dn={number:3,unit:"mu"},es={number:4,unit:"mu"},Da={number:5,unit:"mu"},tA={mord:{mop:dn,mbin:es,mrel:Da,minner:dn},mop:{mord:dn,mop:dn,mrel:Da,minner:dn},mbin:{mord:es,mop:es,mopen:es,minner:es},mrel:{mord:Da,mop:Da,mopen:Da,minner:Da},mopen:{},mclose:{mop:dn,mbin:es,mrel:Da,minner:dn},mpunct:{mord:dn,mop:dn,mrel:Da,mopen:dn,mclose:dn,mpunct:dn,minner:dn},minner:{mord:dn,mop:dn,mbin:es,mrel:Da,mopen:dn,mpunct:dn,minner:dn}},nA={mord:{mop:dn},mop:{mord:dn,mop:dn},mbin:{},mrel:{},mopen:{},mclose:{mop:dn},mpunct:{},minner:{mop:dn}},f5={},Su={},ku={};function Be(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:o,mathmlBuilder:c}=e,d={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:s},m=0;m<n.length;++m)f5[n[m]]=d;t&&(o&&(Su[t]=o),c&&(ku[t]=c))}function us(e){var{type:t,htmlBuilder:n,mathmlBuilder:a}=e;Be({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:a})}var Eu=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},On=function(t){return t.type==="ordgroup"?t.body:[t]},rA=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),aA=new Set(["rightmost","mrel","mclose","mpunct"]),iA={display:ct.DISPLAY,text:ct.TEXT,script:ct.SCRIPT,scriptscript:ct.SCRIPTSCRIPT},sA={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},qn=function(t,n,a,s){s===void 0&&(s=[null,null]);for(var o=[],c=0;c<t.length;c++){var d=Ut(t[c],n);if(d instanceof ll){var m=d.children;o.push(...m)}else o.push(d)}if(o5(o),!a)return o;var h=n;if(t.length===1){var g=t[0];g.type==="sizing"?h=n.havingSize(g.size):g.type==="styling"&&(h=n.havingStyle(iA[g.style]))}var b=Ne([s[0]||"leftmost"],[],n),x=Ne([s[1]||"rightmost"],[],n),y=a==="root";return uh(o,(S,E)=>{var M=E.classes[0],C=S.classes[0];M==="mbin"&&aA.has(C)?E.classes[0]="mord":C==="mbin"&&rA.has(M)&&(S.classes[0]="mord")},{node:b},x,y),uh(o,(S,E)=>{var M,C,R=fh(E),A=fh(S),H=R&&A?S.hasClass("mtight")?(M=nA[R])==null?void 0:M[A]:(C=tA[R])==null?void 0:C[A]:null;if(H)return c5(H,h)},{node:b},x,y),o},uh=function(t,n,a,s,o){s&&t.push(s);for(var c=0;c<t.length;c++){var d=t[c],m=m5(d);if(m){uh(m.children,n,a,null,o);continue}var h=!d.hasClass("mspace");if(h){var g=n(d,a.node);g&&(a.insertAfter?a.insertAfter(g):(t.unshift(g),c++))}h?a.node=d:o&&d.hasClass("newline")&&(a.node=Ne(["leftmost"])),a.insertAfter=(b=>x=>{t.splice(b+1,0,x),c++})(c)}s&&t.pop()},m5=function(t){return t instanceof ll||t instanceof Fu||t instanceof ol&&t.hasClass("enclosing")?t:null},dh=function(t,n){var a=m5(t);if(a){var s=a.children;if(s.length){if(n==="right")return dh(s[s.length-1],"right");if(n==="left")return dh(s[0],"left")}}return t},fh=function(t,n){if(!t)return null;n&&(t=dh(t,n));var a=t.classes[0];return sA[a]||null},Eo=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return Ne(n.concat(a))},Ut=function(t,n,a){if(!t)return Ne();if(Su[t.type]){var s=Su[t.type](t,n);if(a&&n.size!==a.size){s=Ne(n.sizingClasses(a),[s],n);var o=n.sizeMultiplier/a.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new Ae("Got group of unknown type: '"+t.type+"'")};function tu(e,t){var n=Ne(["base"],e,t),a=Ne(["strut"]);return a.style.height=Me(n.height+n.depth),n.depth&&(a.style.verticalAlign=Me(-n.depth)),n.children.unshift(a),n}function mh(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=qn(e,t,"root"),s;a.length===2&&a[1].hasClass("tag")&&(s=a.pop());for(var o=[],c=[],d=0;d<a.length;d++)if(c.push(a[d]),a[d].hasClass("mbin")||a[d].hasClass("mrel")||a[d].hasClass("allowbreak")){for(var m=!1;d<a.length-1&&a[d+1].hasClass("mspace")&&!a[d+1].hasClass("newline");)d++,c.push(a[d]),a[d].hasClass("nobreak")&&(m=!0);m||(o.push(tu(c,t)),c=[])}else a[d].hasClass("newline")&&(c.pop(),c.length>0&&(o.push(tu(c,t)),c=[]),o.push(a[d]));c.length>0&&o.push(tu(c,t));var h;n?(h=tu(qn(n,t,!0),t),h.classes=["tag"],o.push(h)):s&&o.push(s);var g=Ne(["katex-html"],o);if(g.setAttribute("aria-hidden","true"),h){var b=h.children[0];b.style.height=Me(g.height+g.depth),g.depth&&(b.style.verticalAlign=Me(-g.depth))}return g}function h5(e){return new ll(e)}class _e{constructor(t,n,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=a||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=Ni(this.classes));for(var a=0;a<this.children.length;a++)if(this.children[a]instanceof Dn&&this.children[a+1]instanceof Dn){for(var s=this.children[a].toText()+this.children[++a].toText();this.children[a+1]instanceof Dn;)s+=this.children[++a].toText();t.appendChild(new Dn(s).toNode())}else t.appendChild(this.children[a].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=er(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+er(Ni(this.classes))+'"'),t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Dn{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return er(this.toText())}toText(){return this.text}}class p5{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Me(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Me(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var lA=new Set(["\\imath","\\jmath"]),oA=new Set(["mrow","mtable"]),Zr=function(t,n,a){return ln[n][t]&&ln[n][t].replace&&t.charCodeAt(0)!==55349&&!(l5.hasOwnProperty(t)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(t=ln[n][t].replace),new Dn(t)},ip=function(t){return t.length===1?t[0]:new _e("mrow",t)},cA={mathit:"italic",boldsymbol:e=>e.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"},sp=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var a=e.mode,s=cA[n];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(lA.has(o))return null;if(ln[a][o]){var c=ln[a][o].replace;c&&(o=c)}var d=ch[n].fontName;return np(o,d,a)?ch[n].variant:null};function Hf(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Dn&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof Dn&&n.text===","}else return!1}var Br=function(t,n,a){if(t.length===1){var s=en(t[0],n);return a&&s instanceof _e&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],c,d=0;d<t.length;d++){var m=en(t[d],n);if(m instanceof _e&&c instanceof _e){if(m.type==="mtext"&&c.type==="mtext"&&m.getAttribute("mathvariant")===c.getAttribute("mathvariant")){c.children.push(...m.children);continue}else if(m.type==="mn"&&c.type==="mn"){c.children.push(...m.children);continue}else if(Hf(m)&&c.type==="mn"){c.children.push(...m.children);continue}else if(m.type==="mn"&&Hf(c))m.children=[...c.children,...m.children],o.pop();else if((m.type==="msup"||m.type==="msub")&&m.children.length>=1&&(c.type==="mn"||Hf(c))){var h=m.children[0];h instanceof _e&&h.type==="mn"&&(h.children=[...c.children,...h.children],o.pop())}else if(c.type==="mi"&&c.children.length===1){var g=c.children[0];if(g instanceof Dn&&g.text==="̸"&&(m.type==="mo"||m.type==="mi"||m.type==="mn")){var b=m.children[0];b instanceof Dn&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),o.pop())}}}o.push(m),c=m}return o},Ri=function(t,n,a){return ip(Br(t,n,a))},en=function(t,n){if(!t)return new _e("mrow");if(ku[t.type])return ku[t.type](t,n);throw new Ae("Got group of unknown type: '"+t.type+"'")};function Iv(e,t,n,a,s){var o=Br(e,n),c;o.length===1&&o[0]instanceof _e&&oA.has(o[0].type)?c=o[0]:c=new _e("mrow",o);var d=new _e("annotation",[new Dn(t)]);d.setAttribute("encoding","application/x-tex");var m=new _e("semantics",[c,d]),h=new _e("math",[m]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block");var g=s?"katex":"katex-mathml";return Ne([g],[h])}var uA=[[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]],Mv=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ov=function(t,n){return n.size<2?t:uA[t-1][n.size-1]};class za{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||za.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Mv[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new za(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Ov(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Mv[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=Ov(za.BASESIZE,t);return this.size===n&&this.textSize===za.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==za.BASESIZE?["sizing","reset-size"+this.size,"size"+za.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=VC(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}za.BASESIZE=6;var g5=function(t){return new za({style:t.displayMode?ct.DISPLAY:ct.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},b5=function(t,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),t=Ne(a,[t])}return t},dA=function(t,n,a){var s=g5(a),o;if(a.output==="mathml")return Iv(t,n,s,a.displayMode,!0);if(a.output==="html"){var c=mh(t,s);o=Ne(["katex"],[c])}else{var d=Iv(t,n,s,a.displayMode,!1),m=mh(t,s);o=Ne(["katex"],[d,m])}return b5(o,a)},fA=function(t,n,a){var s=g5(a),o=mh(t,s),c=Ne(["katex"],[o]);return b5(c,a)},mA={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":"="},Gu=function(t){var n=new _e("mo",[new Dn(mA[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},hA={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]},pA=new Set(["widehat","widecheck","widetilde","utilde"]),Ku=function(t,n){function a(){var d=4e5,m=t.label.slice(1);if(pA.has(m)&&"base"in t){var h=t.base.type==="ordgroup"?t.base.body.length:1,g,b,x;if(h>5)m==="widehat"||m==="widecheck"?(g=420,d=2364,x=.42,b=m+"4"):(g=312,d=2340,x=.34,b="tilde4");else{var y=[1,1,2,2,3,3][h];m==="widehat"||m==="widecheck"?(d=[0,1062,2364,2364,2364][y],g=[0,239,300,360,420][y],x=[0,.24,.3,.3,.36,.42][y],b=m+y):(d=[0,600,1033,2339,2340][y],g=[0,260,286,306,312][y],x=[0,.26,.286,.3,.306,.34][y],b="tilde"+y)}var S=new Ci(b),E=new Ha([S],{width:"100%",height:Me(x),viewBox:"0 0 "+d+" "+g,preserveAspectRatio:"none"});return{span:Ai([],[E],n),minWidth:0,height:x}}else{var M=[],C=hA[m];if(!C)throw new Error('No SVG data for "'+m+'".');var[R,A,H]=C,F=H/1e3,D=R.length,$,P;if(D===1){if(C.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+m+'".');$=["hide-tail"],P=[C[3]]}else if(D===2)$=["halfarrow-left","halfarrow-right"],P=["xMinYMin","xMaxYMin"];else if(D===3)$=["brace-left","brace-center","brace-right"],P=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
295
- `+D+" children.");for(var ee=0;ee<D;ee++){var q=new Ci(R[ee]),Z=new Ha([q],{width:"400em",height:Me(F),viewBox:"0 0 "+d+" "+H,preserveAspectRatio:P[ee]+" slice"}),G=Ai([$[ee]],[Z],n);if(D===1)return{span:G,minWidth:A,height:F};G.style.height=Me(F),M.push(G)}return{span:Ne(["stretchy"],M,n),minWidth:A,height:F}}}var{span:s,minWidth:o,height:c}=a();return s.height=c,s.style.height=Me(c),o>0&&(s.style.minWidth=Me(o)),s},gA=function(t,n,a,s,o){var c,d=t.height+t.depth+a+s;if(/fbox|color|angl/.test(n)){if(c=Ne(["stretchy",n],[],o),n==="fbox"){var m=o.color&&o.getColor();m&&(c.style.borderColor=m)}}else{var h=[];/^[bx]cancel$/.test(n)&&h.push(new rh({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&h.push(new rh({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new Ha(h,{width:"100%",height:Me(d)});c=Ai([],[g],o)}return c.height=d,c.style.height=Me(d),c},bA={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vA={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function yA(e){return e in bA}function pt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Vu(e){var t=Yu(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Yu(e){return e&&(e.type==="atom"||vA.hasOwnProperty(e.type))?e:null}var v5=e=>{if(e instanceof Lr)return e;if(KC(e)&&e.children.length===1)return v5(e.children[0])},lp=(e,t)=>{var n,a,s;e&&e.type==="supsub"?(a=pt(e.base,"accent"),n=a.base,e.base=n,s=GC(Ut(e,t)),e.base=a):(a=pt(e,"accent"),n=a.base);var o=Ut(n,t.havingCrampedStyle()),c=a.isShifty&&Pa(n),d=0;if(c){var m,h;d=(m=(h=v5(o))==null?void 0:h.skew)!=null?m:0}var g=a.label==="\\c",b=g?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight),x;if(a.isStretchy)x=Ku(a,t),x=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:x,wrapperClasses:["svg-align"],wrapperStyle:d>0?{width:"calc(100% - "+Me(2*d)+")",marginLeft:Me(2*d)}:void 0}]});else{var y,S;a.label==="\\vec"?(y=d5("vec",t),S=u5.vec[1]):(y=$u({mode:a.mode,text:a.label},t,"textord"),y=$C(y),y.italic=0,S=y.width,g&&(b+=y.depth)),x=Ne(["accent-body"],[y]);var E=a.label==="\\textcircled";E&&(x.classes.push("accent-full"),b=o.height);var M=d;E||(M-=S/2),x.style.left=Me(M),a.label==="\\textcircled"&&(x.style.top=".2em"),x=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-b},{type:"elem",elem:x}]})}var C=Ne(["mord","accent"],[x],t);return s?(s.children[0]=C,s.height=Math.max(C.height,s.height),s.classes[0]="mord",s):C},y5=(e,t)=>{var n=e.isStretchy?Gu(e.label):new _e("mo",[Zr(e.label,e.mode)]),a=new _e("mover",[en(e.base,t),n]);return a.setAttribute("accent","true"),a},xA=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Be({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Eu(t[0]),a=!xA.test(e.funcName),s=!a||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:s,base:n}},htmlBuilder:lp,mathmlBuilder:y5});Be({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],a=e.parser.mode;return a==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:lp,mathmlBuilder:y5});Be({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:a,base:s}},htmlBuilder:(e,t)=>{var n=Ut(e.base,t),a=Ku(e,t),s=e.label==="\\utilde"?.12:0,o=Bt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return Ne(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=Gu(e.label),a=new _e("munder",[en(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var nu=e=>{var t=new _e("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Be({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a,funcName:s}=e;return{type:"xArrow",mode:a.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,a=t.havingStyle(n.sup()),s=rl(Ut(e.body,a,t),t),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=rl(Ut(e.below,a,t),t),c.classes.push(o+"-arrow-pad"));var d=Ku(e,t),m=-t.fontMetrics().axisHeight+.5*d.height,h=-t.fontMetrics().axisHeight-.5*d.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(h-=s.depth);var g;if(c){var b=-t.fontMetrics().axisHeight+c.height+.5*d.height+.111;g=Bt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:d,shift:m,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:b}]})}else g=Bt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:d,shift:m,wrapperClasses:["svg-align"]}]});return Ne(["mrel","x-arrow"],[g],t)},mathmlBuilder(e,t){var n=Gu(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var s=nu(en(e.body,t));if(e.below){var o=nu(en(e.below,t));a=new _e("munderover",[n,o,s])}else a=new _e("mover",[n,s])}else if(e.below){var c=nu(en(e.below,t));a=new _e("munder",[n,c])}else a=nu(),a=new _e("mover",[n,a]);return a}});function x5(e,t){var n=qn(e.body,t,!0);return Ne([e.mclass],n,t)}function w5(e,t){var n,a=Br(e.body,t);return e.mclass==="minner"?n=new _e("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new _e("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new _e("mo",a),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Be({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+a.slice(5),body:On(s),isCharacterBox:Pa(s)}},htmlBuilder:x5,mathmlBuilder:w5});var Xu=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Be({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Xu(t[0]),body:On(t[1]),isCharacterBox:Pa(t[1])}}});Be({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:a}=e,s=t[1],o=t[0],c;a!=="\\stackrel"?c=Xu(s):c="mrel";var d={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:On(s)},m={type:"supsub",mode:o.mode,base:d,sup:a==="\\underset"?null:o,sub:a==="\\underset"?o:null};return{type:"mclass",mode:n.mode,mclass:c,body:[m],isCharacterBox:Pa(m)}},htmlBuilder:x5,mathmlBuilder:w5});Be({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Xu(t[0]),body:On(t[0])}},htmlBuilder(e,t){var n=qn(e.body,t,!0),a=Ne([e.mclass],n,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var n=Br(e.body,t),a=new _e("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var wA={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Dv=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),jv=e=>e.type==="textord"&&e.text==="@",SA=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function kA(e,t,n){var a=wA[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),o={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[o],[]),d=n.callFunction("\\\\cdright",[t[1]],[]),m={type:"ordgroup",mode:"math",body:[s,c,d]};return n.callFunction("\\\\cdparent",[m],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function EA(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ae("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],s=[a],o=0;o<t.length;o++){for(var c=t[o],d=Dv(),m=0;m<c.length;m++)if(!jv(c[m]))d.body.push(c[m]);else{a.push(d),m+=1;var h=Vu(c[m]).text,g=new Array(2);if(g[0]={type:"ordgroup",mode:"math",body:[]},g[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(h))if("<>AV".includes(h))for(var b=0;b<2;b++){for(var x=!0,y=m+1;y<c.length;y++){if(SA(c[y],h)){x=!1,m=y;break}if(jv(c[y]))throw new Ae("Missing a "+h+" character to complete a CD arrow.",c[y]);g[b].body.push(c[y])}if(x)throw new Ae("Missing a "+h+" character to complete a CD arrow.",c[m])}else throw new Ae('Expected one of "<>AV=|." after @',c[m]);var S=kA(h,g,e),E={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};a.push(E),d=Dv()}o%2===0?a.push(d):a.shift(),a=[],s.push(a)}e.gullet.endGroup(),e.gullet.endGroup();var M=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:M,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}Be({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"cdlabel",mode:n.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),a=rl(Ut(e.label,n,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=Me(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var n=new _e("mrow",[en(e.label,t)]);return n=new _e("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new _e("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Be({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=rl(Ut(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new _e("mrow",[en(e.fragment,t)])}});Be({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=pt(t[0],"ordgroup"),s=a.body,o="",c=0;c<s.length;c++){var d=pt(s[c],"textord");o+=d.text}var m=parseInt(o),h;if(isNaN(m))throw new Ae("\\@char has non-numeric argument "+o);if(m<0||m>=1114111)throw new Ae("\\@char with invalid code point "+o);return m<=65535?h=String.fromCharCode(m):(m-=65536,h=String.fromCharCode((m>>10)+55296,(m&1023)+56320)),{type:"textord",mode:n.mode,text:h}}});var S5=(e,t)=>{var n=qn(e.body,t.withColor(e.color),!1);return Ga(n)},k5=(e,t)=>{var n=Br(e.body,t.withColor(e.color)),a=new _e("mstyle",n);return a.setAttribute("mathcolor",e.color),a};Be({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,a=pt(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:a,body:On(s)}},htmlBuilder:S5,mathmlBuilder:k5});Be({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,s=pt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var o=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:s,body:o}},htmlBuilder:S5,mathmlBuilder:k5});Be({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:a}=e,s=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,o=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:o,size:s&&pt(s,"size").value}},htmlBuilder(e,t){var n=Ne(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Me(fn(e.size,t)))),n},mathmlBuilder(e,t){var n=new _e("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Me(fn(e.size,t)))),n}});var hh={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},E5=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ae("Expected a control sequence",e);return t},TA=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},T5=(e,t,n,a)=>{var s=e.gullet.macros.get(n.text);s==null&&(n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,s,a)};Be({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var a=t.fetch();if(hh[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=hh[a.text]),pt(t.parseFunction(),"internal");throw new Ae("Invalid token after macro prefix",a)}});Be({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=t.gullet.popToken(),s=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Ae("Expected a control sequence",a);for(var o=0,c,d=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),d[o].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new Ae('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==o+1)throw new Ae('Argument number "'+a.text+'" out of order');o++,d.push([])}else{if(a.text==="EOF")throw new Ae("Expected a macro definition");d[o].push(a.text)}var{tokens:m}=t.gullet.consumeArg();return c&&m.unshift(c),(n==="\\edef"||n==="\\xdef")&&(m=t.gullet.expandTokens(m),m.reverse()),t.gullet.macros.set(s,{tokens:m,numArgs:o,delimiters:d},n===hh[n]),{type:"internal",mode:t.mode}}});Be({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=E5(t.gullet.popToken());t.gullet.consumeSpaces();var s=TA(t);return T5(t,a,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Be({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=E5(t.gullet.popToken()),s=t.gullet.popToken(),o=t.gullet.popToken();return T5(t,a,o,n==="\\\\globalfuture"),t.gullet.pushToken(o),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var fo=function(t,n,a){var s=ln.math[t]&&ln.math[t].replace,o=np(s||t,n,a);if(!o)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return o},op=function(t,n,a,s){var o=a.havingBaseStyle(n),c=Ne(s.concat(o.sizingClasses(a)),[t],a),d=o.sizeMultiplier/a.sizeMultiplier;return c.height*=d,c.depth*=d,c.maxFontSize=o.sizeMultiplier,c},N5=function(t,n,a){var s=n.havingBaseStyle(a),o=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Me(o),t.height-=o,t.depth+=o},NA=function(t,n,a,s,o,c){var d=sr(t,"Main-Regular",o,s),m=op(d,n,s,c);return N5(m,s,n),m},CA=function(t,n,a,s){return sr(t,"Size"+n+"-Regular",a,s)},C5=function(t,n,a,s,o,c){var d=CA(t,n,o,s),m=op(Ne(["delimsizing","size"+n],[d],s),ct.TEXT,s,c);return a&&N5(m,s,ct.TEXT),m},Ff=function(t,n,a){var s;n==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=Ne(["delimsizinginner",s],[Ne([],[sr(t,n,a)])]);return{type:"elem",elem:o}},Pf=function(t,n,a){var s=ua["Size4-Regular"][t.charCodeAt(0)]?ua["Size4-Regular"][t.charCodeAt(0)][4]:ua["Size1-Regular"][t.charCodeAt(0)][4],o=new Ci("inner",zC(t,Math.round(1e3*n))),c=new Ha([o],{width:Me(s),height:Me(n),style:"width:"+Me(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),d=Ai([],[c],a);return d.height=n,d.style.height=Me(n),d.style.width=Me(s),{type:"elem",elem:d}},ph=.008,ru={type:"kern",size:-1*ph},AA=new Set(["|","\\lvert","\\rvert","\\vert"]),RA=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),A5=function(t,n,a,s,o,c){var d,m,h,g,b="",x=0;d=h=g=t,m=null;var y="Size1-Regular";t==="\\uparrow"?h=g="⏐":t==="\\Uparrow"?h=g="‖":t==="\\downarrow"?d=h="⏐":t==="\\Downarrow"?d=h="‖":t==="\\updownarrow"?(d="\\uparrow",h="⏐",g="\\downarrow"):t==="\\Updownarrow"?(d="\\Uparrow",h="‖",g="\\Downarrow"):AA.has(t)?(h="∣",b="vert",x=333):RA.has(t)?(h="∥",b="doublevert",x=556):t==="["||t==="\\lbrack"?(d="⎡",h="⎢",g="⎣",y="Size4-Regular",b="lbrack",x=667):t==="]"||t==="\\rbrack"?(d="⎤",h="⎥",g="⎦",y="Size4-Regular",b="rbrack",x=667):t==="\\lfloor"||t==="⌊"?(h=d="⎢",g="⎣",y="Size4-Regular",b="lfloor",x=667):t==="\\lceil"||t==="⌈"?(d="⎡",h=g="⎢",y="Size4-Regular",b="lceil",x=667):t==="\\rfloor"||t==="⌋"?(h=d="⎥",g="⎦",y="Size4-Regular",b="rfloor",x=667):t==="\\rceil"||t==="⌉"?(d="⎤",h=g="⎥",y="Size4-Regular",b="rceil",x=667):t==="("||t==="\\lparen"?(d="⎛",h="⎜",g="⎝",y="Size4-Regular",b="lparen",x=875):t===")"||t==="\\rparen"?(d="⎞",h="⎟",g="⎠",y="Size4-Regular",b="rparen",x=875):t==="\\{"||t==="\\lbrace"?(d="⎧",m="⎨",g="⎩",h="⎪",y="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(d="⎫",m="⎬",g="⎭",h="⎪",y="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(d="⎧",g="⎩",h="⎪",y="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(d="⎫",g="⎭",h="⎪",y="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(d="⎧",g="⎭",h="⎪",y="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(d="⎫",g="⎩",h="⎪",y="Size4-Regular");var S=fo(d,y,o),E=S.height+S.depth,M=fo(h,y,o),C=M.height+M.depth,R=fo(g,y,o),A=R.height+R.depth,H=0,F=1;if(m!==null){var D=fo(m,y,o);H=D.height+D.depth,F=2}var $=E+A+H,P=Math.max(0,Math.ceil((n-$)/(F*C))),ee=$+P*F*C,q=s.fontMetrics().axisHeight;a&&(q*=s.sizeMultiplier);var Z=ee/2-q,G=[];if(b.length>0){var le=ee-E-A,W=Math.round(ee*1e3),U=BC(b,Math.round(le*1e3)),z=new Ci(b,U),V=Me(x/1e3),ne=Me(W/1e3),we=new Ha([z],{width:V,height:ne,viewBox:"0 0 "+x+" "+W}),O=Ai([],[we],s);O.height=W/1e3,O.style.width=V,O.style.height=ne,G.push({type:"elem",elem:O})}else{if(G.push(Ff(g,y,o)),G.push(ru),m===null){var B=ee-E-A+2*ph;G.push(Pf(h,B,s))}else{var Y=(ee-E-A-H)/2+2*ph;G.push(Pf(h,Y,s)),G.push(ru),G.push(Ff(m,y,o)),G.push(ru),G.push(Pf(h,Y,s))}G.push(ru),G.push(Ff(d,y,o))}var _=s.havingBaseStyle(ct.TEXT),ce=Bt({positionType:"bottom",positionData:Z,children:G});return op(Ne(["delimsizing","mult"],[ce],_),ct.TEXT,s,c)},$f=80,Gf=.08,Kf=function(t,n,a,s,o){var c=LC(t,s,a),d=new Ci(t,c),m=new Ha([d],{width:"400em",height:Me(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Ai(["hide-tail"],[m],o)},_A=function(t,n){var a=n.havingBaseSizing(),s=O5("\\surd",t*a.sizeMultiplier,M5,a),o=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),d,m,h,g,b;return s.type==="small"?(g=1e3+1e3*c+$f,t<1?o=1:t<1.4&&(o=.7),m=(1+c+Gf)/o,h=(1+c)/o,d=Kf("sqrtMain",m,g,c,n),d.style.minWidth="0.853em",b=.833/o):s.type==="large"?(g=(1e3+$f)*bo[s.size],h=(bo[s.size]+c)/o,m=(bo[s.size]+c+Gf)/o,d=Kf("sqrtSize"+s.size,m,g,c,n),d.style.minWidth="1.02em",b=1/o):(m=t+c+Gf,h=t+c,g=Math.floor(1e3*t+c)+$f,d=Kf("sqrtTall",m,g,c,n),d.style.minWidth="0.742em",b=1.056),d.height=h,d.style.height=Me(m),{span:d,advanceWidth:b,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*o}},R5=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),IA=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),_5=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),bo=[0,1.2,1.8,2.4,3],I5=function(t,n,a,s,o){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),R5.has(t)||_5.has(t))return C5(t,n,!1,a,s,o);if(IA.has(t))return A5(t,bo[n],!1,a,s,o);throw new Ae("Illegal delimiter: '"+t+"'")},MA=[{type:"small",style:ct.SCRIPTSCRIPT},{type:"small",style:ct.SCRIPT},{type:"small",style:ct.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],OA=[{type:"small",style:ct.SCRIPTSCRIPT},{type:"small",style:ct.SCRIPT},{type:"small",style:ct.TEXT},{type:"stack"}],M5=[{type:"small",style:ct.SCRIPTSCRIPT},{type:"small",style:ct.SCRIPT},{type:"small",style:ct.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],DA=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var n=t.type;throw new Error("Add support for delim type '"+n+"' here.")},O5=function(t,n,a,s){for(var o=Math.min(2,3-s.style.size),c=o;c<a.length;c++){var d=a[c];if(d.type==="stack")break;var m=fo(t,DA(d),"math"),h=m.height+m.depth;if(d.type==="small"){var g=s.havingBaseStyle(d.style);h*=g.sizeMultiplier}if(h>n)return d}return a[a.length-1]},gh=function(t,n,a,s,o,c){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var d;_5.has(t)?d=MA:R5.has(t)?d=M5:d=OA;var m=O5(t,n,d,s);return m.type==="small"?NA(t,m.style,a,s,o,c):m.type==="large"?C5(t,m.size,a,s,o,c):A5(t,n,a,s,o,c)},Vf=function(t,n,a,s,o,c){var d=s.fontMetrics().axisHeight*s.sizeMultiplier,m=901,h=5/s.fontMetrics().ptPerEm,g=Math.max(n-d,a+d),b=Math.max(g/500*m,2*g-h);return gh(t,b,!0,s,o,c)},Lv={"\\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}},jA=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 zv(e){return"isMiddle"in e}function Zu(e,t){var n=Yu(e);if(n&&jA.has(n.text))return n;throw n?new Ae("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ae("Invalid delimiter type '"+e.type+"'",e)}Be({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Zu(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Lv[e.funcName].size,mclass:Lv[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Ne([e.mclass]):I5(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Zr(e.delim,e.mode));var n=new _e("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=Me(bo[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function Bv(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Be({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Ae("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Zu(t[0],e).text,color:n}}});Be({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Zu(t[0],e),a=e.parser;++a.leftrightDepth;var s=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var o=pt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:s,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{Bv(e);for(var n=qn(e.body,t,!0,["mopen","mclose"]),a=0,s=0,o=!1,c=0;c<n.length;c++){var d=n[c];zv(d)?o=!0:(a=Math.max(n[c].height,a),s=Math.max(n[c].depth,s))}a*=t.sizeMultiplier,s*=t.sizeMultiplier;var m;if(e.left==="."?m=Eo(t,["mopen"]):m=Vf(e.left,a,s,t,e.mode,["mopen"]),n.unshift(m),o)for(var h=1;h<n.length;h++){var g=n[h];if(zv(g)){var b=g.isMiddle;n[h]=Vf(b.delim,a,s,b.options,e.mode,[])}}var x;if(e.right===".")x=Eo(t,["mclose"]);else{var y=e.rightColor?t.withColor(e.rightColor):t;x=Vf(e.right,a,s,y,e.mode,["mclose"])}return n.push(x),Ne(["minner"],n,t)},mathmlBuilder:(e,t)=>{Bv(e);var n=Br(e.body,t);if(e.left!=="."){var a=new _e("mo",[Zr(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var s=new _e("mo",[Zr(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),n.push(s)}return ip(n)}});Be({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Zu(t[0],e);if(!e.parser.leftrightDepth)throw new Ae("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=Eo(t,[]):(n=I5(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Zr("|","text"):Zr(e.delim,e.mode),a=new _e("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Qu=(e,t)=>{var n=rl(Ut(e.body,t),t),a=e.label.slice(1),s=t.sizeMultiplier,o,c,d=Pa(e.body);if(a==="sout")o=Ne(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/s,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var m=fn({number:.6,unit:"pt"},t),h=fn({number:.35,unit:"ex"},t),g=t.havingBaseSizing();s=s/g.sizeMultiplier;var b=n.height+n.depth+m+h;n.style.paddingLeft=Me(b/2+m);var x=Math.floor(1e3*b*s),y=DC(x),S=new Ha([new Ci("phase",y)],{width:"400em",height:Me(x/1e3),viewBox:"0 0 400000 "+x,preserveAspectRatio:"xMinYMin slice"});o=Ai(["hide-tail"],[S],t),o.style.height=Me(b),c=n.depth+m+h}else{/cancel/.test(a)?d||n.classes.push("cancel-pad"):a==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var E,M,C=0;/box/.test(a)?(C=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),E=t.fontMetrics().fboxsep+(a==="colorbox"?0:C),M=E):a==="angl"?(C=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),E=4*C,M=Math.max(0,.25-n.depth)):(E=d?.2:0,M=E),o=gA(n,a,E,M,t),/fbox|boxed|fcolorbox/.test(a)?(o.style.borderStyle="solid",o.style.borderWidth=Me(C)):a==="angl"&&C!==.049&&(o.style.borderTopWidth=Me(C),o.style.borderRightWidth=Me(C)),c=n.depth+M,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var R;if(e.backgroundColor)R=Bt({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:n,shift:0}]});else{var A=/cancel|phase/.test(a)?["svg-align"]:[];R=Bt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:o,shift:c,wrapperClasses:A}]})}return/cancel/.test(a)&&(R.height=n.height,R.depth=n.depth),/cancel/.test(a)&&!d?Ne(["mord","cancel-lap"],[R],t):Ne(["mord"],[R],t)},Wu=(e,t)=>{var n,a=new _e(e.label.includes("colorbox")?"mpadded":"menclose",[en(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*n+"pt"),a.setAttribute("height","+"+2*n+"pt"),a.setAttribute("lspace",n+"pt"),a.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+Me(s)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Be({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,o=pt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:s,backgroundColor:o,body:c}},htmlBuilder:Qu,mathmlBuilder:Wu});Be({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,o=pt(t[0],"color-token").color,c=pt(t[1],"color-token").color,d=t[2];return{type:"enclose",mode:a.mode,label:s,backgroundColor:c,borderColor:o,body:d}},htmlBuilder:Qu,mathmlBuilder:Wu});Be({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});Be({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"enclose",mode:n.mode,label:a,body:s}},htmlBuilder:Qu,mathmlBuilder:Wu});Be({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=t[0];return{type:"enclose",mode:n.mode,label:a,body:s}},htmlBuilder:Qu,mathmlBuilder:Wu});Be({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var D5={};function fa(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:o,mathmlBuilder:c}=e,d={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},m=0;m<n.length;++m)D5[n[m]]=d;o&&(Su[t]=o),c&&(ku[t]=c)}var j5={};function L(e,t){j5[e]=t}class xr{constructor(t,n,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=a}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new xr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class jr{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new jr(n,xr.range(this,t))}}function Uv(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var Ju=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Ae("{"+e.envName+"} can be used only in display mode.")},LA=new Set(["gather","gather*"]);function cp(e){if(!e.includes("ed"))return!e.includes("*")}function Ii(e,t,n){var{hskipBeforeAndAfter:a,addJot:s,cols:o,arraystretch:c,colSeparationType:d,autoTag:m,singleRow:h,emptySingleRow:g,maxNumCols:b,leqno:x}=t;if(e.gullet.beginGroup(),h||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var y=e.gullet.expandMacroAsText("\\arraystretch");if(y==null)c=1;else if(c=parseFloat(y),!c||c<0)throw new Ae("Invalid \\arraystretch: "+y)}e.gullet.beginGroup();var S=[],E=[S],M=[],C=[],R=m!=null?[]:void 0;function A(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function H(){R&&(e.gullet.macros.get("\\df@tag")?(R.push(e.subparse([new jr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):R.push(!!m&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),C.push(Uv(e));;){var F=e.parseExpression(!1,h?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var D={type:"ordgroup",mode:e.mode,body:F};n&&(D={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[D]}),S.push(D);var $=e.fetch().text;if($==="&"){if(b&&S.length===b){if(h||d)throw new Ae("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if($==="\\end"){H(),S.length===1&&D.type==="styling"&&D.body.length===1&&D.body[0].type==="ordgroup"&&D.body[0].body.length===0&&(E.length>1||!g)&&E.pop(),C.length<E.length+1&&C.push([]);break}else if($==="\\\\"){e.consume();var P=void 0;e.gullet.future().text!==" "&&(P=e.parseSizeGroup(!0)),M.push(P?P.value:null),H(),C.push(Uv(e)),S=[],E.push(S),A()}else throw new Ae("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:c,body:E,cols:o,rowGaps:M,hskipBeforeAndAfter:a,hLinesBeforeRow:C,colSeparationType:d,tags:R,leqno:x}}function up(e){return e.slice(0,1)==="d"?"display":"text"}var ma=function(t,n){var a,s,o=t.body.length,c=t.hLinesBeforeRow,d=0,m=new Array(o),h=[],g=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),b=1/n.fontMetrics().ptPerEm,x=5*b;if(t.colSeparationType&&t.colSeparationType==="small"){var y=n.havingStyle(ct.SCRIPT).sizeMultiplier;x=.2778*(y/n.sizeMultiplier)}var S=t.colSeparationType==="CD"?fn({number:3,unit:"ex"},n):12*b,E=3*b,M=t.arraystretch*S,C=.7*M,R=.3*M,A=0;function H(Ue){for(var Ze=0;Ze<Ue.length;++Ze)Ze>0&&(A+=.25),h.push({pos:A,isDashed:Ue[Ze]})}for(H(c[0]),a=0;a<t.body.length;++a){var F=t.body[a],D=C,$=R;d<F.length&&(d=F.length);var P={cells:new Array(F.length),height:0,depth:0,pos:0};for(s=0;s<F.length;++s){var ee=Ut(F[s],n);$<ee.depth&&($=ee.depth),D<ee.height&&(D=ee.height),P.cells[s]=ee}var q=t.rowGaps[a],Z=0;q&&(Z=fn(q,n),Z>0&&(Z+=R,$<Z&&($=Z),Z=0)),t.addJot&&a<t.body.length-1&&($+=E),P.height=D,P.depth=$,A+=D,P.pos=A,A+=$+Z,m[a]=P,H(c[a+1])}var G=A/2+n.fontMetrics().axisHeight,le=t.cols||[],W=[],U,z,V=[];if(t.tags&&t.tags.some(Ue=>Ue))for(a=0;a<o;++a){var ne=m[a],we=ne.pos-G,O=t.tags[a],B=void 0;O===!0?B=Ne(["eqn-num"],[],n):O===!1?B=Ne([],[],n):B=Ne([],qn(O,n,!0),n),B.depth=ne.depth,B.height=ne.height,V.push({type:"elem",elem:B,shift:we})}for(s=0,z=0;s<d||z<le.length;++s,++z){for(var Y,_=le[z],ce=!0;((he=_)==null?void 0:he.type)==="separator";){var he;if(ce||(U=Ne(["arraycolsep"],[]),U.style.width=Me(n.fontMetrics().doubleRuleSep),W.push(U)),_.separator==="|"||_.separator===":"){var ie=_.separator==="|"?"solid":"dashed",ae=Ne(["vertical-separator"],[],n);ae.style.height=Me(A),ae.style.borderRightWidth=Me(g),ae.style.borderRightStyle=ie,ae.style.margin="0 "+Me(-g/2);var ge=A-G;ge&&(ae.style.verticalAlign=Me(-ge)),W.push(ae)}else throw new Ae("Invalid separator type: "+_.separator);z++,_=le[z],ce=!1}if(!(s>=d)){var ve=void 0;if(s>0||t.hskipBeforeAndAfter){var Ie,He;ve=(Ie=(He=_)==null?void 0:He.pregap)!=null?Ie:x,ve!==0&&(U=Ne(["arraycolsep"],[]),U.style.width=Me(ve),W.push(U))}var Ee=[];for(a=0;a<o;++a){var nt=m[a],mt=nt.cells[s];if(mt){var qt=nt.pos-G;mt.depth=nt.depth,mt.height=nt.height,Ee.push({type:"elem",elem:mt,shift:qt})}}var Zt=Bt({positionType:"individualShift",children:Ee}),vn=Ne(["col-align-"+(((Y=_)==null?void 0:Y.align)||"c")],[Zt]);if(W.push(vn),s<d-1||t.hskipBeforeAndAfter){var Tn,mn;ve=(Tn=(mn=_)==null?void 0:mn.postgap)!=null?Tn:x,ve!==0&&(U=Ne(["arraycolsep"],[]),U.style.width=Me(ve),W.push(U))}}}var Ht=Ne(["mtable"],W);if(h.length>0){for(var We=nl("hline",n,g),xt=nl("hdashline",n,g),jt=[{type:"elem",elem:Ht,shift:0}];h.length>0;){var Fe=h.pop(),Kt=Fe.pos-G;Fe.isDashed?jt.push({type:"elem",elem:xt,shift:Kt}):jt.push({type:"elem",elem:We,shift:Kt})}Ht=Bt({positionType:"individualShift",children:jt})}if(V.length===0)return Ne(["mord"],[Ht],n);var fe=Bt({positionType:"individualShift",children:V}),be=Ne(["tag"],[fe],n);return Ga([Ht,be])},zA={c:"center ",l:"left ",r:"right "},ha=function(t,n){for(var a=[],s=new _e("mtd",[],["mtr-glue"]),o=new _e("mtd",[],["mml-eqn-num"]),c=0;c<t.body.length;c++){for(var d=t.body[c],m=[],h=0;h<d.length;h++)m.push(new _e("mtd",[en(d[h],n)]));t.tags&&t.tags[c]&&(m.unshift(s),m.push(s),t.leqno?m.unshift(o):m.push(o)),a.push(new _e("mtr",m))}var g=new _e("mtable",a),b=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);g.setAttribute("rowspacing",Me(b));var x="",y="";if(t.cols&&t.cols.length>0){var S=t.cols,E="",M=!1,C=0,R=S.length;S[0].type==="separator"&&(x+="top ",C=1),S[S.length-1].type==="separator"&&(x+="bottom ",R-=1);for(var A=C;A<R;A++){var H=S[A];H.type==="align"?(y+=zA[H.align],M&&(E+="none "),M=!0):H.type==="separator"&&M&&(E+=H.separator==="|"?"solid ":"dashed ",M=!1)}g.setAttribute("columnalign",y.trim()),/[sd]/.test(E)&&g.setAttribute("columnlines",E.trim())}if(t.colSeparationType==="align"){for(var F=t.cols||[],D="",$=1;$<F.length;$++)D+=$%2?"0em ":"1em ";g.setAttribute("columnspacing",D.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?g.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?g.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?g.setAttribute("columnspacing","0.5em"):g.setAttribute("columnspacing","1em");var P="",ee=t.hLinesBeforeRow;x+=ee[0].length>0?"left ":"",x+=ee[ee.length-1].length>0?"right ":"";for(var q=1;q<ee.length-1;q++)P+=ee[q].length===0?"none ":ee[q][0]?"dashed ":"solid ";return/[sd]/.test(P)&&g.setAttribute("rowlines",P.trim()),x!==""&&(g=new _e("menclose",[g]),g.setAttribute("notation",x.trim())),t.arraystretch&&t.arraystretch<1&&(g=new _e("mstyle",[g]),g.setAttribute("scriptlevel","1")),g},L5=function(t,n){t.envName.includes("ed")||Ju(t);var a=[],s=t.envName.includes("at")?"alignat":"align",o=t.envName==="split",c=Ii(t.parser,{cols:a,addJot:!0,autoTag:o?void 0:cp(t.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:o?2:void 0,leqno:t.parser.settings.leqno},"display"),d=0,m=0,h={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var g="",b=0;b<n[0].body.length;b++){var x=pt(n[0].body[b],"textord");g+=x.text}d=Number(g),m=d*2}var y=!m;c.body.forEach(function(C){for(var R=1;R<C.length;R+=2){var A=pt(C[R],"styling"),H=pt(A.body[0],"ordgroup");H.body.unshift(h)}if(y)m<C.length&&(m=C.length);else{var F=C.length/2;if(d<F)throw new Ae("Too many math in a row: "+("expected "+d+", but got "+F),C[0])}});for(var S=0;S<m;++S){var E="r",M=0;S%2===1?E="l":S>0&&y&&(M=1),a[S]={type:"align",align:E,pregap:M,postgap:0}}return c.colSeparationType=y?"align":"alignat",c};fa({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Yu(t[0]),a=n?[t[0]]:pt(t[0],"ordgroup").body,s=a.map(function(c){var d=Vu(c),m=d.text;if("lcr".includes(m))return{type:"align",align:m};if(m==="|")return{type:"separator",separator:"|"};if(m===":")return{type:"separator",separator:":"};throw new Ae("Unknown column alignment: "+m,c)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Ii(e.parser,o,up(e.envName))},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new Ae("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),a.cols=[{type:"align",align:n}]}}var o=Ii(e.parser,a,up(e.envName)),c=Math.max(0,...o.body.map(d=>d.length));return o.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Ii(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Yu(t[0]),a=n?[t[0]]:pt(t[0],"ordgroup").body,s=a.map(function(d){var m=Vu(d),h=m.text;if("lc".includes(h))return{type:"align",align:h};throw new Ae("Unknown column alignment: "+h,d)});if(s.length>1)throw new Ae("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},c=Ii(e.parser,o,"script");if(c.body.length>0&&c.body[0].length>1)throw new Ae("{subarray} can contain only one column");return c},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=Ii(e.parser,t,up(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:L5,htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){LA.has(e.envName)&&Ju(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:cp(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ii(e.parser,t,"display")},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:L5,htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ju(e);var t={autoTag:cp(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ii(e.parser,t,"display")},htmlBuilder:ma,mathmlBuilder:ha});fa({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Ju(e),EA(e.parser)},htmlBuilder:ma,mathmlBuilder:ha});L("\\nonumber","\\gdef\\@eqnsw{0}");L("\\notag","\\nonumber");Be({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ae(e.funcName+" valid only within array environment")}});var qv=D5;Be({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];if(s.type!=="ordgroup")throw new Ae("Invalid environment name",s);for(var o="",c=0;c<s.body.length;++c)o+=pt(s.body[c],"textord").text;if(a==="\\begin"){if(!qv.hasOwnProperty(o))throw new Ae("No such environment: "+o,s);var d=qv[o],{args:m,optArgs:h}=n.parseArguments("\\begin{"+o+"}",d),g={mode:n.mode,envName:o,parser:n},b=d.handler(g,m,h);n.expect("\\end",!1);var x=n.nextToken,y=pt(n.parseFunction(),"environment");if(y.name!==o)throw new Ae("Mismatch: \\begin{"+o+"} matched by \\end{"+y.name+"}",x);return b}return{type:"environment",mode:n.mode,name:o,nameGroup:s}}});var z5=(e,t)=>{var n=e.font,a=t.withFont(n);return Ut(e.body,a)},B5=(e,t)=>{var n=e.font,a=t.withFont(n);return en(e.body,a)},Hv={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Be({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=Eu(t[0]),o=a;return o in Hv&&(o=Hv[o]),{type:"font",mode:n.mode,font:o.slice(1),body:s}},htmlBuilder:z5,mathmlBuilder:B5});Be({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:Xu(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:Pa(a)}}});Be({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,breakOnTokenText:s}=e,{mode:o}=n,c=n.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:z5,mathmlBuilder:B5});var BA=(e,t)=>{var n=t.style,a=n.fracNum(),s=n.fracDen(),o;o=t.havingStyle(a);var c=Ut(e.numer,o,t);if(e.continued){var d=8.5/t.fontMetrics().ptPerEm,m=3.5/t.fontMetrics().ptPerEm;c.height=c.height<d?d:c.height,c.depth=c.depth<m?m:c.depth}o=t.havingStyle(s);var h=Ut(e.denom,o,t),g,b,x;e.hasBarLine?(e.barSize?(b=fn(e.barSize,t),g=nl("frac-line",t,b)):g=nl("frac-line",t),b=g.height,x=g.height):(g=null,b=0,x=t.fontMetrics().defaultRuleThickness);var y,S,E;n.size===ct.DISPLAY.size?(y=t.fontMetrics().num1,b>0?S=3*x:S=7*x,E=t.fontMetrics().denom1):(b>0?(y=t.fontMetrics().num2,S=x):(y=t.fontMetrics().num3,S=3*x),E=t.fontMetrics().denom2);var M;if(g){var R=t.fontMetrics().axisHeight;y-c.depth-(R+.5*b)<S&&(y+=S-(y-c.depth-(R+.5*b))),R-.5*b-(h.height-E)<S&&(E+=S-(R-.5*b-(h.height-E)));var A=-(R-.5*b);M=Bt({positionType:"individualShift",children:[{type:"elem",elem:h,shift:E},{type:"elem",elem:g,shift:A},{type:"elem",elem:c,shift:-y}]})}else{var C=y-c.depth-(h.height-E);C<S&&(y+=.5*(S-C),E+=.5*(S-C)),M=Bt({positionType:"individualShift",children:[{type:"elem",elem:h,shift:E},{type:"elem",elem:c,shift:-y}]})}o=t.havingStyle(n),M.height*=o.sizeMultiplier/t.sizeMultiplier,M.depth*=o.sizeMultiplier/t.sizeMultiplier;var H;n.size===ct.DISPLAY.size?H=t.fontMetrics().delim1:n.size===ct.SCRIPTSCRIPT.size?H=t.havingStyle(ct.SCRIPT).fontMetrics().delim2:H=t.fontMetrics().delim2;var F,D;return e.leftDelim==null?F=Eo(t,["mopen"]):F=gh(e.leftDelim,H,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?D=Ne([]):e.rightDelim==null?D=Eo(t,["mclose"]):D=gh(e.rightDelim,H,!0,t.havingStyle(n),e.mode,["mclose"]),Ne(["mord"].concat(o.sizingClasses(t)),[F,Ne(["mfrac"],[M]),D],t)},UA=(e,t)=>{var n=new _e("mfrac",[en(e.numer,t),en(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=fn(e.barSize,t);n.setAttribute("linethickness",Me(a))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new _e("mo",[new Dn(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),e.rightDelim!=null){var c=new _e("mo",[new Dn(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),s.push(c)}return ip(s)}return n},U5=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Be({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0],o=t[1],c,d=null,m=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":c=!0;break;case"\\\\atopfrac":c=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":c=!1,d="(",m=")";break;case"\\\\bracefrac":c=!1,d="\\{",m="\\}";break;case"\\\\brackfrac":c=!1,d="[",m="]";break;default:throw new Error("Unrecognized genfrac command")}var h=a==="\\cfrac",g=null;return h||a.startsWith("\\d")?g="display":a.startsWith("\\t")&&(g="text"),U5({type:"genfrac",mode:n.mode,numer:s,denom:o,continued:h,hasBarLine:c,leftDelim:d,rightDelim:m,barSize:null},g)},htmlBuilder:BA,mathmlBuilder:UA});Be({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:a}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:a}}});var Fv=["display","text","script","scriptscript"],Pv=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Be({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,a=t[4],s=t[5],o=Eu(t[0]),c=o.type==="atom"&&o.family==="open"?Pv(o.text):null,d=Eu(t[1]),m=d.type==="atom"&&d.family==="close"?Pv(d.text):null,h=pt(t[2],"size"),g,b=null;h.isBlank?g=!0:(b=h.value,g=b.number>0);var x=null,y=t[3];if(y.type==="ordgroup"){if(y.body.length>0){var S=pt(y.body[0],"textord");x=Fv[Number(S.text)]}}else y=pt(y,"textord"),x=Fv[Number(y.text)];return U5({type:"genfrac",mode:n.mode,numer:a,denom:s,continued:!1,hasBarLine:g,barSize:b,leftDelim:c,rightDelim:m},x)}});Be({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:a,token:s}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:pt(t[0],"size").value,token:s}}});Be({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0],o=pt(t[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var c=t[2],d=o.number>0;return{type:"genfrac",mode:n.mode,numer:s,denom:c,continued:!1,hasBarLine:d,barSize:o,leftDelim:null,rightDelim:null}}});var q5=(e,t)=>{var n=t.style,a,s;e.type==="supsub"?(a=e.sup?Ut(e.sup,t.havingStyle(n.sup()),t):Ut(e.sub,t.havingStyle(n.sub()),t),s=pt(e.base,"horizBrace")):s=pt(e,"horizBrace");var o=Ut(s.base,t.havingBaseStyle(ct.DISPLAY)),c=Ku(s,t),d;if(s.isOver?d=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):d=Bt({positionType:"bottom",positionData:o.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),a){var m=Ne(["minner",s.isOver?"mover":"munder"],[d],t);s.isOver?d=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:m},{type:"kern",size:.2},{type:"elem",elem:a}]}):d=Bt({positionType:"bottom",positionData:m.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:m}]})}return Ne(["minner",s.isOver?"mover":"munder"],[d],t)},qA=(e,t)=>{var n=Gu(e.label);return new _e(e.isOver?"mover":"munder",[en(e.base,t),n])};Be({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"horizBrace",mode:n.mode,label:a,isOver:a.includes("\\over"),base:t[0]}},htmlBuilder:q5,mathmlBuilder:qA});Be({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],s=pt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:n.mode,href:s,body:On(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=qn(e.body,t,!1);return JC(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ri(e.body,t);return n instanceof _e||(n=new _e("mrow",[n])),n.setAttribute("href",e.href),n}});Be({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=pt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var s=[],o=0;o<a.length;o++){var c=a[o];c==="~"&&(c="\\textasciitilde"),s.push({type:"textord",mode:"text",text:c})}var d={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:a,body:On(d)}}});Be({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:On(t[0])}},htmlBuilder(e,t){var n=qn(e.body,t.withFont(""),!1);return Ga(n)},mathmlBuilder(e,t){return new _e("mrow",Br(e.body,t.withFont("")))}});Be({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,token:s}=e,o=pt(t[0],"raw").string,c=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var d,m={};switch(a){case"\\htmlClass":m.class=o,d={command:"\\htmlClass",class:o};break;case"\\htmlId":m.id=o,d={command:"\\htmlId",id:o};break;case"\\htmlStyle":m.style=o,d={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var h=o.split(","),g=0;g<h.length;g++){var b=h[g],x=b.indexOf("=");if(x<0)throw new Ae("\\htmlData key/value '"+b+"' missing equals sign");var y=b.slice(0,x),S=b.slice(x+1);m["data-"+y.trim()]=S}d={command:"\\htmlData",attributes:m};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(d)?{type:"html",mode:n.mode,attributes:m,body:On(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=qn(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var s=Ne(a,n,t);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);return s},mathmlBuilder:(e,t)=>Ri(e.body,t)});Be({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:On(t[0]),mathml:On(t[1])}},htmlBuilder:(e,t)=>{var n=qn(e.html,t,!1);return Ga(n)},mathmlBuilder:(e,t)=>Ri(e.mathml,t)});var Yf=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ae("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!n5(a))throw new Ae("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Be({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:a}=e,s={number:0,unit:"em"},o={number:.9,unit:"em"},c={number:0,unit:"em"},d="";if(n[0])for(var m=pt(n[0],"raw").string,h=m.split(","),g=0;g<h.length;g++){var b=h[g].split("=");if(b.length===2){var x=b[1].trim();switch(b[0].trim()){case"alt":d=x;break;case"width":s=Yf(x);break;case"height":o=Yf(x);break;case"totalheight":c=Yf(x);break;default:throw new Ae("Invalid key: '"+b[0]+"' in \\includegraphics.")}}}var y=pt(t[0],"url").url;return d===""&&(d=y,d=d.replace(/^.*[\\/]/,""),d=d.substring(0,d.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:y})?{type:"includegraphics",mode:a.mode,alt:d,width:s,height:o,totalheight:c,src:y}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=fn(e.height,t),a=0;e.totalheight.number>0&&(a=fn(e.totalheight,t)-n);var s=0;e.width.number>0&&(s=fn(e.width,t));var o={height:Me(n+a)};s>0&&(o.width=Me(s)),a>0&&(o.verticalAlign=Me(-a));var c=new FC(e.src,e.alt,o);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new _e("mglyph",[]);n.setAttribute("alt",e.alt);var a=fn(e.height,t),s=0;if(e.totalheight.number>0&&(s=fn(e.totalheight,t)-a,n.setAttribute("valign",Me(-s))),n.setAttribute("height",Me(a+s)),e.width.number>0){var o=fn(e.width,t);n.setAttribute("width",Me(o))}return n.setAttribute("src",e.src),n}});Be({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,s=pt(t[0],"size");if(n.settings.strict){var o=a[1]==="m",c=s.value.unit==="mu";o?(c||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+s.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):c&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return c5(e.dimension,t)},mathmlBuilder(e,t){var n=fn(e.dimension,t);return new p5(n)}});Be({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:a.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=Ne([],[Ut(e.body,t)]),n=Ne(["inner"],[n],t)):n=Ne(["inner"],[Ut(e.body,t)]);var a=Ne(["fix"],[]),s=Ne([e.alignment],[n,a],t),o=Ne(["strut"]);return o.style.height=Me(s.height+s.depth),s.depth&&(o.style.verticalAlign=Me(-s.depth)),s.children.unshift(o),s=Ne(["thinbox"],[s],t),Ne(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new _e("mpadded",[en(e.body,t)]);if(e.alignment!=="rlap"){var a=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",a+"width")}return n.setAttribute("width","0px"),n}});Be({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:a}=e,s=a.mode;a.switchMode("math");var o=n==="\\("?"\\)":"$",c=a.parseExpression(!1,o);return a.expect(o),a.switchMode(s),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:c}}});Be({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ae("Mismatched "+e.funcName)}});var $v=(e,t)=>{switch(t.style.size){case ct.DISPLAY.size:return e.display;case ct.TEXT.size:return e.text;case ct.SCRIPT.size:return e.script;case ct.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Be({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:On(t[0]),text:On(t[1]),script:On(t[2]),scriptscript:On(t[3])}},htmlBuilder:(e,t)=>{var n=$v(e,t),a=qn(n,t,!1);return Ga(a)},mathmlBuilder:(e,t)=>{var n=$v(e,t);return Ri(n,t)}});var H5=(e,t,n,a,s,o,c)=>{e=Ne([],[e]);var d=n&&Pa(n),m,h;if(t){var g=Ut(t,a.havingStyle(s.sup()),a);h={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(n){var b=Ut(n,a.havingStyle(s.sub()),a);m={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-b.height)}}var x;if(h&&m){var y=a.fontMetrics().bigOpSpacing5+m.elem.height+m.elem.depth+m.kern+e.depth+c;x=Bt({positionType:"bottom",positionData:y,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:Me(-o)},{type:"kern",size:m.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Me(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(m){var S=e.height-c;x=Bt({positionType:"top",positionData:S,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:Me(-o)},{type:"kern",size:m.kern},{type:"elem",elem:e}]})}else if(h){var E=e.depth+c;x=Bt({positionType:"bottom",positionData:E,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Me(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var M=[x];if(m&&o!==0&&!d){var C=Ne(["mspace"],[],a);C.style.marginRight=Me(o),M.unshift(C)}return Ne(["mop","op-limits"],M,a)},F5=new Set(["\\smallint"]),ul=(e,t)=>{var n,a,s=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=pt(e.base,"op"),s=!0):o=pt(e,"op");var c=t.style,d=!1;c.size===ct.DISPLAY.size&&o.symbol&&!F5.has(o.name)&&(d=!0);var m,h;if(o.symbol){var g=d?"Size2-Regular":"Size1-Regular",b="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(b=o.name.slice(1),o.name=b==="oiint"?"\\iint":"\\iiint"),m=sr(o.name,g,"math",t,["mop","op-symbol",d?"large-op":"small-op"]),h=m.italic,b.length>0){var x=d5(b+"Size"+(d?"2":"1"),t);m=Bt({positionType:"individualShift",children:[{type:"elem",elem:m,shift:0},{type:"elem",elem:x,shift:d?.08:0}]}),o.name="\\"+b,m.classes.unshift("mop"),m.italic=h}}else if(o.body){var y=qn(o.body,t,!0);y.length===1&&y[0]instanceof Lr?(m=y[0],m.classes[0]="mop"):m=Ne(["mop"],y,t)}else{for(var S=[],E=1;E<o.name.length;E++)S.push(rp(o.name[E],o.mode,t));m=Ne(["mop"],S,t)}var M=0,C=0;if((m instanceof Lr||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift){var R;M=(m.height-m.depth)/2-t.fontMetrics().axisHeight,C=(R=m.italic)!=null?R:0}return s?H5(m,n,a,t,c,C,M):(M&&(m.style.position="relative",m.style.top=Me(M)),m)},_o=(e,t)=>{var n;if(e.symbol)n=new _e("mo",[Zr(e.name,e.mode)]),F5.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new _e("mo",Br(e.body,t));else{n=new _e("mi",[new Dn(e.name.slice(1))]);var a=new _e("mo",[Zr("⁡","text")]);e.parentIsSupSub?n=new _e("mrow",[n,a]):n=h5([n,a])}return n},HA={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Be({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=a;return s.length===1&&(s=HA[s]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:ul,mathmlBuilder:_o});Be({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:On(a)}},htmlBuilder:ul,mathmlBuilder:_o});var FA={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Be({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ul,mathmlBuilder:_o});Be({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ul,mathmlBuilder:_o});Be({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,a=n;return a.length===1&&(a=FA[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ul,mathmlBuilder:_o});var P5=(e,t)=>{var n,a,s=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=pt(e.base,"operatorname"),s=!0):o=pt(e,"operatorname");var c;if(o.body.length>0){for(var d=o.body.map(b=>{var x="text"in b?b.text:void 0;return typeof x=="string"?{type:"textord",mode:b.mode,text:x}:b}),m=qn(d,t.withFont("mathrm"),!0),h=0;h<m.length;h++){var g=m[h];g instanceof Lr&&(g.text=g.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}c=Ne(["mop"],m,t)}else c=Ne(["mop"],[],t);return s?H5(c,n,a,t,t.style,0,0):c},PA=(e,t)=>{for(var n=Br(e.body,t.withFont("mathrm")),a=!0,s=0;s<n.length;s++){var o=n[s];if(!(o instanceof p5))if(o instanceof _e)switch(o.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=o.children[0];o.children.length===1&&c instanceof Dn?c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var d=n.map(g=>g.toText()).join("");n=[new Dn(d)]}var m=new _e("mi",n);m.setAttribute("mathvariant","normal");var h=new _e("mo",[Zr("⁡","text")]);return e.parentIsSupSub?new _e("mrow",[m,h]):h5([m,h])};Be({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:On(s),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:P5,mathmlBuilder:PA});L("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");us({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ga(qn(e.body,t,!1)):Ne(["mord"],qn(e.body,t,!0),t)},mathmlBuilder(e,t){return Ri(e.body,t,!0)}});Be({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,a=t[0];return{type:"overline",mode:n.mode,body:a}},htmlBuilder(e,t){var n=Ut(e.body,t.havingCrampedStyle()),a=nl("overline-line",t),s=t.fontMetrics().defaultRuleThickness,o=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:a},{type:"kern",size:s}]});return Ne(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new _e("mo",[new Dn("‾")]);n.setAttribute("stretchy","true");var a=new _e("mover",[en(e.body,t),n]);return a.setAttribute("accent","true"),a}});Be({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"phantom",mode:n.mode,body:On(a)}},htmlBuilder:(e,t)=>{var n=qn(e.body,t.withPhantom(),!1);return Ga(n)},mathmlBuilder:(e,t)=>{var n=Br(e.body,t);return new _e("mphantom",n)}});L("\\hphantom","\\smash{\\phantom{#1}}");Be({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"vphantom",mode:n.mode,body:a}},htmlBuilder:(e,t)=>{var n=Ne(["inner"],[Ut(e.body,t.withPhantom())]),a=Ne(["fix"],[]);return Ne(["mord","rlap"],[n,a],t)},mathmlBuilder:(e,t)=>{var n=Br(On(e.body),t),a=new _e("mphantom",n),s=new _e("mpadded",[a]);return s.setAttribute("width","0px"),s}});Be({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,a=pt(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:s}},htmlBuilder(e,t){var n=Ut(e.body,t),a=fn(e.dy,t);return Bt({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new _e("mpadded",[en(e.body,t)]),a=e.dy.number+e.dy.unit;return n.setAttribute("voffset",a),n}});Be({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Be({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:a}=e,s=n[0],o=pt(t[0],"size"),c=pt(t[1],"size");return{type:"rule",mode:a.mode,shift:s&&pt(s,"size").value,width:o.value,height:c.value}},htmlBuilder(e,t){var n=Ne(["mord","rule"],[],t),a=fn(e.width,t),s=fn(e.height,t),o=e.shift?fn(e.shift,t):0;return n.style.borderRightWidth=Me(a),n.style.borderTopWidth=Me(s),n.style.bottom=Me(o),n.width=a,n.height=s+o,n.depth=-o,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=fn(e.width,t),a=fn(e.height,t),s=e.shift?fn(e.shift,t):0,o=t.color&&t.getColor()||"black",c=new _e("mspace");c.setAttribute("mathbackground",o),c.setAttribute("width",Me(n)),c.setAttribute("height",Me(a));var d=new _e("mpadded",[c]);return s>=0?d.setAttribute("height",Me(s)):(d.setAttribute("height",Me(s)),d.setAttribute("depth",Me(-s))),d.setAttribute("voffset",Me(s)),d}});function $5(e,t,n){for(var a=qn(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier,o=0;o<a.length;o++){var c=a[o].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[o].classes,t.sizingClasses(n)):a[o].classes[c+1]==="reset-size"+t.size&&(a[o].classes[c+1]="reset-size"+n.size),a[o].height*=s,a[o].depth*=s}return Ga(a)}var Gv=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],$A=(e,t)=>{var n=t.havingSize(e.size);return $5(e.body,n,t)};Be({type:"sizing",names:Gv,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:s}=e,o=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:Gv.indexOf(a)+1,body:o}},htmlBuilder:$A,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=Br(e.body,n),s=new _e("mstyle",a);return s.setAttribute("mathsize",Me(n.sizeMultiplier)),s}});Be({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:a}=e,s=!1,o=!1,c=n[0]&&pt(n[0],"ordgroup");if(c)for(var d,m=0;m<c.body.length;++m){var h=c.body[m];if(d=Vu(h).text,d==="t")s=!0;else if(d==="b")o=!0;else{s=!1,o=!1;break}}else s=!0,o=!0;var g=t[0];return{type:"smash",mode:a.mode,body:g,smashHeight:s,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Ne([],[Ut(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return Ne(["mord","smash"],[n],t);if(n.children)for(var a=0;a<n.children.length;a++)e.smashHeight&&(n.children[a].height=0),e.smashDepth&&(n.children[a].depth=0);var s=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Ne(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new _e("mpadded",[en(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Be({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a}=e,s=n[0],o=t[0];return{type:"sqrt",mode:a.mode,body:o,index:s}},htmlBuilder(e,t){var n=Ut(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=rl(n,t);var a=t.fontMetrics(),s=a.defaultRuleThickness,o=s;t.style.id<ct.TEXT.id&&(o=t.fontMetrics().xHeight);var c=s+o/4,d=n.height+n.depth+c+s,{span:m,ruleWidth:h,advanceWidth:g}=_A(d,t),b=m.height-h;b>n.height+n.depth+c&&(c=(c+b-n.height-n.depth)/2);var x=m.height-n.height-c-h;n.style.paddingLeft=Me(g);var y=Bt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+x)},{type:"elem",elem:m},{type:"kern",size:h}]});if(e.index){var S=t.havingStyle(ct.SCRIPTSCRIPT),E=Ut(e.index,S,t),M=.6*(y.height-y.depth),C=Bt({positionType:"shift",positionData:-M,children:[{type:"elem",elem:E}]}),R=Ne(["root"],[C]);return Ne(["mord","sqrt"],[R,y],t)}else return Ne(["mord","sqrt"],[y],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new _e("mroot",[en(n,t),en(a,t)]):new _e("msqrt",[en(n,t)])}});var bh={display:ct.DISPLAY,text:ct.TEXT,script:ct.SCRIPT,scriptscript:ct.SCRIPTSCRIPT};function GA(e){return e in bh}Be({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:a,parser:s}=e,o=s.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!GA(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:s.mode,style:c,body:o}},htmlBuilder(e,t){var n=bh[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),$5(e.body,a,t)},mathmlBuilder(e,t){var n=bh[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var s=Br(e.body,a),o=new _e("mstyle",s),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},d=c[e.style];return o.setAttribute("scriptlevel",d[0]),o.setAttribute("displaystyle",d[1]),o}});var KA=function(t,n){var a=t.base;if(a)if(a.type==="op"){var s=a.limits&&(n.style.size===ct.DISPLAY.size||a.alwaysHandleSupSub);return s?ul:null}else if(a.type==="operatorname"){var o=a.alwaysHandleSupSub&&(n.style.size===ct.DISPLAY.size||a.limits);return o?P5:null}else{if(a.type==="accent")return Pa(a.base)?lp:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?q5:null}else return null}else return null};us({type:"supsub",htmlBuilder(e,t){var n=KA(e,t);if(n)return n(e,t);var{base:a,sup:s,sub:o}=e,c=Ut(a,t),d,m,h=t.fontMetrics(),g=0,b=0,x=a&&Pa(a);if(s){var y=t.havingStyle(t.style.sup());d=Ut(s,y,t),x||(g=c.height-y.fontMetrics().supDrop*y.sizeMultiplier/t.sizeMultiplier)}if(o){var S=t.havingStyle(t.style.sub());m=Ut(o,S,t),x||(b=c.depth+S.fontMetrics().subDrop*S.sizeMultiplier/t.sizeMultiplier)}var E;t.style===ct.DISPLAY?E=h.sup1:t.style.cramped?E=h.sup3:E=h.sup2;var M=t.sizeMultiplier,C=Me(.5/h.ptPerEm/M),R=null;if(m){var A=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Lr||A){var H;R=Me(-((H=c.italic)!=null?H:0))}}var F;if(d&&m){g=Math.max(g,E,d.depth+.25*h.xHeight),b=Math.max(b,h.sub2);var D=h.defaultRuleThickness,$=4*D;if(g-d.depth-(m.height-b)<$){b=$-(g-d.depth)+m.height;var P=.8*h.xHeight-(g-d.depth);P>0&&(g+=P,b-=P)}var ee=[{type:"elem",elem:m,shift:b,marginRight:C,marginLeft:R},{type:"elem",elem:d,shift:-g,marginRight:C}];F=Bt({positionType:"individualShift",children:ee})}else if(m){b=Math.max(b,h.sub1,m.height-.8*h.xHeight);var q=[{type:"elem",elem:m,marginLeft:R,marginRight:C}];F=Bt({positionType:"shift",positionData:b,children:q})}else if(d)g=Math.max(g,E,d.depth+.25*h.xHeight),F=Bt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d,marginRight:C}]});else throw new Error("supsub must have either sup or sub.");var Z=fh(c,"right")||"mord";return Ne([Z],[c,Ne(["msupsub"],[F])],t)},mathmlBuilder(e,t){var n=!1,a,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(n=!0,a=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var o=[en(e.base,t)];e.sub&&o.push(en(e.sub,t)),e.sup&&o.push(en(e.sup,t));var c;if(n)c=a?"mover":"munder";else if(e.sub)if(e.sup){var h=e.base;h&&h.type==="op"&&h.limits&&t.style===ct.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(t.style===ct.DISPLAY||h.limits)?c="munderover":c="msubsup"}else{var m=e.base;m&&m.type==="op"&&m.limits&&(t.style===ct.DISPLAY||m.alwaysHandleSupSub)||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(m.limits||t.style===ct.DISPLAY)?c="munder":c="msub"}else{var d=e.base;d&&d.type==="op"&&d.limits&&(t.style===ct.DISPLAY||d.alwaysHandleSupSub)||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(d.limits||t.style===ct.DISPLAY)?c="mover":c="msup"}return new _e(c,o)}});us({type:"atom",htmlBuilder(e,t){return rp(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new _e("mo",[Zr(e.text,e.mode)]);if(e.family==="bin"){var a=sp(e,t);a==="bold-italic"&&n.setAttribute("mathvariant",a)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var G5={mi:"italic",mn:"normal",mtext:"normal"};us({type:"mathord",htmlBuilder(e,t){return $u(e,t,"mathord")},mathmlBuilder(e,t){var n=new _e("mi",[Zr(e.text,e.mode,t)]),a=sp(e,t)||"italic";return a!==G5[n.type]&&n.setAttribute("mathvariant",a),n}});us({type:"textord",htmlBuilder(e,t){return $u(e,t,"textord")},mathmlBuilder(e,t){var n=Zr(e.text,e.mode,t),a=sp(e,t)||"normal",s;return e.mode==="text"?s=new _e("mtext",[n]):/[0-9]/.test(e.text)?s=new _e("mn",[n]):e.text==="\\prime"?s=new _e("mo",[n]):s=new _e("mi",[n]),a!==G5[s.type]&&s.setAttribute("mathvariant",a),s}});var Xf={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Zf={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};us({type:"spacing",htmlBuilder(e,t){if(Zf.hasOwnProperty(e.text)){var n=Zf[e.text].className||"";if(e.mode==="text"){var a=$u(e,t,"textord");return a.classes.push(n),a}else return Ne(["mspace",n],[rp(e.text,e.mode,t)],t)}else{if(Xf.hasOwnProperty(e.text))return Ne(["mspace",Xf[e.text]],[],t);throw new Ae('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Zf.hasOwnProperty(e.text))n=new _e("mtext",[new Dn(" ")]);else{if(Xf.hasOwnProperty(e.text))return new _e("mspace");throw new Ae('Unknown type of space "'+e.text+'"')}return n}});var Kv=()=>{var e=new _e("mtd",[]);return e.setAttribute("width","50%"),e};us({type:"tag",mathmlBuilder(e,t){var n=new _e("mtable",[new _e("mtr",[Kv(),new _e("mtd",[Ri(e.body,t)]),Kv(),new _e("mtd",[Ri(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Vv={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Yv={"\\textbf":"textbf","\\textmd":"textmd"},VA={"\\textit":"textit","\\textup":"textup"},Xv=(e,t)=>{var n=e.font;if(n){if(Vv[n])return t.withTextFontFamily(Vv[n]);if(Yv[n])return t.withTextFontWeight(Yv[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(VA[n])};Be({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"text",mode:n.mode,body:On(s),font:a}},htmlBuilder(e,t){var n=Xv(e,t),a=qn(e.body,n,!0);return Ne(["mord","text"],a,n)},mathmlBuilder(e,t){var n=Xv(e,t);return Ri(e.body,n)}});Be({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ut(e.body,t),a=nl("underline-line",t),s=t.fontMetrics().defaultRuleThickness,o=Bt({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:a},{type:"kern",size:3*s},{type:"elem",elem:n}]});return Ne(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new _e("mo",[new Dn("‾")]);n.setAttribute("stretchy","true");var a=new _e("munder",[en(e.body,t),n]);return a.setAttribute("accentunder","true"),a}});Be({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ut(e.body,t),a=t.fontMetrics().axisHeight,s=.5*(n.height-a-(n.depth+a));return Bt({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new _e("mpadded",[en(e.body,t)],["vcenter"]);return new _e("mrow",[n])}});Be({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ae("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Zv(e),a=[],s=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var c=n[o];c==="~"&&(c="\\textasciitilde"),a.push(sr(c,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return Ne(["mord","text"].concat(s.sizingClasses(t)),o5(a),s)},mathmlBuilder(e,t){var n=new Dn(Zv(e)),a=new _e("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var Zv=e=>e.body.replace(/ /g,e.star?"␣":" "),Ei=f5,K5=`[ \r
296
- ]`,YA="\\\\[a-zA-Z@]+",XA="\\\\[^\uD800-\uDFFF]",ZA="("+YA+")"+K5+"*",QA=`\\\\(
297
- |[ \r ]+
298
- ?)[ \r ]*`,vh="[̀-ͯ]",WA=new RegExp(vh+"+$"),JA="("+K5+"+)|"+(QA+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(vh+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(vh+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+ZA)+("|"+XA+")");class Qv{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(JA,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new jr("EOF",new xr(this,n,n));var a=this.tokenRegex.exec(t);if(a===null||a.index!==n)throw new Ae("Unexpected character: '"+t[n]+"'",new jr(t[n],new xr(this,n,n+1)));var s=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[s]===14){var o=t.indexOf(`
299
- `,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new jr(s,new xr(this,n,this.tokenRegex.lastIndex))}}class eR{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ae("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,a){if(a===void 0&&(a=!1),a){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(t)&&(o[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var tR=j5;L("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});L("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});L("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});L("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});L("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});L("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");L("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Wv={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};L("\\char",function(e){var t=e.popToken(),n,a=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")a=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ae("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=Wv[t.text],a==null||a>=n)throw new Ae("Invalid base-"+n+" digit "+t.text);for(var s;(s=Wv[e.future().text])!=null&&s<n;)a*=n,a+=s,e.popToken()}return"\\@char{"+a+"}"});var dp=(e,t,n,a)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ae("\\newcommand's first argument must be a macro name");var o=s[0].text,c=e.isDefined(o);if(c&&!t)throw new Ae("\\newcommand{"+o+"} attempting to redefine "+(o+"; use \\renewcommand"));if(!c&&!n)throw new Ae("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var d=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var m="",h=e.expandNextToken();h.text!=="]"&&h.text!=="EOF";)m+=h.text,h=e.expandNextToken();if(!m.match(/^\s*[0-9]+\s*$/))throw new Ae("Invalid number of arguments: "+m);d=parseInt(m),s=e.consumeArg().tokens}return c&&a||e.macros.set(o,{tokens:s,numArgs:d}),""};L("\\newcommand",e=>dp(e,!1,!0,!1));L("\\renewcommand",e=>dp(e,!0,!1,!1));L("\\providecommand",e=>dp(e,!0,!0,!0));L("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});L("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});L("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Ei[n],ln.math[n],ln.text[n]),""});L("\\bgroup","{");L("\\egroup","}");L("~","\\nobreakspace");L("\\lq","`");L("\\rq","'");L("\\aa","\\r a");L("\\AA","\\r A");L("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");L("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");L("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");L("ℬ","\\mathscr{B}");L("ℰ","\\mathscr{E}");L("ℱ","\\mathscr{F}");L("ℋ","\\mathscr{H}");L("ℐ","\\mathscr{I}");L("ℒ","\\mathscr{L}");L("ℳ","\\mathscr{M}");L("ℛ","\\mathscr{R}");L("ℭ","\\mathfrak{C}");L("ℌ","\\mathfrak{H}");L("ℨ","\\mathfrak{Z}");L("\\Bbbk","\\Bbb{k}");L("\\llap","\\mathllap{\\textrm{#1}}");L("\\rlap","\\mathrlap{\\textrm{#1}}");L("\\clap","\\mathclap{\\textrm{#1}}");L("\\mathstrut","\\vphantom{(}");L("\\underbar","\\underline{\\text{#1}}");L("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');L("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");L("\\ne","\\neq");L("≠","\\neq");L("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");L("∉","\\notin");L("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");L("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");L("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");L("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");L("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");L("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");L("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");L("⟂","\\perp");L("‼","\\mathclose{!\\mkern-0.8mu!}");L("∌","\\notni");L("⌜","\\ulcorner");L("⌝","\\urcorner");L("⌞","\\llcorner");L("⌟","\\lrcorner");L("©","\\copyright");L("®","\\textregistered");L("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');L("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');L("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');L("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');L("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");L("⋮","\\vdots");L("\\varGamma","\\mathit{\\Gamma}");L("\\varDelta","\\mathit{\\Delta}");L("\\varTheta","\\mathit{\\Theta}");L("\\varLambda","\\mathit{\\Lambda}");L("\\varXi","\\mathit{\\Xi}");L("\\varPi","\\mathit{\\Pi}");L("\\varSigma","\\mathit{\\Sigma}");L("\\varUpsilon","\\mathit{\\Upsilon}");L("\\varPhi","\\mathit{\\Phi}");L("\\varPsi","\\mathit{\\Psi}");L("\\varOmega","\\mathit{\\Omega}");L("\\substack","\\begin{subarray}{c}#1\\end{subarray}");L("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");L("\\boxed","\\fbox{$\\displaystyle{#1}$}");L("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");L("\\implies","\\DOTSB\\;\\Longrightarrow\\;");L("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");L("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");L("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Jv={",":"\\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"},nR=new Set(["bin","rel"]);L("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Jv?t=Jv[n]:(n.slice(0,4)==="\\not"||n in ln.math&&nR.has(ln.math[n].group))&&(t="\\dotsb"),t});var fp={")":!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};L("\\dotso",function(e){var t=e.future().text;return t in fp?"\\ldots\\,":"\\ldots"});L("\\dotsc",function(e){var t=e.future().text;return t in fp&&t!==","?"\\ldots\\,":"\\ldots"});L("\\cdots",function(e){var t=e.future().text;return t in fp?"\\@cdots\\,":"\\@cdots"});L("\\dotsb","\\cdots");L("\\dotsm","\\cdots");L("\\dotsi","\\!\\cdots");L("\\dotsx","\\ldots\\,");L("\\DOTSI","\\relax");L("\\DOTSB","\\relax");L("\\DOTSX","\\relax");L("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");L("\\,","\\tmspace+{3mu}{.1667em}");L("\\thinspace","\\,");L("\\>","\\mskip{4mu}");L("\\:","\\tmspace+{4mu}{.2222em}");L("\\medspace","\\:");L("\\;","\\tmspace+{5mu}{.2777em}");L("\\thickspace","\\;");L("\\!","\\tmspace-{3mu}{.1667em}");L("\\negthinspace","\\!");L("\\negmedspace","\\tmspace-{4mu}{.2222em}");L("\\negthickspace","\\tmspace-{5mu}{.277em}");L("\\enspace","\\kern.5em ");L("\\enskip","\\hskip.5em\\relax");L("\\quad","\\hskip1em\\relax");L("\\qquad","\\hskip2em\\relax");L("\\tag","\\@ifstar\\tag@literal\\tag@paren");L("\\tag@paren","\\tag@literal{({#1})}");L("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ae("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});L("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");L("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");L("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");L("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");L("\\newline","\\\\\\relax");L("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var V5=Me(ua["Main-Regular"][84][1]-.7*ua["Main-Regular"][65][1]);L("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+V5+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");L("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+V5+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");L("\\hspace","\\@ifstar\\@hspacer\\@hspace");L("\\@hspace","\\hskip #1\\relax");L("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");L("\\ordinarycolon",":");L("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");L("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');L("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');L("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');L("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');L("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');L("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');L("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');L("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');L("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');L("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');L("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');L("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');L("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');L("∷","\\dblcolon");L("∹","\\eqcolon");L("≔","\\coloneqq");L("≕","\\eqqcolon");L("⩴","\\Coloneqq");L("\\ratio","\\vcentcolon");L("\\coloncolon","\\dblcolon");L("\\colonequals","\\coloneqq");L("\\coloncolonequals","\\Coloneqq");L("\\equalscolon","\\eqqcolon");L("\\equalscoloncolon","\\Eqqcolon");L("\\colonminus","\\coloneq");L("\\coloncolonminus","\\Coloneq");L("\\minuscolon","\\eqcolon");L("\\minuscoloncolon","\\Eqcolon");L("\\coloncolonapprox","\\Colonapprox");L("\\coloncolonsim","\\Colonsim");L("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");L("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");L("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");L("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");L("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");L("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");L("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");L("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");L("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");L("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");L("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");L("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");L("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");L("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");L("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");L("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");L("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");L("\\nleqq","\\html@mathml{\\@nleqq}{≰}");L("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");L("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");L("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");L("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");L("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");L("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");L("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");L("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");L("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");L("\\imath","\\html@mathml{\\@imath}{ı}");L("\\jmath","\\html@mathml{\\@jmath}{ȷ}");L("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");L("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");L("⟦","\\llbracket");L("⟧","\\rrbracket");L("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");L("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");L("⦃","\\lBrace");L("⦄","\\rBrace");L("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");L("⦵","\\minuso");L("\\darr","\\downarrow");L("\\dArr","\\Downarrow");L("\\Darr","\\Downarrow");L("\\lang","\\langle");L("\\rang","\\rangle");L("\\uarr","\\uparrow");L("\\uArr","\\Uparrow");L("\\Uarr","\\Uparrow");L("\\N","\\mathbb{N}");L("\\R","\\mathbb{R}");L("\\Z","\\mathbb{Z}");L("\\alef","\\aleph");L("\\alefsym","\\aleph");L("\\Alpha","\\mathrm{A}");L("\\Beta","\\mathrm{B}");L("\\bull","\\bullet");L("\\Chi","\\mathrm{X}");L("\\clubs","\\clubsuit");L("\\cnums","\\mathbb{C}");L("\\Complex","\\mathbb{C}");L("\\Dagger","\\ddagger");L("\\diamonds","\\diamondsuit");L("\\empty","\\emptyset");L("\\Epsilon","\\mathrm{E}");L("\\Eta","\\mathrm{H}");L("\\exist","\\exists");L("\\harr","\\leftrightarrow");L("\\hArr","\\Leftrightarrow");L("\\Harr","\\Leftrightarrow");L("\\hearts","\\heartsuit");L("\\image","\\Im");L("\\infin","\\infty");L("\\Iota","\\mathrm{I}");L("\\isin","\\in");L("\\Kappa","\\mathrm{K}");L("\\larr","\\leftarrow");L("\\lArr","\\Leftarrow");L("\\Larr","\\Leftarrow");L("\\lrarr","\\leftrightarrow");L("\\lrArr","\\Leftrightarrow");L("\\Lrarr","\\Leftrightarrow");L("\\Mu","\\mathrm{M}");L("\\natnums","\\mathbb{N}");L("\\Nu","\\mathrm{N}");L("\\Omicron","\\mathrm{O}");L("\\plusmn","\\pm");L("\\rarr","\\rightarrow");L("\\rArr","\\Rightarrow");L("\\Rarr","\\Rightarrow");L("\\real","\\Re");L("\\reals","\\mathbb{R}");L("\\Reals","\\mathbb{R}");L("\\Rho","\\mathrm{P}");L("\\sdot","\\cdot");L("\\sect","\\S");L("\\spades","\\spadesuit");L("\\sub","\\subset");L("\\sube","\\subseteq");L("\\supe","\\supseteq");L("\\Tau","\\mathrm{T}");L("\\thetasym","\\vartheta");L("\\weierp","\\wp");L("\\Zeta","\\mathrm{Z}");L("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");L("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");L("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");L("\\bra","\\mathinner{\\langle{#1}|}");L("\\ket","\\mathinner{|{#1}\\rangle}");L("\\braket","\\mathinner{\\langle{#1}\\rangle}");L("\\Bra","\\left\\langle#1\\right|");L("\\Ket","\\left|#1\\right\\rangle");var Y5=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.consumeArg().tokens,c=t.macros.get("|"),d=t.macros.get("\\|");t.macros.beginGroup();var m=b=>x=>{e&&(x.macros.set("|",c),s.length&&x.macros.set("\\|",d));var y=b;if(!b&&s.length){var S=x.future();S.text==="|"&&(x.popToken(),y=!0)}return{tokens:y?s:a,numArgs:0}};t.macros.set("|",m(!1)),s.length&&t.macros.set("\\|",m(!0));var h=t.consumeArg().tokens,g=t.expandTokens([...o,...h,...n]);return t.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};L("\\bra@ket",Y5(!1));L("\\bra@set",Y5(!0));L("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");L("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");L("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");L("\\angln","{\\angl n}");L("\\blue","\\textcolor{##6495ed}{#1}");L("\\orange","\\textcolor{##ffa500}{#1}");L("\\pink","\\textcolor{##ff00af}{#1}");L("\\red","\\textcolor{##df0030}{#1}");L("\\green","\\textcolor{##28ae7b}{#1}");L("\\gray","\\textcolor{gray}{#1}");L("\\purple","\\textcolor{##9d38bd}{#1}");L("\\blueA","\\textcolor{##ccfaff}{#1}");L("\\blueB","\\textcolor{##80f6ff}{#1}");L("\\blueC","\\textcolor{##63d9ea}{#1}");L("\\blueD","\\textcolor{##11accd}{#1}");L("\\blueE","\\textcolor{##0c7f99}{#1}");L("\\tealA","\\textcolor{##94fff5}{#1}");L("\\tealB","\\textcolor{##26edd5}{#1}");L("\\tealC","\\textcolor{##01d1c1}{#1}");L("\\tealD","\\textcolor{##01a995}{#1}");L("\\tealE","\\textcolor{##208170}{#1}");L("\\greenA","\\textcolor{##b6ffb0}{#1}");L("\\greenB","\\textcolor{##8af281}{#1}");L("\\greenC","\\textcolor{##74cf70}{#1}");L("\\greenD","\\textcolor{##1fab54}{#1}");L("\\greenE","\\textcolor{##0d923f}{#1}");L("\\goldA","\\textcolor{##ffd0a9}{#1}");L("\\goldB","\\textcolor{##ffbb71}{#1}");L("\\goldC","\\textcolor{##ff9c39}{#1}");L("\\goldD","\\textcolor{##e07d10}{#1}");L("\\goldE","\\textcolor{##a75a05}{#1}");L("\\redA","\\textcolor{##fca9a9}{#1}");L("\\redB","\\textcolor{##ff8482}{#1}");L("\\redC","\\textcolor{##f9685d}{#1}");L("\\redD","\\textcolor{##e84d39}{#1}");L("\\redE","\\textcolor{##bc2612}{#1}");L("\\maroonA","\\textcolor{##ffbde0}{#1}");L("\\maroonB","\\textcolor{##ff92c6}{#1}");L("\\maroonC","\\textcolor{##ed5fa6}{#1}");L("\\maroonD","\\textcolor{##ca337c}{#1}");L("\\maroonE","\\textcolor{##9e034e}{#1}");L("\\purpleA","\\textcolor{##ddd7ff}{#1}");L("\\purpleB","\\textcolor{##c6b9fc}{#1}");L("\\purpleC","\\textcolor{##aa87ff}{#1}");L("\\purpleD","\\textcolor{##7854ab}{#1}");L("\\purpleE","\\textcolor{##543b78}{#1}");L("\\mintA","\\textcolor{##f5f9e8}{#1}");L("\\mintB","\\textcolor{##edf2df}{#1}");L("\\mintC","\\textcolor{##e0e5cc}{#1}");L("\\grayA","\\textcolor{##f6f7f7}{#1}");L("\\grayB","\\textcolor{##f0f1f2}{#1}");L("\\grayC","\\textcolor{##e3e5e6}{#1}");L("\\grayD","\\textcolor{##d6d8da}{#1}");L("\\grayE","\\textcolor{##babec2}{#1}");L("\\grayF","\\textcolor{##888d93}{#1}");L("\\grayG","\\textcolor{##626569}{#1}");L("\\grayH","\\textcolor{##3b3e40}{#1}");L("\\grayI","\\textcolor{##21242c}{#1}");L("\\kaBlue","\\textcolor{##314453}{#1}");L("\\kaGreen","\\textcolor{##71B307}{#1}");var X5={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class rR{constructor(t,n,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new eR(tR,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new Qv(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,a,s;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:s,end:a}=this.consumeArg(["]"])}else({tokens:s,start:n,end:a}=this.consumeArg());return this.pushToken(new jr("EOF",a.loc)),this.pushTokens(s),new jr("",xr.range(n,a))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],a=t&&t.length>0;a||this.consumeSpaces();var s=this.future(),o,c=0,d=0;do{if(o=this.popToken(),n.push(o),o.text==="{")++c;else if(o.text==="}"){if(--c,c===-1)throw new Ae("Extra }",o)}else if(o.text==="EOF")throw new Ae("Unexpected end of input in a macro argument, expected '"+(t&&a?t[d]:"}")+"'",o);if(t&&a)if((c===0||c===1&&t[d]==="{")&&o.text===t[d]){if(++d,d===t.length){n.splice(-d,d);break}}else d=0}while(c!==0||a);return s.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:s,end:o}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Ae("The length of delimiters doesn't match the number of args!");for(var a=n[0],s=0;s<a.length;s++){var o=this.popToken();if(a[s]!==o.text)throw new Ae("Use of the macro doesn't match its definition",o)}}for(var c=[],d=0;d<t;d++)c.push(this.consumeArg(n&&n[d+1]).tokens);return c}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Ae("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),a=n.text,s=n.noexpand?null:this._getExpansion(a);if(s==null||t&&s.unexpandable){if(t&&s==null&&a[0]==="\\"&&!this.isDefined(a))throw new Ae("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var o=s.tokens,c=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){o=o.slice();for(var d=o.length-1;d>=0;--d){var m=o[d];if(m.text==="#"){if(d===0)throw new Ae("Incomplete placeholder at end of macro body",m);if(m=o[--d],m.text==="#")o.splice(d+1,1);else if(/^[1-9]$/.test(m.text))o.splice(d,2,...c[+m.text-1]);else throw new Ae("Not a valid argument number",m)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new jr(t)]):void 0}expandTokens(t){var n=[],a=this.stack.length;for(this.pushTokens(t);this.stack.length>a;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),n.push(s)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(a=>a.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var a=this.lexer.catcodes[t];if(a!=null&&a!==13)return}var s=typeof n=="function"?n(this):n;if(typeof s=="string"){var o=0;if(s.includes("#"))for(var c=s.replace(/##/g,"");c.includes("#"+(o+1));)++o;for(var d=new Qv(s,this.settings),m=[],h=d.lex();h.text!=="EOF";)m.push(h),h=d.lex();m.reverse();var g={tokens:m,numArgs:o};return g}return s}isDefined(t){return this.macros.has(t)||Ei.hasOwnProperty(t)||ln.math.hasOwnProperty(t)||ln.text.hasOwnProperty(t)||X5.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Ei.hasOwnProperty(t)&&!Ei[t].primitive}}var e2=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,au=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Qf={"́":{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"}},t2={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class e0{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new rR(t,n,this.mode),this.settings=n,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Ae("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new jr("}")),this.gullet.pushTokens(t);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,a}parseExpression(t,n){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(e0.endOfExpression.has(s.text)||n&&s.text===n||t&&Ei[s.text]&&Ei[s.text].infix)break;var o=this.parseAtom(n);if(o){if(o.type==="internal")continue}else break;a.push(o)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,s=0;s<t.length;s++){var o=t[s];if(o.type==="infix"){if(n!==-1)throw new Ae("only one infix operator per group",o.token);n=s,a=o.replaceWith}}if(n!==-1&&a){var c,d,m=t.slice(0,n),h=t.slice(n+1);m.length===1&&m[0].type==="ordgroup"?c=m[0]:c={type:"ordgroup",mode:this.mode,body:m},h.length===1&&h[0].type==="ordgroup"?d=h[0]:d={type:"ordgroup",mode:this.mode,body:h};var g;return a==="\\\\abovefrac"?g=this.callFunction(a,[c,t[n],d],[]):g=this.callFunction(a,[c,d],[]),[g]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var s;do{var o;s=this.parseGroup(t)}while(((o=s)==null?void 0:o.type)==="internal");if(!s)throw new Ae("Expected group after '"+a+"'",n);return s}formatUnsupportedCmd(t){for(var n=[],a=0;a<t.length;a++)n.push({type:"textord",mode:"text",text:t[a]});var s={type:"text",mode:this.mode,body:n},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[s]};return o}parseAtom(t){var n=this.parseGroup("atom",t);if(n?.type==="internal"||this.mode==="text")return n;for(var a,s;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(n&&n.type==="op"){var c=o.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=o.text==="\\limits");else throw new Ae("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(a)throw new Ae("Double superscript",o);a=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(s)throw new Ae("Double subscript",o);s=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(a)throw new Ae("Double superscript",o);var d={type:"textord",mode:this.mode,text:"\\prime"},m=[d];for(this.consume();this.fetch().text==="'";)m.push(d),this.consume();this.fetch().text==="^"&&m.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:m}}else if(au[o.text]){var h=e2.test(o.text),g=[];for(g.push(new jr(au[o.text])),this.consume();;){var b=this.fetch().text;if(!au[b]||e2.test(b)!==h)break;g.unshift(new jr(au[b])),this.consume()}var x=this.subparse(g);h?s={type:"ordgroup",mode:"math",body:x}:a={type:"ordgroup",mode:"math",body:x}}else break}return a||s?{type:"supsub",mode:this.mode,base:n,sup:a,sub:s}:n}parseFunction(t,n){var a=this.fetch(),s=a.text,o=Ei[s];if(!o)return null;if(this.consume(),n&&n!=="atom"&&!o.allowedInArgument)throw new Ae("Got function '"+s+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!o.allowedInText)throw new Ae("Can't use function '"+s+"' in text mode",a);if(this.mode==="math"&&o.allowedInMath===!1)throw new Ae("Can't use function '"+s+"' in math mode",a);var{args:c,optArgs:d}=this.parseArguments(s,o);return this.callFunction(s,c,d,a,t)}callFunction(t,n,a,s,o){var c={funcName:t,parser:this,token:s,breakOnTokenText:o},d=Ei[t];if(d&&d.handler)return d.handler(c,n,a);throw new Ae("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var s=[],o=[],c=0;c<a;c++){var d=n.argTypes&&n.argTypes[c],m=c<n.numOptionalArgs;("primitive"in n&&n.primitive&&d==null||n.type==="sqrt"&&c===1&&o[0]==null)&&(d="primitive");var h=this.parseGroupOfType("argument to '"+t+"'",d,m);if(m)o.push(h);else if(h!=null)s.push(h);else throw new Ae("Null argument, please report this as a bug")}return{args:s,optArgs:o}}parseGroupOfType(t,n,a){switch(n){case"color":return this.parseColorGroup(a);case"size":return this.parseSizeGroup(a);case"url":return this.parseUrlGroup(a);case"math":case"text":return this.parseArgumentGroup(a,n);case"hbox":{var s=this.parseArgumentGroup(a,"text");return s!=null?{type:"styling",mode:s.mode,body:[s],style:"text",resetFont:!0}:null}case"raw":{var o=this.parseStringGroup("raw",a);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(a)throw new Ae("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new Ae("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new Ae("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var a=this.gullet.scanArgument(n);if(a==null)return null;for(var s="",o;(o=this.fetch()).text!=="EOF";)s+=o.text,this.consume();return this.consume(),a.text=s,a}parseRegexGroup(t,n){for(var a=this.fetch(),s=a,o="",c;(c=this.fetch()).text!=="EOF"&&t.test(o+c.text);)s=c,o+=s.text,this.consume();if(o==="")throw new Ae("Invalid "+n+": '"+a.text+"'",a);return a.range(s,o)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var a=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!a)throw new Ae("Invalid color: '"+n.text+"'",n);var s=a[0];return/^[0-9a-f]{6}$/i.test(s)&&(s="#"+s),{type:"color-token",mode:this.mode,color:s}}parseSizeGroup(t){var n,a=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",a=!0);var s=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!s)throw new Ae("Invalid size: '"+n.text+"'",n);var o={number:+(s[1]+s[2]),unit:s[3]};if(!n5(o))throw new Ae("Invalid unit: '"+o.unit+"'",n);return{type:"size",mode:this.mode,value:o,isBlank:a}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var a=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:a}}parseArgumentGroup(t,n){var a=this.gullet.scanArgument(t);if(a==null)return null;var s=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:o};return n&&this.switchMode(s),c}parseGroup(t,n){var a=this.fetch(),s=a.text,o;if(s==="{"||s==="\\begingroup"){this.consume();var c=s==="{"?"}":"\\endgroup";this.gullet.beginGroup();var d=this.parseExpression(!1,c),m=this.fetch();this.expect(c),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:xr.range(a,m),body:d,semisimple:s==="\\begingroup"||void 0}}else if(o=this.parseFunction(n,t)||this.parseSymbol(),o==null&&s[0]==="\\"&&!X5.hasOwnProperty(s)){if(this.settings.throwOnError)throw new Ae("Undefined control sequence: "+s,a);o=this.formatUnsupportedCmd(s),this.consume()}return o}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var s=t[a];if(s.type==="textord"){var o=s.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(o==="-"&&c.text==="-"){var d=t[a+2];a+1<n&&d&&d.type==="textord"&&d.text==="-"?(t.splice(a,3,{type:"textord",mode:"text",loc:xr.range(s,d),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:xr.range(s,c),text:"--"}),n-=1)}(o==="'"||o==="`")&&c.text===o&&(t.splice(a,2,{type:"textord",mode:"text",loc:xr.range(s,c),text:o+o}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var a=n.slice(5),s=a.charAt(0)==="*";if(s&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new Ae(`\\verb assertion failed --
300
- please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:s}}t2.hasOwnProperty(n[0])&&!ln[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=t2[n[0]]+n.slice(1));var o=WA.exec(n);o&&(n=n.substring(0,o.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var c;if(ln[this.mode][n]){this.settings.strict&&this.mode==="math"&&ah.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var d=ln[this.mode][n].group,m=xr.range(t),h;yA(d)?h={type:"atom",mode:this.mode,family:d,loc:m,text:n}:h={type:d,mode:this.mode,loc:m,text:n},c=h}else if(n.charCodeAt(0)>=128)this.settings.strict&&(t5(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),c={type:"textord",mode:"text",loc:xr.range(t),text:n};else return null;if(this.consume(),o)for(var g=0;g<o[0].length;g++){var b=o[0][g];if(!Qf[b])throw new Ae("Unknown accent ' "+b+"'",t);var x=Qf[b][this.mode]||Qf[b].text;if(!x)throw new Ae("Accent "+b+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:xr.range(t),label:x,isStretchy:!1,isShifty:!0,base:c}}return c}}e0.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var mp=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new e0(t,n);delete a.gullet.macros.current["\\df@tag"];var s=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Ae("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:a.subparse([new jr("\\df@tag")])}]}return s},hp=function(t,n,a){n.textContent="";var s=t0(t,a).toNode();n.appendChild(s)};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."),hp=function(){throw new Ae("KaTeX doesn't work in quirks mode.")});var Z5=function(t,n){var a=t0(t,n).toMarkup();return a},Q5=function(t,n){var a=new Jh(n);return mp(t,a)},W5=function(t,n,a){if(a.throwOnError||!(t instanceof Ae))throw t;var s=Ne(["katex-error"],[new Lr(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+a.errorColor),s},t0=function(t,n){var a=new Jh(n);try{var s=mp(t,a);return dA(s,t,a)}catch(o){return W5(o,t,a)}},J5=function(t,n){var a=new Jh(n);try{var s=mp(t,a);return fA(s,t,a)}catch(o){return W5(o,t,a)}},e6="0.16.47",t6={Span:ol,Anchor:Fu,SymbolNode:Lr,SvgNode:Ha,PathNode:Ci,LineNode:rh},yh={version:e6,render:hp,renderToString:Z5,ParseError:Ae,SETTINGS_SCHEMA:yu,__parse:Q5,__renderToDomTree:t0,__renderToHTMLTree:J5,__setFontMetrics:s5,__defineSymbol:w,__defineFunction:Be,__defineMacro:L,__domTree:t6};const DO=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Ae,SETTINGS_SCHEMA:yu,__defineFunction:Be,__defineMacro:L,__defineSymbol:w,__domTree:t6,__parse:Q5,__renderToDomTree:t0,__renderToHTMLTree:J5,__setFontMetrics:s5,default:yh,get render(){return hp},renderToString:Z5,version:e6},Symbol.toStringTag,{value:"Module"})),aR={};function iR(e){const t=this,n=e||aR,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(fC(n)),o.push(aC()),c.push(iC(n))}const n2=/[#.]/g;function sR(e,t){const n=e||"",a={};let s=0,o,c;for(;s<n.length;){n2.lastIndex=s;const d=n2.exec(n),m=n.slice(s,d?d.index:n.length);m&&(o?o==="#"?a.id=m:Array.isArray(a.className)?a.className.push(m):a.className=[m]:c=m,s+=m.length),d&&(o=d[0],s++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}function n6(e,t,n){const a=n?uR(n):void 0;function s(o,c,...d){let m;if(o==null){m={type:"root",children:[]};const h=c;d.unshift(h)}else{m=sR(o,t);const h=m.tagName.toLowerCase(),g=a?a.get(h):void 0;if(m.tagName=g||h,lR(c))d.unshift(c);else for(const[b,x]of Object.entries(c))oR(e,m.properties,b,x)}for(const h of d)xh(m.children,h);return m.type==="element"&&m.tagName==="template"&&(m.content={type:"root",children:m.children},m.children=[]),m}return s}function lR(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const s=t[a];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const o=s;for(const c of o)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function oR(e,t,n,a){const s=e3(e,n);let o;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;o=a}else typeof a=="boolean"?o=a:typeof a=="string"?s.spaceSeparated?o=I4(a):s.commaSeparated?o=N4(a):s.commaOrSpaceSeparated?o=I4(N4(a).join(" ")):o=r2(s,s.property,a):Array.isArray(a)?o=[...a]:o=s.property==="style"?cR(a):String(a);if(Array.isArray(o)){const c=[];for(const d of o)c.push(r2(s,s.property,d));o=c}s.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[s.property]=o}}function xh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)xh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?xh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function r2(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||xo(n)===xo(t)))return!0}return n}function cR(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function uR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const dR=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],fR=n6(t3,"div"),mR=n6(zu,"g",dR),Wf={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function hR(e,t){return r6(e,{})||{type:"root",children:[]}}function r6(e,t){const n=pR(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function pR(e,t){switch(e.nodeType){case 1:return yR(e,t);case 3:return bR(e);case 8:return vR(e);case 9:return a2(e,t);case 10:return gR();case 11:return a2(e,t);default:return}}function a2(e,t){return{type:"root",children:a6(e,t)}}function gR(){return{type:"doctype"}}function bR(e){return{type:"text",value:e.nodeValue||""}}function vR(e){return{type:"comment",value:e.nodeValue||""}}function yR(e,t){const n=e.namespaceURI,a=n===Wf.svg?mR:fR,s=n===Wf.html?e.tagName.toLowerCase():e.tagName,o=n===Wf.html&&s==="template"?e.content:e,c=e.getAttributeNames(),d={};let m=-1;for(;++m<c.length;)d[c[m]]=e.getAttribute(c[m])||"";return a(s,d,a6(o,t))}function a6(e,t){const n=e.childNodes,a=[];let s=-1;for(;++s<n.length;){const o=r6(n[s],t);o!==void 0&&a.push(o)}return a}new DOMParser;function xR(e,t){const n=wR(e);return hR(n)}function wR(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const i2=(function(e,t,n){const a=Co(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),ds=(function(e){if(e==null)return ER;if(typeof e=="string")return kR(e);if(typeof e=="object")return SR(e);if(typeof e=="function")return pp(e);throw new Error("Expected function, string, or array as `test`")});function SR(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ds(e[n]);return pp(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function kR(e){return pp(t);function t(n){return n.tagName===e}}function pp(e){return t;function t(n,a,s){return!!(TR(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function ER(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function TR(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const s2=/\n/g,l2=/[\t ]+/g,wh=ds("br"),o2=ds(OR),NR=ds("p"),c2=ds("tr"),CR=ds(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",MR,DR]),i6=ds(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function AR(e,t){const n=t||{},a="children"in e?e.children:[],s=i6(e),o=o6(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...l6(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(...s6(a[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<a.length-1?wh(a[d+1]):s}));const m=[];let h;for(d=-1;++d<c.length;){const g=c[d];typeof g=="number"?h!==void 0&&g>h&&(h=g):g&&(h!==void 0&&h>-1&&m.push(`
301
- `.repeat(h)||" "),h=-1,m.push(g))}return m.join("")}function s6(e,t,n){return e.type==="element"?RR(e,t,n):e.type==="text"?n.whitespace==="normal"?l6(e,n):_R(e):[]}function RR(e,t,n){const a=o6(e,n),s=e.children||[];let o=-1,c=[];if(CR(e))return c;let d,m;for(wh(e)||c2(e)&&i2(t,e,c2)?m=`
302
- `:NR(e)?(d=2,m=2):i6(e)&&(d=1,m=1);++o<s.length;)c=c.concat(s6(s[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<s.length-1?wh(s[o+1]):m}));return o2(e)&&i2(t,e,o2)&&c.push(" "),d&&c.unshift(d),m&&c.push(m),c}function l6(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){s2.lastIndex=o;const m=s2.exec(n),h=m&&"index"in m?m.index:n.length;a.push(IR(n.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),o=h+1}let c=-1,d;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),d=void 0):a[c]?(typeof d=="number"&&s.push(d),s.push(a[c]),d=0):(c===0||c===a.length-1)&&s.push(0);return s}function _R(e){return[String(e.value)]}function IR(e,t,n){const a=[];let s=0,o;for(;s<e.length;){l2.lastIndex=s;const c=l2.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function o6(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function MR(e){return!!(e.properties||{}).hidden}function OR(e){return e.tagName==="td"||e.tagName==="th"}function DR(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const jR={},LR=[];function zR(e){const t=e||jR;return function(n,a){Vh(n,"element",function(s,o){const c=Array.isArray(s.properties.className)?s.properties.className:LR,d=c.includes("language-math"),m=c.includes("math-display"),h=c.includes("math-inline");let g=m;if(!d&&!m&&!h)return;let b=o[o.length-1],x=s;if(s.tagName==="code"&&d&&b&&b.type==="element"&&b.tagName==="pre"&&(x=b,b=o[o.length-2],g=!0),!b)return;const y=AR(x,{whitespace:"pre"});let S;try{S=yh.renderToString(y,{...t,displayMode:g,throwOnError:!0})}catch(M){const C=M,R=C.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...o,s],cause:C,place:s.position,ruleId:R,source:"rehype-katex"});try{S=yh.renderToString(y,{...t,displayMode:g,strict:"ignore",throwOnError:!1})}catch{S=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(M)},children:[{type:"text",value:y}]}]}}typeof S=="string"&&(S=xR(S).children);const E=b.children.indexOf(x);return b.children.splice(E,1,...S),R3})}}var Jf,u2;function BR(){if(u2)return Jf;u2=1;function e(Q){return Q instanceof Map?Q.clear=Q.delete=Q.set=function(){throw new Error("map is read-only")}:Q instanceof Set&&(Q.add=Q.clear=Q.delete=function(){throw new Error("set is read-only")}),Object.freeze(Q),Object.getOwnPropertyNames(Q).forEach(xe=>{const De=Q[xe],et=typeof De;(et==="object"||et==="function")&&!Object.isFrozen(De)&&e(De)}),Q}class t{constructor(xe){xe.data===void 0&&(xe.data={}),this.data=xe.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Q){return Q.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(Q,...xe){const De=Object.create(null);for(const et in Q)De[et]=Q[et];return xe.forEach(function(et){for(const oe in et)De[oe]=et[oe]}),De}const s="</span>",o=Q=>!!Q.scope,c=(Q,{prefix:xe})=>{if(Q.startsWith("language:"))return Q.replace("language:","language-");if(Q.includes(".")){const De=Q.split(".");return[`${xe}${De.shift()}`,...De.map((et,oe)=>`${et}${"_".repeat(oe+1)}`)].join(" ")}return`${xe}${Q}`};class d{constructor(xe,De){this.buffer="",this.classPrefix=De.classPrefix,xe.walk(this)}addText(xe){this.buffer+=n(xe)}openNode(xe){if(!o(xe))return;const De=c(xe.scope,{prefix:this.classPrefix});this.span(De)}closeNode(xe){o(xe)&&(this.buffer+=s)}value(){return this.buffer}span(xe){this.buffer+=`<span class="${xe}">`}}const m=(Q={})=>{const xe={children:[]};return Object.assign(xe,Q),xe};class h{constructor(){this.rootNode=m(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(xe){this.top.children.push(xe)}openNode(xe){const De=m({scope:xe});this.add(De),this.stack.push(De)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(xe){return this.constructor._walk(xe,this.rootNode)}static _walk(xe,De){return typeof De=="string"?xe.addText(De):De.children&&(xe.openNode(De),De.children.forEach(et=>this._walk(xe,et)),xe.closeNode(De)),xe}static _collapse(xe){typeof xe!="string"&&xe.children&&(xe.children.every(De=>typeof De=="string")?xe.children=[xe.children.join("")]:xe.children.forEach(De=>{h._collapse(De)}))}}class g extends h{constructor(xe){super(),this.options=xe}addText(xe){xe!==""&&this.add(xe)}startScope(xe){this.openNode(xe)}endScope(){this.closeNode()}__addSublanguage(xe,De){const et=xe.root;De&&(et.scope=`language:${De}`),this.add(et)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function b(Q){return Q?typeof Q=="string"?Q:Q.source:null}function x(Q){return E("(?=",Q,")")}function y(Q){return E("(?:",Q,")*")}function S(Q){return E("(?:",Q,")?")}function E(...Q){return Q.map(De=>b(De)).join("")}function M(Q){const xe=Q[Q.length-1];return typeof xe=="object"&&xe.constructor===Object?(Q.splice(Q.length-1,1),xe):{}}function C(...Q){return"("+(M(Q).capture?"":"?:")+Q.map(et=>b(et)).join("|")+")"}function R(Q){return new RegExp(Q.toString()+"|").exec("").length-1}function A(Q,xe){const De=Q&&Q.exec(xe);return De&&De.index===0}const H=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(Q,{joinWith:xe}){let De=0;return Q.map(et=>{De+=1;const oe=De;let Le=b(et),ze="";for(;Le.length>0;){const Oe=H.exec(Le);if(!Oe){ze+=Le;break}ze+=Le.substring(0,Oe.index),Le=Le.substring(Oe.index+Oe[0].length),Oe[0][0]==="\\"&&Oe[1]?ze+="\\"+String(Number(Oe[1])+oe):(ze+=Oe[0],Oe[0]==="("&&De++)}return ze}).map(et=>`(${et})`).join(xe)}const D=/\b\B/,$="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",q="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Z="\\b(0b[01]+)",G="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",le=(Q={})=>{const xe=/^#![ ]*\//;return Q.binary&&(Q.begin=E(xe,/.*\b/,Q.binary,/\b.*/)),a({scope:"meta",begin:xe,end:/$/,relevance:0,"on:begin":(De,et)=>{De.index!==0&&et.ignoreMatch()}},Q)},W={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[W]},z={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[W]},V={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ne=function(Q,xe,De={}){const et=a({scope:"comment",begin:Q,end:xe,contains:[]},De);et.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const oe=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return et.contains.push({begin:E(/[ ]+/,"(",oe,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),et},we=ne("//","$"),O=ne("/\\*","\\*/"),B=ne("#","$"),Y={scope:"number",begin:ee,relevance:0},_={scope:"number",begin:q,relevance:0},ce={scope:"number",begin:Z,relevance:0},he={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[W,{begin:/\[/,end:/\]/,relevance:0,contains:[W]}]},ie={scope:"title",begin:$,relevance:0},ae={scope:"title",begin:P,relevance:0},ge={begin:"\\.\\s*"+P,relevance:0};var Ie=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:W,BINARY_NUMBER_MODE:ce,BINARY_NUMBER_RE:Z,COMMENT:ne,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:we,C_NUMBER_MODE:_,C_NUMBER_RE:q,END_SAME_AS_BEGIN:function(Q){return Object.assign(Q,{"on:begin":(xe,De)=>{De.data._beginMatch=xe[1]},"on:end":(xe,De)=>{De.data._beginMatch!==xe[1]&&De.ignoreMatch()}})},HASH_COMMENT_MODE:B,IDENT_RE:$,MATCH_NOTHING_RE:D,METHOD_GUARD:ge,NUMBER_MODE:Y,NUMBER_RE:ee,PHRASAL_WORDS_MODE:V,QUOTE_STRING_MODE:z,REGEXP_MODE:he,RE_STARTERS_RE:G,SHEBANG:le,TITLE_MODE:ie,UNDERSCORE_IDENT_RE:P,UNDERSCORE_TITLE_MODE:ae});function He(Q,xe){Q.input[Q.index-1]==="."&&xe.ignoreMatch()}function Ee(Q,xe){Q.className!==void 0&&(Q.scope=Q.className,delete Q.className)}function nt(Q,xe){xe&&Q.beginKeywords&&(Q.begin="\\b("+Q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Q.__beforeBegin=He,Q.keywords=Q.keywords||Q.beginKeywords,delete Q.beginKeywords,Q.relevance===void 0&&(Q.relevance=0))}function mt(Q,xe){Array.isArray(Q.illegal)&&(Q.illegal=C(...Q.illegal))}function qt(Q,xe){if(Q.match){if(Q.begin||Q.end)throw new Error("begin & end are not supported with match");Q.begin=Q.match,delete Q.match}}function Zt(Q,xe){Q.relevance===void 0&&(Q.relevance=1)}const vn=(Q,xe)=>{if(!Q.beforeMatch)return;if(Q.starts)throw new Error("beforeMatch cannot be used with starts");const De=Object.assign({},Q);Object.keys(Q).forEach(et=>{delete Q[et]}),Q.keywords=De.keywords,Q.begin=E(De.beforeMatch,x(De.begin)),Q.starts={relevance:0,contains:[Object.assign(De,{endsParent:!0})]},Q.relevance=0,delete De.beforeMatch},Tn=["of","and","for","in","not","or","if","then","parent","list","value"],mn="keyword";function Ht(Q,xe,De=mn){const et=Object.create(null);return typeof Q=="string"?oe(De,Q.split(" ")):Array.isArray(Q)?oe(De,Q):Object.keys(Q).forEach(function(Le){Object.assign(et,Ht(Q[Le],xe,Le))}),et;function oe(Le,ze){xe&&(ze=ze.map(Oe=>Oe.toLowerCase())),ze.forEach(function(Oe){const Ve=Oe.split("|");et[Ve[0]]=[Le,We(Ve[0],Ve[1])]})}}function We(Q,xe){return xe?Number(xe):xt(Q)?0:1}function xt(Q){return Tn.includes(Q.toLowerCase())}const jt={},Fe=Q=>{console.error(Q)},Kt=(Q,...xe)=>{console.log(`WARN: ${Q}`,...xe)},fe=(Q,xe)=>{jt[`${Q}/${xe}`]||(console.log(`Deprecated as of ${Q}. ${xe}`),jt[`${Q}/${xe}`]=!0)},be=new Error;function Ue(Q,xe,{key:De}){let et=0;const oe=Q[De],Le={},ze={};for(let Oe=1;Oe<=xe.length;Oe++)ze[Oe+et]=oe[Oe],Le[Oe+et]=!0,et+=R(xe[Oe-1]);Q[De]=ze,Q[De]._emit=Le,Q[De]._multi=!0}function Ze(Q){if(Array.isArray(Q.begin)){if(Q.skip||Q.excludeBegin||Q.returnBegin)throw Fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),be;if(typeof Q.beginScope!="object"||Q.beginScope===null)throw Fe("beginScope must be object"),be;Ue(Q,Q.begin,{key:"beginScope"}),Q.begin=F(Q.begin,{joinWith:""})}}function Je(Q){if(Array.isArray(Q.end)){if(Q.skip||Q.excludeEnd||Q.returnEnd)throw Fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),be;if(typeof Q.endScope!="object"||Q.endScope===null)throw Fe("endScope must be object"),be;Ue(Q,Q.end,{key:"endScope"}),Q.end=F(Q.end,{joinWith:""})}}function It(Q){Q.scope&&typeof Q.scope=="object"&&Q.scope!==null&&(Q.beginScope=Q.scope,delete Q.scope)}function nn(Q){It(Q),typeof Q.beginScope=="string"&&(Q.beginScope={_wrap:Q.beginScope}),typeof Q.endScope=="string"&&(Q.endScope={_wrap:Q.endScope}),Ze(Q),Je(Q)}function At(Q){function xe(ze,Oe){return new RegExp(b(ze),"m"+(Q.case_insensitive?"i":"")+(Q.unicodeRegex?"u":"")+(Oe?"g":""))}class De{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Oe,Ve){Ve.position=this.position++,this.matchIndexes[this.matchAt]=Ve,this.regexes.push([Ve,Oe]),this.matchAt+=R(Oe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Oe=this.regexes.map(Ve=>Ve[1]);this.matcherRe=xe(F(Oe,{joinWith:"|"}),!0),this.lastIndex=0}exec(Oe){this.matcherRe.lastIndex=this.lastIndex;const Ve=this.matcherRe.exec(Oe);if(!Ve)return null;const Mt=Ve.findIndex((Ln,ur)=>ur>0&&Ln!==void 0),wt=this.matchIndexes[Mt];return Ve.splice(0,Mt),Object.assign(Ve,wt)}}class et{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Oe){if(this.multiRegexes[Oe])return this.multiRegexes[Oe];const Ve=new De;return this.rules.slice(Oe).forEach(([Mt,wt])=>Ve.addRule(Mt,wt)),Ve.compile(),this.multiRegexes[Oe]=Ve,Ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Oe,Ve){this.rules.push([Oe,Ve]),Ve.type==="begin"&&this.count++}exec(Oe){const Ve=this.getMatcher(this.regexIndex);Ve.lastIndex=this.lastIndex;let Mt=Ve.exec(Oe);if(this.resumingScanAtSamePosition()&&!(Mt&&Mt.index===this.lastIndex)){const wt=this.getMatcher(0);wt.lastIndex=this.lastIndex+1,Mt=wt.exec(Oe)}return Mt&&(this.regexIndex+=Mt.position+1,this.regexIndex===this.count&&this.considerAll()),Mt}}function oe(ze){const Oe=new et;return ze.contains.forEach(Ve=>Oe.addRule(Ve.begin,{rule:Ve,type:"begin"})),ze.terminatorEnd&&Oe.addRule(ze.terminatorEnd,{type:"end"}),ze.illegal&&Oe.addRule(ze.illegal,{type:"illegal"}),Oe}function Le(ze,Oe){const Ve=ze;if(ze.isCompiled)return Ve;[Ee,qt,nn,vn].forEach(wt=>wt(ze,Oe)),Q.compilerExtensions.forEach(wt=>wt(ze,Oe)),ze.__beforeBegin=null,[nt,mt,Zt].forEach(wt=>wt(ze,Oe)),ze.isCompiled=!0;let Mt=null;return typeof ze.keywords=="object"&&ze.keywords.$pattern&&(ze.keywords=Object.assign({},ze.keywords),Mt=ze.keywords.$pattern,delete ze.keywords.$pattern),Mt=Mt||/\w+/,ze.keywords&&(ze.keywords=Ht(ze.keywords,Q.case_insensitive)),Ve.keywordPatternRe=xe(Mt,!0),Oe&&(ze.begin||(ze.begin=/\B|\b/),Ve.beginRe=xe(Ve.begin),!ze.end&&!ze.endsWithParent&&(ze.end=/\B|\b/),ze.end&&(Ve.endRe=xe(Ve.end)),Ve.terminatorEnd=b(Ve.end)||"",ze.endsWithParent&&Oe.terminatorEnd&&(Ve.terminatorEnd+=(ze.end?"|":"")+Oe.terminatorEnd)),ze.illegal&&(Ve.illegalRe=xe(ze.illegal)),ze.contains||(ze.contains=[]),ze.contains=[].concat(...ze.contains.map(function(wt){return cn(wt==="self"?ze:wt)})),ze.contains.forEach(function(wt){Le(wt,Ve)}),ze.starts&&Le(ze.starts,Oe),Ve.matcher=oe(Ve),Ve}if(Q.compilerExtensions||(Q.compilerExtensions=[]),Q.contains&&Q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Q.classNameAliases=a(Q.classNameAliases||{}),Le(Q)}function lt(Q){return Q?Q.endsWithParent||lt(Q.starts):!1}function cn(Q){return Q.variants&&!Q.cachedVariants&&(Q.cachedVariants=Q.variants.map(function(xe){return a(Q,{variants:null},xe)})),Q.cachedVariants?Q.cachedVariants:lt(Q)?a(Q,{starts:Q.starts?a(Q.starts):null}):Object.isFrozen(Q)?a(Q):Q}var gt="11.11.2";class Yn extends Error{constructor(xe,De){super(xe),this.name="HTMLInjectionError",this.html=De}}const yn=n,it=a,Ge=Symbol("nomatch"),bt=7,_t=function(Q){const xe=Object.create(null),De=Object.create(null),et=[];let oe=!0;const Le="Could not find the language '{}', did you forget to load/include a language module?",ze={disableAutodetect:!0,name:"Plain text",contains:[]};let Oe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Ve(Ce){return Oe.noHighlightRe.test(Ce)}function Mt(Ce){let Xe=Ce.className+" ";Xe+=Ce.parentNode?Ce.parentNode.className:"";const vt=Oe.languageDetectRe.exec(Xe);if(vt){const Ft=rr(vt[1]);return Ft||(Kt(Le.replace("{}",vt[1])),Kt("Falling back to no-highlight mode for this block.",Ce)),Ft?vt[1]:"no-highlight"}return Xe.split(/\s+/).find(Ft=>Ve(Ft)||rr(Ft))}function wt(Ce,Xe,vt){let Ft="",wn="";typeof Xe=="object"?(Ft=Ce,vt=Xe.ignoreIllegals,wn=Xe.language):(fe("10.7.0","highlight(lang, code, ...args) has been deprecated."),fe("10.7.0",`Please use highlight(code, options) instead.
303
- https://github.com/highlightjs/highlight.js/issues/2277`),wn=Ce,Ft=Xe),vt===void 0&&(vt=!0);const Qn={code:Ft,language:wn};Oi("before:highlight",Qn);const kr=Qn.result?Qn.result:Ln(Qn.language,Qn.code,vt);return kr.code=Qn.code,Oi("after:highlight",kr),kr}function Ln(Ce,Xe,vt,Ft){const wn=Object.create(null);function Qn(je,$e){return je.keywords[$e]}function kr(){if(!at.keywords){Cn.addText(Pt);return}let je=0;at.keywordPatternRe.lastIndex=0;let $e=at.keywordPatternRe.exec(Pt),dt="";for(;$e;){dt+=Pt.substring(je,$e.index);const Tt=Pn.case_insensitive?$e[0].toLowerCase():$e[0],un=Qn(at,Tt);if(un){const[Ur,bl]=un;if(Cn.addText(dt),dt="",wn[Tt]=(wn[Tt]||0)+1,wn[Tt]<=bt&&(Xa+=bl),Ur.startsWith("_"))dt+=$e[0];else{const zo=Pn.classNameAliases[Ur]||Ur;Er($e[0],zo)}}else dt+=$e[0];je=at.keywordPatternRe.lastIndex,$e=at.keywordPatternRe.exec(Pt)}dt+=Pt.substring(je),Cn.addText(dt)}function dr(){if(Pt==="")return;let je=null;if(typeof at.subLanguage=="string"){if(!xe[at.subLanguage]){Cn.addText(Pt);return}je=Ln(at.subLanguage,Pt,!0,Lo[at.subLanguage]),Lo[at.subLanguage]=je._top}else je=Xn(Pt,at.subLanguage.length?at.subLanguage:null);at.relevance>0&&(Xa+=je.relevance),Cn.__addSublanguage(je._emitter,je.language)}function tn(){at.subLanguage!=null?dr():kr(),Pt=""}function Er(je,$e){je!==""&&(Cn.startScope($e),Cn.addText(je),Cn.endScope())}function Do(je,$e){let dt=1;const Tt=$e.length-1;for(;dt<=Tt;){if(!je._emit[dt]){dt++;continue}const un=Pn.classNameAliases[je[dt]]||je[dt],Ur=$e[dt];un?Er(Ur,un):(Pt=Ur,kr(),Pt=""),dt++}}function ms(je,$e){return je.scope&&typeof je.scope=="string"&&Cn.openNode(Pn.classNameAliases[je.scope]||je.scope),je.beginScope&&(je.beginScope._wrap?(Er(Pt,Pn.classNameAliases[je.beginScope._wrap]||je.beginScope._wrap),Pt=""):je.beginScope._multi&&(Do(je.beginScope,$e),Pt="")),at=Object.create(je,{parent:{value:at}}),at}function hl(je,$e,dt){let Tt=A(je.endRe,dt);if(Tt){if(je["on:end"]){const un=new t(je);je["on:end"]($e,un),un.isMatchIgnored&&(Tt=!1)}if(Tt){for(;je.endsParent&&je.parent;)je=je.parent;return je}}if(je.endsWithParent)return hl(je.parent,$e,dt)}function hs(je){return at.matcher.regexIndex===0?(Pt+=je[0],1):(Za=!0,0)}function i0(je){const $e=je[0],dt=je.rule,Tt=new t(dt),un=[dt.__beforeBegin,dt["on:begin"]];for(const Ur of un)if(Ur&&(Ur(je,Tt),Tt.isMatchIgnored))return hs($e);return dt.skip?Pt+=$e:(dt.excludeBegin&&(Pt+=$e),tn(),!dt.returnBegin&&!dt.excludeBegin&&(Pt=$e)),ms(dt,je),dt.returnBegin?0:$e.length}function fr(je){const $e=je[0],dt=Xe.substring(je.index),Tt=hl(at,je,dt);if(!Tt)return Ge;const un=at;at.endScope&&at.endScope._wrap?(tn(),Er($e,at.endScope._wrap)):at.endScope&&at.endScope._multi?(tn(),Do(at.endScope,je)):un.skip?Pt+=$e:(un.returnEnd||un.excludeEnd||(Pt+=$e),tn(),un.excludeEnd&&(Pt=$e));do at.scope&&Cn.closeNode(),!at.skip&&!at.subLanguage&&(Xa+=at.relevance),at=at.parent;while(at!==Tt.parent);return Tt.starts&&ms(Tt.starts,je),un.returnEnd?0:$e.length}function pl(){const je=[];for(let $e=at;$e!==Pn;$e=$e.parent)$e.scope&&je.unshift($e.scope);je.forEach($e=>Cn.openNode($e))}let Di={};function ps(je,$e){const dt=$e&&$e[0];if(Pt+=je,dt==null)return tn(),0;if(Di.type==="begin"&&$e.type==="end"&&Di.index===$e.index&&dt===""){if(Pt+=Xe.slice($e.index,$e.index+1),!oe){const Tt=new Error(`0 width match regex (${Ce})`);throw Tt.languageName=Ce,Tt.badRule=Di.rule,Tt}return 1}if(Di=$e,$e.type==="begin")return i0($e);if($e.type==="illegal"&&!vt){const Tt=new Error('Illegal lexeme "'+dt+'" for mode "'+(at.scope||"<unnamed>")+'"');throw Tt.mode=at,Tt}else if($e.type==="end"){const Tt=fr($e);if(Tt!==Ge)return Tt}if($e.type==="illegal"&&dt==="")return $e.index===Xe.length||(Pt+=`
304
- `),1;if(gl>1e5&&gl>$e.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Pt+=dt,dt.length}const Pn=rr(Ce);if(!Pn)throw Fe(Le.replace("{}",Ce)),new Error('Unknown language: "'+Ce+'"');const jo=At(Pn);let gs="",at=Ft||jo;const Lo={},Cn=new Oe.__emitter(Oe);pl();let Pt="",Xa=0,ba=0,gl=0,Za=!1;try{if(Pn.__emitTokens)Pn.__emitTokens(Xe,Cn);else{for(at.matcher.considerAll();;){gl++,Za?Za=!1:at.matcher.considerAll(),at.matcher.lastIndex=ba;const je=at.matcher.exec(Xe);if(!je)break;const $e=Xe.substring(ba,je.index),dt=ps($e,je);ba=je.index+dt}ps(Xe.substring(ba))}return Cn.finalize(),gs=Cn.toHTML(),{language:Ce,value:gs,relevance:Xa,illegal:!1,_emitter:Cn,_top:at}}catch(je){if(je.message&&je.message.includes("Illegal"))return{language:Ce,value:yn(Xe),illegal:!0,relevance:0,_illegalBy:{message:je.message,index:ba,context:Xe.slice(ba-100,ba+100),mode:je.mode,resultSoFar:gs},_emitter:Cn};if(oe)return{language:Ce,value:yn(Xe),illegal:!1,relevance:0,errorRaised:je,_emitter:Cn,_top:at};throw je}}function ur(Ce){const Xe={value:yn(Ce),illegal:!1,relevance:0,_top:ze,_emitter:new Oe.__emitter(Oe)};return Xe._emitter.addText(Ce),Xe}function Xn(Ce,Xe){Xe=Xe||Oe.languages||Object.keys(xe);const vt=ur(Ce),Ft=Xe.filter(rr).filter(Va).map(tn=>Ln(tn,Ce,!1));Ft.unshift(vt);const wn=Ft.sort((tn,Er)=>{if(tn.relevance!==Er.relevance)return Er.relevance-tn.relevance;if(tn.language&&Er.language){if(rr(tn.language).supersetOf===Er.language)return 1;if(rr(Er.language).supersetOf===tn.language)return-1}return 0}),[Qn,kr]=wn,dr=Qn;return dr.secondBest=kr,dr}function nr(Ce,Xe,vt){const Ft=Xe&&De[Xe]||vt;Ce.classList.add("hljs"),Ce.classList.add(`language-${Ft}`)}function xn(Ce){let Xe=null;const vt=Mt(Ce);if(Ve(vt))return;if(Oi("before:highlightElement",{el:Ce,language:vt}),Ce.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ce);return}if(Ce.children.length>0&&(Oe.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ce)),Oe.throwUnescapedHTML))throw new Yn("One of your code blocks includes unescaped HTML.",Ce.innerHTML);Xe=Ce;const Ft=Xe.textContent,wn=vt?wt(Ft,{language:vt,ignoreIllegals:!0}):Xn(Ft);Ce.innerHTML=wn.value,Ce.dataset.highlighted="yes",nr(Ce,vt,wn.language),Ce.result={language:wn.language,re:wn.relevance,relevance:wn.relevance},wn.secondBest&&(Ce.secondBest={language:wn.secondBest.language,relevance:wn.secondBest.relevance}),Oi("after:highlightElement",{el:Ce,result:wn,text:Ft})}function Zn(Ce){Oe=it(Oe,Ce)}const Ka=()=>{fs(),fe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function fl(){fs(),fe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Io=!1;function fs(){function Ce(){fs()}if(document.readyState==="loading"){Io||window.addEventListener("DOMContentLoaded",Ce,!1),Io=!0;return}document.querySelectorAll(Oe.cssSelector).forEach(xn)}function Mo(Ce,Xe){let vt=null;try{vt=Xe(Q)}catch(Ft){if(Fe("Language definition for '{}' could not be registered.".replace("{}",Ce)),oe)Fe(Ft);else throw Ft;vt=ze}vt.name||(vt.name=Ce),xe[Ce]=vt,vt.rawDefinition=Xe.bind(null,Q),vt.aliases&&pa(vt.aliases,{languageName:Ce})}function Mi(Ce){delete xe[Ce];for(const Xe of Object.keys(De))De[Xe]===Ce&&delete De[Xe]}function ml(){return Object.keys(xe)}function rr(Ce){return Ce=(Ce||"").toLowerCase(),xe[Ce]||xe[De[Ce]]}function pa(Ce,{languageName:Xe}){typeof Ce=="string"&&(Ce=[Ce]),Ce.forEach(vt=>{De[vt.toLowerCase()]=Xe})}function Va(Ce){const Xe=rr(Ce);return Xe&&!Xe.disableAutodetect}function Ya(Ce){Ce["before:highlightBlock"]&&!Ce["before:highlightElement"]&&(Ce["before:highlightElement"]=Xe=>{Ce["before:highlightBlock"](Object.assign({block:Xe.el},Xe))}),Ce["after:highlightBlock"]&&!Ce["after:highlightElement"]&&(Ce["after:highlightElement"]=Xe=>{Ce["after:highlightBlock"](Object.assign({block:Xe.el},Xe))})}function Nn(Ce){Ya(Ce),et.push(Ce)}function Oo(Ce){const Xe=et.indexOf(Ce);Xe!==-1&&et.splice(Xe,1)}function Oi(Ce,Xe){const vt=Ce;et.forEach(function(Ft){Ft[vt]&&Ft[vt](Xe)})}function ga(Ce){return fe("10.7.0","highlightBlock will be removed entirely in v12.0"),fe("10.7.0","Please use highlightElement now."),xn(Ce)}Object.assign(Q,{highlight:wt,highlightAuto:Xn,highlightAll:fs,highlightElement:xn,highlightBlock:ga,configure:Zn,initHighlighting:Ka,initHighlightingOnLoad:fl,registerLanguage:Mo,unregisterLanguage:Mi,listLanguages:ml,getLanguage:rr,registerAliases:pa,autoDetection:Va,inherit:it,addPlugin:Nn,removePlugin:Oo}),Q.debugMode=function(){oe=!1},Q.safeMode=function(){oe=!0},Q.versionString=gt,Q.regex={concat:E,lookahead:x,either:C,optional:S,anyNumberOfTimes:y};for(const Ce in Ie)typeof Ie[Ce]=="object"&&e(Ie[Ce]);return Object.assign(Q,Ie),Q},Lt=_t({});return Lt.newInstance=()=>_t({}),Jf=Lt,Lt.HighlightJS=Lt,Lt.default=Lt,Jf}var em,d2;function UR(){if(d2)return em;d2=1;function e(t){const n=t.regex,a=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},d=t.inherit(c,{begin:/\(/,end:/\)/}),m=t.inherit(t.APOS_STRING_MODE,{className:"string"}),h=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),g={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[c,h,m,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,d,h,m]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[g],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[g],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(a,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:g}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return em=e,em}var tm,f2;function qR(){if(f2)return tm;f2=1;function e(t){const n=t.regex,a={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},m={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a,o]};o.contains.push(m);const h={match:/\\"/},g={className:"string",begin:/'/,end:/'/},b={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,a]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],S=t.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},M=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],C=["true","false"],R={match:/(\/[a-z._-]+)+/},A=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],H=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],F=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:M,literal:C,built_in:[...A,...H,"set","shopt",...F,...D]},contains:[S,t.SHEBANG(),E,x,c,d,R,m,h,g,b,a]}}return tm=e,tm}var nm,m2;function HR(){if(m2)return nm;m2=1;function e(t){const n=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="("+s+"|"+n.optional(o)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",m={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},g={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(g,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:n.optional(o)+t.IDENT_RE,relevance:0},S=n.optional(o)+t.IDENT_RE+"\\s*\\(",C={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},R=[x,m,a,t.C_BLOCK_COMMENT_MODE,b,g],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:R.concat([{begin:/\(/,end:/\)/,keywords:C,contains:R.concat(["self"]),relevance:0}]),relevance:0},H={begin:"("+d+"[\\*&\\s]+)+"+S,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:C,relevance:0},{begin:S,returnBegin:!0,contains:[t.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,g,b,m,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,g,b,m]}]},m,a,t.C_BLOCK_COMMENT_MODE,x]};return{name:"C",aliases:["h"],keywords:C,disableAutodetect:!0,illegal:"</",contains:[].concat(A,H,R,[x,{begin:t.IDENT_RE+"::",keywords:C},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:x,strings:g,keywords:C}}}return nm=e,nm}var rm,h2;function FR(){if(h2)return rm;h2=1;function e(t){const n=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+n.optional(o)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",m={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},g={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(g,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:n.optional(o)+t.IDENT_RE,relevance:0},S=n.optional(o)+t.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],M=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],C=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],R=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],F={type:M,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},D={className:"function.dispatch",relevance:0,keywords:{_hint:R},begin:n.concat(/\b/,`(?!${E.join("|")})`,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},$=[D,x,m,a,t.C_BLOCK_COMMENT_MODE,b,g],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:F,contains:$.concat([{begin:/\(/,end:/\)/,keywords:F,contains:$.concat(["self"]),relevance:0}]),relevance:0},ee={className:"function",begin:"("+d+"[\\*&\\s]+)+"+S,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:F,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:F,relevance:0},{begin:S,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[g,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:F,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,g,b,m,{begin:/\(/,end:/\)/,keywords:F,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,g,b,m]}]},m,a,t.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:F,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,ee,D,$,[x,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:F,contains:["self",m]},{begin:t.IDENT_RE+"::",keywords:F},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return rm=e,rm}var am,p2;function PR(){if(p2)return am;p2=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],a=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],d={keyword:o.concat(c),built_in:n,literal:s},m=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)"}],relevance:0},g={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},x=t.inherit(b,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:d},S=t.inherit(y,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,S]},M={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},C=t.inherit(M,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},S]});y.contains=[M,E,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.C_BLOCK_COMMENT_MODE],S.contains=[C,E,x,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const R={variants:[g,M,E,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},A={begin:"<",end:">",contains:[{beginKeywords:"in out"},m]},H=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",F={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:d,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},R,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},m,A,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[m,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[m,A,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+H+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,A],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[R,h,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},F]}}return am=e,am}var im,g2;function $R(){if(g2)return im;g2=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...n],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function m(h){const g=h.regex,b=e(h),x={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},y="and or not only",S=/@-?\w[\w]*(-\w+)*/,E="[a-zA-Z-][a-zA-Z0-9_-]*",M=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[b.BLOCK_COMMENT,x,b.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+E,relevance:0},b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[b.BLOCK_COMMENT,b.HEXCOLOR,b.IMPORTANT,b.CSS_NUMBER_MODE,b.UNICODE_RANGE,...M,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...M,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},b.FUNCTION_DISPATCH]},{begin:g.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:S},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:y,attribute:s.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...M,b.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b"}]}}return im=m,im}var sm,b2;function GR(){if(b2)return sm;b2=1;function e(t){const n=t.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},d={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},m=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,m,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},g={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},x=t.inherit(g,{contains:[]}),y=t.inherit(b,{contains:[]});g.contains.push(y),b.contains.push(x);let S=[a,h];return[g,b,x,y].forEach(R=>{R.contains=R.contains.concat(S)}),S=S.concat(g,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:S},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:S}]}]},a,c,g,b,{className:"quote",begin:"^>\\s+",contains:S,end:"$"},o,s,h,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return sm=e,sm}var lm,v2;function KR(){if(v2)return lm;v2=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return lm=e,lm}var om,y2;function VR(){if(y2)return om;y2=1;function e(t){const n=t.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=n.concat(s,/(::\w+)*/),d={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},m={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},g=[t.COMMENT("#","$",{contains:[m]}),t.COMMENT("^=begin","^=end",{contains:[m],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:d},x={className:"string",contains:[t.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,b]})]}]},y="[1-9](_?[0-9])*|0",S="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${S}))?([eE][+-]?(${S})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},M={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:d}]},$=[x,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:d},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[M]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:a}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:d},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,g),relevance:0}].concat(h,g);b.contains=$,M.contains=$;const Z=[{begin:/^\s*=>/,starts:{end:"$",contains:$}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:$}}];return g.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(Z).concat(g).concat($)}}return om=e,om}var cm,x2;function YR(){if(x2)return cm;x2=1;function e(t){const c={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:c,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,illegal:/["']/}]}]}}return cm=e,cm}var um,w2;function XR(){if(w2)return um;w2=1;function e(t){const n=t.regex,a=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(a,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return um=e,um}var dm,S2;function ZR(){if(S2)return dm;S2=1;function e(t){const n=t.regex,a={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},s=t.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},c={className:"literal",begin:/\bon|off|true|false|yes|no\b/},d={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},m={begin:/\[/,end:/\]/,contains:[s,c,o,d,a,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,g=/"(\\"|[^"])*"/,b=/'[^']*'/,x=n.either(h,g,b),y=n.concat(x,"(\\s*\\.\\s*",x,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[s,m,c,o,d,a]}}]}}return dm=e,dm}var fm,k2;function QR(){if(k2)return fm;k2=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function s(c,d,m){return m===-1?"":c.replace(d,h=>s(c,d,m-1))}function o(c){const d=c.regex,m="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",h=m+s("(?:<"+m+"~~~(?:\\s*,\\s*"+m+"~~~)*>)?",/~~~/g,2),S={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},E={className:"meta",begin:"@"+m,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},M={className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:S,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,m],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[d.concat(/(?!else)/,m),/\s+/,m,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,m],className:{1:"keyword",3:"title.class"},contains:[M,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+h+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:S,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[E,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,a,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},a,E]}}return fm=o,fm}var mm,E2;function WR(){if(E2)return mm;E2=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d=[].concat(o,a,s);function m(h){const g=h.regex,b=(ae,{after:ge})=>{const ve="</"+ae[0].slice(1);return ae.input.indexOf(ve,ge)!==-1},x=e,y={begin:"<>",end:"</>"},S=/<[A-Za-z0-9\\._:-]+\s*\/>/,E={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,ge)=>{const ve=ae[0].length+ae.index,Ie=ae.input[ve];if(Ie==="<"||Ie===","){ge.ignoreMatch();return}Ie===">"&&(b(ae,{after:ve})||ge.ignoreMatch());let He;const Ee=ae.input.substring(ve);if(He=Ee.match(/^\s*=/)){ge.ignoreMatch();return}if((He=Ee.match(/^\s+extends\s+/))&&He.index===0){ge.ignoreMatch();return}}},M={$pattern:e,keyword:t,literal:n,built_in:d,"variable.language":c},C="[0-9](_?[0-9])*",R=`\\.(${C})`,A="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",H={className:"number",variants:[{begin:`(\\b(${A})((${R})|\\.)?|(${R}))[eE][+-]?(${C})\\b`},{begin:`\\b(${A})\\b((${R})\\b|\\.)?|(${R})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},F={className:"subst",begin:"\\$\\{",end:"\\}",keywords:M,contains:[]},D={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,F],subLanguage:"xml"}},$={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,F],subLanguage:"css"}},P={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,F],subLanguage:"graphql"}},ee={className:"string",begin:"`",end:"`",contains:[h.BACKSLASH_ESCAPE,F]},Z={className:"comment",variants:[h.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:x+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),h.C_BLOCK_COMMENT_MODE,h.C_LINE_COMMENT_MODE]},G=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,D,$,P,ee,{match:/\$\d+/},H];F.contains=G.concat({begin:/\{/,end:/\}/,keywords:M,contains:["self"].concat(G)});const le=[].concat(Z,F.contains),W=le.concat([{begin:/(\s*)\(/,end:/\)/,keywords:M,contains:["self"].concat(le)}]),U={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:M,contains:W},z={variants:[{match:[/class/,/\s+/,x,/\s+/,/extends/,/\s+/,g.concat(x,"(",g.concat(/\./,x),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,x],scope:{1:"keyword",3:"title.class"}}]},V={relevance:0,match:g.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},we={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[U],illegal:/%/},O={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(ae){return g.concat("(?!",ae.join("|"),")")}const Y={match:g.concat(/\b/,B([...o,"super","import","await"].map(ae=>`${ae}\\s*\\(`)),x,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},_={begin:g.concat(/\./,g.lookahead(g.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ce={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},U]},he="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+h.UNDERSCORE_IDENT_RE+")\\s*=>",ie={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(he)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[U]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:M,exports:{PARAMS_CONTAINS:W,CLASS_REFERENCE:V},illegal:/#(?![$_A-Za-z])/,contains:[h.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,D,$,P,ee,Z,{match:/\$\d+/},H,V,{scope:"attr",match:x+g.lookahead(":"),relevance:0},ie,{begin:"("+h.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[Z,h.REGEXP_MODE,{className:"function",begin:he,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:h.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:M,contains:W}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:S},{begin:E.begin,"on:begin":E.isTrulyOpeningTag,end:E.end}],subLanguage:"xml",contains:[{begin:E.begin,end:E.end,skip:!0,contains:["self"]}]}]},we,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+h.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[U,h.inherit(h.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[U]},Y,O,z,ce,{match:/\$[(.]/}]}}return mm=m,mm}var hm,T2;function JR(){if(T2)return hm;T2=1;const t={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function n(a){const s={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},o={match:/[{}[\],:]/,className:"punctuation",relevance:0},c=["true","false","null"],d={scope:"literal",beginKeywords:c.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:c},contains:[s,o,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,d,t,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return hm=n,hm}var pm,N2;function e_(){if(N2)return pm;N2=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function s(o){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},d={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},m={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},g={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},b={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[g,h]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,g,h]}]};h.contains.push(b);const x={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},y={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(b,{className:"string"}),"self"]}]},S=a,E=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),M={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},C=M;return C.variants[1].contains=[M],M.variants[1].contains=[C],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,E,d,m,x,y,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[M,o.C_LINE_COMMENT_MODE,E],relevance:0},o.C_LINE_COMMENT_MODE,E,x,y,b,o.C_NUMBER_MODE]},E]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},x,y]},b,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
305
- `},S]}}return pm=s,pm}var gm,C2;function t_(){if(C2)return gm;C2=1;const e=g=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:g.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[g.APOS_STRING_MODE,g.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:g.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...n],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),m=o.concat(c).sort().reverse();function h(g){const b=e(g),x=m,y="and or not only",S="[\\w-]+",E="("+S+"|@\\{"+S+"\\})",M=[],C=[],R=function(le){return{className:"string",begin:"~?"+le+".*?"+le}},A=function(le,W,U){return{className:le,begin:W,relevance:U}},H={$pattern:/[a-z-]+/,keyword:y,attribute:s.join(" ")},F={begin:"\\(",end:"\\)",contains:C,keywords:H,relevance:0};C.push(g.C_LINE_COMMENT_MODE,g.C_BLOCK_COMMENT_MODE,R("'"),R('"'),b.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},b.UNICODE_RANGE,b.HEXCOLOR,F,A("variable","@@?"+S,10),A("variable","@\\{"+S+"\\}"),A("built_in","~?`[^`]*?`"),{className:"attribute",begin:S+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},b.IMPORTANT,{beginKeywords:"and not"},b.FUNCTION_DISPATCH);const D=C.concat({begin:/\{/,end:/\}/,contains:M}),$={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(C)},P={begin:E+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:C}}]},ee={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:H,returnEnd:!0,contains:C,relevance:0}},q={className:"variable",variants:[{begin:"@"+S+"\\s*:",relevance:15},{begin:"@"+S}],starts:{end:"[;}]",returnEnd:!0,contains:D}},Z={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:E,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[g.C_LINE_COMMENT_MODE,g.C_BLOCK_COMMENT_MODE,$,A("keyword","all\\b"),A("variable","@\\{"+S+"\\}"),{begin:"\\b("+a.join("|")+")\\b",className:"selector-tag"},b.CSS_NUMBER_MODE,A("selector-tag",E,0),A("selector-id","#"+E),A("selector-class","\\."+E,0),A("selector-tag","&",0),b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:D},{begin:"!important"},b.FUNCTION_DISPATCH]},G={begin:S+`:(:)?(${x.join("|")})`,returnBegin:!0,contains:[Z]};return M.push(g.C_LINE_COMMENT_MODE,g.C_BLOCK_COMMENT_MODE,ee,q,G,P,Z,$,b.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:M}}return gm=h,gm}var bm,A2;function n_(){if(A2)return bm;A2=1;function e(t){const n="\\[=*\\[",a="\\]=*\\]",s={begin:n,end:a,contains:["self"]},o=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,a,{contains:[s],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:a,contains:[s],relevance:5}])}}return bm=e,bm}var vm,R2;function r_(){if(R2)return vm;R2=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},a={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},s={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,a]},o={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},c={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},d={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,a,s,o,c,d]}}return vm=e,vm}var ym,_2;function a_(){if(_2)return ym;_2=1;function e(t){const n=t.regex,a=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],s=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:a.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},d={begin:/->\{/,end:/\}/},m={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[m]},g={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[t.BACKSLASH_ESCAPE,c,h],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(M,C,R="\\1")=>{const A=R==="\\1"?R:n.concat(R,C);return n.concat(n.concat("(?:",M,")"),C,/(?:\\.|[^\\\/])*?/,A,/(?:\\.|[^\\\/])*?/,R,s)},S=(M,C,R)=>n.concat(n.concat("(?:",M,")"),C,/(?:\\.|[^\\\/])*?/,R,s),E=[h,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},g,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",n.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:S("(?:m|qr)?",/\//,/\//)},{begin:S("m|qr",n.either(...x,{capture:!0}),/\1/)},{begin:S("m|qr",/\(/,/\)/)},{begin:S("m|qr",/\[/,/\]/)},{begin:S("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,m]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,m,g]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=E,d.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:E}}return ym=e,ym}var xm,I2;function i_(){if(I2)return xm;I2=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,m={"variable.language":["this","super"],$pattern:a,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:a,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:m,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return xm=e,xm}var wm,M2;function s_(){if(M2)return wm;M2=1;function e(t){const n=t.regex,a=/(?![A-Za-z0-9])(?![$])/,s=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),o=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,a),c=n.concat(/[A-Z]+/,a),d={scope:"variable",match:"\\$+"+s},m={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},g=t.inherit(t.APOS_STRING_MODE,{illegal:null}),b=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(h)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(U,z)=>{z.data._beginMatch=U[1]||U[2]},"on:end":(U,z)=>{z.data._beginMatch!==U[1]&&z.ignoreMatch()}},y=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),S=`[
306
- ]`,E={scope:"string",variants:[b,g,x,y]},M={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},C=["false","null","true"],R=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],A=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],F={keyword:R,literal:(U=>{const z=[];return U.forEach(V=>{z.push(V),V.toLowerCase()===V?z.push(V.toUpperCase()):z.push(V.toLowerCase())}),z})(C),built_in:A},D=U=>U.map(z=>z.replace(/\|\d+$/,"")),$={variants:[{match:[/new/,n.concat(S,"+"),n.concat("(?!",D(A).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},P=n.concat(s,"\\b(?!\\()"),ee={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,n.concat(/::/,n.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[o,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},q={scope:"attr",match:n.concat(s,n.lookahead(":"),n.lookahead(/(?!::)/))},Z={relevance:0,begin:/\(/,end:/\)/,keywords:F,contains:[q,d,ee,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,E,M,$]},G={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",D(R).join("\\b|"),"|",D(A).join("\\b|"),"\\b)"),s,n.concat(S,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[Z]};Z.contains.push(G);const le=[q,ee,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,E,M,$],W={begin:n.concat(/#\[\s*\\?/,n.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:C,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:C,keyword:["new","array"]},contains:["self",...le]},...le,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:F,contains:[W,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},m,{scope:"variable.language",match:/\$this\b/},d,G,ee,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},$,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:F,contains:["self",W,d,ee,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,E,M]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},E,M]}}return wm=e,wm}var Sm,O2;function l_(){if(O2)return Sm;O2=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Sm=e,Sm}var km,D2;function o_(){if(D2)return km;D2=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return km=e,km}var Em,j2;function c_(){if(j2)return Em;j2=1;function e(t){const n=t.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],m={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},g={className:"subst",begin:/\{/,end:/\}/,keywords:m,illegal:/#/},b={begin:/\{\{/,relevance:0},x={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h,b,g]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h,b,g]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,b,g]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,b,g]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",S=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,E=`\\b|${s.join("|")}`,M={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${S}))[eE][+-]?(${y})[jJ]?(?=${E})`},{begin:`(${S})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${y})[jJ](?=${E})`}]},C={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:m,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},R={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:["self",h,M,x,t.HASH_COMMENT_MODE]}]};return g.contains=[x,M,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:m,illegal:/(<\/|\?)|=>/,contains:[h,M,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},x,C,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[R]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[M,R,x]}]}}return Em=e,Em}var Tm,L2;function u_(){if(L2)return Tm;L2=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Tm=e,Tm}var Nm,z2;function d_(){if(z2)return Nm;z2=1;function e(t){const n=t.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:a,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:a},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[c,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Nm=e,Nm}var Cm,B2;function f_(){if(B2)return Cm;B2=1;function e(t){const n=t.regex,a=/(r#)?/,s=n.concat(a,t.UNDERSCORE_IDENT_RE),o=n.concat(a,t.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,n.lookahead(/\s*\(/))},d="([ui](8|16|32|64|128|size)|f(32|64))?",m=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],g=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:b,keyword:m,literal:h,built_in:g},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+d},{begin:"\\b0o([0-7_]+)"+d},{begin:"\\b0x([A-Fa-f0-9_]+)"+d},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+d}],relevance:0},{begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:g,type:b}},{className:"punctuation",begin:"->"},c]}}return Cm=e,Cm}var Am,U2;function m_(){if(U2)return Am;U2=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...n],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),d=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function m(h){const g=e(h),b=c,x=o,y="@[a-z-]+",S="and or not only",M={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[h.C_LINE_COMMENT_MODE,h.C_BLOCK_COMMENT_MODE,g.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+x.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+b.join("|")+")"},M,{begin:/\(/,end:/\)/,contains:[g.CSS_NUMBER_MODE]},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[g.BLOCK_COMMENT,M,g.HEXCOLOR,g.CSS_NUMBER_MODE,g.UNICODE_RANGE,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,g.IMPORTANT,g.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:y,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:S,attribute:s.join(" ")},contains:[{begin:y,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},M,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,g.HEXCOLOR,g.CSS_NUMBER_MODE]},g.FUNCTION_DISPATCH]}}return Am=m,Am}var Rm,q2;function h_(){if(q2)return Rm;q2=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Rm=e,Rm}var _m,H2;function p_(){if(H2)return _m;H2=1;function e(t){const n=t.regex,a=t.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],d=["double precision","large object","with timezone","without timezone"],m=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],g=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],S=b,E=[...g,...h].filter(D=>!b.includes(D)),M={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},C={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},R={match:n.concat(/\b/,n.either(...S),/\s*\(/),relevance:0,keywords:{built_in:S}};function A(D){return n.concat(/\b/,n.either(...D.map($=>$.replace(/\s+/,"\\s+"))),/\b/)}const H={scope:"keyword",match:A(y),relevance:0};function F(D,{exceptions:$,when:P}={}){const ee=P;return $=$||[],D.map(q=>q.match(/\|\d+$/)||$.includes(q)?q:ee(q)?`${q}|0`:q)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:F(E,{when:D=>D.length<3}),literal:c,type:m,built_in:x},contains:[{scope:"type",match:A(d)},H,R,M,s,o,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,a,C]}}return _m=e,_m}var Im,F2;function g_(){if(F2)return Im;F2=1;function e(P){return P?typeof P=="string"?P:P.source:null}function t(P){return n("(?=",P,")")}function n(...P){return P.map(q=>e(q)).join("")}function a(P){const ee=P[P.length-1];return typeof ee=="object"&&ee.constructor===Object?(P.splice(P.length-1,1),ee):{}}function s(...P){return"("+(a(P).capture?"":"?:")+P.map(Z=>e(Z)).join("|")+")"}const o=P=>n(/\b/,P,/\w$/.test(P)?/\b/:/\B/),c=["Protocol","Type"].map(o),d=["init","self"].map(o),m=["Any","Self"],h=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],g=["false","nil","true"],b=["assignment","associativity","higherThan","left","lowerThan","none","right"],x=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],y=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],S=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),E=s(S,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),M=n(S,E,"*"),C=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),R=s(C,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),A=n(C,R,"*"),H=n(/[A-Z]/,R,"*"),F=["attached","autoclosure",n(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,A,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],D=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function $(P){const ee={match:/\s+/,relevance:0},q=P.COMMENT("/\\*","\\*/",{contains:["self"]}),Z=[P.C_LINE_COMMENT_MODE,q],G={match:[/\./,s(...c,...d)],className:{2:"keyword"}},le={match:n(/\./,s(...h)),relevance:0},W=h.filter(Ge=>typeof Ge=="string").concat(["_|0"]),U=h.filter(Ge=>typeof Ge!="string").concat(m).map(o),z={variants:[{className:"keyword",match:s(...U,...d)}]},V={$pattern:s(/\b\w+/,/#\w+/),keyword:W.concat(x),literal:g},ne=[G,le,z],we={match:n(/\./,s(...y)),relevance:0},O={className:"built_in",match:n(/\b/,s(...y),/(?=\()/)},B=[we,O],Y={match:/->/,relevance:0},_={className:"operator",relevance:0,variants:[{match:M},{match:`\\.(\\.|${E})+`}]},ce=[Y,_],he="([0-9]_*)+",ie="([0-9a-fA-F]_*)+",ae={className:"number",relevance:0,variants:[{match:`\\b(${he})(\\.(${he}))?([eE][+-]?(${he}))?\\b`},{match:`\\b0x(${ie})(\\.(${ie}))?([pP][+-]?(${he}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},ge=(Ge="")=>({className:"subst",variants:[{match:n(/\\/,Ge,/[0\\tnr"']/)},{match:n(/\\/,Ge,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ve=(Ge="")=>({className:"subst",match:n(/\\/,Ge,/[\t ]*(?:[\r\n]|\r\n)/)}),Ie=(Ge="")=>({className:"subst",label:"interpol",begin:n(/\\/,Ge,/\(/),end:/\)/}),He=(Ge="")=>({begin:n(Ge,/"""/),end:n(/"""/,Ge),contains:[ge(Ge),ve(Ge),Ie(Ge)]}),Ee=(Ge="")=>({begin:n(Ge,/"/),end:n(/"/,Ge),contains:[ge(Ge),Ie(Ge)]}),nt={className:"string",variants:[He(),He("#"),He("##"),He("###"),Ee(),Ee("#"),Ee("##"),Ee("###")]},mt=[P.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[P.BACKSLASH_ESCAPE]}],qt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:mt},Zt=Ge=>{const bt=n(Ge,/\//),_t=n(/\//,Ge);return{begin:bt,end:_t,contains:[...mt,{scope:"comment",begin:`#(?!.*${_t})`,end:/$/}]}},vn={scope:"regexp",variants:[Zt("###"),Zt("##"),Zt("#"),qt]},Tn={match:n(/`/,A,/`/)},mn={className:"variable",match:/\$\d+/},Ht={className:"variable",match:`\\$${R}+`},We=[Tn,mn,Ht],xt={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:D,contains:[...ce,ae,nt]}]}},jt={scope:"keyword",match:n(/@/,s(...F),t(s(/\(/,/\s+/)))},Fe={scope:"meta",match:n(/@/,A)},Kt=[xt,jt,Fe],fe={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,R,"+")},{className:"type",match:H,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(H)),relevance:0}]},be={begin:/</,end:/>/,keywords:V,contains:[...Z,...ne,...Kt,Y,fe]};fe.contains.push(be);const Ue={match:n(A,/\s*:/),keywords:"_|0",relevance:0},Ze={begin:/\(/,end:/\)/,relevance:0,keywords:V,contains:["self",Ue,...Z,vn,...ne,...B,...ce,ae,nt,...We,...Kt,fe]},Je={begin:/</,end:/>/,keywords:"repeat each",contains:[...Z,fe]},It={begin:s(t(n(A,/\s*:/)),t(n(A,/\s+/,A,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:A}]},nn={begin:/\(/,end:/\)/,keywords:V,contains:[It,...Z,...ne,...ce,ae,nt,...Kt,fe,Ze],endsParent:!0,illegal:/["']/},At={match:[/(func|macro)/,/\s+/,s(Tn.match,A,M)],className:{1:"keyword",3:"title.function"},contains:[Je,nn,ee],illegal:[/\[/,/%/]},lt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Je,nn,ee],illegal:/\[|%/},cn={match:[/operator/,/\s+/,M],className:{1:"keyword",3:"title"}},gt={begin:[/precedencegroup/,/\s+/,H],className:{1:"keyword",3:"title"},contains:[fe],keywords:[...b,...g],end:/}/},Yn={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},yn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},it={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,A,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:V,contains:[Je,...ne,{begin:/:/,end:/\{/,keywords:V,contains:[{scope:"title.class.inherited",match:H},...ne],relevance:0}]};for(const Ge of nt.variants){const bt=Ge.contains.find(Lt=>Lt.label==="interpol");bt.keywords=V;const _t=[...ne,...B,...ce,ae,nt,...We];bt.contains=[..._t,{begin:/\(/,end:/\)/,contains:["self",..._t]}]}return{name:"Swift",keywords:V,contains:[...Z,At,lt,Yn,yn,it,cn,gt,{beginKeywords:"import",end:/$/,contains:[...Z],relevance:0},vn,...ne,...B,...ce,ae,nt,...We,...Kt,fe,Ze]}}return Im=$,Im}var Mm,P2;function b_(){if(P2)return Mm;P2=1;function e(t){const n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},d={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,o]},m=t.inherit(d,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},S={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},E={begin:/\{/,end:/\}/,contains:[S],illegal:"\\n",relevance:0},M={begin:"\\[",end:"\\]",contains:[S],illegal:"\\n",relevance:0},C=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},y,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},E,M,c,d],R=[...C];return R.pop(),R.push(m),S.contains=R,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:C}}return Mm=e,Mm}var Om,$2;function v_(){if($2)return Om;$2=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],d=[].concat(o,a,s);function m(g){const b=g.regex,x=(ge,{after:ve})=>{const Ie="</"+ge[0].slice(1);return ge.input.indexOf(Ie,ve)!==-1},y=e,S={begin:"<>",end:"</>"},E=/<[A-Za-z0-9\\._:-]+\s*\/>/,M={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ge,ve)=>{const Ie=ge[0].length+ge.index,He=ge.input[Ie];if(He==="<"||He===","){ve.ignoreMatch();return}He===">"&&(x(ge,{after:Ie})||ve.ignoreMatch());let Ee;const nt=ge.input.substring(Ie);if(Ee=nt.match(/^\s*=/)){ve.ignoreMatch();return}if((Ee=nt.match(/^\s+extends\s+/))&&Ee.index===0){ve.ignoreMatch();return}}},C={$pattern:e,keyword:t,literal:n,built_in:d,"variable.language":c},R="[0-9](_?[0-9])*",A=`\\.(${R})`,H="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",F={className:"number",variants:[{begin:`(\\b(${H})((${A})|\\.)?|(${A}))[eE][+-]?(${R})\\b`},{begin:`\\b(${H})\\b((${A})\\b|\\.)?|(${A})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},D={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},$={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[g.BACKSLASH_ESCAPE,D],subLanguage:"xml"}},P={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[g.BACKSLASH_ESCAPE,D],subLanguage:"css"}},ee={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[g.BACKSLASH_ESCAPE,D],subLanguage:"graphql"}},q={className:"string",begin:"`",end:"`",contains:[g.BACKSLASH_ESCAPE,D]},G={className:"comment",variants:[g.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),g.C_BLOCK_COMMENT_MODE,g.C_LINE_COMMENT_MODE]},le=[g.APOS_STRING_MODE,g.QUOTE_STRING_MODE,$,P,ee,q,{match:/\$\d+/},F];D.contains=le.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(le)});const W=[].concat(G,D.contains),U=W.concat([{begin:/(\s*)\(/,end:/\)/,keywords:C,contains:["self"].concat(W)}]),z={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:U},V={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,b.concat(y,"(",b.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},ne={relevance:0,match:b.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},we={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[z],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Y(ge){return b.concat("(?!",ge.join("|"),")")}const _={match:b.concat(/\b/,Y([...o,"super","import","await"].map(ge=>`${ge}\\s*\\(`)),y,b.lookahead(/\s*\(/)),className:"title.function",relevance:0},ce={begin:b.concat(/\./,b.lookahead(b.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},he={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},z]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+g.UNDERSCORE_IDENT_RE+")\\s*=>",ae={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,b.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[z]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:ne},illegal:/#(?![$_A-Za-z])/,contains:[g.SHEBANG({label:"shebang",binary:"node",relevance:5}),we,g.APOS_STRING_MODE,g.QUOTE_STRING_MODE,$,P,ee,q,G,{match:/\$\d+/},F,ne,{scope:"attr",match:y+b.lookahead(":"),relevance:0},ae,{begin:"("+g.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[G,g.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:g.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:U}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:S.begin,end:S.end},{match:E},{begin:M.begin,"on:begin":M.isTrulyOpeningTag,end:M.end}],subLanguage:"xml",contains:[{begin:M.begin,end:M.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+g.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[z,g.inherit(g.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},ce,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[z]},_,B,V,he,{match:/\$[(.]/}]}}function h(g){const b=g.regex,x=m(g),y=e,S=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],E={begin:[/namespace/,/\s+/,g.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},M={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:S},contains:[x.exports.CLASS_REFERENCE]},C={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},R=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],A={$pattern:e,keyword:t.concat(R),literal:n,built_in:d.concat(S),"variable.language":c},H={className:"meta",begin:"@"+y},F=(ee,q,Z)=>{const G=ee.contains.findIndex(le=>le.label===q);if(G===-1)throw new Error("can not find mode to replace");ee.contains.splice(G,1,Z)};Object.assign(x.keywords,A),x.exports.PARAMS_CONTAINS.push(H);const D=x.contains.find(ee=>ee.scope==="attr"),$=Object.assign({},D,{match:b.concat(y,b.lookahead(/\s*\?:/))});x.exports.PARAMS_CONTAINS.push([x.exports.CLASS_REFERENCE,D,$]),x.contains=x.contains.concat([H,E,M,$]),F(x,"shebang",g.SHEBANG()),F(x,"use_strict",C);const P=x.contains.find(ee=>ee.label==="func.def");return P.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return Om=h,Om}var Dm,G2;function y_(){if(G2)return Dm;G2=1;function e(t){const n=t.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,m=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:n.concat(/# */,n.either(c,o),/ *#/)},{begin:n.concat(/# */,m,/ *#/)},{begin:n.concat(/# */,d,/ *#/)},{begin:n.concat(/# */,n.either(c,o),/ +/,n.either(d,m),/ *#/)}]},g={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},x=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[a,s,h,g,b,x,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}return Dm=e,Dm}var jm,K2;function x_(){if(K2)return jm;K2=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const a=t.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},d={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},m={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},g={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[a,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,d,o,t.QUOTE_STRING_MODE,h,g,m]}}return jm=e,jm}var Lm,V2;function w_(){if(V2)return Lm;V2=1;var e=BR();return e.registerLanguage("xml",UR()),e.registerLanguage("bash",qR()),e.registerLanguage("c",HR()),e.registerLanguage("cpp",FR()),e.registerLanguage("csharp",PR()),e.registerLanguage("css",$R()),e.registerLanguage("markdown",GR()),e.registerLanguage("diff",KR()),e.registerLanguage("ruby",VR()),e.registerLanguage("go",YR()),e.registerLanguage("graphql",XR()),e.registerLanguage("ini",ZR()),e.registerLanguage("java",QR()),e.registerLanguage("javascript",WR()),e.registerLanguage("json",JR()),e.registerLanguage("kotlin",e_()),e.registerLanguage("less",t_()),e.registerLanguage("lua",n_()),e.registerLanguage("makefile",r_()),e.registerLanguage("perl",a_()),e.registerLanguage("objectivec",i_()),e.registerLanguage("php",s_()),e.registerLanguage("php-template",l_()),e.registerLanguage("plaintext",o_()),e.registerLanguage("python",c_()),e.registerLanguage("python-repl",u_()),e.registerLanguage("r",d_()),e.registerLanguage("rust",f_()),e.registerLanguage("scss",m_()),e.registerLanguage("shell",h_()),e.registerLanguage("sql",p_()),e.registerLanguage("swift",g_()),e.registerLanguage("yaml",b_()),e.registerLanguage("typescript",v_()),e.registerLanguage("vbnet",y_()),e.registerLanguage("wasm",x_()),e.HighlightJS=e,e.default=e,Lm=e,Lm}var S_=w_();const Y2=Ou(S_),c6=/^(javascript|vbscript|data):/i;function k_(e){if(!e)return!1;const t=e.trim();return!(!t||c6.test(t))}function E_(e){if(!e)return!1;const t=e.trim();return!t||c6.test(t)||t.startsWith("blob:")||t.startsWith("data:image/")||/^https?:\/\//i.test(t)?!1:!!(t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||!/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t))}const T_=[[rC,{singleTilde:!1}],[iR,{singleDollarTextMath:!0}]],N_=[zR];let zm=null,X2=null;async function C_(){return zm||(X2??=zw(()=>import("./mermaid.core-DWGK9kwP.js").then(e=>e.bp),[]).then(e=>{e.default.initialize({startOnLoad:!1,securityLevel:"strict",theme:"neutral"});const t=async(n,a)=>{const{svg:s}=await e.default.render(`oc-mermaid-${Math.random().toString(36).slice(2,10)}`,a);n.innerHTML=s};return zm=t,t}).catch(()=>null),X2)}function A_({code:e}){const t=N.useRef(null),[n,a]=N.useState(!1);return N.useEffect(()=>{let s=!1;return C_().then(o=>{if(s||!o||!t.current){o||a(!0);return}o(t.current,e).catch(()=>{s||a(!0)})}),()=>{s=!0}},[e]),n?f.jsx(Sh,{lang:"mermaid",text:e}):f.jsx("div",{className:"oc-mermaid",ref:t,role:"img","aria-label":"Mermaid 图表"})}function Sh({lang:e,text:t,children:n}){const[a,s]=N.useState(!1),o=N.useMemo(()=>{const d=Y2.getLanguage(e)?e:"";return d?Y2.highlight(t,{language:d,ignoreIllegals:!0}).value:void 0},[e,t]),c=()=>{navigator.clipboard?.writeText(t).then(()=>{s(!0),window.setTimeout(()=>s(!1),1600)},()=>{})};return f.jsxs("div",{className:"oc-codeblock",children:[f.jsxs("div",{className:"oc-codeblock-head",children:[f.jsx("span",{className:"oc-codeblock-lang",children:e||"text"}),f.jsx("button",{type:"button",className:"oc-codeblock-copy",onClick:c,children:a?"已复制":"复制"})]}),f.jsx("pre",{children:o!==void 0?f.jsx("code",{className:`hljs language-${e}`,dangerouslySetInnerHTML:{__html:o}}):f.jsx("code",{className:e?`hljs language-${e}`:"hljs",children:n??t})})]})}function kh(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(kh).join("");if(typeof e=="object"&&"props"in e){const t=e.props;return kh(t?.children)}return""}const R_={pre({children:e}){return f.jsx(f.Fragment,{children:e})},code({className:e,children:t,...n}){const a=kh(t).replace(/\n$/,""),s=/language-([\w-]+)/.exec(e??"");return s?.[1]==="mermaid"?f.jsx(A_,{code:a}):s||e&&a.includes(`
307
- `)?f.jsx(Sh,{lang:s?.[1]??"",text:a}):a.includes(`
308
- `)?f.jsx(Sh,{lang:"",text:a}):f.jsx("code",{className:e,...n,children:t})},a({href:e,children:t,...n}){if(!k_(e))return f.jsx("span",{...n,children:t});const a=/^https?:\/\//i.test(e??"");return f.jsx("a",{href:e,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...n,children:t})},img({src:e,alt:t}){return E_(e)?f.jsxs(f.Fragment,{children:[f.jsx("img",{src:e,alt:t??"",loading:"lazy",onError:n=>{const a=n.currentTarget;a.hidden=!0,a.nextElementSibling?.removeAttribute("hidden")}}),f.jsx("span",{className:"oc-md-img-fallback",hidden:!0,title:e??void 0,children:t?`[图片加载失败: ${t}]`:"[图片加载失败]"})]}):f.jsx("span",{className:"oc-md-img-fallback",title:e??void 0,children:t?`[图片: ${t}]`:"[图片已屏蔽]"})},table({children:e}){return f.jsx("div",{className:"oc-md-table-wrap",children:f.jsx("table",{children:e})})},input(e){return e.type==="checkbox"?f.jsx("input",{type:"checkbox",checked:!!e.checked,disabled:!0,readOnly:!0}):f.jsx("input",{...e,disabled:!0,readOnly:!0})}};class __ extends N.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){}componentDidUpdate(t){t.text!==this.props.text&&this.state.hasError&&this.setState({hasError:!1})}render(){return this.state.hasError?f.jsx("div",{className:"oc-md",children:f.jsx("pre",{className:"oc-md-fallback",children:this.props.text})}):this.props.children}}function Z2({text:e}){try{return f.jsx(__,{text:e,children:f.jsx("div",{className:"oc-md",children:f.jsx(GE,{remarkPlugins:T_,rehypePlugins:N_,components:R_,children:e})})})}catch{return f.jsx("div",{className:"oc-md",children:f.jsx("pre",{className:"oc-md-fallback",children:e})})}}function I_(){return f.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function M_(){return f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function O_(){return f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),f.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}function D_(){return f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function n0(){return f.jsx("svg",{className:"oc-tool-chevron",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("polyline",{points:"4 2.5 7.5 6 4 9.5"})})}function u6(){return f.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Eh(e){const[t,n]=N.useState(!1),a=()=>{navigator.clipboard?.writeText(e.text).then(()=>{n(!0),window.setTimeout(()=>n(!1),1600)},()=>{})};return f.jsx("button",{type:"button",className:`oc-message-copy${t?" is-copied":""}`,"aria-label":t?"已复制":"复制消息",title:t?"已复制":"复制",onClick:a,children:t?f.jsx(M_,{}):f.jsx(I_,{})})}function Q2(e){const{message:t,streaming:n,activeAssistantId:a}=e;if(t.kind==="compaction")return f.jsxs("div",{className:"oc-compaction-card",role:"status",children:[f.jsx("span",{className:"oc-compaction-icon","aria-hidden":"true",children:f.jsx(i8,{size:16})}),f.jsxs("div",{className:"oc-compaction-body",children:[f.jsxs("div",{className:"oc-compaction-heading",children:[f.jsx("strong",{children:"上下文已压缩"}),f.jsx("span",{children:Pm(t.createdAt)}),t.compaction?.tokensBefore?f.jsxs("span",{children:["压缩前 ",Or(t.compaction.tokensBefore)," tokens"]}):null]}),f.jsx("div",{className:"oc-compaction-summary",children:f.jsx(Z2,{text:t.text})})]})]});const s=t.role==="user",o=s?"你":"π",c=s?"你":"助手",d=!s&&n&&a!==null&&t.id===a,m=d&&t.text.length===0,h=t.text.trim().length>0;return f.jsxs("div",{className:`oc-row ${s?"is-user":"is-assistant"}`,children:[f.jsxs("div",{className:"oc-meta",children:[f.jsx("span",{className:`oc-avatar ${s?"oc-avatar-user":"oc-avatar-assistant"}`,"aria-hidden":"true",children:o}),f.jsx("span",{className:"oc-role",children:c}),f.jsx("span",{className:"oc-time",children:Pm(t.createdAt)}),h&&f.jsx(Eh,{text:t.text})]}),f.jsxs("div",{className:`oc-bubble ${s?"oc-bubble-user":"oc-bubble-assistant"}`,children:[h?s?f.jsx("div",{style:{whiteSpace:"pre-wrap"},children:t.text}):f.jsx(Z2,{text:t.text}):m?f.jsx("span",{className:"oc-cursor","aria-hidden":"true"}):null,d&&h&&f.jsx("span",{className:"oc-cursor","aria-hidden":"true"})]})]})}function j_(e){if(!(!e||typeof e!="object"))return e}function ki(e){return typeof e=="string"?e:void 0}function r0(e){if(!Array.isArray(e))return;const t=[];for(const n of e){const a=j_(n);if(!a)continue;const s=ki(a.type)??"";if(s==="thinking"||s==="reasoning"){const o=ki(a.thinking)??ki(a.text)??"";t.push({type:"thinking",thinking:o});continue}if(s==="toolCall"||s==="tool_call"||s==="toolUse"||s==="tool_use"){const o=ki(a.toolCallId)??ki(a.id)??"";if(!o)continue;const c=ki(a.toolName)??ki(a.name);t.push({type:"toolCall",toolCallId:o,...c?{toolName:c}:{}});continue}if(s==="text"||s==="output_text"||s===""){const o=ki(a.text);o!==void 0&&t.push({type:"text",text:o})}}return t}function L_(e,t={}){return e.type==="thinking"&&!t.isStreaming&&e.thinking.trim()===""}function d6(e,t={}){return e.filter(n=>!L_(n,t))}function z_(e){return e.type==="text"}function B_(e,t={}){const n=d6(e,t);let a=-1;for(let s=n.length-1;s>=0;s--)if(!z_(n[s])){a=s;break}return a===-1?{answerBlocks:n,processBlocks:[]}:{answerBlocks:n.slice(a+1),processBlocks:n.slice(0,a+1)}}function U_(e){return e.filter(t=>t.type==="text").map(t=>t.text).join("")}function W2(e){return{key:e,assistants:[],tools:[],processItems:[],live:!1}}function q_(e){const t=[],n=[];let a,s=[];const o=c=>{for(const d of s)d.assistantMessageId||(d.assistantMessageId=c),d.turnId||(d.turnId=a);s=[]};for(const c of e){const d=Date.parse(c.at)||Date.now();if(c.role==="user"){a=`restored-${c.id}`,s=[],t.push({id:c.id,role:"user",text:c.text,createdAt:d});continue}if(c.role==="assistant"){a||(a=`restored-${c.id}`);const m=r0(c.content);t.push({id:c.id,role:"assistant",text:c.text,createdAt:d,...m&&m.length>0?{content:m}:{}}),o(c.id);continue}if(c.role==="tool"){a||(a=`restored-tool-${c.id}`);const m={id:c.toolCallId||c.id,toolName:c.toolName||"tool",status:c.isError===!0?"error":"ok",resultText:c.text,result:c.text,createdAt:d,finishedAt:d,turnId:a,...c.operationId?{operationId:c.operationId}:{}};n.push(m),s.push(m)}}return{messages:t,toolCalls:n}}function H_(e){return[...e].sort((t,n)=>t.eventSeq!==void 0&&n.eventSeq!==void 0&&t.eventSeq!==n.eventSeq?t.eventSeq-n.eventSeq:t.createdAt!==n.createdAt?t.createdAt-n.createdAt:t.id<n.id?-1:1)}function vo(e,t){if(t.length===0)return;const n=H_(t);let a=[];const s=()=>{a.length===1?e.push({kind:"tool",tool:a[0]}):a.length>1&&e.push({kind:"tool-group",tools:a}),a=[]};for(const o of n){const c=ow(o);c?(s(),e.push({kind:"activity",activity:c})):a.push(o)}s()}function J2(e,t,n,a){let s=[];for(const o of e){if(o.type==="thinking"){vo(n,s),s=[],n.push({kind:"thinking",thinking:o.thinking});continue}if(o.type==="text"){vo(n,s),s=[],o.text.trim()&&n.push({kind:"text",text:o.text});continue}const c=t.tools.find(d=>d.id===o.toolCallId);c&&!a.has(c.id)&&(s.push(c),a.add(c.id))}vo(n,s)}function ey(e,t,n,a){const s=e.tools.filter(o=>!a.has(o.id)&&o.assistantMessageId===t.id);if(s.length!==0){for(const o of s)a.add(o.id);vo(n,s)}}function F_(e){const t=new Set,n=[],a=e.assistants.slice(0,-1),s=e.assistants.at(-1);for(const h of a)J2(d6(h.content??[]),e,n,t),ey(e,h,n,t);const o=s?.content??[],c=B_(o,{isStreaming:e.live});J2(c.processBlocks,e,n,t),s&&ey(e,s,n,t);const d=e.tools.filter(h=>!t.has(h.id));if(d.length>0&&vo(n,d),e.processItems=n,!s)return;if(o.length===0){e.answer=s;return}const m=U_(c.answerBlocks);e.answer={...s,text:m,content:c.answerBlocks}}function P_(e){const t=e.messages.filter(d=>d.role==="user"||d.role==="assistant"),n=[];let a=null;const s=d=>{const m=W2(d);return n.push(m),m};for(const d of t){if(d.role==="user"){a=s(`user-${d.id}`),a.user=d;continue}if(d.kind==="compaction"){a=s(`compaction-${d.id}`),a.assistants.push(d),a=null;continue}a||(a=s(`assistant-${d.id}`)),a.assistants.push(d)}n.length===0&&e.toolCalls.length>0&&n.push(W2("orphan-tools"));const o=new Set,c=new Map;for(const d of n)for(const m of d.assistants)c.set(m.id,d);for(const d of e.toolCalls)if(d.assistantMessageId){const m=c.get(d.assistantMessageId);m&&(m.tools.push(d),o.add(d.id))}for(const d of e.toolCalls)if(!o.has(d.id)&&d.turnId){const m=n.find(g=>g.tools.some(b=>b.turnId===d.turnId)||g.key===`turn-${d.turnId}`||g.user&&`restored-${g.user.id}`===d.turnId);if(m){m.tools.push(d),o.add(d.id);continue}const h=n.find(g=>d.turnId===`restored-${g.user?.id}`||g.assistants.some(b=>d.turnId===`restored-${b.id}`));h&&(h.tools.push(d),o.add(d.id))}for(const d of e.toolCalls){if(o.has(d.id))continue;const m=n.find((h,g)=>{const b=h.user?.createdAt??h.assistants[0]?.createdAt??0,y=n[g+1]?.user?.createdAt??Number.POSITIVE_INFINITY;return d.createdAt>=b&&d.createdAt<y});if(m)m.tools.push(d),o.add(d.id);else{const h=n.at(-1);h&&(h.tools.push(d),o.add(d.id))}}for(const d of n)d.tools.sort((m,h)=>m.eventSeq!==void 0&&h.eventSeq!==void 0?m.eventSeq-h.eventSeq:m.createdAt-h.createdAt),d.live=e.streaming&&e.activeAssistantId!==null&&d.assistants.some(m=>m.id===e.activeAssistantId),F_(d);return n}function $_(e,t){const n=e.length,a=t?.thinkingCount??0,s=t?.textCount??0,o=t?.activityCount??0,c=a+s+o+n,d=e.filter(g=>g.status==="error").length+(t?.activityErrorCount??0),m=e.filter(g=>g.status==="running").length+(t?.activityRunningCount??0),h=[`处理详情 · ${c} 步`];return n>0&&h.push(`${n} 工具`),o>0&&h.push(`${o} 进展`),d>0?h.push(`${d} 出错`):m>0&&h.push("运行中"),{count:n,errorCount:d,runningCount:m,stepCount:c,label:h.join(" · ")}}function G_(e){const t=[];let n=0,a=0,s=0,o=0,c=0;for(const d of e)d.kind==="thinking"?n+=1:d.kind==="text"?a+=1:d.kind==="activity"?(s+=1,d.activity.kind==="error"?o+=1:d.activity.kind==="progress"&&(c+=1)):d.kind==="tool"?t.push(d.tool):t.push(...d.tools);return $_(t,{thinkingCount:n,textCount:a,activityCount:s,activityErrorCount:o,activityRunningCount:c})}function gp(e){const{entry:t}=e,[n,a]=N.useState(t.status==="error"),[s,o]=N.useState(!1),c=t.status==="running"?"运行中":t.status==="error"?"出错":"完成",d=`is-${t.status}`,m=d8(t.args,{toolName:t.toolName}),h=p8(t.createdAt,t.finishedAt),g=f8(t.toolName),b=xy(t.resultText??t.result),x=h8(b,s?{maxLen:Number.MAX_SAFE_INTEGER}:void 0);return f.jsxs("div",{className:`oc-tool ${t.status==="error"?"is-error":""} ${t.status==="running"?"is-running":""}`,children:[f.jsxs("button",{type:"button",className:"oc-tool-head","aria-expanded":n,onClick:()=>a(y=>!y),children:[f.jsx(n0,{}),f.jsx("span",{className:"oc-tool-icon","aria-hidden":"true",children:f.jsx(u6,{})}),f.jsx("span",{className:"oc-tool-name",children:t.toolName}),m&&f.jsx("span",{className:"oc-tool-args",children:m}),h!==void 0&&f.jsxs("span",{className:"oc-tool-duration",children:[h,"s"]}),f.jsx("span",{className:`oc-tool-status ${d}`,children:c})]}),n&&f.jsxs("div",{className:"oc-tool-body",children:[t.args!==void 0&&f.jsxs("div",{className:"oc-tool-section",children:[f.jsx("div",{className:"oc-tool-label",children:g.argsLabel}),f.jsx("pre",{className:"oc-tool-code",children:m8(t.args)})]}),(t.resultText!==void 0||t.result!==void 0)&&f.jsxs("div",{className:"oc-tool-section",children:[f.jsx("div",{className:"oc-tool-label",children:t.status==="error"?"错误":g.resultLabel}),f.jsx("pre",{className:"oc-tool-code",children:x.text}),x.truncated&&!s&&f.jsx("button",{type:"button",className:"btn btn-ghost oc-tool-expand-result",onClick:()=>o(!0),children:"展开全部"})]}),t.status==="running"&&t.resultText===void 0&&t.result===void 0&&t.args===void 0&&f.jsx("div",{className:"oc-tool-section",children:f.jsx("div",{className:"oc-tool-waiting",children:"等待结果…"})})]})]})}function K_(e){const{tools:t}=e,[n,a]=N.useState(!1),s=t.some(d=>d.status==="error"),o=t.some(d=>d.status==="running"),c=o?"运行中":s?"出错":"完成";return f.jsxs("div",{className:`oc-tool-group${s?" is-error":""}${o?" is-running":""}`,children:[f.jsxs("button",{type:"button",className:"oc-tool-group-head","aria-expanded":n,"aria-label":`并行调用 ${t.length} 项,${c}`,onClick:()=>a(d=>!d),children:[f.jsx(n0,{}),f.jsx("span",{className:"oc-tool-icon","aria-hidden":"true",children:f.jsx(u6,{})}),f.jsx("span",{className:"oc-tool-name",children:"并行调用"}),f.jsxs("span",{className:"oc-tool-args",children:[t.length," 项"]}),f.jsx("span",{className:`oc-tool-status is-${o?"running":s?"error":"ok"}`,children:c})]}),n?f.jsx("div",{className:"oc-tool-group-body",children:t.map(d=>f.jsx(gp,{entry:d},d.id))}):null]})}function V_(e){const{thinking:t,defaultOpen:n}=e,[a,s]=N.useState(n);return N.useEffect(()=>{s(n)},[n]),f.jsxs("div",{className:"oc-thinking",children:[f.jsxs("button",{type:"button",className:`oc-thinking-summary${a?" is-open":""}`,"aria-expanded":a,onClick:()=>s(o=>!o),children:[f.jsx(n0,{}),f.jsx("span",{children:"思考"})]}),a?f.jsx("pre",{className:"oc-thinking-body",children:t||"…"}):null]})}function Y_(e){return e.kind==="progress"?"••":e.kind==="success"?"✓":e.kind==="warning"?"!":"×"}function X_(e){const{activity:t,onActivate:n}=e,a=!!(t.activityRef&&n&&(e.canActivate?.(t.activityRef)??!0)),s=f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"oc-semantic-activity-icon","aria-hidden":"true",children:Y_(t)}),f.jsxs("span",{className:"oc-semantic-activity-copy",children:[f.jsx("strong",{children:t.title}),t.detail?f.jsx("small",{children:t.detail}):null]}),a?f.jsx("span",{className:"oc-semantic-activity-link",children:"查看详情"}):null]});if(a&&t.activityRef&&n){const o=t.activityRef;return f.jsx("button",{type:"button",className:`oc-semantic-activity is-${t.kind}`,"data-activity-ref":o,onClick:()=>n(o),children:s})}return f.jsx("div",{className:`oc-semantic-activity is-${t.kind}`,"data-activity-ref":t.activityRef,children:s})}function Z_(e){const{items:t,live:n}=e,[a,s]=N.useState(!1);N.useEffect(()=>{n||s(!1)},[n]);const o=G_(t),c=f.jsx("div",{className:"oc-process-inline-body",children:t.map((d,m)=>d.kind==="thinking"?f.jsx(V_,{thinking:d.thinking,defaultOpen:n},`thinking-${m}`):d.kind==="text"?f.jsx("div",{className:"oc-process-text",children:d.text},`text-${m}`):d.kind==="activity"?f.jsx(X_,{activity:d.activity,onActivate:e.onActivateActivity,canActivate:e.canActivateActivity},d.activity.id):d.kind==="tool-group"?f.jsx(K_,{tools:d.tools},`group-${m}`):f.jsx(gp,{entry:d.tool},d.tool.id))});return n?f.jsx("div",{className:"oc-process-inline is-live",children:c}):f.jsxs("div",{className:"oc-process-inline",children:[f.jsxs("button",{type:"button",className:`oc-process-inline-summary${a?" is-open":""}${o.errorCount>0?" is-error":o.runningCount>0?" is-running":""}`,"aria-expanded":a,onClick:()=>s(d=>!d),children:[f.jsx(n0,{}),f.jsx("span",{children:o.label})]}),a?c:null]})}function Q_(e){const{scrollContainerRef:t,messagesEndRef:n,onScroll:a,hasThread:s,readiness:o,streaming:c,streamingAssistantId:d,messagesCount:m,visibleCount:h,onLoadMore:g,turnGroups:b,interview:x}=e;return f.jsxs("div",{ref:t,className:`oc-messages${s?" has-thread":" is-empty"}`,onScroll:a,children:[s?null:f.jsx(Ky,{mode:"empty-session",readiness:o,disabled:c,onSuggest:e.onSuggest}),s&&m>h&&f.jsx("button",{type:"button",className:"btn btn-ghost oc-load-history",onClick:g,children:"加载更早消息"}),s&&b.map((y,S)=>{const E=y.user??y.assistants[0],M=S>0?b[S-1].user??b[S-1].assistants[0]:void 0,C=!!E&&(!M||pf(M.createdAt)!==pf(E.createdAt)),R=y.answer,A=!!R?.text.trim(),H=y.live&&y.processItems.length===0;return f.jsxs("div",{className:"oc-turn-group",children:[C&&E&&f.jsx("div",{className:"oc-day-sep",children:pf(E.createdAt)}),y.user&&f.jsx(Q2,{message:y.user,streaming:c,activeAssistantId:d}),y.processItems.length>0&&f.jsx(Z_,{items:y.processItems,live:y.live,onActivateActivity:e.onActivateActivity,canActivateActivity:e.canActivateActivity}),R&&(A||H)?f.jsx(Q2,{message:R,streaming:c,activeAssistantId:d}):null]},y.key)}),x&&f.jsx(Ow,{interview:x,interviewAnswer:e.interviewAnswer,onAnswerChange:e.onInterviewAnswerChange,onAnswer:e.onAnswerInterview,onConfirmTaskKind:e.onConfirmTaskKind}),f.jsx("div",{ref:n})]})}const W_={auto:"auto(跟随 Pi 默认等级)",off:"off · 关闭",minimal:"minimal · 极简",low:"low · 低",medium:"medium · 中",high:"high · 高",xhigh:"xhigh · 极高",max:"max · 最高"};function J_(e,t){const n=t.trim().toLowerCase(),a=new Map;for(const s of e){if(n&&!s.provider.toLowerCase().includes(n)&&!s.id.toLowerCase().includes(n)&&!(s.name??"").toLowerCase().includes(n))continue;const o=a.get(s.provider)??[];o.push(s),a.set(s.provider,o)}return[...a.entries()].map(([s,o])=>({provider:s,models:o}))}function eI(e,t){const n=new Set,a=[],s=o=>{n.has(o)||(n.add(o),a.push({value:o,label:W_[o]??o,...o==="auto"&&t?{effective:t}:{}}))};s("auto");for(const o of e)s(o);return a}function Tu(e,t){return`${e}/${t}`}function Th(e){return{...e.modelProvider&&e.modelId?{model:{provider:e.modelProvider,modelId:e.modelId}}:{},...e.thinkingLevel?{thinkingLevel:e.thinkingLevel}:{}}}function f6(e,t){return{...e,model:t.model??e.model,thinkingLevel:t.thinkingLevel??e.thinkingLevel}}function tI(e,t){const n=f6(e,t);return n.model?.provider===e.model?.provider&&n.model?.modelId===e.model?.modelId&&n.thinkingLevel===e.thinkingLevel}function nI(){return f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.jsx("path",{d:"M2.6 4.2 6 7.6l3.4-3.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function rI(e){const t=al(),[n,a]=N.useState(!1),[s,o]=N.useState(""),[c,d]=N.useState(0),m=N.useRef(null),h=N.useRef(null),g=t.snapshot,b=t.status==="loading",x=t.status==="error"?t.error:null,y=g?(g.models??[]).map(R=>({provider:R.provider,id:R.id,...R.name?{name:R.name}:{},...R.hasCredentials!==void 0?{hasCredentials:R.hasCredentials}:{}})):e.models,S=N.useMemo(()=>J_(y,s),[y,s]),E=N.useMemo(()=>S.flatMap(R=>R.models),[S]);N.useEffect(()=>{n&&(o(""),d(0),window.setTimeout(()=>h.current?.focus(),0))},[n]),N.useEffect(()=>{if(!n)return;const R=H=>{const F=m.current;F&&H.target instanceof Node&&!F.contains(H.target)&&a(!1)},A=H=>{H.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",R),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",A)}},[n]);const M=R=>{if(e.disabled)return;const A=E[R];A&&(a(!1),e.onSelect(A.provider,A.id))},C=R=>{if(R.key==="ArrowDown"){R.preventDefault(),d(A=>E.length?(A+1)%E.length:0);return}if(R.key==="ArrowUp"){R.preventDefault(),d(A=>E.length?(A-1+E.length)%E.length:0);return}if(R.key==="Enter"){R.preventDefault(),M(c);return}if(R.key==="Escape"){R.preventDefault(),a(!1);return}};return f.jsxs("div",{className:"oc-select-menu oc-model-menu",ref:m,children:[f.jsxs("button",{type:"button",className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":n,title:"选择模型",disabled:e.disabled,onClick:()=>a(R=>!R),children:[f.jsx("span",{className:"oc-select-trigger-label",children:e.triggerLabel}),f.jsx(nI,{})]}),n&&f.jsxs("div",{className:"oc-select-panel oc-model-panel",role:"listbox","aria-label":"选择模型",children:[f.jsx("input",{ref:h,className:"oc-select-search",placeholder:"搜索模型或 Provider…",value:s,onChange:R=>{o(R.target.value),d(0)},onKeyDown:C}),b&&f.jsx("div",{className:"oc-select-status",children:"模型列表加载中…"}),x&&f.jsxs("div",{className:"oc-select-status is-error",children:[f.jsxs("span",{children:[x.code?`${x.code}:`:"",x.message]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Js()},children:"重试"})]}),!b&&!x&&S.length===0&&f.jsx("div",{className:"oc-select-status",children:"当前没有可用模型(真实空态,未伪造列表)"}),S.map(R=>f.jsxs("div",{className:"oc-model-group",children:[f.jsx("div",{className:"oc-model-group-head",children:R.provider}),R.models.map(A=>{const H=Tu(A.provider,A.id),F=H===e.activeModelRef,D=E[c]===A;return f.jsxs("button",{type:"button",role:"option","aria-selected":F,disabled:e.disabled,className:`oc-select-option oc-model-option${D?" is-highlighted":""}${F?" is-active":""}`,onMouseDown:$=>$.preventDefault(),onClick:()=>{e.disabled||(a(!1),e.onSelect(A.provider,A.id))},children:[f.jsxs("span",{className:"oc-model-option-name",children:[A.name?`${A.name} · `:"",A.id]}),F&&f.jsx("span",{className:"oc-model-option-check",children:"✓"})]},H)})]},R.provider))]})]})}function aI(){return f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.jsx("path",{d:"M2.6 4.2 6 7.6l3.4-3.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function iI(e){const t=al(),[n,a]=N.useState(!1),[s,o]=N.useState(0),c=N.useRef(null),d=e.effectiveLevel??t.snapshot?.selection?.effectiveThinkingLevel,m=t.snapshot?.thinkingLevels?.length?t.snapshot.thinkingLevels.map(x=>x.value):void 0,h=N.useMemo(()=>eI(m??e.levels,d),[m,e.levels,d]);N.useEffect(()=>{n&&o(0)},[n]),N.useEffect(()=>{if(!n)return;const x=S=>{const E=c.current;E&&S.target instanceof Node&&!E.contains(S.target)&&a(!1)},y=S=>{S.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",y)}},[n]);const g=x=>{if(e.disabled)return;const y=h[x];y&&(a(!1),e.onSelect(y.value))},b=x=>{if(x.key==="ArrowDown"){x.preventDefault(),o(y=>h.length?(y+1)%h.length:0);return}if(x.key==="ArrowUp"){x.preventDefault(),o(y=>h.length?(y-1+h.length)%h.length:0);return}if(x.key==="Enter"){x.preventDefault(),g(s);return}if(x.key==="Escape"){x.preventDefault(),a(!1);return}};return f.jsxs("div",{className:"oc-select-menu oc-thinking-menu",ref:c,children:[f.jsxs("button",{type:"button",className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":n,title:"思考等级",disabled:e.disabled,onClick:()=>a(x=>!x),children:[f.jsx("span",{className:"oc-select-trigger-label",children:e.triggerLabel}),f.jsx(aI,{})]}),n&&f.jsx("div",{className:"oc-select-panel oc-thinking-panel",role:"listbox","aria-label":"思考等级",onKeyDown:b,children:h.map((x,y)=>{const S=x.value===e.activeValue,E=y===s;return f.jsxs("button",{type:"button",role:"option","aria-selected":S,disabled:e.disabled,className:`oc-select-option oc-thinking-option${E?" is-highlighted":""}${S?" is-active":""}`,onMouseDown:M=>M.preventDefault(),onClick:()=>{e.disabled||(a(!1),e.onSelect(x.value))},children:[f.jsx("span",{className:"oc-thinking-option-label",children:x.label}),x.value==="auto"&&x.effective?f.jsxs("span",{className:"oc-thinking-badge",children:["Pi 实际:",x.effective]}):null,S&&f.jsx("span",{className:"oc-model-option-check",children:"✓"})]},x.value)})})]})}const Bm="--oc-shortcut-palette-available-height",sI=8,lI=8;function oI(e){const t=e.viewportTop??0,n=e.topInset??sI,a=e.anchorGap??lI;if([e.boundaryTop,e.anchorTop,t,n,a].some(c=>!Number.isFinite(c)))return null;const o=Math.max(e.boundaryTop,t);return Math.max(0,Math.floor(e.anchorTop-o-n-a))}function cI(){return f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),f.jsx("circle",{cx:"8.5",cy:"10",r:"1.5"}),f.jsx("path",{d:"m21 16-5.5-5.5L9 17"})]})}function uI(e){const{composer:t,streaming:n,hasThread:a}=e,s=N.useRef(null),o=al(),c=o.reloading,d=o.reloadError,h=o.mutationBusy||c||n,g=N.useCallback(()=>{t.setInput(""),t.setShortcutOpen(!1),Ws()},[t.setInput,t.setShortcutOpen]),b=N.useCallback(C=>{const R=t.isComposingNow()||C.nativeEvent.isComposing,A=t.recentlyComposedNow();if(C.key==="Enter"&&!C.shiftKey&&!R&&!A){if(t.shortcutOpen&&t.filteredShortcuts.length>0){if((t.filteredShortcuts[t.shortcutIndex]??t.filteredShortcuts[0])?.command==="/reload"){C.preventDefault(),g();return}}else if(t.input.trim()==="/reload"){C.preventDefault(),g();return}}e.onKeyDown(C)},[t.isComposingNow,t.recentlyComposedNow,t.shortcutOpen,t.filteredShortcuts,t.shortcutIndex,t.input,g,e.onKeyDown]),x=N.useCallback((C,R)=>{if(R==="pi-prompt"||C==="/name"||C==="/compact"){t.setInput(`${C} `),t.setShortcutOpen(!1),t.textareaRef.current?.focus();return}if(C==="/reload"){g();return}e.onRunShortcut(C)},[g,e.onRunShortcut,t]),y=N.useCallback(()=>{if(t.input.trim()==="/reload"){g();return}e.onSend(t.input)},[t.input,g,e.onSend]);N.useEffect(()=>{if(!t.shortcutOpen||t.filteredShortcuts.length===0||!e.paletteKeyboardNavRef.current)return;const C=e.shortcutPaletteRef.current;if(!C)return;C.querySelector(`[data-shortcut-index="${t.shortcutIndex}"]`)?.scrollIntoView({block:"nearest",inline:"nearest"}),e.paletteKeyboardNavRef.current=!1},[t.shortcutOpen,t.filteredShortcuts,t.shortcutIndex,e.shortcutPaletteRef,e.paletteKeyboardNavRef]),N.useEffect(()=>{if(!t.shortcutOpen||t.filteredShortcuts.length===0)return;const C=s.current,R=e.shortcutPaletteRef.current,A=C?.closest(".oc-main")??null;if(!C||!R||!A)return;let H=0;const F=()=>{H=0;const P=A.getBoundingClientRect(),ee=C.getBoundingClientRect(),q=oI({boundaryTop:P.top,anchorTop:ee.top,viewportTop:window.visualViewport?.offsetTop??0});if(q===null){R.style.removeProperty(Bm);return}R.style.setProperty(Bm,`${q}px`)},D=()=>{H!==0&&window.cancelAnimationFrame(H),H=window.requestAnimationFrame(F)};F();const $=typeof ResizeObserver>"u"?null:new ResizeObserver(D);return $?.observe(A),$?.observe(C),window.addEventListener("resize",D),window.visualViewport?.addEventListener("resize",D),window.visualViewport?.addEventListener("scroll",D),()=>{H!==0&&window.cancelAnimationFrame(H),$?.disconnect(),window.removeEventListener("resize",D),window.visualViewport?.removeEventListener("resize",D),window.visualViewport?.removeEventListener("scroll",D),R.style.removeProperty(Bm)}},[t.shortcutOpen,t.filteredShortcuts.length,e.layoutMode,e.shortcutPaletteRef]);const S=(()=>{const C=e.processSummary;return C?C.statusKind==="error"?`查看工具调用记录,共 ${C.count} 次,其中 ${C.statusLabel}`:C.statusKind==="running"?`查看工具调用记录,共 ${C.count} 次,${C.statusLabel||"正在运行"}`:`查看工具调用记录,共 ${C.count} 次,全部已完成`:"查看工具调用记录"})(),E=(()=>{const C=e.usage.inputTokens,R=e.usage.outputTokens,A=e.usage.cacheReadTokens,H=e.usage.cacheWriteTokens,F=e.usage.cost??0,D=e.usage.contextUsage,$=[];if(D&&(D.percent!==null||D.tokens!==null)){const P=D.percent!==null?`${Math.round(D.percent*10)/10}%`:"—",ee=D.contextWindow>0?Or(D.contextWindow):"—",q=D.tokens!==null?Or(D.tokens):"—";$.push(f.jsxs("span",{className:`oc-usage-part is-context${D.percent!==null&&D.percent>=80?" is-high":""}`,title:`上下文占用 ${q} / ${ee} tokens(达到约 80% 时建议压缩上下文)`,children:["上下文 ",P," / ",ee]},"context"))}if(C>0&&$.push(f.jsxs("span",{className:"oc-usage-part is-in",title:"输入 tokens",children:["↑ ",Or(C)]},"in")),R>0&&$.push(f.jsxs("span",{className:"oc-usage-part is-out",title:"输出 tokens",children:["↓ ",Or(R)]},"out")),A>0&&$.push(f.jsxs("span",{className:"oc-usage-part",title:"缓存命中:这部分输入由提供商 prompt 缓存复用,计费约为原价的 10%",children:[f.jsx(c4,{size:12,"aria-hidden":"true"}),"缓存命中 ",Or(A)]},"cache-read")),H>0&&$.push(f.jsxs("span",{className:"oc-usage-part",title:"缓存写入:本次新建立 prompt 缓存的部分,下次请求可低价复用",children:[f.jsx(c4,{size:12,"aria-hidden":"true"}),"缓存写入 ",Or(H)]},"cache-write")),F>0&&$.push(f.jsx("span",{className:"oc-usage-part",children:F>=.01?`$${F.toFixed(2)}`:"<$0.01"},"cost")),$.length===0){const P=e.usage.totalTokens;P>0&&$.push(f.jsxs("span",{className:"oc-usage-part",children:[Or(P)," tokens"]},"total"))}return $})(),M=f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"oc-runtime-controls-group",children:[f.jsx(rI,{models:e.models,activeModelRef:e.activeModelRef,triggerLabel:e.activeModelRef||"选择模型",disabled:h,onSelect:(C,R)=>e.onSwitchRuntime({provider:C,modelId:R})}),f.jsx(iI,{levels:e.thinkingLevels,activeValue:e.activeThinkingLevel||"auto",triggerLabel:e.activeThinkingLevel||"auto",disabled:h,onSelect:C=>e.onSwitchRuntime({thinkingLevel:C})}),f.jsxs("span",{className:"oc-usage",title:Dw(e.usage),children:[f.jsx("span",{className:"oc-usage-state",children:n?"运行中":"空闲"}),e.unread>0?f.jsxs("span",{className:"oc-usage-unread",children:[e.unread," 未读"]}):null,E]}),e.processSummary&&f.jsxs("button",{type:"button",ref:e.processTriggerRef,className:`oc-process-summary is-${e.processSummary.statusKind}${e.processOpen?" is-open":""}`,"aria-expanded":e.processOpen,"aria-controls":"oc-process-panel","aria-label":S,title:S,onClick:e.onToggleProcess,children:[f.jsx("span",{className:"oc-process-summary-label",children:"调用记录"}),f.jsx("span",{className:"oc-process-summary-badge",children:e.processSummary.count}),e.processSummary.statusKind!=="ok"&&e.processSummary.statusLabel?f.jsx("span",{className:"oc-process-summary-status",children:e.processSummary.statusLabel}):null]})]}),f.jsxs("div",{className:"oc-runtime-controls-group is-right",children:[f.jsxs("button",{type:"button",className:"btn btn-ghost",onClick:e.onCompact,disabled:n||!a||e.compacting,title:e.compacting?"正在压缩上下文…":a?n?"生成中,暂不可压缩":"压缩上下文,释放 token":"先进行对话后再压缩上下文","aria-label":e.compacting?"正在压缩上下文…":a?n?"生成中,暂不可压缩":"压缩上下文,释放 token":"先进行对话后再压缩上下文",children:[e.compacting?f.jsx("span",{className:"oc-spinner oc-spinner-inline","aria-hidden":"true"}):null,e.compacting?"压缩中…":"压缩"]}),e.runtimeContext?f.jsx("button",{type:"button",ref:e.runtimeContextTriggerRef,className:`btn btn-ghost oc-runtime-context-toggle${e.runtimeContextOpen?" is-active":""}`,"aria-expanded":e.runtimeContextOpen,"aria-controls":"oc-runtime-context-panel",onClick:e.onToggleRuntimeContext,children:"注入上下文"}):null]})]});return f.jsx("div",{className:"oc-composer",children:f.jsxs("div",{className:"oc-composer-inner",ref:s,children:[t.fileOptions.length>0&&f.jsx("div",{className:"oc-file-palette",role:"listbox","aria-label":"Repository files",children:t.fileOptions.map(C=>f.jsx("button",{type:"button",role:"option",onMouseDown:R=>R.preventDefault(),onClick:()=>t.insertFileReference(C),children:f.jsxs("code",{children:["@",C]})},C))}),t.pendingImages.length>0&&f.jsx("div",{className:"oc-attachment-list",children:t.pendingImages.map(C=>f.jsxs("span",{children:[C.name,f.jsx("button",{type:"button","aria-label":`移除 ${C.name}`,onClick:()=>t.removeImage(C),children:"×"})]},C.name))}),f.jsxs("div",{className:"oc-composer-toolbar",children:[f.jsxs("label",{className:"oc-attach-button oc-attach-icon",title:"添加图片","aria-label":"添加图片",children:[f.jsx(cI,{}),f.jsx("span",{className:"sr-only",children:"添加图片"}),f.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:C=>{t.addImagesFromFiles(Array.from(C.target.files??[]).slice(0,4)),C.target.value=""}})]}),f.jsxs("span",{className:"oc-composer-hint",children:[f.jsx("span",{className:"oc-kbd",children:"Enter"})," 发送"]}),f.jsxs("span",{className:"oc-composer-hint",children:[f.jsx("span",{className:"oc-kbd",children:"Shift"}),"+",f.jsx("span",{className:"oc-kbd",children:"Enter"})," 换行"]}),c&&f.jsx("span",{className:"oc-reload-status",children:"正在重新加载会话…"})]}),t.shortcutOpen&&t.filteredShortcuts.length>0&&f.jsxs("div",{className:"oc-shortcut-palette",id:"oc-shortcut-palette",ref:e.shortcutPaletteRef,role:"listbox","aria-label":"命令","aria-busy":t.dynamicCommandsLoading||void 0,"data-layout-mode":e.layoutMode,children:[f.jsxs("div",{className:"oc-shortcut-palette-head",children:[f.jsxs("strong",{children:["命令 · ",t.filteredShortcuts.length]}),t.dynamicCommandsLoading?f.jsx("span",{className:"oc-shortcut-palette-meta",children:"正在加载扩展、提示词与技能…"}):null,t.dynamicCommandsError?f.jsxs("span",{className:"oc-shortcut-palette-meta is-error",children:[t.dynamicCommandsError,f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>t.retryDynamicCommands(),children:"重试"})]}):null]}),f.jsx("div",{className:"oc-shortcut-palette-body",children:e.paletteModel.map(C=>f.jsxs("div",{className:"oc-shortcut-group",children:[f.jsxs("small",{children:[C.label," · ",C.items.length]}),C.items.map(({entry:R,globalIndex:A})=>f.jsxs("button",{type:"button",role:"option",id:`oc-shortcut-option-${A}`,"aria-label":R.command,"aria-describedby":`oc-shortcut-option-desc-${A}`,"aria-selected":A===t.shortcutIndex,className:A===t.shortcutIndex?"is-active":"","data-shortcut-index":A,title:R.command,onMouseEnter:()=>t.setShortcutIndex(A),onMouseDown:H=>H.preventDefault(),onClick:H=>{H.currentTarget.scrollIntoView({block:"nearest"}),x(R.command,R.action)},children:[f.jsx("code",{children:R.command}),f.jsx("small",{id:`oc-shortcut-option-desc-${A}`,children:R.description})]},`${R.source}:${R.command}`))]},C.source))})," "]}),f.jsxs("div",{className:`oc-composer-shell${n?" is-busy":""}`,children:[f.jsx("textarea",{ref:t.textareaRef,className:"oc-textarea",value:t.input,rows:3,placeholder:n?"正在生成回复…(停止后可发送下一轮)":a?"输入消息… Enter 发送 · Shift+Enter 换行":"描述目标,或点选上方建议开始…",onChange:C=>t.handleInputChange(C.target.value),onKeyDown:b,onCompositionStart:t.onCompositionStart,onCompositionEnd:t.onCompositionEnd,disabled:n,"aria-expanded":t.shortcutOpen,"aria-controls":t.shortcutOpen?"oc-shortcut-palette":void 0,"aria-activedescendant":t.shortcutOpen&&t.filteredShortcuts.length>0?`oc-shortcut-option-${t.shortcutIndex}`:void 0}),n?f.jsxs("button",{type:"button",className:"oc-stop",title:"对话进行中,点击停止","aria-label":"对话进行中,点击停止",onClick:e.onStop,children:[f.jsx("span",{className:"oc-spinner","aria-hidden":"true"}),f.jsx(D_,{})]}):f.jsx("button",{type:"button",className:"oc-send",title:"发送","aria-label":"发送",onClick:y,disabled:!t.input.trim()&&t.pendingImages.length===0||c,children:f.jsx(O_,{})})]}),d&&f.jsxs("div",{className:"oc-reload-banner is-error",role:"alert",children:[f.jsxs("span",{children:[d.code?`${d.code}:`:"",d.message]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Ws()},children:"重试"})]}),f.jsx("div",{className:"oc-runtime-controls",children:M})]})})}function dI(e){const{toolCalls:t,onClose:n,overlay:a=!1}=e,s=N.useRef(null);return Lu({open:a,containerRef:s,triggerRef:e.triggerRef,onEscape:n}),f.jsxs("aside",{ref:s,id:"oc-process-panel",className:`oc-process${a?" is-process-overlay":""}`,"aria-label":"工具调用记录",role:a?"dialog":void 0,"aria-modal":a?!0:void 0,tabIndex:-1,children:[f.jsxs("header",{className:"oc-process-head",children:[f.jsxs("div",{className:"oc-process-title",children:[f.jsx("span",{className:"oc-process-title-mark","aria-hidden":"true"}),"工具调用记录",f.jsxs("span",{className:"oc-process-count",children:[t.length," 次"]})]}),f.jsx("button",{type:"button",className:"btn btn-ghost oc-process-close","aria-label":"关闭工具调用记录",onClick:n,children:"关闭"})]}),f.jsx("div",{className:"oc-process-timeline",children:t.length===0?f.jsx("div",{className:"oc-process-empty",children:"本轮对话尚无工具调用。诊断细节会在这里按时间线展示。"}):t.map((o,c)=>f.jsxs("div",{className:`oc-process-item${c===0?" is-first":""}${c===t.length-1?" is-last":""}${o.status==="error"?" is-error":""}${o.status==="running"?" is-running":""}`,children:[f.jsx("div",{className:"oc-process-rail","aria-hidden":"true",children:f.jsx("span",{className:"oc-process-dot"})}),f.jsx("div",{className:"oc-process-time",children:Pm(o.createdAt)}),f.jsx("div",{className:"oc-process-body",children:f.jsx(gp,{entry:o})})]},o.id))})]})}const ty=[{id:"overview",label:"概览"},{id:"system",label:"System prompt"},{id:"files",label:"Context files"},{id:"skills",label:"Skills"},{id:"extensions",label:"Extensions"},{id:"packages",label:"Packages"},{id:"tools",label:"Active tools"},{id:"raw",label:"原始 JSON"}];function iu(e){const t=Array.isArray(e.items)?e.items:void 0;return f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsx("strong",{children:e.title}),f.jsx("span",{className:"oc-runtime-context-meta",children:t?`${t.length} 项`:"未投影"})]}),t===void 0?f.jsx("p",{className:"oc-runtime-context-empty",children:"该 session 未提供资源投影"}):t.length===0?f.jsx("p",{className:"oc-runtime-context-empty",children:e.emptyText}):f.jsx("ul",{className:"oc-runtime-context-resources",children:t.map((n,a)=>f.jsx(fI,{item:n},`${n.name??n.path??a}:${a}`))})]})}function fI(e){const t=e.item,a=[t.scope?`scope ${t.scope}`:"",t.source??"",t.version?`v${t.version}`:"",t.cwd?`cwd ${t.cwd}`:""].filter(Boolean).join(" · "),s=t.path?`${t.path}${t.baseDir?`(base: ${t.baseDir})`:""}`:"";return f.jsxs("li",{children:[f.jsxs("div",{className:"oc-runtime-context-resource-head",children:[f.jsx("strong",{className:"oc-runtime-context-resource-name",title:t.path??t.name,children:t.name||t.path||"未命名资源"}),t.enabled===!1?f.jsx("span",{className:"oc-runtime-context-resource-flag",children:"未启用"}):null,a?f.jsx("span",{className:"oc-runtime-context-meta",title:a,children:a}):null]}),t.description?f.jsx("span",{className:"oc-runtime-context-resource-desc",children:t.description}):null,t.path?f.jsx("code",{className:"oc-runtime-context-resource-path",title:s,children:s}):null,t.error?f.jsxs("span",{className:"oc-runtime-context-diag is-error",children:[f.jsx("span",{className:"oc-runtime-context-diag-icon","aria-hidden":"true",children:"✕"}),t.error]}):null,Array.isArray(t.diagnostics)&&t.diagnostics.length>0?f.jsxs("span",{className:"oc-runtime-context-diag",children:[f.jsx("span",{className:"oc-runtime-context-diag-icon","aria-hidden":"true",children:"⚠"}),t.diagnostics.join(";")]}):null,Array.isArray(t.resolved)&&t.resolved.length>0?f.jsxs("details",{className:"oc-runtime-context-resolved",children:[f.jsxs("summary",{children:["已解析 ",t.resolved.length," 项"]}),f.jsx("ul",{className:"oc-runtime-context-resolved-list",children:t.resolved.map((o,c)=>{const d=`${o.type??"?"}:${o.name??o.path??"?"}`;return f.jsx("li",{children:f.jsx("code",{title:d,children:d})},c)})})]}):null]})}const mI=N.forwardRef(function({open:t,onToggle:n,onClose:a,context:s,panelOnly:o=!1,triggerOnly:c=!1,triggerRef:d},m){const h=al(),g=h.reloading,b=h.reloadError,[x,y]=N.useState("overview"),S=N.useRef(null);Lu({open:t&&!c,containerRef:S,triggerRef:d,onEscape:a}),N.useEffect(()=>{t||y("overview")},[t]);const E=Array.isArray(s.resources.activeTools)?s.resources.activeTools:[],M=typeof s.resources.activeToolCount=="number"?s.resources.activeToolCount:E.length,C=s.systemPrompt.text??s.systemPrompt.summary??"",R=s.systemPrompt.charCount??C.length,A=s.suffix.present?s.suffix.text??s.suffix.summary??"":"",H=s.model?Tu(s.model.provider,s.model.modelId):"",F=s.resources,D=String(s.resources.mode??"closed"),$=D.includes("open")?"open":"closed",P={files:F.contextFiles?.length??0,skills:F.skills?.length??0,extensions:F.extensions?.length??0,packages:F.packages?.length??0},ee=["files","skills","extensions","packages"].map(G=>({id:G,label:ty.find(le=>le.id===G)?.label??G,count:P[G]??0})),q=f.jsx("button",{type:"button",ref:G=>{typeof m=="function"?m(G):m&&(m.current=G)},className:`btn btn-ghost oc-runtime-context-toggle${t?" is-active":""}`,"aria-expanded":t,"aria-controls":"oc-runtime-context-panel",onClick:n,children:"注入上下文"});if(c)return q;const Z=t?f.jsxs("div",{ref:S,id:"oc-runtime-context-panel",className:"oc-runtime-context-sidepanel",role:"dialog","aria-modal":"true","aria-label":"注入上下文",tabIndex:-1,children:[f.jsxs("header",{className:"oc-runtime-context-head",children:[f.jsxs("div",{className:"oc-runtime-context-head-copy",children:[f.jsx("strong",{children:"注入上下文"}),f.jsx("span",{className:"oc-runtime-context-meta",children:"只读 · 本轮实际注入的 system prompt / 资源(已脱敏)"})]}),f.jsx("button",{type:"button",className:"btn btn-ghost oc-runtime-context-close","aria-label":"关闭注入上下文",onClick:a,children:"关闭"})]}),f.jsxs("div",{className:"oc-runtime-context-layout",children:[f.jsx("nav",{className:"oc-runtime-context-nav","aria-label":"上下文分类",children:ty.map(G=>{const le=P[G.id];return f.jsxs("button",{type:"button",className:`oc-runtime-context-nav-item${x===G.id?" is-active":""}`,"aria-current":x===G.id?"page":void 0,onClick:()=>y(G.id),children:[f.jsx("span",{className:"oc-runtime-context-nav-label",title:G.label,children:G.label}),typeof le=="number"?f.jsx("span",{className:"oc-runtime-context-nav-count",children:le}):null]},G.id)})}),f.jsxs("div",{className:"oc-runtime-context-body",children:[x==="overview"?f.jsxs("div",{className:"oc-runtime-context-overview",children:[s.model?f.jsxs("section",{className:"oc-runtime-context-model-card",children:[f.jsx("span",{className:"oc-runtime-context-model-label",children:"模型"}),f.jsx("code",{className:"oc-runtime-context-model-ref",title:H,children:H})]}):null,f.jsxs("div",{className:"oc-runtime-context-stat-grid",children:[f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"Prompt 字数"}),f.jsxs("strong",{className:"oc-runtime-context-stat-value",children:[R.toLocaleString()," 字"]})]}),f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"工具"}),f.jsx("strong",{className:"oc-runtime-context-stat-value",children:M})]}),f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"思考"}),f.jsx("strong",{className:"oc-runtime-context-stat-value",children:s.thinkingLevel??"—"})]}),f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"资源面"}),f.jsxs("strong",{className:`oc-runtime-context-stat-value oc-runtime-context-mode is-${$}`,title:D,children:[f.jsx("span",{className:"oc-runtime-context-mode-dot","aria-hidden":"true"}),D]})]})]}),f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsx("header",{className:"oc-runtime-context-section-head",children:f.jsx("strong",{children:"已加载资源"})}),f.jsx("div",{className:"oc-runtime-context-resource-links",children:ee.map(G=>f.jsxs("button",{type:"button",className:"oc-runtime-context-resource-link",onClick:()=>y(G.id),children:[f.jsx("span",{className:"oc-runtime-context-resource-label",children:G.label}),f.jsx("span",{className:`oc-runtime-context-resource-count${G.count===0?" is-zero":""}`,children:G.count}),f.jsx("span",{className:"oc-runtime-context-resource-chevron","aria-hidden":"true",children:"›"})]},G.id))})]})]}):null,x==="system"?f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsxs("div",{children:[f.jsx("strong",{children:"System prompt"}),f.jsxs("code",{className:"oc-runtime-context-hash",children:[s.systemPrompt.hash.slice(0,12),"…"]})]}),C?f.jsx(Eh,{text:C}):null]}),f.jsx("pre",{className:"oc-runtime-context-text",children:C||"(空)"})]}),f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsxs("div",{className:"oc-runtime-context-section-title",children:[f.jsx("strong",{children:"Session suffix"}),f.jsx("span",{className:"oc-runtime-context-meta",children:s.suffix.present?`${(s.suffix.charCount??0).toLocaleString()} 字`:"未注入"})]}),A?f.jsx(Eh,{text:A}):null]}),s.suffix.present?f.jsx("pre",{className:"oc-runtime-context-text",children:A||"已注入"}):f.jsx("p",{className:"oc-runtime-context-empty",children:"本会话无额外 suffix"})]})]}):null,x==="files"?f.jsx(iu,{title:"Context files",items:F.contextFiles?.map(G=>({name:G.path,description:`${G.characters.toLocaleString()} 字符`})),emptyText:"该 session 未加载任何上下文文件"}):null,x==="skills"?f.jsx(iu,{title:"Skills",items:F.skills,emptyText:"该 session 未加载任何 Skills"}):null,x==="extensions"?f.jsx(iu,{title:"Extensions",items:F.extensions,emptyText:"该 session 未加载任何 Extensions"}):null,x==="packages"?f.jsx(iu,{title:"Packages",items:F.packages,emptyText:"该 session 未配置 Packages"}):null,x==="tools"?f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsx("strong",{children:"Active tools"}),f.jsxs("span",{className:"oc-runtime-context-meta",children:[M," 项"]})]}),E.length===0?f.jsx("p",{className:"oc-runtime-context-empty",children:"无激活工具"}):f.jsx("ul",{className:"oc-runtime-context-tools",children:E.map(G=>f.jsx("li",{children:f.jsx("code",{children:G})},G))}),Array.isArray(F.diagnostics)&&F.diagnostics.length>0?f.jsx("ul",{className:"oc-runtime-context-resources",children:F.diagnostics.map((G,le)=>f.jsxs("li",{children:[f.jsxs("span",{className:`oc-runtime-context-diag is-${G.type??"warning"}`,children:[G.type,": ",G.message]}),G.path?f.jsx("code",{children:G.path}):null]},le))}):null]}):null,x==="raw"?f.jsxs("details",{className:"oc-runtime-context-raw",open:!0,children:[f.jsx("summary",{children:"原始投影 JSON"}),f.jsx("pre",{children:JSON.stringify(s,null,2)})]}):null]},x)]}),f.jsxs("footer",{className:"oc-runtime-context-foot",children:[f.jsx("span",{className:"oc-runtime-context-meta",children:g?"正在重新加载会话…":"重新加载 Pi 会话设置、扩展、技能、提示词与上下文文件"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:g,onClick:()=>{Ws()},children:"重新加载会话"}),b&&f.jsxs("span",{className:"oc-runtime-context-diag is-error",role:"alert",children:[b.code?`${b.code}:`:"",b.message,f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Ws()},children:"重试"})]})]})]}):null;return o?Z:f.jsxs("div",{className:"oc-runtime-context-menu",children:[q,Z]})});function hI(){const e=N.useRef(null),t=N.useRef(!1),n=N.useRef(null),a=N.useRef(new Map),s=N.useRef(new Set),o=N.useRef(null),c=N.useRef(null),d=N.useRef(0),m=N.useRef(null),h=N.useRef(new Set),g=N.useRef(new Set),b=N.useRef(new Map),x=N.useRef(new Set),y=N.useRef(null),S=N.useRef(null),E=N.useRef(!1),M=N.useRef(0),C=N.useRef(null),R=N.useRef(!1),A=N.useRef(!1),H=N.useRef(null),F=N.useRef(new Set),D=N.useRef(new Set),$=N.useRef(new Set),P=N.useRef(!1),ee=N.useRef(0);return N.useMemo(()=>({sessionRef:e,streamingRef:t,abortRef:n,sessionAbortControllersRef:a,inlineStreamSessionIdsRef:s,assistantIdRef:o,lastEventIdRef:c,sessionGenerationRef:d,eventsStreamStateRef:m,settledTurnIdsRef:h,seenEventIdsRef:g,turnAssistantIdsRef:b,sealedAssistantIdsRef:x,reconnectAbortRef:y,activeTurnIdRef:S,submitInFlightRef:E,submitGenerationRef:M,pendingSubmissionRef:C,stopInFlightRef:R,stopRequestedRef:A,stoppingTurnIdRef:H,abortPostedTurnIdsRef:F,releasedClientRequestIdsRef:D,usageResponseKeysRef:$,isComposingRef:P,compositionEndedAtRef:ee}),[e,t,n,a,s,o,c,d,m,h,g,b,x,y,S,E,M,C,R,A,H,F,D,$,P,ee])}const pI=["operation","contract","dag","report","html"];function gI(e){const t=e.artifact;if(!t||typeof t!="object")return;const n=t;if(!(n.schemaVersion!==1||typeof n.artifactId!="string"||!n.artifactId||typeof n.kind!="string"||!pI.includes(n.kind)||typeof n.previewHash!="string")){for(const a of["title","summary","htmlPreview","reportText","inspectHref"])if(n[a]!==void 0&&typeof n[a]!="string")return;return n}}function bI(e,t){const n=e.findIndex(a=>a.artifactId===t.artifactId);return n<0?[...e,t]:e.map((a,s)=>s===n?{...a,...t,eventSeq:a.eventSeq??t.eventSeq,activityRef:a.activityRef??t.activityRef}:a)}function vI(e){if(!e||typeof e!="object")return;const t=e;if(!(t.schemaVersion!==1||typeof t.cardId!="string"||t.gateType!=="contract-apply"&&t.gateType!=="dag-run"||typeof t.taskId!="string"||typeof t.state!="string"||typeof t.expiresAt!="string"||typeof t.inspectHref!="string"||typeof t.previewHash!="string"))return t}function yI(e,t){const n=e.findIndex(o=>o.cardId===t.cardId);if(n<0)return[...e,t];const a=[...e],s=a[n];return s?(a[n]={...s,...t,eventSeq:s.eventSeq??t.eventSeq,activityRef:s.activityRef??t.activityRef},a):[...e,t]}function xI(e,t){const n=e.findIndex(a=>a.operationId===t.operationId);return n<0?[...e,t]:e.map((a,s)=>{if(s!==n)return a;let o=a.eventSeq;return o===void 0?o=t.eventSeq:t.eventSeq!==void 0&&(o=Math.min(o,t.eventSeq)),{...a,...t,...o===void 0?{}:{eventSeq:o},updatedSeq:Math.max(a.updatedSeq??a.eventSeq??0,t.updatedSeq??t.eventSeq??0),toolCallId:a.toolCallId??t.toolCallId,activityRef:a.activityRef??t.activityRef}})}function wI(e){const t=e.operation;if(!t||typeof t!="object")return;const n=t;if(n.schemaVersion!==1||typeof n.operationId!="string"||typeof n.action!="string"||typeof n.state!="string"||typeof n.inspectHref!="string"||typeof n.createdAt!="string"||typeof n.updatedAt!="string"||typeof n.previewHash!="string")return;const a=SI(n.runSummary),{runSummary:s,...o}=n;return{...o,...a?{runSummary:a}:{}}}function SI(e){if(!e||typeof e!="object"||Array.isArray(e))return;const t=e;if(typeof t.runId!="string"||!t.runId||typeof t.status!="string"||!t.status)return;let n=[];Array.isArray(t.nodes)&&(n=t.nodes.flatMap(o=>{if(!o||typeof o!="object")return[];const c=String(o.id??""),d=String(o.status??"");return!c||!d?[]:[{id:c,status:d}]}).slice(0,20));let a;if(t.next&&typeof t.next=="object"){const o=t.next;a={kind:String(o.kind??""),...typeof o.description=="string"?{description:o.description}:{}}}return{runId:t.runId,status:t.status,nodes:n,...typeof t.verdict=="string"?{verdict:t.verdict}:{},...typeof t.failureCategory=="string"?{failureCategory:t.failureCategory}:{},...a&&a.kind?{next:a}:{}}}function kI(e){const{refs:t,onReconcile:n,setError:a,setInterview:s,setHumanGateCards:o,setArtifactCards:c,setStreaming:d,setStreamingAssistantId:m,setUnread:h,setOperationCards:g,setUsage:b,setMessages:x,setToolCalls:y}=e;return(S,E,M,C)=>{if(C?.generation!==void 0&&t.sessionGenerationRef.current!==C.generation)return;const R=C?.replay===!0;if(S==="stream_ready")return;if(S==="reconcile"){const ee={reason:typeof E.reason=="string"?E.reason:"cursor_expired",...typeof E.minSeq=="number"?{minSeq:E.minSeq}:{},...typeof E.epoch=="string"?{epoch:E.epoch}:{},...typeof E.latestTurnId=="string"?{latestTurnId:E.latestTurnId}:{}};(typeof E.latestEventId=="string"||E.latestEventId===null)&&(ee.latestEventId=E.latestEventId),n?.(ee);return}const A=E.data&&typeof E.data=="object"?E.data:E,H=typeof E.turnId=="string"?E.turnId:void 0,F=typeof E.seq=="number"&&Number.isFinite(E.seq)?E.seq:void 0,D=typeof E.at=="string"&&Number.isFinite(Date.parse(E.at))?Date.parse(E.at):Date.now();if(H&&(S==="agent_start"||S==="message_update")&&t.settledTurnIdsRef.current.has(H))return;let $=M;if(H){const P=t.turnAssistantIdsRef.current.get(H);P?$=P:t.turnAssistantIdsRef.current.set(H,M)}if(S==="interview-turn"){s(P=>({...P??{},interviewSessionId:typeof A.interviewSessionId=="string"?A.interviewSessionId:P?.interviewSessionId,taskId:typeof A.taskId=="string"?A.taskId:P?.taskId,state:typeof A.state=="string"?A.state:P?.state,question:A.question&&typeof A.question=="object"?A.question:void 0}));return}if(S==="draft"){s(P=>({...P??{},taskId:typeof A.taskId=="string"?A.taskId:P?.taskId,draft:A.draft&&typeof A.draft=="object"?A.draft:P?.draft,draftSha256:typeof A.draftSha256=="string"?A.draftSha256:P?.draftSha256,taskKindRecommendation:typeof A.taskKindRecommendation=="string"?A.taskKindRecommendation:P?.taskKindRecommendation}));return}if(S==="assessment"){s(P=>({...P??{},assessment:A}));return}if(S==="taskKind-confirmed"){s(P=>({...P??{},confirmedTaskKind:typeof A.taskKind=="string"?A.taskKind:P?.confirmedTaskKind,taskKindRecommendation:void 0}));return}if(S==="human-gate-card"){const P=vI(A);P&&o(ee=>yI(ee,{...P,...F===void 0?{}:{eventSeq:F},...H?{turnId:H}:{},activityRef:`gate:${P.cardId}`}));return}if(S==="artifact-ref"){const P=gI(A);P&&c(ee=>bI(ee,{...P,...F===void 0?{}:{eventSeq:F},...H?{turnId:H}:{},activityRef:`artifact:${P.artifactId}`}));return}if(S==="agent_start"){if(R&&H!==void 0&&H!==t.activeTurnIdRef.current)return;H&&(t.settledTurnIdsRef.current.delete(H),t.activeTurnIdRef.current=H),t.streamingRef.current=!0,d(!0),m($);return}if(S==="agent_settled"||S==="agent_end"){if(H&&t.settledTurnIdsRef.current.add(H),S==="agent_end")return;H===t.activeTurnIdRef.current&&(t.activeTurnIdRef.current=null),t.streamingRef.current=!1,d(!1),m(null),S==="agent_settled"&&!R&&typeof document<"u"&&document.hidden&&h(P=>P+1),x(P=>P.filter(ee=>!(ee.id===$&&ee.role==="assistant"&&!ee.text.trim()))),y(P=>P.map(ee=>ee.status==="running"&&ee.assistantMessageId===$?{...ee,status:"error",finishedAt:Date.now()}:ee));return}if(S==="operation-ref"||S==="operation-status"){const P=wI(A);if(P){const ee=typeof A.toolCallId=="string"?A.toolCallId:void 0;g(q=>xI(q,{...P,...F===void 0?{}:{eventSeq:F,updatedSeq:F},...H?{turnId:H}:{},...ee?{toolCallId:ee}:{},activityRef:`operation:${P.operationId}`}))}return}if(S==="usage"){if(R)return;const P=A,ee=typeof P.responseKey=="string"&&P.responseKey?P.responseKey:void 0;if(ee&&t.usageResponseKeysRef.current.has(ee))return;ee&&t.usageResponseKeysRef.current.add(ee),b(q=>{const Z=P.inputTokens??0,G=P.outputTokens??0,le=P.cacheReadTokens??0,W=P.cacheWriteTokens??0,U=P.totalTokens??Z+G+le+W,z=P.contextUsage;return{inputTokens:q.inputTokens+Z,outputTokens:q.outputTokens+G,cacheReadTokens:q.cacheReadTokens+le,cacheWriteTokens:q.cacheWriteTokens+W,totalTokens:q.totalTokens+U,cost:P.cost===void 0?q.cost:(q.cost??0)+P.cost,...z&&typeof z=="object"?{contextUsage:{tokens:typeof z.tokens=="number"?z.tokens:null,contextWindow:typeof z.contextWindow=="number"?z.contextWindow:0,percent:typeof z.percent=="number"?z.percent:null}}:{}}});return}if(S==="message_update"||S==="message_end"){if(R)return;const P=t.sealedAssistantIdsRef.current;if(S==="message_update"&&P.has($)){const G=rs("a");H&&t.turnAssistantIdsRef.current.set(H,G),$=G,m(G)}const ee=typeof A.text=="string"?A.text:"",q=r0(A.content),Z=$;x(G=>G.some(W=>W.id===Z)?G.map(W=>W.id!==Z?W:{...W,text:ee,...q?{content:q}:{}}):[...G,{id:Z,role:"assistant",text:ee,createdAt:D,...q?{content:q}:{}}]),S==="message_end"&&P.add(Z)}else if(S==="tool_call"){const P=typeof A.toolCallId=="string"?A.toolCallId:rs("t"),ee=typeof A.toolName=="string"?A.toolName:"tool",q=typeof A.argsPreview=="string"?A.argsPreview:"{}";y(Z=>Z.some(G=>G.id===P)?Z.map(G=>G.id!==P?G:{...G,args:q,status:"running",turnId:H??G.turnId,assistantMessageId:$,...F===void 0?{}:{eventSeq:F}}):[...Z,{id:P,toolName:ee,args:q,status:"running",createdAt:D,...F===void 0?{}:{eventSeq:F},turnId:H,assistantMessageId:$}])}else if(S==="tool_result"){const P=typeof A.toolCallId=="string"?A.toolCallId:rs("r"),ee=typeof A.toolName=="string"?A.toolName:"tool",q=A.isError===!0,Z=typeof A.resultPreview=="string"?A.resultPreview:"{}",G=typeof A.operationId=="string"&&A.operationId?A.operationId:void 0;y(le=>le.find(U=>U.id===P)?le.map(U=>U.id!==P?U:{...U,result:Z,resultText:Z,status:q?"error":"ok",finishedAt:D,...F===void 0?{}:{finishedSeq:F},turnId:H??U.turnId,assistantMessageId:U.assistantMessageId??$,...G?{operationId:G}:U.operationId?{operationId:U.operationId}:{}}):[...le,{id:P,toolName:ee,result:Z,resultText:Z,status:q?"error":"ok",createdAt:D,finishedAt:D,...F===void 0?{}:{eventSeq:F,finishedSeq:F},turnId:H,assistantMessageId:$,...G?{operationId:G}:{}}])}else S==="error"&&a(typeof A.message=="string"?A.message:"chat error")}}const Um={inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheWriteTokens:0,totalTokens:0};function EI(e){const{origin:t,refs:n,sessionId:a,setError:s,onReconcile:o}=e,[c,d]=N.useState([]),[m,h]=N.useState([]),[g,b]=N.useState([]),[x,y]=N.useState([]),[S,E]=N.useState(50),[M,C]=N.useState(0),[R,A]=N.useState([]),[H,F]=N.useState(null),[D,$]=N.useState(null),[P,ee]=N.useState(!1),[q,Z]=N.useState(Um),[G,le]=N.useState(!1),[W,U]=N.useState(null),[z]=N.useState(!1),V=N.useMemo(()=>kI({refs:n,onReconcile:o,setError:s,setInterview:F,setHumanGateCards:A,setArtifactCards:y,setStreaming:le,setStreamingAssistantId:U,setUnread:C,setOperationCards:b,setUsage:Z,setMessages:d,setToolCalls:h}),[n,o,s]),ne=N.useCallback((ie,ae,ge)=>{if(ge?.targetSessionId&&n.sessionRef.current?.sessionId!==ge.targetSessionId||ge?.generation!==void 0&&n.sessionGenerationRef.current!==ge.generation)return null;const ve=ie.split(`
309
- `);let Ie="message",He="",Ee=null;for(const qt of ve)qt.startsWith("event: ")?Ie=qt.slice(7).trim():qt.startsWith("data: ")?He+=qt.slice(6):qt.startsWith("id: ")&&(Ee=qt.slice(4).trim());if(!He)return Ee;let nt;try{nt=JSON.parse(He)}catch{return Ee}const mt=Ee??(typeof nt.eventId=="string"?nt.eventId:null);if(mt){if(n.seenEventIdsRef.current.has(mt))return mt;n.seenEventIdsRef.current.add(mt)}return V(Ie,nt,ae,ge),Ee??mt},[V,n]),we=N.useCallback(async(ie,ae)=>{const ge=ae?.background===!0;ge||ee(!0);try{const ve=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ie)}/context`,{credentials:"include"});if(!ve.ok)return;const Ie=await ve.json();Ie.context&&n.sessionRef.current?.sessionId===ie&&$(He=>g8(He,Ie.context)?He:Ie.context)}finally{ge||ee(!1)}},[t,n]);N.useEffect(()=>{a&&we(a)},[a,we]),N.useEffect(()=>{if(!a)return;const ie=window.setTimeout(()=>{we(a,{background:!0})},350);return()=>window.clearTimeout(ie)},[a,g,R,H,we]);const O=N.useMemo(()=>c.filter(ie=>ie.role!=="system"||z).slice(-S),[c,z,S]);N.useEffect(()=>{const ie=()=>{document.hidden||C(0)};return document.addEventListener("visibilitychange",ie),()=>document.removeEventListener("visibilitychange",ie)},[]);const B=N.useMemo(()=>{if(m.length===0)return null;const ie=m.filter(He=>He.status==="running"),ae=m.filter(He=>He.status==="error"),ge=ie[ie.length-1];let ve="完成",Ie="ok";return ae.length>0?(ve=`${ae.length} 次出错`,Ie="error"):ie.length>0?(ve=ge?`${ge.toolName} 运行中`:"运行中",Ie="running"):ve="",{count:m.length,statusLabel:ve,statusKind:Ie}},[m]),Y=N.useMemo(()=>P_({messages:O,toolCalls:m,streaming:G,activeAssistantId:W}),[O,m,G,W]),_=N.useCallback(()=>{d([]),h([]),b([]),A([]),y([]),F(null),$(null),Z(Um),le(!1),U(null),C(0),E(50),n.usageResponseKeysRef.current=new Set},[n]),ce=N.useCallback(ie=>{d(ie.messages),h(ie.toolCalls),b([]),A([]),y([]),$(null),F(null),Z(Um),n.usageResponseKeysRef.current=new Set,le(ie.streaming),U(null),C(0),E(50)},[n]),he=N.useCallback(async ie=>{try{const ae=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ie)}`,{credentials:"include"});if(!ae.ok)return!1;const ge=await ae.json();if(!ge.session||n.sessionRef.current?.sessionId!==ie)return!1;const ve=ge.session.activeTurnId??null;return n.activeTurnIdRef.current=ve,n.streamingRef.current=!!ve,n.lastEventIdRef.current=ge.lastEventId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,d((ge.session.messages??[]).filter(Ie=>Ie.role==="user"||Ie.role==="assistant").map(Ie=>{const He=r0(Ie.content);return{id:Ie.id,role:Ie.role,text:Ie.text,createdAt:Date.parse(Ie.at)||Date.now(),...He&&He.length>0?{content:He}:{}}})),U(null),!0}catch{return!1}},[t,n,d,U]);return{messages:c,setMessages:d,toolCalls:m,setToolCalls:h,operationCards:g,artifactCards:x,historyLimit:S,setHistoryLimit:E,unread:M,humanGateCards:R,interview:H,setInterview:F,taskContext:D,contextLoading:P,usage:q,streaming:G,setStreaming:le,streamingAssistantId:W,setStreamingAssistantId:U,visibleMessages:O,turnGroups:Y,processSummary:B,applyChatSseEvent:V,applySseBlock:ne,loadTaskContext:we,resetForNewSession:_,applyActivatedSession:ce,recoverSession:he}}const TI={error:6e3,info:4e3};function NI(e){const{toast:t,onDismiss:n}=e,[a,s]=N.useState(!1),o=N.useRef(null),c=N.useRef(null),d=()=>{o.current!==null&&window.clearTimeout(o.current),c.current!==null&&window.clearTimeout(c.current),o.current=null,c.current=null},m=()=>{d(),s(!0),c.current=window.setTimeout(()=>{s(!1),n()},140)};if(N.useEffect(()=>{if(t)return s(!1),o.current=window.setTimeout(m,TI[t.kind]),d},[t?.id]),N.useEffect(()=>d,[]),!t)return null;const h=t.kind==="error";return _h.createPortal(f.jsxs("div",{className:`oc-toast is-${t.kind}${a?" is-leaving":""}`,role:h?"alert":"status",onMouseEnter:d,onMouseLeave:()=>{a||(o.current=window.setTimeout(m,1600))},children:[f.jsx("span",{className:"oc-toast-icon","aria-hidden":"true",children:h?f.jsx(n8,{size:16}):f.jsx(a8,{size:16})}),f.jsx("span",{className:"oc-toast-message",children:t.message}),f.jsx("button",{type:"button",className:"oc-toast-close","aria-label":"关闭提示",onClick:m,children:f.jsx(Jx,{size:14,"aria-hidden":"true"})})]}),document.body)}class CI{constructor(t){this.options=t,this.fetchFn=t.fetchFn??fetch,this.backoffMs=t.backoffMs??1e3,this.deadlineMs=t.deadlineMs??3e4}options;eligible=new Set;controllers=new Map;fetchFn;backoffMs;deadlineMs;markEligible(t){this.eligible.add(t)}startIfEligible(t){if(!this.eligible.delete(t)||this.controllers.has(t))return;const n=new AbortController;this.controllers.set(t,n),this.run(t,n)}cancel(t){this.eligible.delete(t),this.controllers.get(t)?.abort(),this.controllers.delete(t)}reconcile(t){const n=new Set(t);for(const a of this.controllers.keys())n.has(a)||this.cancel(a)}dispose(){for(const t of this.controllers.values())t.abort();this.controllers.clear(),this.eligible.clear()}async run(t,n){let a;const s=new Set;let o=!1;const c=window.setTimeout(()=>{o=!0,n.abort()},this.deadlineMs);try{for(;!n.signal.aborted;){try{const d={Accept:"text/event-stream"};a&&(d["Last-Event-ID"]=a);const m=await this.fetchFn(`${this.options.origin}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/events`,{headers:d,credentials:"include",signal:n.signal});if(m.status===404||!m.body)return;if(!m.ok)throw new Error(`HTTP ${m.status}`);const h=m.body.getReader(),g=new TextDecoder;let b="";for(;;){const{done:x,value:y}=await h.read();if(x||n.signal.aborted)break;b+=g.decode(y,{stream:!0});const S=b.split(`
310
-
311
- `);b=S.pop()??"";for(const E of S){const M=E.split(`
312
- `).find(R=>R.startsWith("id: "))?.slice(4);if(M&&(a=M),!M||s.has(M)||!E.includes("event: session_title"))continue;const C=E.split(`
313
- `).find(R=>R.startsWith("data: "))?.slice(6);if(C)try{const R=JSON.parse(C),A=R.data?.title?.trim();if(!A)continue;if(s.add(M),!this.options.hasSession(t)||(this.options.onTitle(t,{title:A,automatic:!!R.data?.automatic}),R.data?.automatic))return}catch{}}}}catch{if(n.signal.aborted)return}n.signal.aborted||await AI(this.backoffMs,n.signal)}}finally{window.clearTimeout(c),this.controllers.get(t)===n&&this.controllers.delete(t),(o||!this.options.hasSession(t))&&this.options.refresh()}}}function AI(e,t){return new Promise(n=>{const a=window.setTimeout(o,e),s=()=>o();function o(){window.clearTimeout(a),t.removeEventListener("abort",s),n()}t.addEventListener("abort",s,{once:!0})})}async function RI(e){if(e.creatingRef?.current)throw new Error("CREATE_SESSION_IN_FLIGHT");e.creatingRef&&(e.creatingRef.current=!0),e.setCreatingSession?.(!0);try{const t=await(e.fetchFn??fetch)(`${e.origin}/api/operator/v1/chat/sessions`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},credentials:"include",body:JSON.stringify(e.options??{})});if(!t.ok){const c=await t.json().catch(()=>({}));throw new Error(c.error?.message??`HTTP ${t.status}`)}const n=await t.json();if(!n.session)throw new Error("创建会话响应缺少 durable session");const a=n.session,s={sessionId:a.sessionId,...Th(a)},o=[a,...e.sessionListRef.current.filter(c=>c.sessionId!==a.sessionId)].slice(0,mu);return e.sessionListRef.current=o,e.setSessionList(o),e.titleWatcher?.markEligible(a.sessionId),e.refreshSessionList(),s}finally{e.creatingRef&&(e.creatingRef.current=!1),e.setCreatingSession?.(!1)}}function _I(e){const{origin:t,refs:n,setSession:a,thread:s,composer:o,browser:c,setError:d,setNotice:m,onCompactionChange:h,setProcessOpen:g,setAutoScroll:b}=e,{applyActivatedSession:x,resetForNewSession:y,setMessages:S}=s,{setInput:E,setPendingImages:M}=o,{setPreviews:C,setActivePreviewPath:R}=c,[A,H]=N.useState([]),F=N.useRef([]);F.current=A;const D=N.useRef(null),[$,P]=N.useState(!1),ee=N.useRef(!1),q=N.useRef(0),Z=N.useCallback(()=>{n.sessionGenerationRef.current+=1,n.abortRef.current?.abort(),n.reconnectAbortRef.current?.abort();for(const O of n.sessionAbortControllersRef.current.values())O.abort();n.sessionAbortControllersRef.current.clear(),n.reconnectAbortRef.current=null,n.eventsStreamStateRef.current=null,n.streamingRef.current=!1,n.abortRef.current=null,n.assistantIdRef.current=null,n.lastEventIdRef.current=null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,n.settledTurnIdsRef.current=new Set,n.activeTurnIdRef.current=null,y(),E(""),M([]),C([]),R(null),g(!1),b(!0)},[n,y,E,M,C,R,g,b]),G=N.useCallback(async()=>{try{const O=await fetch(`${t}/api/operator/v1/chat/sessions`,{credentials:"include"});if(!O.ok)return;const B=(await O.json()).sessions??[],Y=B.slice(0,mu),_=B.slice(mu);if(H(Y),_.length===0)return;await Promise.all(_.map(he=>fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(he.sessionId)}`,{method:"DELETE",credentials:"include",headers:{"x-loop-console-confirmation":wr()}}).catch(()=>{})));const ce=n.sessionRef.current?.sessionId;ce&&_.some(he=>he.sessionId===ce)&&(q.current+=1,n.sessionRef.current=null,Z(),a(null),window.localStorage.removeItem(ta))}catch{}},[t,n,Z,a]),le=N.useCallback(async O=>{try{return(await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(O)}`,{method:"DELETE",credentials:"include",headers:{"x-loop-console-confirmation":wr()}})).ok?(D.current?.cancel(O),n.sessionRef.current?.sessionId===O&&(q.current+=1,n.sessionRef.current=null,Z(),a(null),window.localStorage.removeItem(ta)),await G(),!0):(d("删除会话失败"),!1)}catch(B){return d(B instanceof Error?B.message:String(B)),!1}},[t,n,a,Z,G,d]),W=N.useCallback(async O=>{const B=++q.current;try{const Y=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(O)}`,{credentials:"include"}),_=await Y.json();if(!Y.ok||!_.session)throw new Error(_.error?.message??"会话不可用");if(B!==q.current)return;const ce={sessionId:_.session.sessionId,...Th(_.session)};Z(),n.sessionRef.current=ce,n.streamingRef.current=!!_.session.activeTurnId,n.activeTurnIdRef.current=_.session.activeTurnId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,n.settledTurnIdsRef.current=new Set,n.lastEventIdRef.current=null,a(ce),n.assistantIdRef.current=null,n.abortRef.current=n.sessionAbortControllersRef.current.get(O)??null,M([]),C([]),E(_.session.composerDraft??"");const he=q_(_.session.messages??[]);x({messages:he.messages,toolCalls:he.toolCalls,streaming:!!_.session.activeTurnId}),window.localStorage.setItem(ta,O),R(null)}catch(Y){if(B!==q.current)return;d(Y instanceof Error?Y.message:String(Y))}},[t,n,a,M,C,E,x,Z,R,d]);N.useEffect(()=>{G()},[G]),D.current||(D.current=new CI({origin:t,hasSession:O=>F.current.some(B=>B.sessionId===O),onTitle:(O,B)=>{H(Y=>Y.map(_=>_.sessionId!==O||B.automatic&&_.title?_:B.automatic?{..._,title:B.title}:{..._,displayTitle:B.title}))},refresh:G}));const U=N.useCallback(O=>D.current?.startIfEligible(O),[]);N.useEffect(()=>{D.current?.reconcile(A.filter(O=>O.state!=="archived"&&!O.title).map(O=>O.sessionId))},[A]),N.useEffect(()=>()=>D.current?.dispose(),[]),N.useEffect(()=>{let O=!1;const B=window.localStorage.getItem(ta);if(!B)return;const Y=++q.current;return(async()=>{try{const _=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(B)}`,{credentials:"include"});if(!_.ok){window.localStorage.removeItem(ta);return}const ce=await _.json();if(O||Y!==q.current||!ce.session)return;const he={sessionId:ce.session.sessionId,...Th(ce.session)};n.sessionGenerationRef.current+=1,n.sessionRef.current=he,n.activeTurnIdRef.current=ce.session.activeTurnId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,n.settledTurnIdsRef.current=new Set,n.lastEventIdRef.current=null,a(he),E(ce.session.composerDraft??""),S((ce.session.messages??[]).filter(ie=>ie.role==="user"||ie.role==="assistant").map(ie=>{const ae=r0(ie.content);return{id:ie.id,role:ie.role,text:ie.text,createdAt:Date.parse(ie.at)||Date.now(),...ae&&ae.length>0?{content:ae}:{}}}))}catch{}})(),()=>{O=!0}},[t,n,a,E,S]);const z=N.useCallback(O=>RI({origin:t,sessionListRef:F,setSessionList:H,titleWatcher:D.current,refreshSessionList:G,options:O,setCreatingSession:P,creatingRef:ee}),[t,G]),V=N.useCallback(async O=>{if(ee.current)return null;const B=++q.current;d(null);try{const Y=await z(O);return B!==q.current?null:(Z(),n.sessionRef.current=Y,window.localStorage.setItem(ta,Y.sessionId),a(Y),Y)}catch(Y){if(B!==q.current)return null;const _=Y instanceof Error?Y.message:String(Y);return _!=="CREATE_SESSION_IN_FLIGHT"&&d(_),null}},[n,a,d,Z,z]),ne=N.useCallback(async O=>{const B=n.sessionRef.current;if(!B||n.streamingRef.current)return;const Y=typeof O=="string"?O.trim():"";h?.(!0);try{const _={"x-loop-console-confirmation":wr()};Y&&(_["content-type"]="application/json");const ce=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(B.sessionId)}/compact`,{method:"POST",credentials:"include",headers:_,...Y?{body:JSON.stringify({instructions:Y})}:{}}),he=await ce.json().catch(()=>({}));if(!ce.ok){d(he.error?.message??"上下文压缩失败");return}d(null);const ie=he.snapshot?.summary?.trim(),ae=he.snapshot?.tokensBefore,ge=ie||"历史上下文已精简,关键决策与当前任务已保留。";await W(B.sessionId),S(ve=>[...ve,{id:`compaction-${Date.now()}`,role:"assistant",kind:"compaction",text:ge,createdAt:Date.now(),...ae?{compaction:{tokensBefore:ae}}:{}}]),m({id:Date.now(),message:`已压缩上下文:${ge.slice(0,72)}${ge.length>72?"…":""}`})}catch(_){d(_ instanceof Error?_.message:"上下文压缩失败")}finally{h?.(!1)}},[t,n,d,m,S,h,W]);return{sessionList:A,creatingSession:$,activateSession:W,refreshSessionList:G,deleteSession:le,createSession:V,updateSession:async(O,B)=>{if(!(await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(O)}`,{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":wr()},body:JSON.stringify(B)})).ok){d("会话更新失败");return}await G(),B.state==="archived"&&D.current?.cancel(O),B.state==="archived"&&n.sessionRef.current?.sessionId===O&&(q.current+=1,n.sessionRef.current=null,Z(),a(null),window.localStorage.removeItem(ta))},watchSessionTitle:U,compactSession:ne}}const yo={"worker-managed-rerun-unsupported":"这次运行由 Console/Worker 启动,不能只从某个节点续跑","workspace-drift":"工作区在上次运行后又改过文件,旧结果不能接着用","controller-drift":"控制器版本已变化,不能接到上次运行上继续","binding-drift":"任务契约或源文件已变化,不能只续跑旧计划","restart-subgraph-contains-unsafe-shell":"下游包含会执行命令的验证步骤,不能只重跑这一段","restart-subgraph-contains-writer":"下游包含会改代码的写入步骤,不能只重跑这一段","restart-subgraph-contains-decision-gate":"下游包含需要人工决策的门禁,不能只重跑这一段","dynamic-rerun-unsupported":"这次运行含动态展开节点,不支持从节点续跑","parent-lifecycle-ineligible":"当前运行状态不允许从节点续跑","convergence-rerun-unsupported":"收敛型运行不支持从节点续跑","evaluation-rerun-unsupported":"带评估的运行不支持从节点续跑","budget-rerun-unsupported":"硬预算运行不支持从节点续跑","workspace-checkpoint-missing":"缺少工作区快照,无法安全地只续跑一段","skill-snapshot-invalid":"技能快照缺失或损坏,不能接到上次运行上继续","unresolved-errors-outside-reset-closure":"选中节点之外还有未解决的失败,只重跑这一段不够","selected-node-missing":"找不到要续跑的起始节点","ambiguous-skipped-rewrite":"跳过的节点有多个上游失败,无法自动选定起点","skipped-without-upstream-error":"该节点被跳过且没有明确的上游失败","parent-facts-invalid":"上次运行的证据不完整或已损坏,不能只续跑一段",RUN_NOT_ACTIVE:"这次运行不在活动状态,不能协作中止",RUN_NOT_CONSOLE_OWNED:"此运行不由当前 Console 持有,暂不支持协作中止",RUNNER_IDENTITY_MISMATCH:"运行身份已变化,不能中止这份过期请求",INTERRUPT_ALREADY_PENDING:"已有一条中止请求等待结算",RUN_ALREADY_TERMINAL:"运行已经结束,没有可中止的活 runner",INTERRUPT_NEEDS_RECONCILE:"中止请求已登记但无法确认 runner 已处理,需要对账"};function II(){return Object.keys(yo)}function uu(e){const t=e.trim().replace(/[.…]+$/,"");if(!t)return null;if(yo[t])return{code:t};const n=t.lastIndexOf(":");if(n>0){const a=t.slice(n+1),s=t.slice(0,n);if(yo[a])return{code:a,nodeId:s};const o=II().find(c=>a.length>=3&&c.startsWith(a));if(o)return{code:o,nodeId:s}}return yo[t]?{code:t}:null}function MI(e){const t=[];for(const n of e.blockedReasons??[]){const a=uu(String(n));a&&t.push(a)}for(const n of e.blockingNodes??[]){const a=n.reasonCode?.trim();if(!a)continue;const s=uu(n.nodeId?`${n.nodeId}:${a}`:a);s&&t.push(s)}if(t.length===0&&e.fallbackMessage?.trim()){const n=e.fallbackMessage.trim().replace(/^从节点重跑不具备安全资格[::]?\s*/,"").replace(/[。..]+$/,"");for(const a of n.split(/[;;]/)){const s=uu(a);s&&t.push(s)}}return t}function OI(e){const t=new Map;for(const a of e){const s=t.get(a.code)??[];a.nodeId&&!s.includes(a.nodeId)&&s.push(a.nodeId),t.set(a.code,s)}const n=[];for(const[a,s]of t){const o=yo[a];o&&(s.length>0&&a.startsWith("restart-subgraph-contains-")?n.push(`${o}(${s.join("、")})`):n.push(o))}return n}function DI(e){return e.join("; ").includes("worker-managed-rerun-unsupported")||e.some(n=>uu(n)?.code==="worker-managed-rerun-unsupported")?"下一步:请点下方「重新排队 Worker Task」,从头完整执行。":"下一步:请改用「完整重跑任务」,从头完整执行。"}function m6(e){const t=e.fallbackMessage?.trim();if(t?.startsWith("无法从该节点续跑"))return t;const n=MI(e),a=OI(n),s=n.map(c=>c.code),o=DI(s.length>0?s:[t??""]);return a.length===0?["无法从该节点续跑。这次续跑不够安全(工作区、控制器或下游步骤不允许只重跑一段)。",o].join(`
314
- `):["无法从该节点续跑,因为:",...a.map(c=>`• ${c}`),"",o].join(`
315
- `)}function jI(e){const t=e.trim();if(!t)return null;if(t.startsWith("无法从该节点续跑"))return t;if(/从节点重跑不具备安全资格|worker-managed-rerun-unsupported|restart-subgraph-contains-|workspace-drift|controller-drift|binding-drift/.test(t))return m6({fallbackMessage:t});if(/action must be a mutation-gate target/i.test(t))return"这个操作不能再走确认门。Worker 启动的任务请直接点「重新排队 Worker Task」;独立运行请点「完整重跑任务」。";if(/cannot read dagReport run facts/i.test(t))return"读不到这次运行的失败报告,不能完整重跑。请先点「查看报告」或「Doctor 诊断」。";if(/dagRerunPlan run facts unavailable/i.test(t))return"读不到从节点续跑的资格结果,不能改走完整重跑。请先点「从节点重跑」查看资格,或先「查看报告」。";if(/node rerun plan is eligible/i.test(t))return"从节点续跑是安全的,请改用「从节点重跑」,不必完整重跑整单。";if(/does not support autonomous standaloneTaskRerun/i.test(t))return"当前失败不适合自动完整重跑。请先点「查看报告」,按建议操作。";if(/primaryRecovery requires a human decision/i.test(t))return"这次失败需要人工决策,不能自动重跑。请先点「查看报告」。";if(/is not bound to run/i.test(t))return"填写的任务 ID 与这次运行不匹配。请使用该运行绑定的原任务 ID。";if(/cannot read pool doctor/i.test(t))return"读不到任务队列状态,暂时不能重新排队。请稍后重试,或先跑 Doctor 诊断。";if(/not found in the pool doctor inventory/i.test(t))return"任务队列里找不到这个任务,不能重新排队。请确认 Task ID 来自 Worker 队列,而不是只填了 DAG 运行 ID。";if(/only Failed tasks are retry-eligible/i.test(t)){const n=t.match(/is ([A-Za-z_]+); only Failed/)?.[1];return n?`该任务当前是「${n}」,只有失败(Failed)的任务才能重新排队。`:"只有失败(Failed)的任务才能重新排队。请先确认任务已失败。"}return/featureId .+ does not match the pool task/i.test(t)?"Feature ID 与队列中的任务不一致。请改用队列里记录的 Feature ID,或留空后重试。":/RUN_NOT_CONSOLE_OWNED|不由当前 Console 持有/.test(t)?"此运行不由当前 Console 持有,暂不支持协作中止。请用 Doctor / 报告查看。":/RUNNER_IDENTITY_MISMATCH|运行身份已变化/.test(t)?"运行身份已变化,不能中止这份过期请求。请刷新后再试。":/INTERRUPT_ALREADY_PENDING|已有一条中止请求/.test(t)?"已有一条中止请求等待当前节点安全收敛。请稍候刷新,不要重复提交。":/RUN_ALREADY_TERMINAL|运行已经结束/.test(t)?"运行已经结束,没有可中止的活 runner。请改用报告或对账。":/INTERRUPT_NEEDS_RECONCILE|无法确认 runner 已处理/.test(t)?"中止请求已登记,但无法确认 runner 已处理。请用 Doctor 对账,不要当成已经中止。":/RUN_NOT_ACTIVE/.test(t)?"这次运行不在本机活动目录,或已经不是 running,不能协作中止。":null}function Ua(e){const t=(e??"").trim();if(!t)return"操作失败";const n=jI(t);return n||(/controller identity changed|package fingerprint changed|entry binary sha256 changed/i.test(t)?"控制器版本已变更(Console 启动后代码被重新编译)。请重启 Console 后再试,一次会话中途不要升级/重建控制器。":/Pi session file missing or not openable|cannot reopen chat session .* no persisted Pi session file/i.test(t)?"该对话的 Pi 会话文件已丢失,无法恢复上下文。请新建对话继续(历史记录无法重开)。":/reopened Pi sessionId mismatch/i.test(t)?"重开对话失败:Pi 会话身份与记录不一致(常见于会话文件丢失后被误建)。请新建对话继续。":/base HEAD .+ != frozen baseCommit|exact-base|not a descendant of frozen baseCommit/i.test(t)?"主分支已相对夜间冻结的 baseCommit 前进,无法安全 fast-forward harvest。请人工核对后使用 Discard(必要时勾选强制),或改走日间合并流程。":/force-required|requires --force/i.test(t)?"该终态需要强制 Discard。请确认后勾选强制再试。":t)}function LI(e){let t;const n=new Promise(a=>{t=a});return{...e,outcomePromise:n,resolveOutcome:t}}function ny(e="network error while creating turn"){return{kind:"ambiguous",message:e}}function zI(e="无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)"){return{kind:"ambiguous",message:e}}function ry(e){const{body:t,clientRequestId:n}=e,a=t.error?.code,s=t.error?.message??(e.httpOk?"turn was not accepted":`HTTP ${e.status}`);if(a==="TURN_ACTIVE"&&t.activeTurn?.turnId)return{kind:"adopt-active",activeTurn:t.activeTurn,message:"上一轮仍在运行,已重新连接;当前消息已保留。"};if(t.accepted===!0||e.httpOk&&t.turnId){const o=t.turn?.turnId??t.turnId;return o?{kind:"accepted",turnId:o,idempotent:t.idempotent===!0,turn:t.turn??{turnId:o,clientRequestId:n,state:t.state}}:{kind:"ambiguous",message:s}}return t.accepted===!1||a?{kind:"rejected",code:a,message:s}:{kind:"ambiguous",message:s}}function BI(e){const t=e.clientRequestId,n=e.state?.activeTurn,a=e.state?.latestTurn;return n?.clientRequestId===t&&n.turnId?{kind:"accepted",turnId:n.turnId,idempotent:!0,turn:n}:a?.clientRequestId===t&&a.turnId?{kind:"accepted",turnId:a.turnId,idempotent:!0,turn:a}:n?.turnId?{kind:"adopt-active",activeTurn:n,message:"上一轮仍在运行,已重新连接;当前消息已保留。"}:null}function UI(e){const t=e.clientRequestId,n=e.state?.activeTurn,a=e.state?.latestTurn,s=n?.state??e.state?.activeTurnState??void 0,o=a?.state??e.state?.latestTurnState??void 0;if(n?.clientRequestId===t&&n.turnId)return is(s)?{action:"release-terminal",turnId:n.turnId,state:String(s)}:{action:"bind-active",turnId:n.turnId};if(a?.clientRequestId===t&&a.turnId){if(is(o))return{action:"release-terminal",turnId:a.turnId,state:String(o)};if(!n?.turnId||n.clientRequestId===t)return{action:"bind-active",turnId:a.turnId}}return!Nu(e.state)&&!(!!n?.turnId&&n?.clientRequestId!==t)?{action:"release-not-accepted"}:{action:"hold"}}function Nu(e){if(e?.activeTurnId||e?.activeTurn?.turnId)return!0;const t=e?.runtime;return t?t.isStreaming===!0||t.isPromptRunning===!0||t.isCompacting===!0||t.isBashRunning===!0:!1}function is(e){return e==="settled"||e==="aborted"||e==="failed"}function Cu(e){return e.pending.sessionId===e.sessionId&&e.pending.sessionGeneration===e.sessionGeneration&&e.pending.submitGeneration===e.submitGeneration}function qI(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/turns`}function ay(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/state`}function HI(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/events`}function FI(e,t,n){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/turns/${encodeURIComponent(n)}/abort`}function dl(e,t){const n=e.pendingSubmission;t&&n&&n.clientRequestId!==t||(e.submitInFlight=!1,(!t||n?.clientRequestId===t)&&(n?.clientRequestId?e.releasedClientRequestIds.add(n.clientRequestId):t&&e.releasedClientRequestIds.add(t),e.pendingSubmission=null),e.pendingSubmission||(e.stopRequested=!1))}function h6(e){e.stopRequested=!0}function Au(e){e.stopRequested=!1}function PI(e,t){return!(!t||e.abortPostedTurnIds.has(t))}function $I(e,t){t&&e.abortPostedTurnIds.add(t)}function Ru(e,t){return!e.stopRequested||!PI(e,t)?null:($I(e,t),e.stoppingTurnId=t,e.activeTurnId=t,t)}function iy(e,t){const n=e.pendingSubmission;return n&&n.clientRequestId!==t.clientRequestId?!1:(t.turnId&&e.settledTurnIds.add(t.turnId),dl(e,t.clientRequestId),Au(e),t.markIdle!==!1&&(e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null),!0)}function GI(e,t){return Cu({pending:t.pending,sessionId:e.sessionId,sessionGeneration:e.sessionGeneration,submitGeneration:e.submitGeneration})?(t.pending.acceptedTurnId=t.turnId,e.activeTurnId=t.turnId,e.turnAssistantIds.set(t.turnId,t.assistantId),e.streaming=!0,e.submitInFlight=!1,t.pending.resolveOutcome({kind:"accepted",turnId:t.turnId}),t.ui?.setStreaming(!0),t.ui?.setStreamingAssistantId(t.assistantId),t.ui?.setPendingImages([]),t.ui?.watchSessionTitle?.(t.sessionId),!0):(t.pending.resolveOutcome({kind:"stale"}),!1)}function KI(e,t){t.pending.resolveOutcome({kind:"adopt-active",activeTurn:{turnId:t.activeTurnId},message:t.message}),dl(e,t.pending.clientRequestId),t.current&&(t.ui?.clearEmptyAssistant(t.assistantId),t.ui?.setInput(t.text),t.ui?.setPendingImages(t.images),e.activeTurnId=t.activeTurnId,e.assistantId=null,e.streaming=!0,t.ui?.setStreaming(!0),t.ui?.setStreamingAssistantId(null),t.notice.setError(null),t.notice.showNotice(t.message))}function VI(e,t){if(t.pending.resolveOutcome({kind:"rejected",message:t.message}),dl(e,t.pending.clientRequestId),!t.current)return;const n=t.ui?.formatError?t.ui.formatError(t.message):t.message;t.ui?.setError(n),e.streaming=!1,e.assistantId=null,t.ui?.setStreaming(!1),t.ui?.setStreamingAssistantId(null),t.ui?.clearEmptyAssistant(t.assistantId),t.ui?.setInput(t.text),t.ui?.setPendingImages(t.images)}function YI(e,t,n){const a=Cu({pending:n.pending,sessionId:e.sessionId,sessionGeneration:e.sessionGeneration,submitGeneration:e.submitGeneration});if(t.kind==="accepted"){if(GI(e,{turnId:t.turnId,assistantId:n.assistantId,pending:n.pending,sessionId:n.sessionId,ui:n.acceptedUi})){const o=Ru(e,t.turnId);o&&n.onAutoAbort?.(o)}return}if(t.kind==="adopt-active"){const s=a?Ru(e,t.activeTurn.turnId):null;KI(e,{activeTurnId:t.activeTurn.turnId,message:t.message,assistantId:n.assistantId,text:n.text,images:n.images,pending:n.pending,current:a,notice:n.notice,ui:n.adoptUi}),s&&n.onAutoAbort?.(s);return}if(t.kind==="rejected"){VI(e,{message:t.message,assistantId:n.assistantId,text:n.text,images:n.images,pending:n.pending,current:a,ui:n.rejectedUi}),Au(e);return}if(t.kind==="stale"){n.pending.resolveOutcome(t),dl(e,n.pending.clientRequestId),Au(e);return}n.pending.resolveOutcome(t)}function XI(e,t,n,a){const s=e.pendingSubmission;if(!s)return"held";if(t.action==="bind-active"){const c=!!s.acceptedTurnId;c||(s.acceptedTurnId=t.turnId,e.activeTurnId=t.turnId,e.turnAssistantIds.set(t.turnId,s.assistantId),e.streaming=!0,e.submitInFlight=!1);const d=Ru(e,t.turnId);return d&&a?.onAutoAbort?.(d),c?"held":"bound"}if(t.action==="release-terminal"||t.action==="release-not-accepted")return t.action==="release-terminal"&&e.settledTurnIds.add(t.turnId),dl(e,s.clientRequestId),Au(e),Nu(n)||(e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.()),"released";const o=n?.activeTurn?.turnId??n?.activeTurnId??null;return o&&(e.activeTurnId=o),"held"}const ZI="正在停止…",QI="正在停止…",WI="停止请求未完成,正在与服务端对账…",JI="停止请求失败,正在与服务端对账…";function sy(e){e.showNotice(ZI)}function ly(e){if(e.networkError)return{action:"keep-busy-notice",message:JI};const t=e.body.turn?.state;return e.body.accepted===!0&&is(t)?{action:"terminal-idle",turnId:e.turnId}:e.body.error?.code==="TURN_ABORT_PENDING"?{action:"abort-pending-notice"}:e.body.error?.code==="CHAT_TURN_OWNER_LOST"||e.body.error?.code==="OWNER_LOST"?{action:"owner-lost-reconcile"}:e.httpOk?{action:"noop"}:{action:"keep-busy-notice",message:WI}}function qm(e,t,n,a){const s=a?.sessionStillCurrent!==!1;if(t.action==="terminal-idle"){if(!s)return;e.settledTurnIds.add(t.turnId),e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.();return}if(t.action==="abort-pending-notice"){n.showNotice(QI);return}if(t.action==="owner-lost-reconcile"){if(!s)return;a?.runtimeBusy||(e.stoppingTurnId&&e.settledTurnIds.add(e.stoppingTurnId),e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.());return}if(t.action==="keep-busy-notice"){n.showNotice(t.message);return}}function oy(e,t){h6(e);const n=e.activeTurnId??e.pendingSubmission?.acceptedTurnId??null;if(n){const a=Ru(e,n);return a?(t.notice&&sy(t.notice),t.postAbort(a),{abortedTurnId:a,stopRequested:!0}):{abortedTurnId:null,stopRequested:!0}}return t.notice&&sy(t.notice),{abortedTurnId:null,stopRequested:!0}}function ja(e){return{submitInFlight:e.submitInFlightRef.current,pendingSubmission:e.pendingSubmissionRef.current,activeTurnId:e.activeTurnIdRef.current,streaming:e.streamingRef.current,assistantId:e.assistantIdRef.current,stoppingTurnId:e.stoppingTurnIdRef.current,settledTurnIds:e.settledTurnIdsRef.current,turnAssistantIds:e.turnAssistantIdsRef.current,sessionId:e.sessionRef.current?.sessionId??null,sessionGeneration:e.sessionGenerationRef.current,submitGeneration:e.submitGenerationRef.current,stopInFlight:e.stopInFlightRef.current,stopRequested:e.stopRequestedRef.current,abortPostedTurnIds:e.abortPostedTurnIdsRef.current,releasedClientRequestIds:e.releasedClientRequestIdsRef.current}}function la(e,t){e.submitInFlightRef.current=t.submitInFlight,e.pendingSubmissionRef.current=t.pendingSubmission,e.activeTurnIdRef.current=t.activeTurnId,e.streamingRef.current=t.streaming,e.assistantIdRef.current=t.assistantId,e.stoppingTurnIdRef.current=t.stoppingTurnId,e.submitGenerationRef.current=t.submitGeneration,e.stopInFlightRef.current=t.stopInFlight,e.stopRequestedRef.current=t.stopRequested}function eM(e){return e.split(`
316
- `).find(t=>t.startsWith("event: "))?.slice(7).trim()??"message"}function tM(){return new Promise(e=>window.setTimeout(e,25))}function Hm(e,t){t&&e(n=>n.filter(a=>!(a.id===t&&a.role==="assistant"&&!a.text.trim())))}function nM(e){const{origin:t,refs:n,session:a,thread:s,composer:o,setError:c,setAutoScroll:d,setNotice:m,recoveryVersion:h=0,watchSessionTitle:g}=e,{applySseBlock:b,setMessages:x,setStreaming:y,setStreamingAssistantId:S,streaming:E}=s,{setInput:M,setPendingImages:C}=o,R=N.useCallback(U=>{m&&m({id:Date.now(),message:U})},[m]),A=N.useCallback(U=>{const z=ja(n);dl(z,U),la(n,z)},[n]),H=N.useCallback((U,z,V)=>{n.sessionRef.current?.sessionId!==U||n.sessionGenerationRef.current!==z||(n.streamingRef.current=!1,n.activeTurnIdRef.current=null,n.assistantIdRef.current=null,n.stoppingTurnIdRef.current=null,y(!1),S(null),Hm(x,V))},[n,y,S,x]),F=N.useCallback(async(U,z,V)=>{for(;!V.aborted;){const ne=n.eventsStreamStateRef.current;if(!ne||ne.sessionId!==U||ne.generation!==z)return;ne.ready=!1;try{const we={Accept:"text/event-stream"},O=n.lastEventIdRef.current;O&&(we["Last-Event-ID"]=O);const B=await fetch(HI(t,U),{headers:we,credentials:"include",signal:V});if(!B.ok||!B.body){if(B.status===404)return;await hf(2e3,V);continue}const Y=B.body.getReader(),_=new TextDecoder;let ce="",he=!0;const ie=rs("a");for(;;){const{done:ge,value:ve}=await Y.read();if(ge)break;ce+=_.decode(ve,{stream:!0});const Ie=ce.split(`
317
-
318
- `);ce=Ie.pop()??"";for(const He of Ie){if(eM(He)==="stream_ready"){const mt=n.eventsStreamStateRef.current;mt?.sessionId===U&&mt.generation===z&&(mt.ready=!0),he=!1;continue}const Ee=n.assistantIdRef.current??ie,nt=b(He,Ee,{replay:he,targetSessionId:U,generation:z});nt&&(n.lastEventIdRef.current=nt)}}const ae=n.eventsStreamStateRef.current;ae?.sessionId===U&&ae.generation===z&&(ae.ready=!1),await hf(1e3,V)}catch{if(V.aborted)return;await hf(2e3,V)}}},[t,n,b]),D=N.useCallback((U,z)=>{const V=n.eventsStreamStateRef.current;if(V?.sessionId===U&&V.generation===z&&n.reconnectAbortRef.current)return;n.reconnectAbortRef.current?.abort();const ne=new AbortController;n.reconnectAbortRef.current=ne,n.eventsStreamStateRef.current={sessionId:U,generation:z,ready:!1},F(U,z,ne.signal)},[n,F]),$=N.useCallback(async(U,z)=>{D(U,z);const V=Date.now()+5e3;for(;Date.now()<V;){const ne=n.eventsStreamStateRef.current;if(ne?.sessionId===U&&ne.generation===z&&ne.ready)return;if(n.sessionRef.current?.sessionId!==U||n.sessionGenerationRef.current!==z)throw new Error("会话已切换");await tM()}throw new Error("事件连接未就绪,请检查 Console 连接后重试")},[n,D]),P=N.useCallback(async U=>{try{const z=await fetch(ay(t,U),{credentials:"include"}),V=await z.json().catch(()=>({}));return z.ok?V.state??null:null}catch{return null}},[t]),ee=N.useCallback(async U=>{try{const z=await fetch(qI(t,U.sessionId),{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},credentials:"include",body:JSON.stringify({clientRequestId:U.clientRequestId,text:U.text.trim()||"请查看附件图片。",images:U.images.map(({type:ne,mimeType:we,data:O})=>({type:ne,mimeType:we,data:O}))})}),V=await z.json().catch(()=>({}));return{httpOk:z.ok,status:z.status,body:V}}catch{return{httpOk:!1,status:0,body:{},networkError:!0}}},[t]),q=N.useCallback(()=>({showNotice:R,setError:U=>c(U)}),[R,c]),Z=N.useCallback(async(U,z,V)=>{n.stoppingTurnIdRef.current=V,n.streamingRef.current=!0,y(!0);try{const ne=await fetch(FI(t,U,V),{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},credentials:"include",body:"{}"}),we=await ne.json().catch(()=>({}));if(n.sessionRef.current?.sessionId!==U||n.sessionGenerationRef.current!==z||n.stoppingTurnIdRef.current!==V)return;const O=ly({httpOk:ne.ok,turnId:V,body:we}),B=ja(n);if(B.stoppingTurnId=V,O.action==="owner-lost-reconcile"){const Y=await P(U),_=n.sessionRef.current?.sessionId===U&&n.sessionGenerationRef.current===z;qm(B,O,q(),{sessionStillCurrent:_,runtimeBusy:Nu(Y??void 0),markIdle:()=>H(U,z,n.assistantIdRef.current)}),la(n,B);return}qm(B,O,q(),{sessionStillCurrent:!0,markIdle:()=>H(U,z,n.assistantIdRef.current)}),la(n,B)}catch{const ne=ja(n);qm(ne,ly({httpOk:!1,turnId:V,body:{},networkError:!0}),q()),la(n,ne)}},[t,n,y,H,P,q]),G=N.useCallback((U,z)=>{const V=ja(n);V.sessionId=n.sessionRef.current?.sessionId??null,V.sessionGeneration=n.sessionGenerationRef.current,V.submitGeneration=n.submitGenerationRef.current;const ne=we=>{C(we)};YI(V,U,{assistantId:z.assistantId,text:z.text,images:z.images,pending:z.pending,sessionId:z.sessionId,notice:q(),acceptedUi:{setStreaming:y,setStreamingAssistantId:S,setPendingImages:ne,watchSessionTitle:g},adoptUi:{clearEmptyAssistant:we=>Hm(x,we),setInput:M,setPendingImages:ne,setStreaming:y,setStreamingAssistantId:S},rejectedUi:{setError:c,setStreaming:y,setStreamingAssistantId:S,clearEmptyAssistant:we=>Hm(x,we),setInput:M,setPendingImages:ne,formatError:Ua},onAutoAbort:we=>{Z(z.sessionId,z.generation,we)}}),la(n,V)},[n,q,y,S,C,g,x,M,c,Z]),le=N.useCallback(async(U,z)=>{const V=n.sessionRef.current,ne=n.sessionGenerationRef.current;if(!V||!U.trim()&&z.length===0||n.streamingRef.current||n.submitInFlightRef.current||n.pendingSubmissionRef.current)return;n.submitInFlightRef.current=!0;const we=++n.submitGenerationRef.current,O=rs("chat-submit"),B=rs("u"),Y=rs("a"),_=U.trim(),ce=z.slice(),he=LI({clientRequestId:O,submitGeneration:we,sessionId:V.sessionId,sessionGeneration:ne,text:_,images:ce,assistantId:Y,userMessageId:B});n.pendingSubmissionRef.current=he;try{await $(V.sessionId,ne)}catch(Ie){n.sessionRef.current?.sessionId===V.sessionId&&n.sessionGenerationRef.current===ne&&c(Ua(Ie instanceof Error?Ie.message:String(Ie))),A(O);return}if(n.sessionRef.current?.sessionId!==V.sessionId||n.sessionGenerationRef.current!==ne){A(O);return}const ie={id:B,role:"user",text:_,createdAt:Date.now()};x(Ie=>[...Ie,ie,{id:Y,role:"assistant",text:"",createdAt:Date.now()}]),M(""),d(!0),c(null),n.streamingRef.current=!0,n.assistantIdRef.current=Y,y(!0),S(Y);const ae={sessionId:V.sessionId,generation:ne,submitGeneration:we,assistantId:Y,text:_,images:ce,pending:he},ge=await ee({sessionId:V.sessionId,clientRequestId:O,text:_,images:ce});if(!Cu({pending:he,sessionId:n.sessionRef.current?.sessionId,sessionGeneration:n.sessionGenerationRef.current,submitGeneration:n.submitGenerationRef.current})){he.resolveOutcome({kind:"stale"}),A(O);return}let ve=ge.networkError?ny():ry({httpOk:ge.httpOk,status:ge.status,body:ge.body,clientRequestId:O});if(ve.kind==="ambiguous"){const Ie=await P(V.sessionId),He=Ie?BI({clientRequestId:O,state:Ie}):null;if(He)ve=He;else{const Ee=await ee({sessionId:V.sessionId,clientRequestId:O,text:_,images:ce});if(!Cu({pending:he,sessionId:n.sessionRef.current?.sessionId,sessionGeneration:n.sessionGenerationRef.current,submitGeneration:n.submitGenerationRef.current})){he.resolveOutcome({kind:"stale"}),A(O);return}if(ve=Ee.networkError?ny("无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)"):ry({httpOk:Ee.httpOk,status:Ee.status,body:Ee.body,clientRequestId:O}),ve.kind==="ambiguous"){const nt=ve.message||"无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)";ve=zI(nt),R(nt)}}}G(ve,ae)},[t,n,$,ee,P,G,A,R,x,M,d,c,y,S]),W=N.useCallback(async()=>{const U=n.sessionRef.current?.sessionId,z=n.sessionGenerationRef.current;if(!U)return;const V=ja(n),ne=oy(V,{postAbort:()=>{},notice:q()});if(la(n,V),ne.abortedTurnId){if(n.stopInFlightRef.current)return;n.stopInFlightRef.current=!0;try{await Z(U,z,ne.abortedTurnId)}finally{n.stopInFlightRef.current=!1}return}const we=n.pendingSubmissionRef.current;if(we&&!n.stopInFlightRef.current){n.stopInFlightRef.current=!0;try{const O=await we.outcomePromise;if(n.sessionRef.current?.sessionId!==U||n.sessionGenerationRef.current!==z)return;let B=null;if(O.kind==="accepted")B=O.turnId;else if(O.kind==="adopt-active")B=O.activeTurn.turnId;else{if(O.kind==="ambiguous")return;n.stopRequestedRef.current=!1;return}if(!B)return;const Y=ja(n);h6(Y);const _=oy(Y,{postAbort:()=>{},notice:q()});la(n,Y),_.abortedTurnId&&await Z(U,z,_.abortedTurnId)}finally{n.stopInFlightRef.current=!1}}},[n,q,Z]);return N.useEffect(()=>{const U=!!n.pendingSubmissionRef.current||n.submitInFlightRef.current||n.stopRequestedRef.current||!!n.activeTurnIdRef.current;if(!a||!E&&!U)return;const z=a.sessionId,V=n.sessionGenerationRef.current;let ne=!1;const we=async()=>{try{const _=await fetch(ay(t,z),{credentials:"include"}),ce=await _.json().catch(()=>({}));if(ne||!_.ok||n.sessionRef.current?.sessionId!==z||n.sessionGenerationRef.current!==V)return;const he=ce.state,ie=n.pendingSubmissionRef.current;if(ie){const Ee=UI({clientRequestId:ie.clientRequestId,state:he}),nt=ja(n),mt=XI(nt,Ee,he,{markIdle:()=>H(z,V,n.assistantIdRef.current),onAutoAbort:qt=>{Z(z,V,qt)}});if(la(n,nt),mt==="bound"){y(!0);return}if(mt==="released"||!ie.acceptedTurnId&&!nt.pendingSubmission?.acceptedTurnId)return}const ae=he?.activeTurn?.turnId??he?.activeTurnId??null;n.activeTurnIdRef.current=ae;const ge=Nu(he),ve=n.pendingSubmissionRef.current;if(ve){const Ee=he?.latestTurn?.clientRequestId===ve.clientRequestId&&is(he?.latestTurn?.state),nt=he?.activeTurn?.clientRequestId===ve.clientRequestId&&is(he?.activeTurn?.state);if(Ee||nt){const mt=nt?he?.activeTurn?.turnId??null:he?.latestTurn?.turnId??ve.acceptedTurnId??null,qt=ja(n);iy(qt,{clientRequestId:ve.clientRequestId,turnId:mt,markIdle:!ge}),la(n,qt),ge||H(z,V,n.assistantIdRef.current);return}}if(ge)return;const Ie=n.assistantIdRef.current;if(ae&&!(is(he?.activeTurn?.state)||is(he?.activeTurnState)))return;ae&&n.settledTurnIdsRef.current.add(ae);const He=ve?.clientRequestId;if(He){const Ee=ja(n);iy(Ee,{clientRequestId:He,turnId:ae,markIdle:!0}),la(n,Ee)}else A();H(z,V,Ie)}catch{}},O=()=>{document.visibilityState==="visible"&&we()},B=()=>{we()},Y=window.setInterval(()=>{we()},15e3);return document.addEventListener("visibilitychange",O),window.addEventListener("online",B),we(),()=>{ne=!0,window.clearInterval(Y),document.removeEventListener("visibilitychange",O),window.removeEventListener("online",B)}},[t,n,a,E,H,A,Z]),N.useEffect(()=>{if(!a)return;const U=n.sessionGenerationRef.current;return D(a.sessionId,U),()=>{const z=n.eventsStreamStateRef.current;z?.sessionId===a.sessionId&&z.generation===U&&(n.reconnectAbortRef.current?.abort(),n.reconnectAbortRef.current=null,n.eventsStreamStateRef.current=null)}},[a,h,n,D]),{sendPrompt:le,handleStop:W,openEventsStream:F}}function rM(e){const{origin:t,refs:n,thread:a,setError:s}=e,{interview:o,setInterview:c}=a,[d,m]=N.useState(""),h=N.useCallback(async()=>{const x=n.sessionRef.current;if(!x)return;const y=window.prompt("Task ID(例如 2026-07-26-my-task)")?.trim();if(!y)return;const S=await fetch(`${t}/api/operator/v1/chat/sessions/${x.sessionId}/interviews`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},credentials:"include",body:JSON.stringify({taskId:y})}),E=await S.json();if(!S.ok){s(E.error?.message??`HTTP ${S.status}`);return}c({interviewSessionId:E.interview?.sessionId,taskId:y,state:E.interview?.state,question:E.question,draft:E.draft?.draft,draftSha256:E.draft?.draftSha256,assessment:E.assessment})},[t,n,c,s]),g=N.useCallback(async x=>{const y=n.sessionRef.current;if(!y||!o?.interviewSessionId||!o.question)return;const S=await fetch(`${t}/api/operator/v1/chat/sessions/${y.sessionId}/interviews/${o.interviewSessionId}/answers`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},credentials:"include",body:JSON.stringify({questionId:o.question.id,response:x,...x==="override"?{text:d}:{}})}),E=await S.json();if(!S.ok){s(E.error?.message??`HTTP ${S.status}`);return}c(M=>({...M??{},state:E.interview?.state,question:E.question,draft:E.draft?.draft,draftSha256:E.draft?.draftSha256,assessment:E.assessment,taskKindRecommendation:E.taskKindRecommendation??M?.taskKindRecommendation})),m("")},[t,n,o,d,c,s]),b=N.useCallback(async()=>{const x=n.sessionRef.current;if(!x||!o?.interviewSessionId||!o.taskKindRecommendation)return;const y=await fetch(`${t}/api/operator/v1/chat/sessions/${x.sessionId}/interviews/${o.interviewSessionId}/task-kind/confirm`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":wr()},credentials:"include",body:JSON.stringify({taskKind:o.taskKindRecommendation})}),S=await y.json();if(!y.ok){s(S.error?.message??`HTTP ${y.status}`);return}c(E=>({...E??{},confirmedTaskKind:E?.taskKindRecommendation,taskKindRecommendation:void 0,draft:S.draft?.draft,draftSha256:S.draft?.draftSha256,assessment:S.assessment}))},[t,n,o,c,s]);return{interviewAnswer:d,setInterviewAnswer:m,startInterview:h,answerInterview:g,confirmTaskKind:b}}function aM(e){const{origin:t,refs:n,sessionId:a,setError:s}=e,[o,c]=N.useState({}),[d,m]=N.useState(new Set),[h,g]=N.useState(null),[b,x]=N.useState([]),[y,S]=N.useState(null),[E,M]=N.useState(!1),C=N.useCallback(async(F="")=>{try{g(null);const D=await fetch(`${t}/api/operator/v1/chat/repo/tree?path=${encodeURIComponent(F)}`,{credentials:"include"}),$=await D.json();if(!D.ok)throw new Error($.error?.message??"无法读取仓库目录");c(P=>({...P,[F]:$.data?.entries??[]}))}catch(D){g(D instanceof Error?D.message:String(D))}},[t]);N.useEffect(()=>{C()},[C]);const R=N.useCallback(async F=>{M(!0);try{const D=await fetch(`${t}/api/operator/v1/chat/repo/file?path=${encodeURIComponent(F)}`,{credentials:"include"}),$=await D.json();if(!D.ok||!$.data)throw new Error($.error?.message??"无法预览文件");x(P=>{const ee=[...P.filter(Z=>Z.path!==$.data.path),$.data],q=n.sessionRef.current?.sessionId;return q&&window.localStorage.setItem(`${ta}.previews.${q}`,JSON.stringify(ee.map(Z=>Z.path))),ee}),S($.data.path)}catch(D){s(D instanceof Error?D.message:String(D))}finally{M(!1)}},[t,n,s]);N.useEffect(()=>{if(!a)return;let F=[];try{const D=JSON.parse(window.localStorage.getItem(`${ta}.previews.${a}`)??"[]");Array.isArray(D)&&(F=D.filter($=>typeof $=="string").slice(0,10))}catch{}F.length&&Promise.all(F.map(async D=>{const $=await fetch(`${t}/api/operator/v1/chat/repo/file?path=${encodeURIComponent(D)}`,{credentials:"include"});if($.ok)return(await $.json()).data})).then(D=>{if(n.sessionRef.current?.sessionId!==a)return;const $=D.filter(P=>!!P);x($),S($.at(-1)?.path??null)})},[t,a,n]);const A=N.useCallback(F=>{m(D=>{const $=new Set(D);return $.has(F)?$.delete(F):$.add(F),$}),o[F]||C(F)},[o,C]),H=N.useCallback(F=>{x(D=>{const $=D.filter(P=>P.path!==F);return a&&window.localStorage.setItem(`${ta}.previews.${a}`,JSON.stringify($.map(P=>P.path))),$}),S(D=>D===F?b.find($=>$.path!==F)?.path??null:D)},[b,a]);return{tree:o,expandedDirs:d,treeError:h,previews:b,activePreviewPath:y,setActivePreviewPath:S,previewLoading:E,setPreviews:x,loadTree:C,openPreview:R,closePreview:H,toggleDir:A}}const iM=["operator","web","extension","prompt","skill"];function sM(e){const t=[];for(const n of iM){const a=[];for(let s=0;s<e.length;s+=1)e[s].source===n&&a.push({entry:e[s],globalIndex:s});a.length!==0&&t.push({source:n,label:Z8[n],items:a})}return t}function lM(e,t){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<0?0:e>=t?t-1:e}function oM(e){return e==="comfortable"?3:e==="compact"?2:1}function cy(e,t,n,a){const s=t.findIndex(b=>b.items.some(x=>x.globalIndex===e));if(s<0)return e;const o=t[s],c=o.items.findIndex(b=>b.globalIndex===e);if(c<0)return e;const d=Math.floor(c/n),m=c%n;if(a==="left"||a==="right"){if(n<=1)return e;const x=c+(a==="left"?-1:1);return x<0||x>=o.items.length||Math.floor(x/n)!==d?e:o.items[x].globalIndex}const h=a==="up"?-1:1,g=c+h*n;if(g>=0&&g<o.items.length)return o.items[g].globalIndex;for(let b=s+h;b>=0&&b<t.length;b+=h){const x=t[b];if(x.items.length===0)continue;const y=Math.floor((x.items.length-1)/n)*n,S=a==="up"?y+m:m;return S>=x.items.length?e:x.items[S].globalIndex}return e}function cM(e,t,n){const a=(e.left+e.right)/2;let s=null;for(const o of t){if(o.globalIndex===e.globalIndex)continue;const c=n==="up"?e.top-o.bottom:o.top-e.bottom;if(c<0)continue;const d=(o.left+o.right)/2,m=Math.abs(d-a);(s===null||c<s.gap||c===s.gap&&m<s.dist||c===s.gap&&m===s.dist&&o.globalIndex<s.index)&&(s={gap:c,dist:m,index:o.globalIndex})}return s?.index??null}function uM(e){const{origin:t,sessionId:n,refs:a,setError:s}=e,[o,c]=N.useState(""),[d,m]=N.useState([]),[h,g]=N.useState([]),[b,x]=N.useState(!1),y=N.useCallback(_=>{if(typeof _=="function"){c(ce=>{const he=_(ce);return x(he.startsWith("/")),he});return}c(_),x(_.startsWith("/"))},[]),[S,E]=N.useState(0),[M,C]=N.useState([]),[R,A]=N.useState(!1),[H,F]=N.useState(null),[D,$]=N.useState(0),P=N.useRef(null),ee=N.useRef(n),q=N.useRef(0),Z=N.useCallback(_=>{y(_),x(_.startsWith("/")),E(0)},[]);N.useLayoutEffect(()=>{ee.current=n,q.current+=1,C([]),F(null),A(!1)},[n]);const G=N.useCallback(async()=>{if(!n){C([]),F(null),A(!1);return}const _=n,ce=q.current;ee.current=_,A(!0),F(null);const he=()=>ee.current===_&&q.current===ce;try{const ie=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(_)}/commands`,{credentials:"include"});if(!he())return;if(!ie.ok){F("动态命令加载失败"),C([]);return}const ae=await ie.json().catch(()=>null),ge=[];for(const Ie of ae?.commands??[]){const He=Ie.source;if(He!=="extension"&&He!=="prompt"&&He!=="skill")continue;const Ee=String(Ie.command??Ie.name??"").trim();Ee&&ge.push({command:Ee.startsWith("/")?Ee:`/${Ee}`,label:String(Ie.label??Ie.name??Ee),description:String(Ie.description??""),source:He})}if(!he())return;C(ge);const ve=typeof ae?.warning=="string"?ae.warning.trim():"";F(ve?ve.slice(0,160):null)}catch{if(!he())return;F("动态命令加载失败"),C([])}finally{he()&&A(!1)}},[t,n]);N.useEffect(()=>{n&&(!b&&D===0||G())},[n,b,D,G]);const le=N.useCallback(()=>{$(_=>_+1),G()},[G]);N.useEffect(()=>{if(!n)return;const _=o.slice(0,P.current?.selectionStart??o.length).match(/(?:^|\s)@([^\s@]*)$/);if(!_){m([]);return}const ce=window.setTimeout(()=>{fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/files?q=${encodeURIComponent(_[1]??"")}`).then(he=>he.ok?he.json():null).then(he=>m((he?.files??[]).map(ie=>ie.path)))},150);return()=>window.clearTimeout(ce)},[t,n,o]);const W=N.useCallback(_=>{const ce=P.current?.selectionStart??o.length,ie=o.slice(0,ce).search(/@[^\s@]*$/);ie<0||(y(`${o.slice(0,ie)}@${_} ${o.slice(ce)}`),m([]))},[o]),U=N.useCallback(_=>{for(const ce of Array.from(_).slice(0,4)){if(!ce.type.startsWith("image/")||ce.size>5*1024*1024){s("图片仅支持 PNG/JPEG/GIF/WebP,单张不超过 5 MiB");continue}const he=new FileReader;he.onload=()=>{const ie=String(he.result??""),ae=ie.slice(ie.indexOf(",")+1);g(ge=>[...ge,{name:ce.name,type:"image",mimeType:ce.type,data:ae}].slice(0,4))},he.readAsDataURL(ce)}},[s]),z=N.useCallback(_=>{g(ce=>ce.filter(he=>he!==_))},[]);N.useLayoutEffect(()=>{const _=P.current;_&&(_.style.height="auto",_.style.height=`${Math.min(_.scrollHeight,280)}px`)},[o]),N.useEffect(()=>{if(!n)return;const _=window.setTimeout(()=>{fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/draft`,{method:"PUT",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":wr()},body:JSON.stringify({text:o})})},400);return()=>window.clearTimeout(_)},[t,n,o]);const V=N.useMemo(()=>Y8(M),[M]),ne=N.useMemo(()=>o.startsWith("/")?X8(V,o):[],[o,V]);N.useEffect(()=>{E(_=>lM(_,ne.length))},[ne.length]);const we=N.useCallback(()=>{a.isComposingRef.current=!0},[a]),O=N.useCallback(()=>{a.isComposingRef.current=!1,a.compositionEndedAtRef.current=Date.now()},[a]),B=N.useCallback(()=>a.isComposingRef.current,[a]),Y=N.useCallback(()=>Date.now()-a.compositionEndedAtRef.current<100,[a]);return N.useEffect(()=>{x8({origin:t,sessionId:n,refs:a})},[t,n,a]),{input:o,setInput:y,handleInputChange:Z,fileOptions:d,pendingImages:h,setPendingImages:g,addImagesFromFiles:U,removeImage:z,shortcutOpen:b,setShortcutOpen:x,shortcutIndex:S,setShortcutIndex:E,filteredShortcuts:ne,dynamicCommandsLoading:R,dynamicCommandsError:H,retryDynamicCommands:le,insertFileReference:W,textareaRef:P,onCompositionStart:we,onCompositionEnd:O,isComposingNow:B,recentlyComposedNow:Y}}const dM=[{toolId:"read",kind:"explore",description:"Pi 内置读取文件。"},{toolId:"write",kind:"explore",description:"Pi 内置写入文件(软约束:大改优先走 DAG)。"},{toolId:"edit",kind:"explore",description:"Pi 内置编辑文件(软约束:大改优先走 DAG)。"},{toolId:"bash",kind:"explore",description:"Pi 内置 shell 执行(软约束:优先受治路径)。"},{toolId:"grep",kind:"explore",description:"Pi 内置内容搜索。"},{toolId:"find",kind:"explore",description:"按名称查找文件路径。"},{toolId:"ls",kind:"explore",description:"列出目录内容。"},{toolId:"safe-read",kind:"explore",description:"安全读取仓库相对路径文件;拒绝敏感文件并自动脱敏 secret。"},{toolId:"safe-grep",kind:"explore",description:"安全搜索仓库内容;跳过敏感文件并自动脱敏搜索结果。"},{toolId:"git-status",kind:"explore",description:"固定参数执行 git status --porcelain(无 shell)。"},{toolId:"git-diff",kind:"explore",description:"固定参数查看 git diff;敏感路径不可查看且结果自动脱敏。"}];function fM(e){if(!e)return null;const t=(e.tools??[]).map(a=>({toolId:a.toolId,action:a.action,description:a.description,kind:a.kind??"read",cli:a.cli})),n=[...dM];return{explore:n,operator:t,total:n.length+t.length}}let mM=0;function hM(e){const{origin:t,session:n,setSession:a,refs:s,setError:o}=e,[c,d]=N.useState(null),[m,h]=N.useState([]),[g,b]=N.useState("idle"),[x,y]=N.useState(null),[S,E]=N.useState([]),[M,C]=N.useState(null),[R,A]=N.useState(null),[H,F]=N.useState(!1),[D,$]=N.useState(!1),[P,ee]=N.useState(!1),q=N.useRef(null),Z=N.useRef(null),G=N.useRef(0);N.useEffect(()=>{G.current=-1,F(!1)},[n?.sessionId,F]);const W=al().snapshot,U=N.useCallback(async()=>{try{const ie=await fetch(`${t}/api/operator/v1/chat/capabilities`);if(!ie.ok)return;const ae=await ie.json();d(ae)}catch{}},[t]);N.useEffect(()=>{U()},[U]);const z=N.useCallback(async()=>{if(!n){h([]),b("idle");return}const ie=n.sessionId;b("loading"),y(null);try{const ae=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ie)}/models`,{credentials:"include"}),ge=await ae.json().catch(()=>null);if(s.sessionRef.current?.sessionId!==ie)return;if(!ae.ok||!ge){b("error"),y(ge?.error?.message??`模型列表读取失败(HTTP ${ae.status})`);return}h(ge.models??[]),E(ge.thinkingLevels??[]),b("ready")}catch(ae){if(s.sessionRef.current?.sessionId!==ie)return;b("error"),y(ae instanceof Error?ae.message:String(ae))}},[t,n,s]);N.useEffect(()=>{z()},[z]),N.useEffect(()=>{if(!n){C(null),A(null);return}const ie=n.sessionId,ae=`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ie)}`;A(null),fetch(`${ae}/runtime-context`,{credentials:"include"}).then(async ge=>{const ve=await ge.json().catch(()=>null);if(!ve?.context||s.sessionRef.current?.sessionId!==ie)return;const Ie=ve.context,He=k8().snapshot;C(Ee=>v8(Ee,Ie,He,ie))}).catch(()=>{s.sessionRef.current?.sessionId===ie&&A("注入上下文读取失败,请重试")})},[t,n?.sessionId,s]),N.useEffect(()=>{if(!W||!n||W.sessionId!==n.sessionId)return;const ie=Sy(W);a(ae=>{if(!ae||ae.sessionId!==W.sessionId||tI(ae,ie))return ae;const ge=f6(ae,ie);return s.sessionRef.current=ge,ge}),C(ae=>{if(!ae)return ae;const ge={...ae,...ie.model?{model:ie.model}:{},...ie.thinkingLevel?{thinkingLevel:ie.thinkingLevel}:{}};return ge.model?.provider===ae.model?.provider&&ge.model?.modelId===ae.model?.modelId&&ge.thinkingLevel===ae.thinkingLevel?ae:ge})},[W,n?.sessionId,s,a,C]);const V=N.useCallback(async ie=>{if(!n)return!1;const ae=n.sessionId,ge=++mM;G.current=ge,Ty({type:"mutation-start",token:ge}),F(!0);try{const ve=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n.sessionId)}/model`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":wr()},body:JSON.stringify(ie)}),Ie=await ve.json().catch(()=>({}));return G.current!==ge?!1:ve.ok?!Ie.session||s.sessionRef.current?.sessionId!==ae?!1:w8(ge,ae,Ie.snapshot):(s.sessionRef.current?.sessionId===ae&&(o(Ie.error?.message??`模型或思考等级切换失败(HTTP ${ve.status})`),Js()),!1)}catch(ve){return G.current!==ge||s.sessionRef.current?.sessionId===ae&&o(ve instanceof Error?ve.message:String(ve)),!1}finally{S8(ge,ae,s)&&G.current===ge&&F(!1)}},[t,n,s,a,o]);N.useEffect(()=>{if(!D)return;const ie=ge=>{const ve=q.current;ve&&ge.target instanceof Node&&!ve.contains(ge.target)&&$(!1)},ae=ge=>{ge.key==="Escape"&&$(!1)};return document.addEventListener("mousedown",ie),document.addEventListener("keydown",ae),()=>{document.removeEventListener("mousedown",ie),document.removeEventListener("keydown",ae)}},[D]),N.useEffect(()=>{if(!P)return;const ie=ge=>{const ve=Z.current;ve&&ge.target instanceof Node&&!ve.contains(ge.target)&&ee(!1)},ae=ge=>{ge.key==="Escape"&&ee(!1)};return document.addEventListener("mousedown",ie),document.addEventListener("keydown",ae),()=>{document.removeEventListener("mousedown",ie),document.removeEventListener("keydown",ae)}},[P]);const ne=N.useMemo(()=>fM(c),[c]),we=W?(W.models??[]).map(ie=>({provider:ie.provider,id:ie.id,...ie.name?{name:ie.name}:{},...ie.hasCredentials!==void 0?{hasCredentials:ie.hasCredentials}:{}})):m,O=W?.thinkingLevels?.length?W.thinkingLevels.map(ie=>ie.value):S,B=n?.model??M?.model,Y=B?Tu(B.provider,B.modelId):"",_=W?.selection?.thinkingSelection??n?.thinkingLevel??"",ce=W?.selection?.effectiveThinkingLevel??n?.thinkingLevel??void 0,he=!Y||we.some(ie=>Tu(ie.provider,ie.id)===Y);return{capabilities:c,models:we,modelsStatus:g,modelsError:x,onRetryModels:()=>{z()},thinkingLevels:O,runtimeContext:M,runtimeContextError:R,onRetryRuntimeContext:()=>{A(null),Js()},toolsOpen:D,setToolsOpen:$,runtimeContextOpen:P,setRuntimeContextOpen:ee,toolsMenuRef:q,runtimeContextMenuRef:Z,switchRuntime:V,switching:H,toolCatalog:ne,activeModel:B,activeModelRef:Y,activeThinkingLevel:_,effectiveThinkingLevel:ce,activeModelListed:he}}const uy={comfortableMin:1450,compactMin:1100};function pM(e){return!Number.isFinite(e)||e<0?"narrow":e>=uy.comfortableMin?"comfortable":e>=uy.compactMin?"compact":"narrow"}const gM={mode:"comfortable",width:1600,landingDensity:"comfortable",emptyHeight:720};function bM(e,t){const[n,a]=N.useState(gM);return N.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const o=()=>{const g=s.getBoundingClientRect().width,b=t?.current??null,x=b?b.getBoundingClientRect().height:720;a({mode:pM(g),width:g,landingDensity:_w(x),emptyHeight:x})};o();const c=new ResizeObserver(()=>o());c.observe(s);let d=null;const m=()=>{const g=t?.current??null;g&&g!==d&&(d&&c.unobserve(d),c.observe(g),d=g,o())};m();const h=window.setInterval(m,250);return()=>{window.clearInterval(h),c.disconnect()}},[e,t]),n}function vM(e="none"){return{active:e}}function Ys(e,t){return{active:t}}function ea(e={active:"none"}){return{active:"none"}}function yM(e){return{sidebarDrawerOpen:e.active==="sidebar-drawer",processOpen:e.active==="process",runtimeContextOpen:e.active==="runtime-context",toolsOpen:e.active==="tools",activityOpen:e.active==="activity"}}const xM=160,wM=120,SM=120;function kM(e){return e?e.operationCards.length+e.humanGateCards.length+e.artifactCards.length:0}function EM(e){const t=kM(e),[n,a]=N.useState(()=>t>0?{phase:"visible",snapshot:e}:{phase:"hidden",snapshot:null}),s=N.useRef(n);s.current=n;const o=N.useMemo(()=>`${e?.sessionId??"none"}:${t}`,[e?.sessionId,t]);return N.useEffect(()=>{const c=[],d=s.current.snapshot;if(!e||t===0){if(!d){a({phase:"hidden",snapshot:null});return}a({phase:"leaving",snapshot:d}),c.push(window.setTimeout(()=>{a({phase:"hidden",snapshot:null})},wM))}else d?d.sessionId!==e.sessionId?(a({phase:"switching",snapshot:e}),c.push(window.setTimeout(()=>{a({phase:"visible",snapshot:e})},SM))):a({phase:"visible",snapshot:e}):(a({phase:"entering",snapshot:e}),c.push(window.setTimeout(()=>{a({phase:"visible",snapshot:e})},xM)));return()=>{for(const m of c)window.clearTimeout(m)}},[e,o,t]),n}function TM(e){const{origin:t,surface:n="standalone"}=e,a=n==="workspace",s=hI(),[o,c]=N.useState(null),[d,m]=N.useState(!1),[h,g]=N.useState(null),[b,x]=N.useState(!0),[y,S]=N.useState(!0),[E,M]=N.useState(()=>vM()),[C,R]=N.useState(null),[A,H]=N.useState(null),[F,D]=N.useState(0),$=N.useRef(null),P=N.useRef(null),ee=N.useRef(null),q=N.useRef(null),Z=N.useRef(null),G=N.useRef(null),le=N.useRef(null),W=N.useRef(null),U=N.useRef(null),z=N.useRef(()=>{}),V=N.useRef(null),ne=N.useRef(!1),we=bM(ee,Z),O=we.mode,B=yM(E),Y=B.processOpen,_=Y,ce=B.runtimeContextOpen,he=B.activityOpen,ie=N.useCallback(oe=>{M(Le=>{const ze=Le.active==="process";return(typeof oe=="function"?oe(ze):oe)?Ys(Le,"process"):Le.active==="process"?ea(Le):Le})},[]),ae=uM({origin:t,sessionId:h?.sessionId,refs:s,setError:c}),ge=N.useMemo(()=>sM(ae.filteredShortcuts),[ae.filteredShortcuts]),ve=aM({origin:t,refs:s,sessionId:h?.sessionId,setError:c}),Ie=N.useRef(()=>{}),He=N.useCallback(oe=>{Ie.current(oe)},[]),Ee=EI({origin:t,refs:s,sessionId:h?.sessionId,setError:c,onReconcile:He});Ie.current=oe=>{const Le=s.sessionRef.current?.sessionId;Le&&(async()=>await Ee.recoverSession(Le)?(H({id:Date.now(),message:"已自动恢复:会话事件已重新同步,可继续对话。"}),D(Oe=>Oe+1)):H({id:Date.now(),message:"自动恢复未完成,将在重连时重试。"}))()};const nt=Ee.operationCards.length+Ee.humanGateCards.length+Ee.artifactCards.length,mt=N.useMemo(()=>By(Ee.operationCards).length+Ee.humanGateCards.length+Ee.artifactCards.length,[Ee.operationCards,Ee.humanGateCards.length,Ee.artifactCards.length]),qt=N.useMemo(()=>h?{sessionId:h.sessionId,operationCards:Ee.operationCards,humanGateCards:Ee.humanGateCards,artifactCards:Ee.artifactCards}:null,[h,Ee.operationCards,Ee.humanGateCards,Ee.artifactCards]),Zt=EM(qt),vn=N.useMemo(()=>cw({operations:Ee.operationCards,gates:Ee.humanGateCards,artifacts:Ee.artifactCards}),[Ee.operationCards,Ee.humanGateCards,Ee.artifactCards]),Tn=N.useCallback(oe=>vn.has(oe),[vn]),mn=Rw(q,O,h?.sessionId??"no-session"),Ht=mn.presentation==="sidecar";N.useEffect(()=>{const oe=O==="comfortable"&&E.active==="sidebar-drawer",Le=Ht&&E.active==="activity";(oe||Le)&&M(ze=>ze.active===E.active?ea(ze):ze)},[Ht,O,E.active]),N.useEffect(()=>{R(null)},[h?.sessionId]),N.useEffect(()=>{nt>0||E.active!=="activity"||M(oe=>oe.active==="activity"?ea(oe):oe)},[nt,E.active]);const We=N.useCallback(oe=>{oe&&R(oe),Ht||M(Le=>Ys(Le,"activity"))},[Ht]),xt=N.useCallback(()=>{M(oe=>oe.active==="activity"?ea(oe):oe)},[]),jt=N.useCallback(oe=>{const Le=P.current;if(!Le)return;const Oe=Array.from(Le.querySelectorAll("[data-activity-ref]")).find(Ve=>oe.includes(Ve.dataset.activityRef??""));if(!Oe){H({id:Date.now(),message:"详细运行记录暂时没有对应的对话位置。"});return}Oe.scrollIntoView({block:"center",behavior:"smooth"}),Oe.classList.add("is-located"),window.setTimeout(()=>Oe.classList.remove("is-located"),1400),Ht||xt()},[Ht,xt]),Fe=_I({origin:t,refs:s,setSession:g,thread:Ee,composer:{setInput:ae.setInput,setPendingImages:ae.setPendingImages},browser:{setPreviews:ve.setPreviews,setActivePreviewPath:ve.setActivePreviewPath},setError:c,setNotice:H,onCompactionChange:m,setProcessOpen:ie,setAutoScroll:S}),Kt=nM({origin:t,refs:s,session:h,thread:Ee,composer:{setInput:ae.setInput,setPendingImages:ae.setPendingImages},setError:c,setNotice:H,setAutoScroll:S,recoveryVersion:F,watchSessionTitle:Fe.watchSessionTitle}),fe=rM({origin:t,refs:s,thread:Ee,setError:c}),be=hM({origin:t,session:h,setSession:g,refs:s,setError:c});N.useEffect(()=>{if(Ee.streaming){Fe.refreshSessionList();return}const oe=window.setTimeout(()=>{Fe.refreshSessionList()},1200);return()=>window.clearTimeout(oe)},[Ee.streaming]),N.useEffect(()=>{be.runtimeContextOpen&&E.active!=="runtime-context"?M(oe=>Ys(oe,"runtime-context")):!be.runtimeContextOpen&&E.active==="runtime-context"&&M(oe=>ea(oe))},[be.runtimeContextOpen,E.active]),N.useEffect(()=>{E.active!=="runtime-context"&&be.runtimeContextOpen&&be.setRuntimeContextOpen(!1)},[E.active]),N.useEffect(()=>{Ee.streaming&&E.active==="process"&&M(ea)},[Ee.streaming,E.active]);const{sendPrompt:Ue,handleStop:Ze}=Kt,Je=N.useRef(()=>{}),It=N.useCallback(async oe=>{const Le=g4(oe);if(Le&&Le.action!=="unknown"&&Le.action!=="pi-prompt"){Je.current(oe);return}await Ue(oe,ae.pendingImages)},[Ue,ae.pendingImages]);z.current=oe=>{It(oe)};const nn=N.useCallback(()=>{ae.textareaRef.current?.focus()},[ae.textareaRef]),At=N.useCallback(()=>{M(oe=>oe.active==="sidebar-drawer"?ea(oe):oe)},[]),lt=N.useCallback(()=>{be.setRuntimeContextOpen(!1),M(oe=>Ys(oe,"sidebar-drawer"))},[be.setRuntimeContextOpen]),cn=N.useCallback(oe=>{Fe.activateSession(oe),At(),queueMicrotask(()=>{P.current?.focus?.(),nn()})},[Fe,At,nn]),gt=N.useCallback(oe=>{ae.setInput(Le=>`${Le}${Le&&!Le.endsWith(" ")?" ":""}@${oe} `),At(),queueMicrotask(()=>nn())},[ae,At,nn]),Yn=N.useCallback(oe=>{ve.openPreview(oe),At()},[ve,At]),yn=N.useCallback(()=>{const oe=P.current;if(!oe)return;const Le=oe.scrollHeight-oe.scrollTop-oe.clientHeight<80;S(Le)},[]);N.useEffect(()=>{y&&$.current?.scrollIntoView({behavior:"smooth",block:"end"})},[Ee.messages,y,Ee.streaming]),N.useEffect(()=>{if(!A)return;const oe=window.setTimeout(()=>H(null),6500);return()=>window.clearTimeout(oe)},[A]);const it=o?{id:A?.id??1,kind:"error",message:o}:A?{id:A.id,kind:"info",message:A.message}:null,Ge=N.useCallback(oe=>{if(oe.action==="pi-prompt"||oe.command==="/name"||oe.command==="/compact"){ae.setInput(`${oe.command} `),ae.setShortcutOpen(!1),ae.textareaRef.current?.focus();return}Je.current(oe.command)},[ae]),bt=N.useCallback(oe=>{const Le=g4(oe),ze=oe.trim(),Oe=ze.split(/\s+/,1)[0]?.toLowerCase()??"";if(ae.setInput(""),ae.setShortcutOpen(!1),!Le)return;if(Le.action==="focus:interview"){if(!h){H({id:Date.now(),message:"请先创建或打开一个会话,再开始 Interview"});return}fe.startInterview();return}const Ve=V8(Le.action);if(Ve){e.onNavigateWorkspace?.(Ve,{});return}if(Le.action==="compact"){const Mt=ze.slice(Oe.length).trim();Fe.compactSession(Mt||void 0);return}if(Le.action==="name"){const Mt=ze.slice(Oe.length).trim(),wt=h?.sessionId;if(!wt){c("当前没有可重命名的会话");return}const Ln=Fe.sessionList.find(Xn=>Xn.sessionId===wt),ur=Mt||window.prompt("会话名称",Ln?.title??Ln?.displayTitle??"")||"";ur.trim()&&Fe.updateSession(wt,{title:ur.trim()});return}if(Le.action==="session"){const Mt=h?.sessionId??"(none)",wt=Fe.sessionList.find(ur=>ur.sessionId===Mt),Ln=wt?.title||wt?.displayTitle||"未命名对话";H({id:Date.now(),message:`当前会话:${Ln}(${Mt})`});return}if(Le.action==="copy"){const wt=[...Ee.visibleMessages??[]].reverse().find(Ln=>Ln.role==="assistant");if(!wt?.text){c("没有可复制的助手消息");return}navigator.clipboard?.writeText(wt.text).then(()=>H({id:Date.now(),message:"已复制最后一条助手消息"}),()=>c("复制失败"));return}if(Le.action==="unknown"){Ue(ze,ae.pendingImages);return}c(`未知 shortcut:${Le.command}`)},[ae.setInput,ae.setShortcutOpen,ae.pendingImages,fe.startInterview,e.onNavigateWorkspace,Fe,h,Ee.visibleMessages,Ue]);Je.current=bt;const _t=N.useCallback(oe=>{const Le=s.isComposingRef.current||oe.nativeEvent.isComposing,ze=Date.now()-s.compositionEndedAtRef.current<100;if(ae.shortcutOpen&&ae.filteredShortcuts.length>0&&!Le&&!ze){if(oe.key==="ArrowLeft"||oe.key==="ArrowRight"||oe.key==="ArrowUp"||oe.key==="ArrowDown"){oe.preventDefault();const Oe=oM(O);let Ve=ae.shortcutIndex;if(oe.key==="ArrowLeft"||oe.key==="ArrowRight")Ve=cy(ae.shortcutIndex,ge,Oe,oe.key==="ArrowLeft"?"left":"right");else{const Mt=V.current;let wt=null;if(Mt){const Ln=Array.from(Mt.querySelectorAll("[data-shortcut-index]")).map(Xn=>{const nr=Xn.getBoundingClientRect();return{globalIndex:Number(Xn.dataset.shortcutIndex??-1),top:nr.top,bottom:nr.bottom,left:nr.left,right:nr.right}}).filter(Xn=>Number.isFinite(Xn.globalIndex)&&Xn.globalIndex>=0),ur=Ln.find(Xn=>Xn.globalIndex===ae.shortcutIndex)??null;ur&&(wt=cM(ur,Ln,oe.key==="ArrowUp"?"up":"down"))}Ve=wt??cy(ae.shortcutIndex,ge,Oe,oe.key==="ArrowUp"?"up":"down")}Ve!==ae.shortcutIndex&&(ne.current=!0,ae.setShortcutIndex(Ve));return}if(oe.key==="Escape"){oe.preventDefault(),ae.setShortcutOpen(!1);return}if(oe.key==="Enter"||oe.key==="Tab"){oe.preventDefault();const Oe=ae.filteredShortcuts[ae.shortcutIndex]??ae.filteredShortcuts[0];Ge(Oe);return}}if(oe.key==="Enter"&&!oe.shiftKey&&(Le||ze)){ze&&oe.preventDefault();return}if(oe.key==="Enter"&&!oe.shiftKey){oe.preventDefault(),It(ae.input);return}},[ae.input,ae.shortcutOpen,ae.filteredShortcuts,ae.shortcutIndex,ae.setShortcutIndex,ae.setShortcutOpen,s,It,Ge,O,ge,V,ne]),Lt=Ee.visibleMessages.length>0||Ee.operationCards.length>0||Ee.humanGateCards.length>0||Ee.artifactCards.length>0||!!Ee.interview,Q=e.readiness==="setup-required"?"⚠ Pi 未就绪(setup-required):Chat 需要先完成 Pi 认证 / 模型配置。":e.readiness==="degraded"?"⚠ Pi 降级(degraded):可继续对话,但部分能力不可用。":null,xe=f.jsx($8,{origin:t,open:b,layoutMode:O,drawerOpen:B.sidebarDrawerOpen,activeSessionId:h?.sessionId,activeSessionStreaming:Ee.streaming,sessions:Fe.sessionList,tree:ve.tree,expanded:ve.expandedDirs,treeError:ve.treeError,onToggleOpen:()=>x(oe=>!oe),onOpenDrawer:lt,onCloseDrawer:At,onCreate:()=>{Fe.createSession()},creatingSession:Fe.creatingSession,onActivate:oe=>{B.sidebarDrawerOpen?cn(oe):Fe.activateSession(oe)},onRename:(oe,Le)=>{Fe.updateSession(oe,{title:Le})},onSetState:(oe,Le)=>{Fe.updateSession(oe,{state:Le})},onDelete:oe=>Fe.deleteSession(oe),onRefreshTree:()=>{ve.loadTree()},onToggleDir:ve.toggleDir,onInsert:oe=>{B.sidebarDrawerOpen?gt(oe):ae.setInput(Le=>`${Le}${Le&&!Le.endsWith(" ")?" ":""}@${oe} `)},onPreview:oe=>{B.sidebarDrawerOpen?Yn(oe):ve.openPreview(oe)},drawerTriggerRef:G}),De=["oc-workspace",Y&&!_?"has-process":"",_?"has-process-overlay":""].filter(Boolean).join(" "),et=oe=>f.jsx("div",{className:"oc-messages is-empty",ref:Z,"data-landing-density":we.landingDensity,children:f.jsx(Ky,{mode:oe,readiness:e.readiness,density:we.landingDensity,onSuggest:async Le=>{Fe.creatingSession||(oe==="no-session"?await Fe.createSession()&&await It(Le):await It(Le))},disabled:Fe.creatingSession,onCreateSession:oe==="no-session"?()=>{Fe.createSession()}:void 0})});return f.jsxs("div",{className:"oc-shell",children:[a?null:f.jsxs("div",{className:"oc-banner",children:[f.jsxs("span",{className:"oc-banner-title",children:[f.jsx("span",{className:"oc-banner-dot","aria-hidden":"true"}),"对话"]}),f.jsxs("span",{className:"oc-banner-body",children:["用自然语言编排 loop-agent / agent-worker 的",f.jsx("strong",{children:"全部能力"}),"。这是 ",f.jsx("strong",{children:"Operator"})," 面:默认具备完整 Pi 工具(read/write/edit/bash/grep/find/ls)与 safe-* 探查、以及受策略约束的 operator action(ADR 0011)。",f.jsx("strong",{children:"软约束"}),":大改与高风险变更优先走受治 DAG 的 implement-pi / repair-pi 与 Human Gate,而非把 Chat 当作第二套 DAG kernel。"]})]}),Q&&f.jsx("div",{className:"oc-alert oc-alert-warning",children:Q}),f.jsx(NI,{toast:it,onDismiss:()=>{c(null),H(null)}}),h?f.jsxs("div",{className:De,ref:ee,"data-layout-mode":O,children:[xe,f.jsxs("div",{ref:q,className:`oc-main${Lt?"":" is-landing"}`,children:[!Ht&&(O==="narrow"||nt>0)?f.jsxs("div",{className:"oc-main-topbar",children:[O==="narrow"?f.jsx("button",{type:"button",className:"oc-main-topbar-btn",ref:G,"aria-label":"打开会话与仓库","aria-expanded":B.sidebarDrawerOpen,onClick:()=>B.sidebarDrawerOpen?At():lt(),children:"会话与仓库"}):null,nt>0?f.jsxs("button",{type:"button",className:"oc-main-topbar-btn oc-activity-trigger",ref:U,"aria-controls":"oc-activity-rail","aria-expanded":he,onClick:()=>he?xt():We(),children:["运行活动 ",f.jsx("span",{children:mt})]}):null]}):null,f.jsx(K8,{previews:ve.previews,activePath:ve.activePreviewPath,loading:ve.previewLoading,onActivate:ve.setActivePreviewPath,onClose:ve.closePreview}),Lt?f.jsx(Q_,{scrollContainerRef:P,messagesEndRef:$,onScroll:yn,hasThread:Lt,readiness:e.readiness,streaming:Ee.streaming,streamingAssistantId:Ee.streamingAssistantId,messagesCount:Ee.messages.length,visibleCount:Ee.visibleMessages.length,onLoadMore:()=>Ee.setHistoryLimit(oe=>oe+50),turnGroups:Ee.turnGroups,interview:Ee.interview,interviewAnswer:fe.interviewAnswer,onInterviewAnswerChange:fe.setInterviewAnswer,onAnswerInterview:oe=>{fe.answerInterview(oe)},onConfirmTaskKind:()=>{fe.confirmTaskKind()},onActivateActivity:We,canActivateActivity:Tn,onSuggest:oe=>{It(oe)}}):et("empty-session"),f.jsx(uI,{composer:ae,streaming:Ee.streaming,hasThread:Lt,layoutMode:O,paletteModel:ge,shortcutPaletteRef:V,paletteKeyboardNavRef:ne,onSend:oe=>{It(oe)},onStop:Ze,onKeyDown:_t,onRunShortcut:bt,models:be.models,activeModel:be.activeModel,activeModelRef:be.activeModelRef,activeModelListed:be.activeModelListed,activeThinkingLevel:be.activeThinkingLevel,thinkingLevels:be.thinkingLevels,onSwitchRuntime:oe=>{be.switchRuntime(oe)},usage:Ee.usage,unread:Ee.unread,onCompact:()=>{Fe.compactSession()},compacting:d,processSummary:Ee.streaming?null:Ee.processSummary,processOpen:Y,onToggleProcess:()=>{M(oe=>oe.active==="process"?ea(oe):Ys(oe,"process")),Y||be.setRuntimeContextOpen(!1)},processTriggerRef:le,runtimeContext:be.runtimeContext,runtimeContextOpen:ce,onToggleRuntimeContext:()=>{ce?(be.setRuntimeContextOpen(!1),M(oe=>oe.active==="runtime-context"?ea(oe):oe)):(be.setRuntimeContextOpen(!0),M(oe=>Ys(oe,"runtime-context")))},runtimeContextTriggerRef:W})]}),nt>0&&!Ht&&he?f.jsx("button",{type:"button",className:"oc-overlay-backdrop is-activity","aria-label":"关闭运行活动遮罩",onClick:xt}):null,Zt.snapshot?f.jsx(Nw,{origin:t,sessionId:Zt.snapshot.sessionId,presentation:mn.presentation,sidecarRect:mn.sidecarRect,phase:Zt.phase,open:he,focusRef:C,triggerRef:U,operationCards:Zt.snapshot.operationCards,humanGateCards:Zt.snapshot.humanGateCards,artifactCards:Zt.snapshot.artifactCards,onClose:xt,onLocateConversation:jt,onNavigateWorkspace:e.onNavigateWorkspace}):null,ce&&be.runtimeContext?f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"oc-overlay-backdrop is-runtime-context","aria-label":"关闭注入上下文遮罩",onClick:()=>{be.setRuntimeContextOpen(!1),M(oe=>oe.active==="runtime-context"?ea(oe):oe)}}),f.jsx(mI,{panelOnly:!0,open:ce,onToggle:()=>{},onClose:()=>{be.setRuntimeContextOpen(!1),M(oe=>oe.active==="runtime-context"?ea(oe):oe)},context:be.runtimeContext,triggerRef:W})]}):null,Y&&f.jsxs(f.Fragment,{children:[_?f.jsx("button",{type:"button",className:"oc-overlay-backdrop is-process","aria-label":"关闭工具调用记录遮罩",onClick:()=>ie(!1)}):null,f.jsx(dI,{toolCalls:Ee.toolCalls,overlay:_,onClose:()=>ie(!1),triggerRef:le})]})]}):f.jsxs("div",{className:De,ref:ee,"data-layout-mode":O,children:[xe,f.jsxs("div",{className:"oc-main is-landing",children:[O==="narrow"?f.jsx("div",{className:"oc-main-topbar",children:f.jsx("button",{type:"button",className:"oc-main-topbar-btn",ref:G,"aria-label":"打开会话与仓库","aria-expanded":B.sidebarDrawerOpen,onClick:()=>B.sidebarDrawerOpen?At():lt(),children:"会话与仓库"})}):null,et("no-session")]})]})]})}function NM(e){return e==="validate"||e==="apply"||e==="spine"?"contract":e}const p6="X-Loop-Console-Confirmation",g6="agent-worker console doctor --repo .",Nh=[{kind:"standard",label:"后端研发(默认 DAG)",hint:"生成标准 hybrid DAG(contract → implement → verify)"},{kind:"frontend-implementation",label:"前端研发",hint:"生成 frontend-implementation 专用节点链"},{kind:"backend-test",label:"后端测试",hint:"生成 backend-test-dag(分析 / 用例 / pytest)"},{kind:"frontend-test",label:"前端测试",hint:"生成 frontend-test-dag(RAG 用例 + Playwright CLI)"}],b6={"setup-required":"需要设置",ready:"已就绪",degraded:"降级可用",unknown:"未知"},CM={idle:"未探测",match:"匹配",mismatch:"仓库不匹配",unavailable:"不可用"},v6={low:"低",medium:"中",high:"高"},y6={"validation-failed":"校验失败","contract-drift":"契约漂移","runtime-mismatch":"运行时不匹配","pause-on-human":"等待人工","verification-failed":"验证失败","orphan-unknown":"孤立/未知","terminal-failed":"已终止(失败)","terminal-succeeded":"已终止(成功)","needs-reconcile":"需要对账","running-active":"正在运行"},AM={idle:"空闲","not-started":"未开始","not-run":"未运行","n/a (MVP)":"不适用(MVP)",accepted:"已接受",succeeded:"已成功",running:"运行中",ran:"已执行"};function su(e){return AM[e]??e}function x6(){return window.__CONSOLE_CONFIRMATION_TOKEN__??""}function _u(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}async function Iu(e,t={},n){const a={"Content-Type":"application/json",[p6]:x6()},s=await fetch("/api/operator/v1/operations",{method:"POST",credentials:"same-origin",headers:a,body:JSON.stringify({action:e,actionParams:t,...n?{clientRequestId:n}:{}})});let o={};try{o=await s.json()}catch{o={ok:!1,error:{code:"INVALID_INPUT",message:"操作响应不是合法 JSON"}}}return{status:s.status,body:o}}const RM=new Set(["runDag","dagRerun","dagReconcileRun","dagRequestInterrupt","standaloneTaskRerun"]);function Fm(e,t){return m6({blockedReasons:e.blockedReasons,blockingNodes:e.blockingNodes,fallbackMessage:t})}async function dy(e,t=3e5){const n=Date.now();for(;Date.now()-n<t;){const a=await fetch(`/api/operator/v1/operations/${encodeURIComponent(e)}`,{credentials:"same-origin"});if(!a.ok)return null;const s=await a.json(),o=s.operation??s,c=o.state??"";if(c==="succeeded"||c==="failed"||c==="needs-reconcile"||c==="timed-out")return o;await new Promise(d=>setTimeout(d,250))}return{state:"needs-reconcile",errorMessage:"等待操作结果超时"}}const _M={};function IM(){const[e,t]=N.useState(()=>Fy({env:_M?.VITE_OPERATOR_CHAT_DEFAULT_LANDING,storage:window.localStorage,location:window.location})),[n,a]=N.useState(null),[s,o]=N.useState("setup-required"),[c,d]=N.useState(null),[m,h]=N.useState(null),[g,b]=N.useState(!1),[x,y]=N.useState(!1),[S,E]=N.useState(null),[M,C]=N.useState(null),[R,A]=N.useState(null),[H,F]=N.useState(null),[D,$]=N.useState({command:"idle",dag:"not-started",verification:"not-run",promote:"n/a (MVP)"}),[P,ee]=N.useState("setup"),q=N.useCallback(U=>{ee(z=>NM(typeof U=="function"?U(z):U))},[]),Z=s==="setup-required",G=s==="degraded",le=N.useCallback(U=>{U!==e&&(E(null),A(null),C(null)),t(U)},[e]),W=N.useCallback(async()=>{try{const z=await(await fetch("/api/health")).json();a(z);const V=z.piReadiness??"setup-required";o(V),h(null),q(V==="ready"||V==="degraded"?ne=>ne==="setup"?"import-prd":ne:"setup")}catch(U){h(U instanceof Error?U.message:String(U))}try{const z=await(await fetch("/api/operator/v1/readiness")).json();d(z),z.state&&o(z.state)}catch{}},[q]);return{nav:e,setNav:t,selectNav:le,health:n,readiness:s,setReadiness:o,readinessReport:c,healthError:m,loadHealth:W,busy:g,setBusy:b,observeBusy:x,setObserveBusy:y,opError:S,setOpError:E,opMessage:M,setOpMessage:C,opErrorCode:R,setOpErrorCode:A,lastOpState:H,setLastOpState:F,layers:D,setLayers:$,step:P,setStep:q,setupBlocked:Z,degraded:G}}const MM={bootstrapFromPrd:"正在导入 PRD 并创建任务:归档文档 → 确定性解析 → 语义结构化(MED→HIGH→LOW,每档最多 300 秒,请勿关闭页面)",importPrd:"正在导入 PRD:归档文档 → 确定性解析 → 语义结构化(MED→HIGH→LOW,每档最多 300 秒,请勿关闭页面)",interviewStart:"正在启动需求访谈…",interviewTurn:"正在提交访谈回答…",interviewSkip:"正在跳过访谈并生成评估…",contractValidate:"正在校验契约草稿…",contractDiff:"正在计算契约差异…",contractApply:"正在应用契约(写入需求与执行约束)…",spineCheck:"正在运行 Spine 审计…",dagGenerate:"正在生成 DAG…",standaloneTaskRerun:"正在完整重跑任务:服务端校验资格后启动新 run…",workerTaskRetry:"正在重新排队 Worker Task…"};function OM(e){const{shell:t,applyInterviewPayload:n}=e,{setBusy:a,setOpError:s,setOpErrorCode:o,setOpMessage:c,setReadiness:d,setStep:m,setNav:h,setLastOpState:g,setLayers:b,step:x,nav:y}=t,[S,E]=N.useState(null),[M,C]=N.useState([]),[R,A]=N.useState(!0),H=N.useRef(null),[F,D]=N.useState(null),[$,P]=N.useState(null),ee=N.useCallback(async(W,U={},z)=>{a(!0),s(null),o(null),c(MM[W]??null);try{const{status:V,body:ne}=await Iu(W,U,z?.clientRequestId);if(V===412||ne.error?.code==="PI_SETUP_REQUIRED")return s(Ua(ne.error?.message??"Pi 未就绪或已降级:该操作暂不可用")),o(ne.error?.code??"PI_SETUP_REQUIRED"),d("setup-required"),m("setup"),h("models"),ne;if(V>=400||ne.ok===!1)return s(Ua(ne.error?.message??ne.message??`操作失败(HTTP ${V})`)),o(ne.error?.code??String(V)),g(ne.state??`failed:${V}`),b(B=>({...B,command:ne.error?.message??`failed:${ne.error?.code??V}`})),ne;if(ne.operationId){const B=window.localStorage.getItem(ta)?.trim();if(B&&fetch(`/api/operator/v1/chat/sessions/${encodeURIComponent(B)}/operation-links`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",[p6]:x6()},body:JSON.stringify({operationId:ne.operationId})}).then(Y=>{Y.ok||console.warn("Operator Chat operation link failed",Y.status)}).catch(Y=>console.warn("Operator Chat operation link failed",Y)),E(ne.operationId),g(ne.state??"accepted"),b(Y=>({...Y,command:ne.state??"accepted",dag:W==="runDag"?"running":Y.dag})),RM.has(W)){A(!0),c(`操作已接受,后台运行中:${ne.operationId}(请看事件流;可同时打开 Observe)`);const Y=ne.operationId;dy(Y,30*6e4).then(_=>{if(_){if(g(_.state??null),_.state==="failed"||_.state==="needs-reconcile"||_.state==="timed-out"){s(Ua(_.errorMessage??_.stderrPreview??`操作失败:${_.state}`)),o(_.errorCode??_.state??null),b(ce=>({...ce,command:`failed:${_.errorCode??_.state}`}));return}_.state==="succeeded"&&(c(`${W} 已成功`),b(ce=>({...ce,command:"succeeded"})))}})}else{c(`操作已接受:${ne.operationId}`);const Y=await dy(ne.operationId);if(Y){if(g(Y.state??null),Y.state==="failed"||Y.state==="needs-reconcile"||Y.state==="timed-out")return s(Ua(Y.errorMessage??Y.stderrPreview??`操作失败:${Y.state}`)),o(Y.errorCode??Y.state??null),b(ie=>({...ie,command:`failed:${Y.errorCode??Y.state}`})),{ok:!1,operationId:ne.operationId,state:Y.state,error:{code:Y.errorCode??Y.state??"INTERNAL_ERROR",message:Y.errorMessage??Y.stderrPreview??`操作失败:${Y.state}`}};c(Y.errorMessage?`${W}:${Y.errorMessage}`:`${W} 已成功`),b(ie=>({...ie,command:Y.state??"succeeded"}));const _=Y.result??{},ce={ok:!0,operationId:ne.operationId,state:Y.state??"succeeded",result:_};(W==="interviewStart"||W==="interviewTurn"||W==="interviewSkip")&&n(_);const he=_.confirmation;return he?.confirmationId&&(D(he.confirmationId),P(_)),z?.advanceTo&&m(z.advanceTo),ce}}}else c(`${W} 已完成`),g(ne.state??"succeeded"),b(B=>({...B,command:"succeeded",verification:W==="contractValidate"||W==="spineCheck"?"ran":B.verification}));const we=ne.result??{};(W==="interviewStart"||W==="interviewTurn"||W==="interviewSkip")&&n(we);const O=we.confirmation;return O?.confirmationId&&(D(O.confirmationId),P(we)),z?.advanceTo&&m(z.advanceTo),ne}catch(V){s(V instanceof Error?V.message:String(V));return}finally{a(!1)}},[n,a,s,o,c,d,m,h,g,b]),q=N.useCallback(W=>{if(!W)return"无响应";if(W.error?.message)return W.error.message;if(W.message)return W.message;const U=W.result;if(U&&typeof U=="object")try{return JSON.stringify(U).slice(0,1200)}catch{return"已返回结果"}return W.ok===!1?"失败":"成功"},[]),Z=N.useCallback(W=>{if(!W||W.ok===!1||W.error)return!1;const U=W.result;if(!U)return!0;if(typeof U.valid=="boolean")return U.valid;const z=U.result;return z&&typeof z.valid=="boolean"?z.valid:!0},[]),G=N.useCallback(async W=>{H.current?.abort();const U=new AbortController;H.current=U,C(z=>[...z,`开始跟随事件流 ${W}`]);try{const z=await fetch(`/api/operator/v1/operations/${encodeURIComponent(W)}/events`,{credentials:"same-origin",signal:U.signal});if(!z.ok||!z.body){C(O=>[...O,`事件流 HTTP ${z.status}`]);return}const V=z.body.getReader(),ne=new TextDecoder;let we="";for(;R;){const{done:O,value:B}=await V.read();if(O)break;we+=ne.decode(B,{stream:!0});const Y=we.split(`
319
-
320
- `);we=Y.pop()??"";for(const _ of Y){const ce=_.split(`
321
- `).find(ie=>ie.startsWith("data:"));if(!ce)continue;const he=ce.slice(5).trim();C(ie=>[...ie.slice(-80),he.slice(0,240)])}}}catch(z){z.name!=="AbortError"&&C(V=>[...V,`事件流错误:${z instanceof Error?z.message:String(z)}`])}},[R]);N.useEffect(()=>(S&&R&&(x==="run"||y==="recovery")&&G(S),()=>H.current?.abort()),[S,R,x,y,G]);const le=N.useCallback(()=>{A(!1),H.current?.abort(),c("已停止跟随日志(未取消子进程)")},[c]);return{runAction:ee,summarizeEnvelope:q,isActionSuccess:Z,operationId:S,setOperationId:E,sseLog:M,followSse:R,setFollowSse:A,stopFollowSse:le,confirmationId:F,setConfirmationId:D,confirmationDetails:$,setConfirmationDetails:P}}const Ch=8*1024*1024,DM=10*1024*1024,Mu=8,jM=".md,.markdown,.txt,text/markdown,text/plain",LM=[".md",".markdown",".txt"],bp=/\.[^.]+$/;function zM(e){const t=bp.exec(e.trim());return t?t[0].toLowerCase():""}function BM(e){const t=zM(e);return LM.includes(t)}function Ah(e){if(!Number.isFinite(e)||e<0)return"0 B";if(e<1024)return`${e} B`;if(e<1024*1024){const n=e/1024;return`${n>=10?n.toFixed(0):n.toFixed(1)} KiB`}const t=e/(1024*1024);return`${t>=10?t.toFixed(1):t.toFixed(2)} MiB`}function Ba(e,t){return{ok:!1,code:e,message:t}}function UM(e,t){const n=e?Array.from(e):[],a=t?.maxFiles??Mu,s=t?.existingCount??0;return n.length===0?Ba("file-count","请选择至少一个 .md / .markdown / .txt 文件"):s+n.length>a?Ba("file-count",`最多支持 ${a} 个文件(当前已有 ${s} 个)`):null}async function qM(e){const t=e.name?.trim()||"untitled.md";if(!BM(t))return Ba("unsupported-extension","仅支持 .md、.markdown、.txt 文件");if(e.size>Ch)return Ba("file-too-large",`文件不能超过 ${Ah(Ch)}`);let n;try{n=await e.arrayBuffer()}catch{return Ba("read-failed","文件读取失败,请重试或直接粘贴")}let a;try{a=new TextDecoder("utf-8",{fatal:!0}).decode(n)}catch{return Ba("invalid-utf8","文件不是有效 UTF-8,请另存为 UTF-8")}if(a.trim().length===0)return Ba("empty-content","文件内容不能为空或只有空白");const s=new TextEncoder().encode(a).byteLength;return{ok:!0,text:a,fileName:t,sourceBytes:e.size,textBytes:s}}async function HM(e){if(e.length===0)return Ba("file-count","请选择至少一个 .md / .markdown / .txt 文件");if(e.length>Mu)return Ba("file-count",`最多支持 ${Mu} 个文件`);const t=[];for(const n of e){const a=await qM(n);if(!a.ok)return a;t.push({fileName:a.fileName,text:a.text,sourceBytes:a.sourceBytes,textBytes:a.textBytes})}return{ok:!0,documents:t}}function FM(e,t){const n=e.split(/\r?\n/);for(const s of n){const o=/^(#{1,6})\s+(.+)$/.exec(s.trim());if(o?.[2])return o[2].trim()}for(const s of n){const o=s.trim();if(o&&!/^---+$/.test(o)&&!/^```/.test(o)&&!/^<!--/.test(o))return o.replace(/^>\s+/,"").slice(0,120)}return t.replace(bp,"").trim()||"需求"}function PM(e){return e.trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")||"requirement"}function $M(e,t){const n=e.replace(bp,"").trim(),a=PM(n);return a==="requirement"&&/[^\u0000-\u007f]/.test(n)?`part-${t+1}`:a==="requirement"?n?`part-${t+1}`:`part-${t+1}`:a}function GM(e){const t=new Set;return e.map((n,a)=>{let s=$M(n.fileName,a);if(t.has(s)){let o=2;for(;t.has(`${s}-${o}`);)o+=1;s=`${s}-${o}`}return t.add(s),{name:s,content:n.text,fileName:n.fileName}})}function KM(e,t){if(e.length===0)return"";if(e.length===1)return e[0].text;const n=Math.min(Math.max(0,t?.primaryIndex??0),e.length-1),a=e[n],s=FM(a.text,a.fileName),c=[`<!-- composed-from: ${e.map(d=>d.fileName).join(", ")} -->`,"",`# ${s}`,""];for(const d of e)c.push(`## 来源:${d.fileName}`,"",d.text.trim(),"");return`${c.join(`
322
- `).trimEnd()}
323
- `}function VM(e,t,n){const a={action:e,actionParams:t};return new TextEncoder().encode(JSON.stringify(a)).byteLength<=DM}function YM(){return"最终内容导致请求体超过服务端限制,请缩小文档或减少文件数量"}function XM(){const[e,t]=N.useState(""),[n,a]=N.useState([]),[s,o]=N.useState(0),[c,d]=N.useState(!1),[m,h]=N.useState(null),[g,b]=N.useState(!1),[x,y]=N.useState(!1),S=N.useRef(0),E=N.useRef(0),M=N.useCallback((Z,G)=>{const le=Z.length===0?0:Math.min(Math.max(0,G),Z.length-1);o(le),t(KM(Z,{primaryIndex:le})),d(!1)},[]),C=N.useCallback(async Z=>{const G=UM(Z,{existingCount:n.length});if(G){h(G.message);return}const le=Array.from(Z),W=++E.current;b(!0),h(null);try{const U=await HM(le);if(W!==E.current)return;if(!U.ok){h(U.message);return}const z=[...n,...U.documents],V=n.length===0?0:s;a(z),n.length===0||!c?(M(z,V),h(null)):h("已追加文件,未改正文(正文已手动编辑);可点「按文件重新合成」覆盖。")}catch{if(W!==E.current)return;h("文件读取失败,请重试或直接粘贴")}finally{W===E.current&&b(!1)}},[M,c,n,s]),R=N.useCallback(Z=>{t(Z),n.length>0&&d(!0)},[n.length]),A=N.useCallback(Z=>{o(Z),c||M(n,Z)},[M,c,n]),H=N.useCallback((Z,G)=>{const le=Z+G,W=[...n],U=W[le];W[le]=W[Z],W[Z]=U;const z=s===Z?le:s===le?Z:s;a(W),o(z),c||M(W,z)},[M,c,n,s]),F=N.useCallback(Z=>{const G=n.filter((W,U)=>U!==Z),le=G.length===0?0:Math.min(s>=Z?Math.max(0,s-1):s,Math.max(0,G.length-1));a(G),o(le),G.length===0?d(!1):c||M(G,le)},[M,c,n,s]),D=N.useCallback(()=>{a([]),o(0),d(!1),h(null)},[]),$=N.useCallback(()=>{c&&!window.confirm("将用当前文件列表重新合成正文,覆盖你在编辑区的修改。继续?")||(M(n,s),h(null))},[M,c,n,s]),P=N.useCallback((Z,G)=>{Z.preventDefault(),Z.stopPropagation(),!G&&(S.current+=1,y(!0))},[]),ee=N.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),S.current=Math.max(0,S.current-1),S.current===0&&y(!1)},[]),q=N.useCallback((Z,G)=>{Z.preventDefault(),Z.stopPropagation(),S.current=0,y(!1),!G&&C(Z.dataTransfer.files)},[C]);return{prdText:e,setPrdText:t,onPrdTextChange:R,prdDocuments:n,prdPrimaryIndex:s,prdComposedDirty:c,prdFileError:m,setPrdFileError:h,prdFileReading:g,prdDragOver:x,loadPrdFromFiles:C,applyPrdComposition:M,setPrimaryDocument:A,moveDocument:H,removeDocument:F,clearDocuments:D,recomposeDocuments:$,onDragEnter:P,onDragLeave:ee,onDrop:q}}const ZM={report:{id:"report",label:"查看报告",action:"dagReport",lane:"dag",guide:"看失败分类与建议动作(交接报告摘要)",commandHint:"loop-agent dag report --run-id <run-id> --json"},doctor:{id:"doctor",label:"Doctor 诊断",action:"doctor",lane:"dag",guide:"只读诊断:检查 Console / Pi / 仓库就绪,不是重跑前置",commandHint:"agent-worker console doctor --repo ."},decision:{id:"decision",label:"人工决策",lane:"dag",guide:"暂停等人时:先看 doctor 输出再做决策(经 CLI)",commandHint:"loop-agent dag doctor --run-id <run-id> --markdown"},resume:{id:"resume",label:"恢复运行",lane:"dag",guide:"仅当运行可安全 resume 时使用(经 CLI)",commandHint:"loop-agent task advance <task-id> --json"},reconcile:{id:"reconcile",label:"对账 / reconcile",requiresReason:!0,action:"dagReconcileRun",lane:"dag",guide:"Orphan/中断时先对账归档(默认 supersede);runner 仍存活时勿盲 supersede",commandHint:"loop-agent dag reconcile-run --run-id <run-id> --action supersede --reason <structured-reason>"},regenerate:{id:"regenerate",label:"重新生成契约/计划",lane:"dag",guide:"契约/计划过期时:回任务页或经 CLI 重新 task advance(本页仅提示)",commandHint:"loop-agent task advance <task-id> --json"},observeLink:{id:"observeLink",label:"全屏观测",action:"observeLink",lane:"dag",guide:"打开完整 Inspect 画布;顶栏可返回操作台",commandHint:"agent-worker console --repo . --port 8790"},dagRerun:{id:"dagRerun",label:"从节点重跑",requiresReason:!0,action:"dagRerun",lane:"dag",guide:"终端失败默认首选:先 dagRerunPlan,plan 合格后直接执行(无需 Human Gate)。Worker 持有的 run、workspace/controller 漂移或含 unsafe shell 时不要强跑子图",commandHint:"loop-agent dag rerun --run-id <run-id> --from-node <node-id> --plan"},standaloneTaskRerun:{id:"standaloneTaskRerun",label:"完整重跑任务",requiresReason:!0,action:"standaloneTaskRerun",lane:"dag",guide:"独立 DAG run 整单重跑:仅当 from-node plan 不合格时直调执行,服务端校验 run facts,无需 Human Gate。Worker 持有的 run 请用下方「重新排队 Worker Task」",commandHint:"loop-agent dag rerun-task --run-id <run-id> --reason <text> --json"},workerTaskRetry:{id:"workerTaskRetry",label:"重新排队 Worker Task",requiresReason:!0,action:"workerTaskRetry",lane:"worker",guide:"仅 Worker 队列任务失败时直调执行,服务端校验 Failed 状态,无需 Human Gate;不要与 DAG 完整重跑混用",commandHint:"agent-worker task retry <task-id> --feature-id <feature-id> --repo . --reason <reason>"},interrupt:{id:"interrupt",label:"中止运行",requiresReason:!0,action:"dagRequestInterrupt",lane:"dag",guide:"仅本机 Console 持有的正在运行 DAG:经 Human Gate 登记协作中止,等待当前节点安全收敛。不会立即强杀进程",commandHint:"loop-agent dag request-interrupt --run-id <run-id> --reason-code operator-request --reason <structured-reason>"}},fy={"validation-failed":["report","doctor","regenerate"],"contract-drift":["report","doctor","decision","reconcile","regenerate"],"runtime-mismatch":["report","doctor","reconcile","regenerate"],"pause-on-human":["decision","resume","report","doctor"],"verification-failed":["report","doctor","dagRerun","standaloneTaskRerun","resume","regenerate"],"orphan-unknown":["report","doctor"],"terminal-failed":["report","doctor","dagRerun","standaloneTaskRerun","workerTaskRetry","regenerate"],"terminal-succeeded":["report","observeLink"],"needs-reconcile":["report","doctor","reconcile","regenerate"],"running-active":["interrupt","report","doctor","observeLink"]},QM=new Set(["succeeded","failed","timed-out"]);function WM(e){const t=(e.interruptStatus??"").trim();if(!t||t==="none")return null;if(t==="requested")return"请求已登记,等待 runner 确认。";if(t==="acknowledged")return"等待当前节点安全收敛(不会立即强杀)。";if(t==="needs-reconcile")return"需要对账:中止请求未能确认。";if(t==="settled"){const n=e.dagStatus==="failed"||e.dagStatus==="partial_failed",a=(e.failureCategory??"").includes("controller-interrupted"),s=QM.has(e.targetOperationState??"");return n&&a&&s?"已中止。":"正在对账,尚未确认退出。"}return null}function JM(e){return(fy[e]??fy["orphan-unknown"]).map(n=>ZM[n])}function eO(e){const t=[],n=[];for(const a of e)a.lane==="worker"?n.push(a):t.push(a);return{dag:t,worker:n}}function tO(e){return typeof e.action=="string"&&e.action.trim().length>0}function w6(e){return JM(e).filter(tO)}function nO(e){const t=new Set(w6(e).map(a=>a.id)),n=(...a)=>{for(const s of a)if(t.has(s))return s;return null};switch(e){case"terminal-failed":case"verification-failed":return n("dagRerun","standaloneTaskRerun","doctor","report");case"pause-on-human":return n("doctor","report");case"needs-reconcile":return n("doctor","reconcile","report");case"running-active":return n("interrupt","doctor","report");case"runtime-mismatch":case"contract-drift":return n("doctor","report");case"validation-failed":return n("doctor","report");case"terminal-succeeded":return n("observeLink","report");default:return n("doctor","report")}}function rO(e){if(e.needsReconcile)return"needs-reconcile";const t=(e.errorCode??"").toLowerCase(),n=(e.operationState??"").toLowerCase(),a=(e.dagStatus??"").toLowerCase(),s=(e.failureCategory??"").toLowerCase();return t.includes("validation")||t.includes("invalid")||n.includes("validation")?"validation-failed":t.includes("contract")||t.includes("drift")||t.includes("binding")?"contract-drift":t.includes("runtime")||t.includes("mismatch")||t.includes("fingerprint")?"runtime-mismatch":t.includes("human")||n.includes("paused")||a.includes("paused")||n.includes("awaiting")?"pause-on-human":t.includes("verif")||n.includes("verif")?"verification-failed":s==="controller-interrupted"||t.includes("controller-interrupted")||t.includes("interrupted")||a==="interrupted"||a==="orphaned"||n.includes("controller-interrupted")||n.includes("interrupted")?"needs-reconcile":a==="running-suspected-stall"||a==="running-quiet"||a==="suspected-stall"||a.includes("suspected-stall")||n.includes("suspected-stall")?"orphan-unknown":a==="running"||a==="active"?"running-active":n==="succeeded"||n==="completed"||n==="finished"||a==="succeeded"||a==="completed"||a==="finished"?"terminal-succeeded":n==="failed"||n.includes("fail")||a==="failed"||a==="partial_failed"||t.includes("fail")?"terminal-failed":t.includes("reconcil")||n.includes("reconcil")?"needs-reconcile":"orphan-unknown"}const vp=new Set(["failed","error","partial_failed"]),S6=new Set(["blocked","paused","awaiting_human"]);function a0(e){return(e??"").trim().toLowerCase()}function aO(e){return vp.has(a0(e))}function my(e){const t=a0(e.status);return vp.has(t)||t.includes("fail")?0:e.lifecycle==="paused"||t==="paused"?1:e.lifecycle==="active"?2:3}function iO(e){return[...e].sort((t,n)=>{const a=my(t)-my(n);return a!==0?a:n.mtimeMs-t.mtimeMs})}function sO(e){return iO(e)[0]?.dagRunId}function hy(e){const t=a0(e.status);return vp.has(t)?0:S6.has(t)?1:2}function k6(e){return[...e].sort((t,n)=>{const a=hy(t)-hy(n);return a!==0?a:t.nodeId.localeCompare(n.nodeId)})}function lO(e){const t=k6(e);return t.find(a=>aO(a.status)||S6.has(a0(a.status)))?.nodeId??t[0]?.nodeId}function oO(e){const t=e.status?.trim()||e.lifecycle;return`${e.dagRunId.length>36?`${e.dagRunId.slice(0,18)}…${e.dagRunId.slice(-8)}`:e.dagRunId} · ${t}`}function cO(e){const t=e.status?.trim()||"unknown",n=e.label?.trim();return n&&n!==e.nodeId?`${e.nodeId} · ${t} · ${n}`:`${e.nodeId} · ${t}`}function uO(e){const n=[`operator-recovery: ${e.actionLabel?.trim()||"恢复"}`],a=e.dagRunId?.trim();if(a){const d=e.runStatus?.trim();n.push(d?`run=${a} (${d})`:`run=${a}`)}const s=e.fromNodeId?.trim();if(s){const d=e.nodeStatus?.trim();n.push(d?`from-node=${s} (${d})`:`from-node=${s}`)}const o=e.factClassLabel?.trim();o&&n.push(`fact=${o}`);const c=e.nodeError?.trim()||e.errorMessage?.trim()||(e.errorCode?.trim()?`code=${e.errorCode.trim()}`:"");return c&&n.push(`detail=${c.replace(/\s+/g," ").slice(0,280)}`),n.join(`
324
- `).slice(0,500)}function E6(e){const t=e.trim();return t?t==="operator-recovery"||t.startsWith("operator-recovery:")||t.startsWith("recovery:"):!0}async function py(e){const t=await e.runAction("prepareMutationGate",{action:e.action,actionParams:e.actionParams});if(!e.isActionSuccess(t))return;const n=t?.result??t,a=n.receiptId?n:n.result??n;if(!a.receiptId||!a.humanGateToken){e.setOpError("prepareMutationGate 未返回可消费的 Human Gate receipt");return}await e.runAction(e.action,{...e.actionParams,confirmationId:a.receiptId,humanGateToken:a.humanGateToken},{clientRequestId:e.clientRequestId})}function dO(e){const{shell:t,actions:n,taskId:a,dagRunId:s,fromNodeId:o,featureId:c,recoveryReason:d,recoveryReasonTouched:m,recoveryConfirm:h,recoveryPlanSummary:g,interruptReasonCode:b,setRecoveryConfirm:x,setRecoveryPlanSummary:y,setRecoveryReport:S,setRecoveryReason:E,setRecoveryReasonTouched:M,buildCurrentRecoveryReason:C,openFullCanvas:R}=e,{setOpError:A,setOpErrorCode:H,setOpMessage:F,setBusy:D}=t,{runAction:$,isActionSuccess:P}=n,ee=N.useCallback(async Z=>{if(Z.requiresReason||(x(null),y(null)),Z.action==="doctor"){S(null),$("doctor",{});return}if(Z.action==="dagReport"||Z.id==="report"){const G=s.trim();if(G){x(null),y(null);const le=await $("dagReport",{runId:G}),W=le?.result??{},U=(W.raw?.runs??W.runs)?.[0];le&&le.ok!==!1&&!le.error&&U&&(S({runId:U.runId??G,title:U.title,status:U.status,category:U.productLineFailureCategory,recommendation:U.recoveryRecommendation?.summary??U.recommendedFollowUp??void 0}),F(null));return}if(a.trim()){S(null),$("status",{taskId:a});return}A("查看报告需要先选择 DAG 运行 ID(或填写任务 ID)");return}if(Z.action==="observeLink"){S(null),R();return}if(Z.requiresReason){if(S(null),x(Z),y(null),Z.id!=="dagRerun"&&(A(null),H(null)),(!m||E6(d))&&(E(C(Z.label)),M(!1)),Z.id==="dagRerun"&&s.trim()&&o.trim()){D(!0);try{const{status:G,body:le}=await Iu("dagRerunPlan",{runId:s.trim(),fromNode:o.trim()}),W=le.result??{};W&&typeof W=="object"&&("eligible"in W||W.planHash)&&y(W),G<400&&le.ok!==!1&&W.eligible!==!1?F(null):W.eligible===!1?A(Ua(Fm(W,le.error?.message))):F(le.error?.message??"无法预检重跑计划;确认后仍将尝试提交(CLI 可能尚未就绪)")}finally{D(!1)}}return}A(null),H(null),F(`${Z.label}:请经 CLI — ${Z.commandHint??""}`)},[C,s,o,R,d,m,$,D,A,H,F,x,y,S,E,M,a]),q=N.useCallback(async()=>{const Z=h;if(!Z)return;const G=d.trim();if(!G){A("恢复操作需要结构化原因");return}const le=_u(`recovery-${Z.id}`);if(x(null),Z.id==="dagRerun"){const W=s.trim(),U=o.trim();if(!W||!U){A("从节点重跑需要 DAG 运行 ID 与起始节点 ID");return}let z=g?.planHash?.trim(),V=g?.eligible;if(!z||V===void 0){const ne=await $("dagRerunPlan",{runId:W,fromNode:U}),we=ne?.result??{};if((we.planHash||we.eligible!==void 0)&&y(we),z=we.planHash?.trim()||z,V=we.eligible,we.eligible===!1){A(Ua(Fm(we,ne?.error?.message)));return}if(ne&&ne.ok===!1&&!z){A(ne.error?.message??"无法获取 planHash;请确认 loop-agent dag rerun --plan 可用");return}}if(V===!1){A(Ua(Fm(g??{})));return}if(!z){A("无法获取 planHash;请确认 loop-agent dag rerun --plan 可用");return}await $("dagRerun",{runId:W,fromNode:U,planHash:z,reason:G},{clientRequestId:le});return}if(Z.id==="standaloneTaskRerun"){const W=s.trim();if(!W){A("完整重跑任务需要 DAG 运行 ID");return}await $("standaloneTaskRerun",{runId:W,reason:G,...a.trim()?{taskId:a.trim()}:{}},{clientRequestId:le});return}if(Z.id==="workerTaskRetry"){const W=a.trim();if(!W){A("重新排队 Worker Task 需要任务 ID");return}await $("workerTaskRetry",{taskId:W,reason:G,...c.trim()?{featureId:c.trim()}:{}},{clientRequestId:le});return}if(Z.id==="interrupt"){const W=s.trim();if(!W){A("中止运行需要 DAG 运行 ID");return}if(G.trim().length<10||G.trim().length>500){A("中止原因去首尾空白后必须是 10–500 个字符,请手写说明,不要用占位句。");return}await py({runAction:$,isActionSuccess:P,setOpError:A,action:"dagRequestInterrupt",actionParams:{runId:W,reasonCode:b.trim()||"operator-request",reasonDetail:G},clientRequestId:le});return}if(Z.id==="reconcile"){const W=s.trim();if(!W){A("对账恢复需要 DAG 运行 ID");return}await py({runAction:$,isActionSuccess:P,setOpError:A,action:"dagReconcileRun",actionParams:{runId:W,reason:G,reconcileAction:"supersede"},clientRequestId:le});return}F(`${Z.label}:请经 CLI — ${Z.commandHint??""}`)},[s,c,o,h,g?.planHash,d,b,$,P,A,F,x,y,a]);return{handleRecoveryCta:ee,submitRecoveryConfirm:q}}function fO(e){const{shell:t,actions:n,wizard:a}=e,{nav:s,opError:o,opErrorCode:c,lastOpState:d,setOpError:m,setObserveBusy:h}=t,{taskId:g}=a,[b,x]=N.useState(""),[y,S]=N.useState(""),[E,M]=N.useState(""),[C,R]=N.useState(""),[A,H]=N.useState(!1),[F,D]=N.useState(null),[$,P]=N.useState(null),[ee,q]=N.useState(!1),[Z,G]=N.useState("operator-request"),[le,W]=N.useState(null),[U,z]=N.useState([]),[V,ne]=N.useState([]),[we,O]=N.useState(!1),[B,Y]=N.useState(!1),[_,ce]=N.useState(null),[he,ie]=N.useState(null),[ae,ge]=N.useState(null),[ve,Ie]=N.useState(!1),[He,Ee]=N.useState(!1),[nt,mt]=N.useState(null),[qt,Zt]=N.useState("idle"),[vn,Tn]=N.useState(null),[mn,Ht]=N.useState(null),[We,xt]=N.useState(!1),jt=N.useCallback(()=>b.trim()?`/inspect/#/dag/${encodeURIComponent(b.trim())}?from=recovery`:"/inspect/#/",[b]),Fe=N.useCallback(()=>{window.location.assign(jt())},[jt]),Kt=N.useCallback(async()=>{if(b.trim())return b.trim();const it=g.trim();if(!it)return m("打开 DAG 检视需要任务 ID 或 DAG 运行 ID"),null;h(!0),m(null);try{const{status:Ge,body:bt}=await Iu("observeLink",{taskId:it}),_t=bt.result??{};if(Ge>=400||bt.ok===!1)return m(bt.error?.message??"无法解析 DAG 画布地址"),Zt("unavailable"),Tn(bt.error?.message??null),null;const Lt=typeof _t.dagRunId=="string"?_t.dagRunId.trim():"";return Lt?(x(Lt),Zt("match"),Tn(null),Ht(`/inspect/#/dag/${encodeURIComponent(Lt)}`),Lt):(m("尚未找到该任务的 DAG 运行,请稍后再打开检视"),Zt("unavailable"),Tn(_t.message??"未解析到 DAG run"),null)}catch(Ge){return m(Ge instanceof Error?Ge.message:String(Ge)),null}finally{h(!1)}},[b,g,m,h]),fe=N.useCallback(async()=>{await Kt()&&xt(!0)},[Kt]),be=N.useCallback(async()=>{const it=await Kt();it&&window.location.assign(`/inspect/#/dag/${encodeURIComponent(it)}?from=recovery`)},[Kt]),Ue=N.useCallback(async()=>{O(!0);try{const it=g.trim(),Ge=new URLSearchParams;it&&Ge.set("taskId",it),Ge.set("limit","40");const bt=await fetch(`/api/operator/v1/recovery/candidates?${Ge.toString()}`,{credentials:"same-origin"});if(!bt.ok){z([]);return}const _t=await bt.json();z(Array.isArray(_t.runs)?_t.runs:[])}catch{z([])}finally{O(!1)}},[g]),Ze=N.useCallback(async it=>{const Ge=it.trim();if(!Ge){ne([]),ce(null),ie(null),ge(null);return}Y(!0);try{const bt=await fetch(`/api/dag-runs/${encodeURIComponent(Ge)}`,{credentials:"same-origin"});if(!bt.ok){ne([]),ce(null),ie(null);return}const _t=await bt.json(),Lt=typeof _t.effectiveStatus=="string"&&_t.effectiveStatus||typeof _t.status=="string"&&_t.status||null;ce(Lt);const Q=Array.isArray(_t.nodes)?_t.nodes:[],xe=k6(Q.map(oe=>{const Le=(oe.nodeId??oe.id??"").trim();return Le?{nodeId:Le,status:oe.status,label:oe.label??oe.name,errorPreview:oe.errorPreview}:null}).filter(oe=>oe!==null));ne(xe);const De=typeof _t.failureCategory=="string"&&_t.failureCategory||void 0,et=Q.find(oe=>typeof oe.failureCategory=="string"&&oe.failureCategory&&oe.failureCategory!=="success")?.failureCategory;ie(De??et??null),ge(_t.frontendRecovery??null)}catch{ne([]),ce(null),ie(null),ge(null)}finally{Y(!1)}},[]);N.useEffect(()=>{s==="recovery"&&Ue()},[s,g,Ue]),N.useEffect(()=>{if(s!=="recovery"||ve||U.length===0)return;const it=b.trim(),Ge=it?U.some(bt=>bt.dagRunId===it):!1;if(!it||!Ge){const bt=sO(U);bt&&bt!==it&&x(bt)}},[s,U,b,ve]),N.useEffect(()=>{s==="recovery"&&Ze(b)},[s,b,Ze]),N.useEffect(()=>{if(s!=="recovery")return;const it=b.trim();if(!it){W(null);return}let Ge=!1;const bt=async()=>{const{body:Lt}=await Iu("dagInterruptEligibility",{runId:it});if(Ge)return;const Q=Lt.result??Lt;W({eligible:Q.eligible===!0,ownerKind:Q.ownerKind,message:Q.message,interruptStatus:Q.interruptStatus,reasonCodes:Q.reasonCodes,targetOperationId:Q.targetOperationId,targetOperationState:Q.targetOperationState})};bt();const _t=window.setInterval(()=>{bt()},4e3);return()=>{Ge=!0,window.clearInterval(_t)}},[s,b]),N.useEffect(()=>{if(s!=="recovery"||He||V.length===0)return;const it=y.trim(),Ge=it?V.some(bt=>bt.nodeId===it):!1;if(!it||!Ge){const bt=lO(V);bt&&bt!==it&&S(bt)}},[s,V,y,He]);const Je=rO({operationState:_?null:d,errorCode:_?null:c,dagStatus:_,failureCategory:he}),It=N.useMemo(()=>{const it=w6(Je);return Je!=="running-active"||le?.eligible?it:it.filter(Ge=>Ge.id!=="interrupt")},[Je,le?.eligible]),nn=N.useMemo(()=>eO(It),[It]),At=N.useMemo(()=>nO(Je),[Je]),lt=N.useMemo(()=>V.find(it=>it.nodeId===y.trim()),[V,y]),cn=N.useRef(null);N.useEffect(()=>{$&&cn.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[$?.id]);const gt=N.useCallback(it=>uO({actionLabel:it,dagRunId:b.trim()||void 0,fromNodeId:y.trim()||void 0,runStatus:_,nodeStatus:lt?.status,nodeError:lt?.errorPreview,factClassLabel:y6[Je],errorMessage:o,errorCode:c}),[b,y,o,c,Je,_,lt?.errorPreview,lt?.status]);N.useEffect(()=>{if(s!=="recovery"||A&&!E6(C))return;const it=gt($?.label);it&&it!==C&&R(it)},[s,b,y,_,lt,Je,o,c,$?.label,A,C,gt]);const{handleRecoveryCta:Yn,submitRecoveryConfirm:yn}=dO({shell:t,actions:n,taskId:g,dagRunId:b,fromNodeId:y,featureId:E,recoveryReason:C,recoveryReasonTouched:A,recoveryConfirm:$,recoveryPlanSummary:F,interruptReasonCode:Z,setRecoveryConfirm:P,setRecoveryPlanSummary:D,setRecoveryReport:mt,setRecoveryReason:R,setRecoveryReasonTouched:H,buildCurrentRecoveryReason:gt,openFullCanvas:be});return N.useEffect(()=>{if(s!=="recovery"||!ee||!le?.eligible)return;const it=It.find(Ge=>Ge.id==="interrupt");it&&(P(it),R(gt(it.label)),H(!1),q(!1))},[s,ee,le?.eligible,It,gt]),{dagRunId:b,setDagRunId:x,fromNodeId:y,setFromNodeId:S,featureId:E,setFeatureId:M,recoveryReason:C,setRecoveryReason:R,recoveryReasonTouched:A,setRecoveryReasonTouched:H,recoveryPlanSummary:F,recoveryConfirm:$,setRecoveryConfirm:P,setRecoveryPlanSummary:D,recoveryRuns:U,recoveryNodes:V,recoveryRunsLoading:we,recoveryNodesLoading:B,recoveryRunStatus:_,recoveryFailureCategory:he,frontendRecovery:ae,manualRunId:ve,setManualRunId:Ie,manualNodeId:He,setManualNodeId:Ee,recoveryReport:nt,setRecoveryReport:mt,observeLinkStatus:qt,observeLinkMessage:vn,observeUrl:mn,inspectSplitOpen:We,setInspectSplitOpen:xt,inspectPath:jt,openFullInspect:Fe,resolveDagRunForInspect:Kt,openInspectSplit:fe,openFullCanvas:be,loadRecoveryRuns:Ue,loadRecoveryNodes:Ze,recoveryFact:Je,recoveryCtas:It,recoveryLanes:nn,recommendedCtaId:At,interruptIntent:ee,setInterruptIntent:q,interruptReasonCode:Z,setInterruptReasonCode:G,interruptEligibility:le,recoveryConfirmRef:cn,buildCurrentRecoveryReason:gt,handleRecoveryCta:Yn,submitRecoveryConfirm:yn}}function mO(e){const{shell:t,actions:n,prd:a}=e,{step:s,setStep:o,setOpMessage:c}=t,{runAction:d,isActionSuccess:m,summarizeEnvelope:h}=n,[g,b]=N.useState(""),[x,y]=N.useState(""),[S,E]=N.useState("standard"),[M,C]=N.useState(""),[R,A]=N.useState(""),[H,F]=N.useState(""),D=Nh.find(We=>We.kind===S)??Nh[0],[$,P]=N.useState(null),[ee,q]=N.useState(null),[Z,G]=N.useState(""),[le,W]=N.useState(null),[U,z]=N.useState(null),[V,ne]=N.useState(null),[we,O]=N.useState(null),[B,Y]=N.useState(null),[_,ce]=N.useState(!1),[he,ie]=N.useState(null),[ae,ge]=N.useState(null),ve=N.useRef(!1),Ie=N.useCallback(()=>{ne(null),O(null),Y(null),ce(!1),ie(null),ge(null),ve.current=!1},[]),He=N.useCallback(()=>{Ie(),o("contract")},[Ie,o]),Ee=N.useCallback(We=>{const xt=We.session;xt?.sessionId&&P(xt.sessionId);const jt=We.question;q(jt),W(We.summary??null);const Fe=We.assessmentId;typeof Fe=="string"&&Fe&&z(Fe),(We.complete===!0||typeof Fe=="string"&&Fe)&&(He(),c(We.skipped===!0?"已跳过访谈:已按推荐补齐草稿并签发评估":"访谈已完成:草稿已绑定完整评估结果"))},[He,c]),nt=N.useCallback(async(We=!1)=>{const xt=g.trim();if(!xt)return;const jt=`${xt}:${U??""}`;if(!(!We&&ae===jt&&V!==null)&&!ve.current){ve.current=!0,ne(null),O(null),Y(null),ie(null),ce(!1);try{const Fe=await d("contractValidate",{taskId:xt}),Kt=m(Fe);if(ne(Kt),O(h(Fe)),!Kt){ge(jt),c("契约校验未通过:请先修正草稿后再应用");return}const fe=await d("contractDiff",{taskId:xt});Y(h(fe)),ge(jt),c(m(fe)?"校验与差异已就绪:确认后可应用契约":"校验通过,但差异查询失败(仍可查看下方摘要)")}finally{ve.current=!1}}},[U,ae,V,m,d,c,h,g]),mt=N.useCallback(async()=>{const We=g.trim();if(!We||!U)return;const xt=await d("contractApply",{taskId:We,assessmentId:U},{clientRequestId:_u("apply")});if(!m(xt)){ce(!1);return}ce(!0);const jt=await d("spineCheck",{taskId:We});if(m(jt)){ie(!0),o("dag-confirm"),c("契约已应用并通过 Spine 审计,可生成并运行 DAG");return}ie(!1),c("契约已应用,但 Spine 审计未通过:可重试 Spine")},[U,m,d,c,o,g]),qt=N.useCallback(async()=>{const We=g.trim();if(!We)return;const xt=await d("spineCheck",{taskId:We});if(m(xt)){ie(!0),o("dag-confirm"),c("Spine 审计已通过,可生成并运行 DAG");return}ie(!1)},[m,d,c,o,g]),Zt=N.useCallback(async()=>{const We=n.confirmationId?.trim();if(!We)return;const xt=n.confirmationDetails?.confirmation?.humanGateToken,jt=await d("confirmDagConfirmation",{confirmationId:We,humanGateToken:xt});m(jt)&&(o("run"),await d("runDag",{confirmationId:We},{clientRequestId:_u("run")}))},[n.confirmationId,n.confirmationDetails,m,d,o]);N.useEffect(()=>{s==="contract"&&g.trim()&&nt(!1)},[s,g,U,nt]);const vn=N.useCallback(We=>We.split(/[\n,;,;]+/).map(xt=>xt.trim()).filter(Boolean),[]),Tn=N.useCallback(async()=>{const We=a.prdDocuments.length>0?GM(a.prdDocuments):void 0,xt=vn(M),jt=vn(R),Fe=vn(H),Kt={content:a.prdText,taskKind:S,...We?{documents:We}:{},...xt.length>0?{allowedPaths:xt}:{},...jt.length>0?{forbiddenPaths:jt}:{},...Fe.length>0?{verifyCommands:Fe}:{}};if(!VM("bootstrapFromPrd",Kt)){a.setPrdFileError(YM());return}const fe=await d("bootstrapFromPrd",Kt);if(!fe||fe.ok===!1)return;const be=fe.result??{};be.taskId&&b(be.taskId),be.title&&y(be.title);const Ue=be.parseStatus??"pending",Ze=be.draftPreview?.objective?.trim(),Je=Array.isArray(be.gaps)?be.gaps.length:0,It=be.semanticIntake?.applied?"semantic":be.semanticIntake?.code??"no-semantic",nn=(be.autoImportedReferences??[]).filter(lt=>lt.repoRelative),At=(be.unresolvedReferences??[]).filter(lt=>lt.token);c([`已创建任务「${be.title??""}」(${be.taskId??""})`,`来源:${be.identitySource??"prd"}`,`解析:${Ue}(${It})`,Ze?`目标:${Ze.slice(0,120)}`:null,Je>0?`缺口 ${Je} 项待确认`:null,nn.length>0?`已自动导入 ${nn.length} 个引用文档(${nn.map(lt=>`${lt.repoRelative}${lt.role?`:${lt.role}`:""}`).join("、")})`:null,At.length>0?`有 ${At.length} 个引用未能解析:${At.map(lt=>`${lt.token}(${lt.reason??"未知原因"})`).join("、")}`:null].filter(Boolean).join(" · ")),o("interview")},[M,R,a,d,c,o,vn,S,H]),mn=[{id:"setup",label:"就绪检查"},{id:"import-prd",label:"导入需求"},{id:"interview",label:"需求访谈(可跳过)"},{id:"contract",label:"契约落地"},{id:"dag-confirm",label:"确认 DAG"},{id:"run",label:"运行"}],Ht=mn.findIndex(We=>We.id===s);return{taskId:g,setTaskId:b,taskTitle:x,taskKind:S,setTaskKind:E,engineering:{allowedPathsText:M,forbiddenPathsText:R,verifyCommandsText:H},setEngineering:We=>{We.allowedPathsText!==void 0&&C(We.allowedPathsText),We.forbiddenPathsText!==void 0&&A(We.forbiddenPathsText),We.verifyCommandsText!==void 0&&F(We.verifyCommandsText)},workflowMeta:D,sessionId:$,question:ee,answerText:Z,setAnswerText:G,draftSummary:le,assessmentId:U,contractValidateOk:V,contractValidateSummary:we,contractDiffSummary:B,contractApplied:_,spineOk:he,applyInterviewPayload:Ee,runContractPreflight:nt,applyContractThenSpine:mt,retrySpineOnly:qt,confirmAndRunDag:Zt,importPrdAndCreate:Tn,wizardSteps:mn,stepIndex:Ht}}const hO={chat:"对话",tasks:"任务",recovery:"恢复",night:"夜间",models:"模型与认证",settings:"设置"};async function pO(e){return await import(e)}function gO(e){const t=e.repoName?.trim();if(t)return t;const n=(e.repoRoot??"").split(/[\\/]/).filter(Boolean);return n.length?n[n.length-1]:"repository"}function bO(e){const{nav:t,readiness:n,setupBlocked:a,degraded:s,health:o,inspectHref:c}=e,d=a||s?"models":"settings",m=a?"Pi SDK / 认证 / 模型未就绪。不提供纯表单兜底。点击前往模型与认证。":s?"Pi 暂时降级:仍可恢复草稿与需求访谈。点击查看详情。":"Pi 已就绪。点击打开设置查看详情。";return{mode:"operate",activeTabHref:`#/${t}`,operateHref:"/#/chat",inspectHref:c,freshness:!1,readinessState:n,readinessHref:`#/${d}`,readinessTitle:m,repo:o?{name:gO(o),fingerprint:o.repoFingerprint??"",version:o.packageVersion??"",product:o.productName??o.product??"",inspectReady:o.inspect?.ready}:null}}function vO(e){const t=N.useRef(null),n=N.useRef(null),[a,s]=N.useState(!1),o=N.useMemo(()=>bO(e),[e.nav,e.readiness,e.setupBlocked,e.degraded,e.health,e.inspectHref]),c=N.useRef(o);return c.current=o,N.useEffect(()=>{let d=!1;return pO("/inspect/operator-chrome.js").then(m=>{d||!t.current||(n.current=m.mountOperatorChrome(t.current,c.current))}).catch(()=>{d||s(!0)}),()=>{d=!0,n.current?.destroy(),n.current=null}},[]),N.useEffect(()=>{n.current?.update(o)},[o]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:t,"data-testid":"operator-chrome"}),a?f.jsxs("nav",{className:"operator-chrome-fallback","aria-label":"操作工作区",children:[f.jsx("button",{type:"button",onClick:()=>window.location.assign("/#/"),children:"Loop Agent"}),f.jsx("button",{type:"button",onClick:()=>window.location.assign(`#/${e.nav}`),children:hO[e.nav]}),f.jsx("button",{type:"button",onClick:()=>window.location.assign(e.inspectHref),children:"观测"}),f.jsx("span",{role:"status",children:"共享导航加载失败,请刷新页面"})]}):null]})}function yO(e){return f.jsxs(f.Fragment,{children:[e.opError?f.jsxs("div",{className:"flash flash-error","data-testid":"op-error",children:[f.jsx("span",{className:"flash-label",children:"错误"}),f.jsx("p",{className:"flash-body",children:e.opError})]}):null,e.opMessage?f.jsxs("div",{className:"flash flash-info","data-testid":"op-message",children:[f.jsx("span",{className:"flash-label",children:"状态"}),f.jsx("p",{className:"flash-body",children:e.opMessage})]}):null]})}const xO=[{key:"sdkAvailable",detailKey:"sdkMessage",label:"Pi SDK",hint:"Node 侧 Pi SDK 可加载"},{key:"authReady",detailKey:"authMessage",label:"认证凭据",hint:"Pi auth / provider 密钥已配置"},{key:"modelsAvailable",detailKey:"modelsMessage",label:"可用模型",hint:"harness.json executors.pi(LOW/MED/HIGH)可在 Pi 凭据面解析"},{key:"interviewSessionOk",detailKey:"sessionMessage",label:"访谈会话",hint:"Interview 会话预检通过"}];function wO(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()}function SO(e){const t=e.readinessReport?.state??e.readiness,n=e.readinessReport?.probe,a=n?.details??{},s=e.readinessReport?.blockedActions??[],o=wO(e.readinessReport?.generatedAt),c=e.readinessReport??{state:e.readiness,health:e.health};return f.jsxs("section",{className:"panel models-page","aria-labelledby":"models-title",children:[f.jsxs("div",{className:"models-header",children:[f.jsx("h2",{id:"models-title",children:"模型与认证"}),f.jsx("span",{className:"models-status-pill","data-state":t,"data-testid":"models-readiness-pill",children:b6[t]??t})]}),f.jsxs("p",{className:"panel-lead",children:["复用 Pi ModelRuntime 凭据平面;密钥不会回传到页面。请用"," ",f.jsx("code",{children:"pi"})," 或 Pi 认证存储完成配置,然后刷新就绪探测。"]}),f.jsxs("section",{className:"models-probe-card","aria-labelledby":"models-probe-title","data-testid":"readiness-details",children:[f.jsx("h3",{id:"models-probe-title",className:"models-subtitle",children:"就绪检查"}),f.jsx("ul",{className:"models-probe-list",children:xO.map(d=>{const m=n?.[d.key],h=a[d.detailKey],g=m===void 0;return f.jsxs("li",{className:`models-probe-item${g?" is-pending":m?" is-ok":" is-bad"}`,children:[f.jsx("span",{className:"models-probe-badge","aria-label":g?"未探测":m?"通过":"未通过",children:g?"—":m?"✓":"✕"}),f.jsxs("div",{className:"models-probe-body",children:[f.jsx("strong",{children:d.label}),f.jsx("span",{className:"muted",children:d.hint}),h?f.jsx("p",{className:"models-probe-detail",children:h}):null]})]},d.key)})})]}),t==="setup-required"?f.jsxs("div",{className:"models-setup-card","data-testid":"models-setup-hint",children:[f.jsx("h3",{className:"models-subtitle",children:"如何完成配置"}),f.jsxs("ol",{className:"models-setup-steps",children:[f.jsxs("li",{children:["在终端配置 Pi 认证(例如 ",f.jsx("code",{children:"pi auth login"}),")或写入 provider API key。"]}),f.jsxs("li",{children:["确认 agent 目录下 ",f.jsx("code",{children:"models.json"})," / 认证文件可读。"]}),f.jsx("li",{children:"点击下方「刷新就绪探测」,或运行诊断命令查看详情。"})]}),f.jsx("pre",{className:"cmd",children:g6})]}):null,t==="degraded"?f.jsx("p",{className:"models-degraded-note","data-testid":"models-degraded-note",children:"Pi 暂时降级:仍可恢复草稿与需求访谈;部分写入/运行类操作会被拦截。"}):null,s.length>0?f.jsxs("div",{className:"models-blocked-card",children:[f.jsx("h3",{className:"models-subtitle",children:"当前受限操作"}),f.jsx("ul",{className:"models-blocked-list",children:s.map(d=>f.jsx("li",{children:f.jsx("code",{children:d})},d))})]}):null,f.jsxs("div",{className:"models-actions",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:e.busy,onClick:e.onRefreshReadiness,children:"刷新就绪探测"}),o?f.jsxs("span",{className:"muted models-generated-at",children:["上次探测:",o]}):null]}),f.jsxs("details",{className:"models-raw-details",children:[f.jsx("summary",{children:"查看原始探测数据(调试)"}),f.jsx("pre",{className:"cmd models-raw-json",children:JSON.stringify(c,null,2)})]})]})}const kO=[{value:"requirements-changed",label:"需求已变更"},{value:"suspected-runaway",label:"疑似失控"},{value:"resource-protection",label:"保护资源"},{value:"operator-request",label:"操作者请求"},{value:"other",label:"其他"}];function gy(e){const{lane:t,cta:n,planSummary:a,reason:s,busy:o,confirmRef:c}=e;return!n||n.lane!==t?null:f.jsxs("div",{ref:c,className:"recovery-confirm","data-testid":"recovery-confirm",children:[f.jsxs("h3",{children:["待确认:",n.label]}),f.jsx("p",{className:"muted",children:n.id==="reconcile"?"破坏性对账需经浏览器 Human Gate 确认。请核对运行与原因后再点「确定」。":n.id==="interrupt"?"协作中止需经浏览器 Human Gate。原因已按当前运行预填,可改分类或编辑后再确定。提交只表示请求已登记,当前节点仍会跑完。":"核对上方运行 / 节点与恢复原因后直接执行;服务端会校验资格,不再走 Human Gate。"}),n.id==="interrupt"?f.jsxs("fieldset",{className:"recovery-reason-code","data-testid":"recovery-interrupt-reason-code",disabled:o,children:[f.jsx("legend",{children:"原因分类"}),f.jsx("div",{className:"recovery-reason-code-group",children:kO.map(d=>{const m=(e.reasonCode??"operator-request")===d.value;return f.jsxs("label",{className:m?"recovery-reason-code-option is-active":"recovery-reason-code-option",children:[f.jsx("input",{type:"radio",name:"recovery-interrupt-reason-code",value:d.value,checked:m,onChange:()=>e.onReasonCodeChange?.(d.value)}),d.label]},d.value)})})]}):null,a?f.jsxs("div",{className:"recovery-plan-summary",children:[f.jsxs("p",{className:"muted",children:["计划 eligible=",String(a.eligible??"—")," · 风险=",v6[a.risk??""]??a.risk??"—"]}),a.effectiveFromNodeId?f.jsxs("p",{className:"muted",children:["有效起点:",a.effectiveFromNodeId]}):null,a.estimatedExecution?f.jsxs("p",{className:"muted",children:["将执行 ",a.estimatedExecution.nodeCount??"?"," 个节点 / ",a.estimatedExecution.piCallCount??"?"," 次 Pi;预计避免"," ",a.estimatedExecution.avoidedNodeCount??"?"," 个节点"]}):null,a.planHash?f.jsxs("p",{className:"muted",children:["planHash: ",f.jsxs("code",{children:[a.planHash.slice(0,16),"…"]})]}):null]}):n.id==="dagRerun"?f.jsx("p",{className:"muted",children:"未加载计划摘要;点「确定」前将再次尝试资格检查。"}):null,f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:o||!s.trim(),"data-testid":"recovery-confirm-submit",onClick:e.onSubmit,children:"确定"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:o,"data-testid":"recovery-confirm-cancel",onClick:e.onCancel,children:"取消"})]})]})}function EO(e){const{shell:t,recovery:n,wizard:a}=e,{busy:s}=t,o=WM({interruptStatus:n.interruptEligibility?.interruptStatus,dagStatus:n.recoveryRunStatus,failureCategory:n.recoveryFailureCategory,targetOperationState:n.interruptEligibility?.targetOperationState}),c={planSummary:n.recoveryPlanSummary,reason:n.recoveryReason,reasonCode:n.interruptReasonCode,onReasonCodeChange:n.setInterruptReasonCode,busy:s,confirmRef:n.recoveryConfirmRef,onSubmit:()=>{n.submitRecoveryConfirm()},onCancel:()=>{n.setRecoveryConfirm(null),n.setRecoveryPlanSummary(null)}};return f.jsxs("section",{className:"panel","aria-labelledby":"recovery-title",children:[f.jsx("h2",{id:"recovery-title",children:"恢复"}),f.jsxs("p",{className:"muted",children:["事实分类:",y6[n.recoveryFact]," · 无 Cancel · 无「直接改代码」"]}),n.frontendRecovery?f.jsxs("div",{className:"muted","data-testid":"frontend-recovery-lineage",style:{marginBottom:"0.75rem"},children:[f.jsxs("div",{children:["前端恢复:outcome=",f.jsx("code",{children:n.frontendRecovery.outcome??"—"})," phase=",f.jsx("code",{children:n.frontendRecovery.phase??"—"})]}),f.jsxs("div",{children:["root ",f.jsx("code",{children:n.frontendRecovery.recoveryRootRunId??"—"}),n.frontendRecovery.parentRunId?` · parent ${n.frontendRecovery.parentRunId}`:"",n.frontendRecovery.childRunId?` · child ${n.frontendRecovery.childRunId}`:"",n.frontendRecovery.attemptIndex!==void 0?` · attempt ${n.frontendRecovery.attemptIndex}`:""]})]}):null,f.jsxs("ol",{className:"muted recovery-steps",children:[f.jsx("li",{children:"上方选 DAG 运行 / 节点,用「DAG 运行恢复」动作"}),f.jsx("li",{children:"Worker 持有的失败 run 用下方「Worker Task 重排队」;独立 DAG run 才用「完整重跑任务」"}),f.jsx("li",{children:"带 * 的动作:核对预填原因后点「确定」。重跑/重试直接执行;对账与中止运行走 Human Gate"})]}),o?f.jsxs("p",{className:"muted","data-testid":"recovery-interrupt-status",children:["中止进度:",o]}):null,n.recoveryFact==="running-active"&&n.interruptEligibility&&!n.interruptEligibility.eligible&&(!n.interruptEligibility.interruptStatus||n.interruptEligibility.interruptStatus==="none")?f.jsx("p",{className:"muted","data-testid":"recovery-interrupt-unavailable",children:n.interruptEligibility.ownerKind==="worker-managed"?"此运行不由当前 Console 持有,暂不支持协作中止。请用 Doctor / 报告查看。":n.interruptEligibility.message??"当前运行不具备协作中止资格。"}):null,f.jsxs("p",{className:"muted",children:[a.taskId.trim()?`按任务 ${a.taskId.trim()} 拉取候选。`:"未填任务 ID 时列出最近 DAG 运行。","Doctor 诊断可选,不是重跑前置。"," ",f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s||n.recoveryRunsLoading,"data-testid":"recovery-refresh-candidates",onClick:()=>{n.loadRecoveryRuns()},children:n.recoveryRunsLoading?"刷新中…":"刷新候选"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"DAG 运行 ID"}),!n.manualRunId&&n.recoveryRuns.length>0?f.jsxs("select",{"data-testid":"recovery-run-select",value:n.dagRunId,disabled:s||n.recoveryRunsLoading,onChange:d=>{n.setManualRunId(!1),n.setManualNodeId(!1),n.setFromNodeId(""),n.setDagRunId(d.target.value),n.recoveryReasonTouched||n.setRecoveryReasonTouched(!1)},children:[n.recoveryRuns.some(d=>d.dagRunId===n.dagRunId)?null:f.jsx("option",{value:n.dagRunId||"",children:n.dagRunId?`${n.dagRunId}(当前)`:"— 请选择 —"}),n.recoveryRuns.map(d=>f.jsx("option",{value:d.dagRunId,children:oO(d)},d.dagRunId))]}):f.jsx("input",{"data-testid":"recovery-run-input",value:n.dagRunId,disabled:s,onChange:d=>{n.setManualRunId(!0),n.setDagRunId(d.target.value.trim())},placeholder:"dag-run-id(子图/完整重跑)"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s,"data-testid":"recovery-run-manual-toggle",onClick:()=>{if(!n.manualRunId&&n.recoveryRuns.length>0){n.setManualRunId(!0);return}n.setManualRunId(!1),n.loadRecoveryRuns()},children:!n.manualRunId&&n.recoveryRuns.length>0?"手动输入运行 ID":"刷新并改用下拉"})]}),f.jsxs("label",{className:"field",children:[f.jsxs("span",{className:"muted",children:["起始节点 ID(从节点重跑)",n.recoveryNodesLoading?" · 加载节点…":""]}),!n.manualNodeId&&n.recoveryNodes.length>0?f.jsxs("select",{"data-testid":"recovery-node-select",value:n.fromNodeId,disabled:s||n.recoveryNodesLoading,onChange:d=>{n.setManualNodeId(!1),n.setFromNodeId(d.target.value)},children:[n.recoveryNodes.some(d=>d.nodeId===n.fromNodeId)?null:f.jsx("option",{value:n.fromNodeId||"",children:n.fromNodeId?`${n.fromNodeId}(当前)`:"— 请选择 —"}),n.recoveryNodes.map(d=>f.jsx("option",{value:d.nodeId,children:cO(d)},d.nodeId))]}):f.jsx("input",{"data-testid":"recovery-node-input",value:n.fromNodeId,disabled:s,onChange:d=>{n.setManualNodeId(!0),n.setFromNodeId(d.target.value.trim())},placeholder:"例如 review-verdict-recovery-pi"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s,"data-testid":"recovery-node-manual-toggle",onClick:()=>{if(!n.manualNodeId&&n.recoveryNodes.length>0){n.setManualNodeId(!0);return}n.setManualNodeId(!1),n.loadRecoveryNodes(n.dagRunId)},children:!n.manualNodeId&&n.recoveryNodes.length>0?"手动输入节点 ID":"刷新并改用下拉"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"恢复原因(已按 run/节点失败事实自动预填,可编辑)"}),f.jsx("textarea",{"data-testid":"recovery-reason",value:n.recoveryReason,disabled:s,rows:4,onChange:d=>{n.setRecoveryReasonTouched(!0),n.setRecoveryReason(d.target.value)},placeholder:"将自动预填 operator-recovery / run / from-node / detail"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s,"data-testid":"recovery-reason-refresh",onClick:()=>{n.setRecoveryReasonTouched(!1),n.setRecoveryReason(n.buildCurrentRecoveryReason(n.recoveryConfirm?.label))},children:"重新预填原因"})]}),f.jsxs("div",{className:"recovery-lane","data-testid":"recovery-lane-dag",children:[f.jsx("h3",{children:"DAG 运行恢复"}),f.jsx("p",{className:"muted",children:"针对 `.harness/dag-runs` 的 Agent DAG 运行。橙色为当前建议;带 * 需确认原因。"}),f.jsxs("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row-dag",children:[n.recoveryLanes.dag.map(d=>{const m=d.id===n.recommendedCtaId;return f.jsxs("button",{type:"button",className:m?"btn btn-primary":"btn btn-secondary",disabled:s,title:d.guide,"aria-pressed":n.recoveryConfirm?.id===d.id?!0:void 0,"data-testid":`recovery-cta-${d.id}`,"data-recommended":m?"true":void 0,onClick:()=>{n.handleRecoveryCta(d)},children:[d.label,d.requiresReason?" *":""]},d.id)}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!n.dagRunId.trim(),"data-testid":"recovery-dag-preview",title:"在本页侧栏预览,可关闭返回",onClick:()=>{if(!n.dagRunId.trim()){t.setOpError("侧栏预览需要先选择 DAG 运行 ID");return}n.setInspectSplitOpen(!0)},children:"侧栏预览"})]}),n.recoveryReport?f.jsxs("div",{className:"recovery-report","data-testid":"recovery-report",children:[f.jsxs("div",{className:"recovery-report-header",children:[f.jsx("h3",{children:"交接报告摘要"}),f.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"recovery-report-close",onClick:()=>n.setRecoveryReport(null),children:"关闭"})]}),f.jsxs("dl",{className:"recovery-report-facts",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"运行"}),f.jsx("dd",{children:f.jsx("code",{children:n.recoveryReport.runId})})]}),n.recoveryReport.title?f.jsxs("div",{children:[f.jsx("dt",{children:"标题"}),f.jsx("dd",{children:n.recoveryReport.title})]}):null,f.jsxs("div",{children:[f.jsx("dt",{children:"状态"}),f.jsx("dd",{children:n.recoveryReport.status??"—"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"失败分类"}),f.jsx("dd",{children:n.recoveryReport.category??"—"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"建议"}),f.jsx("dd",{children:n.recoveryReport.recommendation??"暂无结构化建议"})]})]}),f.jsxs("p",{className:"muted",children:["完整 Markdown 可用 CLI:",f.jsxs("code",{children:["loop-agent dag report --run-id"," ",n.recoveryReport.runId," --markdown"]})]})]}):null,f.jsx(gy,{lane:"dag",cta:n.recoveryConfirm,...c})]}),f.jsxs("div",{className:"recovery-lane","data-testid":"recovery-lane-worker",children:[f.jsx("h3",{children:"Worker Task 重排队"}),f.jsx("p",{className:"muted",children:"针对 agent-worker Task Pool,不是 DAG run。需要 Task ID;Feature ID 可选。"}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"Task ID(Worker 重排队必填)"}),f.jsx("input",{"data-testid":"recovery-worker-task-id",value:a.taskId,disabled:s,onChange:d=>a.setTaskId(d.target.value.trim()),placeholder:"harness / worker task-id"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"Feature ID(可选)"}),f.jsx("input",{"data-testid":"recovery-feature-id",value:n.featureId,disabled:s,onChange:d=>n.setFeatureId(d.target.value.trim()),placeholder:"feature-id"})]}),f.jsx("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row-worker",children:n.recoveryLanes.worker.length>0?n.recoveryLanes.worker.map(d=>f.jsxs("button",{type:"button",className:d.id===n.recommendedCtaId?"btn btn-primary":"btn btn-secondary",disabled:s,title:d.guide,"data-testid":`recovery-cta-${d.id}`,"data-recommended":d.id===n.recommendedCtaId?"true":void 0,onClick:()=>{n.handleRecoveryCta(d)},children:[d.label,d.requiresReason?" *":""]},d.id)):f.jsx("p",{className:"muted","data-testid":"recovery-worker-unavailable",children:"当前事实分类下不提供 Worker 重排队。"})}),f.jsx(gy,{lane:"worker",cta:n.recoveryConfirm,...c})]}),f.jsx("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row",hidden:!0,children:n.recoveryCtas.map(d=>f.jsx("span",{children:d.id},d.id))}),n.observeLinkMessage?f.jsxs("p",{className:"muted",children:["[",CM[n.observeLinkStatus],"]"," ",n.observeLinkMessage]}):null,n.observeUrl?f.jsx("p",{className:"muted",children:f.jsx("a",{className:"external-link",href:n.observeUrl,children:n.observeUrl})}):null]})}function TO(e){const{health:t,readiness:n,healthError:a,layers:s,setupBlocked:o,degraded:c}=e;return f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"panel","aria-labelledby":"settings-title",children:[f.jsx("h2",{id:"settings-title",children:"设置"}),f.jsxs("dl",{className:"kv",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"产品"}),f.jsx("dd",{children:t?.productName??"Loop Operator Console"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"仓库根目录"}),f.jsx("dd",{children:f.jsx("code",{children:t?.repoRoot??"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"仓库指纹"}),f.jsx("dd",{children:f.jsx("code",{title:t?.repoFingerprint??void 0,children:t?.repoFingerprint?`${t.repoFingerprint.slice(0,12)}…`:"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Pi 就绪"}),f.jsxs("dd",{children:[f.jsxs("code",{children:[b6[n]??n,"(",n,")"]}),o?f.jsx("p",{className:"muted",children:"Pi SDK / 认证 / 模型未就绪。不提供纯表单兜底。请前往「模型与认证」。"}):c?f.jsx("p",{className:"muted",children:"Pi 暂时降级:仍可恢复草稿与需求访谈。"}):null]})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Inspect"}),f.jsxs("dd",{children:[f.jsx("code",{children:"/inspect/"}),"(同一 Console 进程)"]})]})]}),a?f.jsx("p",{className:"error",children:a}):null]}),f.jsxs("section",{className:"panel","aria-labelledby":"layers-title",children:[f.jsx("h2",{id:"layers-title",children:"完成语义分层"}),f.jsx("p",{className:"muted",children:"MVP 不执行收尾提交;不显示「任务已关闭/已交付」。"}),f.jsxs("dl",{className:"kv","data-testid":"completion-layers",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"命令"}),f.jsx("dd",{children:su(s.command)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"DAG 生命周期"}),f.jsx("dd",{children:su(s.dag)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"最终验证"}),f.jsx("dd",{children:su(s.verification)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"晋升"}),f.jsx("dd",{children:su(s.promote)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"任务关闭"}),f.jsx("dd",{children:"不可用(MVP)"})]})]})]})]})}function NO(e){const{busy:t,degraded:n,taskId:a,assessmentId:s,contractValidateOk:o,contractValidateSummary:c,contractDiffSummary:d,contractApplied:m,spineOk:h,onRerunPreflight:g,onApplyContract:b,onRetrySpine:x}=e;return f.jsxs("div",{"data-testid":"panel-contract",children:[f.jsx("h3",{children:"契约落地"}),f.jsx("p",{className:"muted",children:"进入本步后自动跑确定性校验与差异(非 AI 代判)。写入仓库仍需你人工确认一次;应用成功后会自动跑 Spine 审计。"}),f.jsxs("p",{className:"muted",children:["评估 ID: ",f.jsx("code",{children:s??"—"})]}),f.jsxs("div",{className:"contract-checks",children:[f.jsxs("p",{children:[f.jsx("strong",{children:"校验"}),":"," ",o===null?t?"进行中…":"等待开始":o?"通过":"未通过"]}),c?f.jsx("pre",{className:"cmd","data-testid":"contract-validate-summary",children:c}):null,f.jsxs("p",{children:[f.jsx("strong",{children:"差异"}),d?"":":尚未拉取"]}),d?f.jsx("pre",{className:"cmd","data-testid":"contract-diff-summary",children:d}):null,m?f.jsxs("p",{children:[f.jsx("strong",{children:"Spine"}),":"," ",h===null?"待检查":h?"通过":"未通过"]}):null]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:t||!a.trim(),onClick:g,children:"重新校验"}),f.jsx("button",{type:"button",className:"btn btn-primary","data-testid":"contract-apply",disabled:t||n||!s||o!==!0||m,onClick:b,children:"确认并应用契约"}),m&&h===!1?f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:x,children:"重试 Spine"}):null]})]})}function CO(e){const{busy:t,taskId:n,confirmationId:a,confirmationDetails:s,runAction:o,onConfirmAndRun:c}=e;return f.jsxs("div",{"data-testid":"panel-dag-confirm",children:[f.jsx("h3",{children:"DAG 确认(§5.5)"}),f.jsxs("ul",{className:"checklist",children:[f.jsx("li",{children:"源绑定(source)"}),f.jsx("li",{children:"Writer 写集范围(writer-scope)"}),f.jsx("li",{children:"验证命令(verification)"}),f.jsx("li",{children:"人工门禁(human-gates)"})]}),s?f.jsx("pre",{className:"cmd",children:JSON.stringify(s,null,2).slice(0,4e3)}):null,f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:()=>{o("prepareDagConfirmation",{taskId:n,dagHandle:`${n}.dag.json`,profile:"auto"})},children:"生成 DAG 并准备确认"}),f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!a,onClick:c,children:"开始运行"})]}),a?f.jsxs("p",{className:"muted",children:["确认 ID: ",f.jsx("code",{children:a})]}):null]})}function AO(e){const{busy:t,taskKind:n,onTaskKindChange:a,workflowHint:s,prd:o,engineering:c,onEngineeringChange:d,onImport:m}=e,h=t||o.prdFileReading;return f.jsxs("div",{"data-testid":"panel-import-prd",children:[f.jsx("h3",{children:"导入需求"}),f.jsx("p",{className:"muted",children:"粘贴、选择或拖入一份或多份 PRD / 需求 Markdown。多文件会分别归档到 source/references,并合成一份可编辑正文。创建前可继续编辑。 系统会对 PRD 做确定性/语义结构化;工程边界(路径与验证)须人类确认,不会由模型编造。"}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"流程类型"}),f.jsx("select",{"data-testid":"workflow-kind-select",value:n,disabled:t||o.prdFileReading,onChange:g=>a(g.target.value),children:Nh.map(g=>f.jsx("option",{value:g.kind,children:g.label},g.kind))})]}),f.jsxs("p",{className:"workflow-hint","data-testid":"workflow-kind-hint",children:[s," · taskKind=",f.jsx("code",{children:n})]}),f.jsxs("div",{className:`prd-drop-zone${o.prdDragOver?" is-dragover":""}`,"data-testid":"prd-drop-zone","data-dragover":o.prdDragOver?"true":"false",onDragEnter:g=>o.onDragEnter(g,h),onDragOver:g=>{g.preventDefault(),g.stopPropagation()},onDragLeave:o.onDragLeave,onDrop:g=>o.onDrop(g,h),children:[f.jsxs("div",{className:"prd-upload-toolbar",children:[f.jsxs("label",{className:`btn btn-ghost prd-upload-btn${h?" is-disabled":""}`,children:["选择需求文档",f.jsx("input",{type:"file",accept:jM,multiple:!0,hidden:!0,disabled:h,"data-testid":"prd-file-input",onChange:g=>{const b=g.currentTarget;o.loadPrdFromFiles(b.files).finally(()=>{b.value=""})}})]}),f.jsxs("span",{className:"muted prd-upload-hint",children:["支持多文件 .md / .markdown / .txt,单文件最大"," ",Ah(Ch),",最多 ",Mu," 个"]}),o.prdDocuments.length>0?f.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"prd-recompose",disabled:h,onClick:o.recomposeDocuments,children:"按文件重新合成"}):null]}),o.prdDocuments.length>0?f.jsx("ul",{className:"prd-file-list","data-testid":"prd-file-list",children:o.prdDocuments.map((g,b)=>f.jsxs("li",{className:b===o.prdPrimaryIndex?"is-primary":void 0,"data-testid":`prd-file-item-${b}`,children:[f.jsxs("span",{className:"prd-file-item-name",children:[g.fileName,b===o.prdPrimaryIndex?f.jsx("span",{className:"prd-file-primary-tag",children:"主"}):null,f.jsxs("span",{className:"muted",children:[" ","· ",Ah(g.sourceBytes)]})]}),f.jsxs("span",{className:"prd-file-item-actions",children:[f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===o.prdPrimaryIndex,onClick:()=>o.setPrimaryDocument(b),children:"设为主"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===0,onClick:()=>o.moveDocument(b,-1),children:"上移"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===o.prdDocuments.length-1,onClick:()=>o.moveDocument(b,1),children:"下移"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h,onClick:()=>o.removeDocument(b),children:"移除"})]})]},`${g.fileName}-${b}`))}):null,o.prdDocuments.length>0?f.jsxs("div",{className:"prd-file-meta",children:[f.jsxs("span",{children:["分卷=上传原件(将分别归档);正文=本会话采用稿",o.prdComposedDirty?"(已手动编辑)":""]}),f.jsx("button",{type:"button",className:"btn btn-ghost prd-file-clear","data-testid":"prd-file-clear",disabled:h,onClick:o.clearDocuments,children:"清除来源列表"})]}):null,o.prdDragOver?f.jsx("p",{className:"prd-drop-hint","data-testid":"prd-drop-hint",children:"释放以载入"}):null,f.jsxs("label",{className:"field prd-text-field",children:[f.jsx("span",{className:"muted",children:"PRD Markdown"}),f.jsx("textarea",{rows:10,value:o.prdText,disabled:h,"data-testid":"prd-textarea",onChange:g=>o.onPrdTextChange(g.target.value)})]})]}),o.prdFileError?f.jsx("p",{className:"prd-file-error",role:"alert","aria-live":"polite","data-testid":"prd-file-error",children:o.prdFileError}):null,f.jsxs("details",{className:"engineering-boundary","data-testid":"engineering-boundary",children:[f.jsx("summary",{children:"工程边界(可选,人类确认)"}),f.jsxs("p",{className:"muted",children:["逗号或换行分隔。留空则 intake 后进入访谈补齐;不会自动填",f.jsx("code",{children:"src/worker/console/**"})," 模板。"]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"allowedPaths"}),f.jsx("textarea",{rows:2,value:c.allowedPathsText,disabled:h,"data-testid":"prd-allowed-paths",placeholder:"src/**, test/**",onChange:g=>d({allowedPathsText:g.target.value})})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"forbiddenPaths"}),f.jsx("textarea",{rows:2,value:c.forbiddenPathsText,disabled:h,"data-testid":"prd-forbidden-paths",placeholder:".harness/**, node_modules/**",onChange:g=>d({forbiddenPathsText:g.target.value})})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"verifyCommands(label:command 或纯命令)"}),f.jsx("textarea",{rows:2,value:c.verifyCommandsText,disabled:h,"data-testid":"prd-verify-commands",placeholder:"typecheck:npm run typecheck",onChange:g=>d({verifyCommandsText:g.target.value})})]})]}),f.jsx("div",{className:"cta-row",children:f.jsxs("button",{type:"button",className:`btn btn-primary${t?" is-loading":""}`,disabled:t||o.prdFileReading||!o.prdText.trim(),"aria-busy":t||void 0,onClick:m,children:[t?f.jsx("span",{className:"spinner","aria-hidden":"true"}):null,t?"导入中…":"导入并创建任务"]})})]})}function RO(e){const{busy:t,taskId:n,taskTitle:a,taskKind:s,sessionId:o,question:c,answerText:d,onAnswerTextChange:m,draftSummary:h,assessmentId:g,runAction:b}=e;return f.jsxs("div",{"data-testid":"panel-interview",children:[f.jsx("h3",{children:"需求访谈(grill-me)"}),f.jsx("p",{className:"muted",children:"一次一问;也可跳过:系统会按推荐补齐草稿并签发评估,随后进入校验。 访谈中不可应用契约 / 运行 DAG / 对账。"}),h?f.jsx("pre",{className:"cmd","data-testid":"draft-summary",children:JSON.stringify(h,null,2)}):null,f.jsxs("div",{className:"cta-row",style:{marginBottom:"0.75rem"},children:[!o||!c?f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!n.trim(),onClick:()=>{b("interviewStart",{taskId:n,title:a,taskKind:s})},children:"开始 / 继续访谈"}):null,f.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"interview-skip",disabled:t||!n.trim(),onClick:()=>{b("interviewSkip",{taskId:n,title:a,taskKind:s})},children:"跳过访谈"})]}),o&&c?f.jsxs("div",{className:"interview-card",children:[f.jsxs("p",{className:"interview-q",children:[f.jsx("strong",{children:c.id})," · 风险=",v6[c.risk??""]??c.risk??"—"]}),f.jsx("p",{children:c.text}),c.recommendation?f.jsxs("p",{className:"muted",children:["推荐:",c.recommendation]}):null,f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"你的回答(覆盖推荐)"}),f.jsx("textarea",{rows:3,value:d,disabled:t,onChange:x=>m(x.target.value)})]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:()=>{b("interviewTurn",{sessionId:o,questionId:c.id,response:"accept-recommendation"}).then(()=>m(""))},children:"接受推荐"}),f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!d.trim(),onClick:()=>{b("interviewTurn",{sessionId:o,questionId:c.id,response:"override",text:d}).then(()=>m(""))},children:"提交自定义回答"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:t||c.risk==="high",onClick:()=>{b("interviewTurn",{sessionId:o,questionId:c.id,response:"defer",text:d||c.recommendation}).then(()=>m(""))},children:"暂缓(非高风险)"})]})]}):null,g?f.jsxs("p",{className:"muted",children:["评估 ID: ",f.jsx("code",{children:g})]}):null]})}function _O(e){const{busy:t,confirmationId:n,operationId:a,dagRunId:s,taskId:o,observeBusy:c,sseLog:d,runAction:m,onStopFollow:h,onShowInspectSplit:g,onOpenInspectSplit:b}=e;return f.jsxs("div",{"data-testid":"panel-run",children:[f.jsx("h3",{children:"运行详情"}),f.jsxs("div",{className:"meta-row",children:[f.jsxs("div",{children:["操作 ID: ",f.jsx("code",{children:a??"—"})]}),f.jsxs("div",{children:["确认 ID: ",f.jsx("code",{children:n??"—"})]})]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!n,onClick:()=>{m("runDag",{confirmationId:n},{clientRequestId:_u("run")})},children:"重新运行"}),f.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:"停止跟随日志"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!s.trim(),onClick:g,children:"打开检视"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:c||!s.trim()&&!o.trim(),title:"在本页侧栏预览,可关闭返回",onClick:b,children:"侧栏预览"})]}),f.jsx("pre",{className:"cmd","data-testid":"sse-log",children:d.join(`
325
- `)||"(尚无事件)"})]})}function IO(e){const{shell:t,actions:n,wizard:a,prd:s,recovery:o}=e,{busy:c,step:d,setupBlocked:m,degraded:h}=t;return f.jsxs("section",{className:"panel task-ops","aria-labelledby":"task-ops-title",children:[f.jsx("h2",{id:"task-ops-title",children:"任务操作"}),f.jsx("p",{className:"panel-lead",children:"按 Happy Path 推进;契约落地一步内自动校验,人工确认写入。"}),f.jsx("ol",{className:"wizard-steps","data-testid":"wizard-steps",children:a.wizardSteps.map((g,b)=>f.jsxs("li",{"data-active":d===g.id,"data-done":b<a.stepIndex,children:[f.jsx("span",{className:"step-index",children:String(b+1).padStart(2,"0")}),f.jsx("span",{className:"step-label",children:g.label})]},g.id))}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"任务 ID"}),f.jsx("input",{"data-testid":"task-id-input",value:a.taskId,disabled:c||m||d==="import-prd",placeholder:d==="import-prd"?"导入需求后自动生成":"task-id",onChange:g=>a.setTaskId(g.target.value.trim())})]}),a.taskTitle?f.jsxs("p",{className:"workflow-hint","data-testid":"task-title-chip",children:["任务名称:",a.taskTitle]}):null,d!=="import-prd"&&!m?f.jsxs("p",{className:"workflow-hint","data-testid":"workflow-kind-chip",children:["当前流程:",a.workflowMeta.label," ·"," ",f.jsx("code",{children:a.taskKind})]}):null,m||d==="setup"?f.jsxs("div",{className:"empty-state","data-testid":"setup-gate",children:[f.jsx("p",{className:"empty-title",children:"需要先完成设置"}),f.jsx("p",{className:"muted",children:"请先在「模型与认证」完成 Pi 就绪,再导入需求与访谈。"}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:c,onClick:()=>{t.selectNav("models"),n.runAction("refreshReadiness",{}).then(()=>t.loadHealth())},children:"刷新就绪状态"}),f.jsx("button",{type:"button",className:"btn btn-primary",disabled:c,onClick:()=>{n.runAction("doctor",{})},children:"运行诊断"}),f.jsx("pre",{className:"cmd",children:g6})]})]}):f.jsxs("div",{className:"wizard-body","data-testid":"wizard-body",children:[d==="import-prd"&&f.jsx(AO,{busy:c,taskKind:a.taskKind,onTaskKindChange:a.setTaskKind,workflowHint:a.workflowMeta.hint,prd:s,engineering:a.engineering,onEngineeringChange:a.setEngineering,onImport:()=>{a.importPrdAndCreate()}}),d==="interview"&&f.jsx(RO,{busy:c,taskId:a.taskId,taskTitle:a.taskTitle,taskKind:a.taskKind,sessionId:a.sessionId,question:a.question,answerText:a.answerText,onAnswerTextChange:a.setAnswerText,draftSummary:a.draftSummary,assessmentId:a.assessmentId,runAction:n.runAction}),d==="contract"&&f.jsx(NO,{busy:c,degraded:h,taskId:a.taskId,assessmentId:a.assessmentId,contractValidateOk:a.contractValidateOk,contractValidateSummary:a.contractValidateSummary,contractDiffSummary:a.contractDiffSummary,contractApplied:a.contractApplied,spineOk:a.spineOk,onRerunPreflight:()=>{a.runContractPreflight(!0)},onApplyContract:()=>{a.applyContractThenSpine()},onRetrySpine:()=>{a.retrySpineOnly()}}),d==="dag-confirm"&&f.jsx(CO,{busy:c,taskId:a.taskId,confirmationId:n.confirmationId,confirmationDetails:n.confirmationDetails,runAction:n.runAction,onConfirmAndRun:()=>{a.confirmAndRunDag()}}),d==="run"&&f.jsx(_O,{busy:c,confirmationId:n.confirmationId,operationId:n.operationId,dagRunId:o.dagRunId,taskId:a.taskId,observeBusy:t.observeBusy,sseLog:n.sseLog,runAction:n.runAction,onStopFollow:n.stopFollowSse,onShowInspectSplit:()=>o.setInspectSplitOpen(!0),onOpenInspectSplit:()=>{o.openInspectSplit()}})]})]})}const MO={};function OO(){const e=IM(),t=N.useRef(()=>{}),n=N.useCallback(g=>t.current(g),[]),a=OM({shell:e,applyInterviewPayload:n}),s=XM(),o=mO({shell:e,actions:a,prd:s}),c=fO({shell:e,actions:a,wizard:o});N.useEffect(()=>{t.current=o.applyInterviewPayload}),N.useEffect(()=>{e.loadHealth()},[e.loadHealth]);const d=N.useCallback((g,b={})=>{e.selectNav(g),b.taskId&&o.setTaskId(b.taskId),b.dagRunId&&c.setDagRunId(b.dagRunId),b.fromNodeId&&c.setFromNodeId(b.fromNodeId),b.featureId&&c.setFeatureId(b.featureId),c.setInterruptIntent(b.intent==="interrupt");const x=Py(g,b);window.location.hash.replace(/^#/,"")!==x&&(window.location.hash=x)},[e.selectNav,o.setTaskId,c.setDagRunId,c.setFromNodeId,c.setFeatureId,c.setInterruptIntent]),m=N.useCallback(()=>{const g=Sw(window.location);if(g){d(g.workspace,g);return}const b=Fy({env:MO?.VITE_OPERATOR_CHAT_DEFAULT_LANDING,storage:window.localStorage,location:window.location});d(b,{})},[d]);N.useEffect(()=>(m(),window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const h=e.nav==="recovery"&&c.dagRunId.trim()?`/inspect/#/dag/${encodeURIComponent(c.dagRunId.trim())}?from=recovery`:"/inspect/#/";return f.jsx(f.Fragment,{children:f.jsxs("div",{className:`console-app${e.nav==="chat"?" is-chat-focus":""}`,children:[f.jsx(vO,{nav:e.nav,readiness:e.readiness,setupBlocked:e.setupBlocked,degraded:e.degraded,health:e.health,inspectHref:h}),f.jsxs("div",{className:`console-shell${e.nav==="chat"?" is-chat-focus":""}`,children:[f.jsx(yO,{opError:e.opError,opMessage:e.opMessage}),f.jsxs("main",{className:`console-main${e.nav==="chat"?" console-main--fill":""}`,children:[e.nav==="tasks"?f.jsx(IO,{shell:e,actions:a,wizard:o,prd:s,recovery:c}):null,e.nav==="recovery"?f.jsx(EO,{shell:e,recovery:c,wizard:o}):null,e.nav==="night"?f.jsx(Qx,{busy:e.busy,runAction:a.runAction,isActionSuccess:a.isActionSuccess,setOpError:e.setOpError}):null,e.nav==="models"?f.jsx(SO,{busy:e.busy,readiness:e.readiness,readinessReport:e.readinessReport,health:e.health,onRefreshReadiness:()=>{a.runAction("refreshReadiness",{}).then(()=>e.loadHealth())}}):null,e.nav==="chat"?f.jsxs("section",{className:"panel panel--chat","aria-labelledby":"chat-title",children:[f.jsx("h2",{id:"chat-title",className:"sr-only",children:"对话"}),f.jsx(TM,{origin:"",readiness:e.readiness,surface:"workspace",onNavigateWorkspace:d})]}):null,e.nav==="settings"?f.jsx(TO,{health:e.health,readiness:e.readiness,healthError:e.healthError,layers:e.layers,setupBlocked:e.setupBlocked,degraded:e.degraded}):null]}),c.inspectSplitOpen&&c.dagRunId.trim()?f.jsx(Bx,{dagRunId:c.dagRunId.trim(),nodeId:c.fromNodeId.trim()||void 0,onClose:()=>c.setInspectSplitOpen(!1),onOpenFull:c.openFullInspect}):null]})]})})}const T6=document.getElementById("root");if(!T6)throw new Error("Loop Operator Console: #root missing");Lx.createRoot(T6).render(f.jsx(N.StrictMode,{children:f.jsx(OO,{})}));export{zw as _,Ou as g,DO as k};