@co0ontty/wand 4.57.0 → 4.58.0
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.
- package/dist/build-info.json +3 -3
- package/dist/ensure-node-pty-helper.d.ts +0 -1
- package/dist/ensure-node-pty-helper.js +0 -5
- package/dist/git-quick-commit.js +18 -19
- package/dist/github-connector.d.ts +11 -5
- package/dist/github-connector.js +105 -33
- package/dist/missions.d.ts +1 -1
- package/dist/missions.js +17 -4
- package/dist/server-file-routes.js +43 -2
- package/dist/server-github-routes.js +50 -53
- package/dist/server-mission-routes.js +11 -10
- package/dist/server-task-routes.d.ts +14 -2
- package/dist/server-task-routes.js +248 -84
- package/dist/server-workspace-routes.js +90 -16
- package/dist/server.js +2 -20
- package/dist/storage.d.ts +23 -6
- package/dist/storage.js +130 -53
- package/dist/structured-exec-host.d.ts +13 -2
- package/dist/structured-exec-host.js +71 -36
- package/dist/structured-exec-pump.d.ts +1 -1
- package/dist/structured-exec-pump.js +14 -8
- package/dist/task-types.d.ts +15 -0
- package/dist/terminal-daemon-client.d.ts +2 -0
- package/dist/terminal-daemon-client.js +7 -1
- package/dist/terminal-daemon-server.js +17 -18
- package/dist/tui/ipc-server.js +3 -1
- package/dist/types.d.ts +1 -0
- package/dist/wand-task-sync.d.ts +9 -0
- package/dist/wand-task-sync.js +50 -0
- package/dist/web-ui/content/scripts.js +85 -85
- package/dist/web-ui/content/styles.css +1 -1
- package/dist/web-ui/embedded-assets.js +2 -2
- package/dist/ws-broadcast.js +5 -1
- package/package.json +2 -3
- package/dist/taskboard-bridge.d.ts +0 -11
- package/dist/taskboard-bridge.js +0 -371
- package/vendor/codex-taskboard/LICENSE +0 -201
- package/vendor/codex-taskboard/dist/web/assets/AiChat-BNn4VJ5a.js +0 -12
- package/vendor/codex-taskboard/dist/web/assets/GanttView-D8wnfGrG.css +0 -1
- package/vendor/codex-taskboard/dist/web/assets/GanttView-rGWhuEX9.js +0 -39
- package/vendor/codex-taskboard/dist/web/assets/abnfDiagram-N423BO3Z-DbFG6lbA.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/arc-BjSQqbzd.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/architecture-TIHT7OUA-C9-t8p4o.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/architectureDiagram-T3A2C74G-Db4kJZwO.js +0 -36
- package/vendor/codex-taskboard/dist/web/assets/array-BifhSqXX.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/blockDiagram-VBNYF7ZC-C-BywuWV.js +0 -132
- package/vendor/codex-taskboard/dist/web/assets/c4Diagram-5PPSVZJV-Dq-80rjP.js +0 -10
- package/vendor/codex-taskboard/dist/web/assets/channel-C7mnz8Xc.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-2GRJ4B5K-B2G57us9.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-2Q5K7J3B-C1jixKkw.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-3NCLNEKW-DVGIRib_.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-4I5QYGJK-kNoGFqr0.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-5RXB4S5H-4iv6-xM6.js +0 -231
- package/vendor/codex-taskboard/dist/web/assets/chunk-5VM5RSS4-ZNzvKenW.js +0 -15
- package/vendor/codex-taskboard/dist/web/assets/chunk-6Q2QTUOP-1J34vxHr.js +0 -88
- package/vendor/codex-taskboard/dist/web/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-7Z6QIM7H-CDQpQlxX.js +0 -10
- package/vendor/codex-taskboard/dist/web/assets/chunk-GF5L2VYU-Dg92oHHl.js +0 -206
- package/vendor/codex-taskboard/dist/web/assets/chunk-I66GZJ75-Bk8_gFs2.js +0 -125
- package/vendor/codex-taskboard/dist/web/assets/chunk-J7OUQ5F2-CJRcenlr.js +0 -2
- package/vendor/codex-taskboard/dist/web/assets/chunk-JQJVKLGR-BLBV_Sus.js +0 -156
- package/vendor/codex-taskboard/dist/web/assets/chunk-JWPE2WC7-DVXcaiue.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-KBJHAD2P-Da9Yjz0p.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-KEIR6QF5-Dj-OpFgW.js +0 -161
- package/vendor/codex-taskboard/dist/web/assets/chunk-NSK5VX7P-Cb56tnGK.js +0 -2
- package/vendor/codex-taskboard/dist/web/assets/chunk-QR6OTTB3-BwoszTxn.js +0 -62
- package/vendor/codex-taskboard/dist/web/assets/chunk-RYQCIY6F-D_L2RdcQ.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-UBXNYLIW-YX5mN8cl.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-W5SLKNZC-DlOLhhDO.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-WRU74C26-B7SBmP0K.js +0 -70
- package/vendor/codex-taskboard/dist/web/assets/chunk-XXDRQBXY-BuE3VzE_.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/chunk-ZIRB5QZD-C6fEPe3t.js +0 -32
- package/vendor/codex-taskboard/dist/web/assets/classDiagram-JCYQIIEL-KIdCVvbA.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/classDiagram-v2-OCEON4UE-KIdCVvbA.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/cose-bilkent-JH36ORCC-BzQvy5TC.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/cynefin-VYW2F7L2-D1_5O1XR.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/cynefinDiagram-MW4NZA55-DOW_U5QN.js +0 -62
- package/vendor/codex-taskboard/dist/web/assets/cytoscape.esm-DnGd5Fuo.js +0 -321
- package/vendor/codex-taskboard/dist/web/assets/dagre-VZM6K2ZE-0Dntc3NT.js +0 -4
- package/vendor/codex-taskboard/dist/web/assets/dagre-dpRSp0QF.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/defaultLocale-C8Fc0cco.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/diagram-7IWD3JNH-D7GleYAM.js +0 -30
- package/vendor/codex-taskboard/dist/web/assets/diagram-B4RE2ZJO-DCXTe6q5.js +0 -3
- package/vendor/codex-taskboard/dist/web/assets/diagram-LBJQPF4R-ZFJyXEXl.js +0 -24
- package/vendor/codex-taskboard/dist/web/assets/diagram-Q27KOJAE-DUGCuGd9.js +0 -24
- package/vendor/codex-taskboard/dist/web/assets/diagram-UB23O5K3-DRmp4Nng.js +0 -41
- package/vendor/codex-taskboard/dist/web/assets/dist-D9sYb5Oa.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/ebnfDiagram-BXEA7PRR-CkKoaf7T.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/erDiagram-JOGREHBK-nBX5z4R4.js +0 -85
- package/vendor/codex-taskboard/dist/web/assets/eventmodeling-45OFAUF4-pexmK65N.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/flowDiagram-UKHOOZJN-aroohRbL.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/ganttDiagram-PKOTCBZU-BOJWUTXa.js +0 -292
- package/vendor/codex-taskboard/dist/web/assets/gitGraph-TEB2WS4Q-DxnuhSZU.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/gitGraphDiagram-DS77QQ5N-Cte975TC.js +0 -106
- package/vendor/codex-taskboard/dist/web/assets/graphlib-DS17s2tU.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/index-Docmx4uQ.css +0 -1
- package/vendor/codex-taskboard/dist/web/assets/index-Du07lEGz.js +0 -121
- package/vendor/codex-taskboard/dist/web/assets/info-DKCQHKI2-DOTjgYxk.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/infoDiagram-6WML65LV-SpyV9UJd.js +0 -2
- package/vendor/codex-taskboard/dist/web/assets/init-D6jRqBbL.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/ishikawaDiagram-WSZJBQD7-T0PZwoUZ.js +0 -70
- package/vendor/codex-taskboard/dist/web/assets/journeyDiagram-NVQOT4AX-B88b8UgX.js +0 -139
- package/vendor/codex-taskboard/dist/web/assets/kanban-definition-27J2QSJJ-CIlfNnl_.js +0 -89
- package/vendor/codex-taskboard/dist/web/assets/katex-B7rAX3Vi.js +0 -257
- package/vendor/codex-taskboard/dist/web/assets/line-fWrwPZhB.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/linear-B7l8qgEw.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/map-BaFkSB1l.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/mermaid-parser.core-C5gls2nC.js +0 -7
- package/vendor/codex-taskboard/dist/web/assets/mermaid.core-POz2Xcvr.js +0 -11
- package/vendor/codex-taskboard/dist/web/assets/mindmap-definition-FAOFIHXS-BM0-egZ5.js +0 -96
- package/vendor/codex-taskboard/dist/web/assets/ordinal-hYBb2elL.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/packet-7NZHBO7P-DQZzyVos.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/path-BWPyau1x.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/pegDiagram-VL7TDLO6-B8aEwl-7.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/pie-RZYD4A2V-DRUflilR.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/pieDiagram-7S7Q4E2Y-0cDDxlua.js +0 -39
- package/vendor/codex-taskboard/dist/web/assets/purify.es-Bwt4ulIK.js +0 -3
- package/vendor/codex-taskboard/dist/web/assets/quadrantDiagram-CIZ2JOQS-CBgb0YZ0.js +0 -7
- package/vendor/codex-taskboard/dist/web/assets/radar-I7S5WNFK-tRocoKxq.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/railroad-3IZDKUUU-DaS4ZlX_.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/railroad-abnf-AHOZXSZD-BN1T5dBT.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/railroad-ebnf-EBAXGLYW-Cuf8qyKs.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/railroad-peg-LSFZ7HO6-B511_EYq.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/railroadDiagram-AXF67PYL-QtPo-JZb.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/requirementDiagram-LRYGKXZP-CuBIF85r.js +0 -84
- package/vendor/codex-taskboard/dist/web/assets/rolldown-runtime-QTnfLwEv.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/rough.esm-CSKSodPl.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/sankeyDiagram-W5VNT64P-CRA-b_za.js +0 -40
- package/vendor/codex-taskboard/dist/web/assets/sequenceDiagram-SI44F4Z6-CoddVWwY.js +0 -162
- package/vendor/codex-taskboard/dist/web/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/src-_wZywoZs.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/stateDiagram-OKZ733FA-D8DMM2ln.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/stateDiagram-v2-UEYNNEHI-CVp0eYAS.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/swimlanes-SLNWSIFB-C1fC7EFu.js +0 -2
- package/vendor/codex-taskboard/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CPd58Xso.js +0 -8
- package/vendor/codex-taskboard/dist/web/assets/timeline-definition-Z64GVDOM-BUBv8aKP.js +0 -120
- package/vendor/codex-taskboard/dist/web/assets/treeView-QDETBFTQ-C-Bve2kY.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/treemap-6X3UGDF4-BcphHDdV.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/vennDiagram-T6HMQDX7-0wQnwAyA.js +0 -34
- package/vendor/codex-taskboard/dist/web/assets/wardley-OPB4EBWU-CJZ4BevB.js +0 -1
- package/vendor/codex-taskboard/dist/web/assets/wardleyDiagram-T6FBY63Y-U9nwPrkN.js +0 -78
- package/vendor/codex-taskboard/dist/web/assets/xychartDiagram-ELKLHX3M-CyCqnzgE.js +0 -7
- package/vendor/codex-taskboard/dist/web/codex-agent-logo.png +0 -0
- package/vendor/codex-taskboard/dist/web/codex-app-icon.png +0 -0
- package/vendor/codex-taskboard/dist/web/favicon.svg +0 -7
- package/vendor/codex-taskboard/dist/web/index.html +0 -20
- package/vendor/codex-taskboard/server/ai-chat-catalog.mjs +0 -1031
- package/vendor/codex-taskboard/server/ai-chat-process.mjs +0 -462
- package/vendor/codex-taskboard/server/ai-chat.mjs +0 -1237
- package/vendor/codex-taskboard/server/ai-turn-owner.mjs +0 -39
- package/vendor/codex-taskboard/server/app.mjs +0 -3211
- package/vendor/codex-taskboard/server/cloud-config.mjs +0 -188
- package/vendor/codex-taskboard/server/cloud-proxy.mjs +0 -310
- package/vendor/codex-taskboard/server/codex-app-server.mjs +0 -376
- package/vendor/codex-taskboard/server/codex-slash-commands-0.139.0.json +0 -62
- package/vendor/codex-taskboard/server/database.mjs +0 -2845
- package/vendor/codex-taskboard/server/index.mjs +0 -41
- package/vendor/codex-taskboard/server/jira-config.mjs +0 -181
- package/vendor/codex-taskboard/server/jira-integration.mjs +0 -487
- package/vendor/codex-taskboard/server/project-summary.mjs +0 -159
- package/vendor/codex-taskboard/shared/api-fields.mjs +0 -163
- package/vendor/codex-taskboard/shared/codex-environment.mjs +0 -5
- package/vendor/codex-taskboard/shared/codex-executable.mjs +0 -77
- package/vendor/codex-taskboard/shared/codex-permissions.mjs +0 -9
- package/vendor/codex-taskboard/shared/composer-reference.d.mts +0 -19
- package/vendor/codex-taskboard/shared/composer-reference.mjs +0 -90
- package/vendor/codex-taskboard/shared/domain.mjs +0 -34
- package/vendor/codex-taskboard/shared/executable-command.mjs +0 -13
- package/vendor/codex-taskboard/shared/process-tree.mjs +0 -27
- package/vendor/codex-taskboard/shared/task-input.mjs +0 -308
- package/vendor/codex-taskboard/shared/task-records.mjs +0 -199
- package/vendor/codex-taskboard/shared/task-relations.mjs +0 -55
- package/vendor/codex-taskboard/shared/taskboard-automation.mjs +0 -277
- package/vendor/codex-taskboard/skills/manage-taskboard/SKILL.md +0 -45
- package/vendor/codex-taskboard/skills/manage-taskboard/agents/openai.yaml +0 -4
- package/vendor/codex-taskboard/skills/manage-taskboard/references/cli.md +0 -211
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-POz2Xcvr.js","./purify.es-Bwt4ulIK.js","./chunk-Y2CYZVJY-DsF7k-Jl.js","./src-_wZywoZs.js","./rolldown-runtime-QTnfLwEv.js","./chunk-I66GZJ75-Bk8_gFs2.js","./chunk-NSK5VX7P-Cb56tnGK.js","./dist-D9sYb5Oa.js","./chunk-3NCLNEKW-DVGIRib_.js","./chunk-4I5QYGJK-kNoGFqr0.js","./chunk-WRU74C26-B7SBmP0K.js","./chunk-7BUUIJ7U-Bb538aSH.js","./chunk-UBXNYLIW-YX5mN8cl.js","./chunk-W5SLKNZC-DlOLhhDO.js","./chunk-QR6OTTB3-BwoszTxn.js","./rough.esm-CSKSodPl.js","./chunk-7Z6QIM7H-CDQpQlxX.js","./line-fWrwPZhB.js","./path-BWPyau1x.js","./array-BifhSqXX.js","./chunk-J7OUQ5F2-CJRcenlr.js","./chunk-ZIRB5QZD-C6fEPe3t.js","./GanttView-rGWhuEX9.js","./GanttView-D8wnfGrG.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-QTnfLwEv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),i=n(((e,t)=>{t.exports=r()})),a=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=n(((e,t)=>{t.exports=a()})),s=n((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),c=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=ie(null),oe=ie(null),se=ie(null),ce=ie(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function ue(){L(ae),L(oe),L(se)}function de(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Jd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function fe(e){oe.current===e&&(L(ae),L(oe)),ce.current===e&&(L(ce),np._currentValue=I)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
-
`),l=s.split(`
|
|
6
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,z=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function We(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function B(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ke(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ie(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:V(n),(n&(e.suspendedLanes|t))===0?n:0}function V(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $e(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function H(){var e=F.p;return e===0?(e=window.event,e===void 0?32:vp(e.type)):e}function et(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var tt=Math.random().toString(36).slice(2),U=`__reactFiber$`+tt,nt=`__reactProps$`+tt,rt=`__reactContainer$`+tt,it=`__reactEvents$`+tt,at=`__reactListeners$`+tt,ot=`__reactHandles$`+tt,W=`__reactResources$`+tt,st=`__reactMarker$`+tt;function G(e){delete e[U],delete e[nt],delete e[it],delete e[at],delete e[ot]}function ct(e){var t=e[U];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rt]||n[U]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_f(e);e!==null;){if(n=e[U])return n;e=_f(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[U]||e[rt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function dt(e){var t=e[W];return t||=e[W]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[st]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=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={},yt={};function bt(e){return be.call(yt,e)?!0:be.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function St(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=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 Bt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Bt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ut=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`]]),Wt=/^[\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 Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[nt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[nt]||null;if(!i)throw Error(a(90));Mt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(Cu(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[nt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return sn=i.slice(e,1<r?1-r:void 0)}function ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=h({},pn,{view:0,detail:0}),gn=fn(hn),_n,vn,yn,bn=h({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==yn&&(yn&&e.type===`mousemove`?(_n=e.screenX-yn.screenX,vn=e.screenY-yn.screenY):vn=_n=0,yn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:vn}}),xn=fn(bn),Sn=fn(h({},bn,{dataTransfer:0})),Cn=fn(h({},hn,{relatedTarget:0})),wn=fn(h({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),Tn=fn(h({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),En=fn(h({},pn,{data:0})),Dn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},On={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`},kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kn[e])?!!t[e]:!1}function jn(){return An}var Mn=fn(h({},hn,{key:function(e){if(e.key){var t=Dn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?On[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Nn=fn(h({},bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=fn(h({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Fn=fn(h({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=fn(h({},bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=fn(h({},pn,{newState:0,oldState:0})),Rn=[9,13,27,32],zn=tn&&`CompositionEvent`in window,Bn=null;tn&&`documentMode`in document&&(Bn=document.documentMode);var Vn=tn&&`TextEvent`in window&&!Bn,Hn=tn&&(!zn||Bn&&8<Bn&&11>=Bn),Un=` `,Wn=!1;function Gn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var qn=!1;function Jn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Wn=!0,Un):null;case`textInput`:return e=t.data,e===Un&&Wn?null:e;default:return null}}function Yn(e,t){if(qn)return e===`compositionend`||!zn&&Gn(e,t)?(e=cn(),sn=on=an=null,qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Hn&&t.locale!==`ko`?null:t.data;default:return null}}var Xn={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 Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Xn[e.type]:t===`textarea`}function Qn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=jd(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var $n=null,er=null;function tr(e){Cd(e,0)}function nr(e){if(Ot(ut(e)))return e}function rr(e,t){if(e===`change`)return t}var ir=!1;if(tn){var ar;if(tn){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;ir=ar&&(!document.documentMode||9<document.documentMode)}function cr(){$n&&($n.detachEvent(`onpropertychange`,lr),er=$n=null)}function lr(e){if(e.propertyName===`value`&&nr(er)){var t=[];Qn(t,er,e,Jt(e)),$t(tr,t)}}function ur(e,t,n){e===`focusin`?(cr(),$n=t,er=n,$n.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return nr(er)}function fr(e,t){if(e===`click`)return nr(t)}function pr(e,t){if(e===`input`||e===`change`)return nr(t)}function mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var hr=typeof Object.is==`function`?Object.is:mr;function gr(e,t){if(hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!be.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function _r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e,t){var n=_r(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=_r(n)}}function yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Sr=tn&&`documentMode`in document&&11>=document.documentMode,Cr=null,wr=null,Tr=null,K=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;K||Cr==null||Cr!==kt(r)||(r=Cr,`selectionStart`in r&&xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tr&&gr(Tr,r)||(Tr=r,r=jd(wr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};tn&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`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(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),ht(t,[e])}var Hr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<mu)throw mu=0,hu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ri(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ii(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=qf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ei(31,n,t,i),e.elementType=k,e.lanes=o,e;case y:return ai(n.children,i,o,t);case b:s=8,i|=24;break;case x:return e=ei(12,n,t,i|2),e.elementType=x,e.lanes=o,e;case T:return e=ei(13,n,t,i),e.elementType=T,e.lanes=o,e;case E:return e=ei(19,n,t,i),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},li.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-Ie(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,Oi=null,ki=!1,Ai=Error(a(519));function ji(e){throw Li(ui(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[U]=e,t[nt]=r,n){case`dialog`:wd(`cancel`,t),wd(`close`,t);break;case`iframe`:case`object`:case`embed`:wd(`load`,t);break;case`video`:case`audio`:for(n=0;n<xd.length;n++)wd(xd[n],t);break;case`source`:wd(`error`,t);break;case`img`:case`image`:case`link`:wd(`error`,t),wd(`load`,t);break;case`details`:wd(`toggle`,t);break;case`input`:wd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:wd(`invalid`,t);break;case`textarea`:wd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ld(t.textContent,n)?(r.popover!=null&&(wd(`beforetoggle`,t),wd(`toggle`,t)),r.onScroll!=null&&wd(`scroll`,t),r.onScrollEnd!=null&&wd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ti=Ti.return}}function Pi(e){if(e!==Ti)return!1;if(!Di)return Ni(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Yd(e.type,e.memoizedProps)),n=!n),n&&Ei&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ei=gf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ei=gf(e)}else t===27?(t=Ei,rf(e.type)?(e=hf,hf=null,Ei=e):Ei=t):Ei=Ti?mf(e.stateNode.nextSibling):null;return!0}function Fi(){Ei=Ti=null,Di=!1}function Ii(){var e=Oi;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=ie(null),zi=null,Bi=null;function Vi(e,t,n){R(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,L(Ri)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Gi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;hr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ce.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[np]:e.push(np))}i=i.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(a(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=hd(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ua=P.S;P.S=function(e,t){ru=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=ie(null);function fa(){var e=da.current;return e===null?Rl.pooledCache:e}function pa(e,t){t===null?R(da,da.current):R(da,t.pool)}function ma(){var e=fa();return e===null?null:{parent:ea._currentValue,pool:e}}var ha=Error(a(460)),ga=Error(a(474)),_a=Error(a(542)),va={then:function(){}};function ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e}throw Sa=t,ha}}function xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Sa=e,ha):e}}var Sa=null;function Ca(){if(Sa===null)throw Error(a(459));var e=Sa;return Sa=null,e}function wa(e){if(e===ha||e===_a)throw Error(a(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),ba(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(e,t){throw t.$$typeof===g?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Aa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=ni(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=oi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===O&&xa(a)===t.type)?(t=i(t,n.props),Oa(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Oa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ai(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ii(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case v:return t=ci(t,e.mode,n),t.return=e,t;case O:return t=xa(t),f(e,t,n)}if(N(t)||te(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===C)return f(e,Yi(e,t),n);ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=xa(n),p(e,t,n,r)}if(N(n)||te(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===C)return p(e,t,Yi(e,n),r);ka(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=xa(r),m(e,t,n,r,i)}if(N(r)||te(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Da(r),i);if(r.$$typeof===C)return m(e,t,n,Yi(t,r),i);ka(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Di&&bi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Di&&bi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Di&&bi(i,h),l}function g(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Di&&bi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Di&&bi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Di&&bi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&xa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Oa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=xa(o),b(e,r,o,c)}if(N(o))return h(e,r,o,c);if(te(o)){if(l=te(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Da(o),c);if(o.$$typeof===C)return b(e,r,Yi(e,o),c);ka(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=b(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function Ra(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Bl&f)===f:(r&f)===f){f!==0&&f===aa&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Na=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=ie(null),Ka=ie(0);function qa(e,t){e=Kl,R(Ka,e),R(Ga,t),Kl=e|t.baseLanes}function Ja(){R(Ka,Kl),R(Ga,Ga.current)}function Ya(){Kl=Ka.current,L(Ga),L(Ka)}var Xa=ie(null),Za=null;function Qa(e){var t=e.alternate;R(ro,ro.current&1),R(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){R(ro,ro.current),R(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(R(ro,ro.current),R(Xa,e),Za===null&&(Za=e)):to(e)}function to(){R(ro,ro.current),R(Xa,Xa.current)}function no(e){L(Xa),Za===e&&(Za=null),L(ro)}var ro=ie(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||df(n)||ff(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ao=0,q=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(a(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return ao=a,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Is:Ls,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){P.H=Fs;var t=oo!==null&&oo.next!==null;if(ao=0,so=oo=q=null,co=!1,po=0,mo=null,t)throw Error(a(300));e===null||ec||(e=e.dependencies,e!==null&&Ki(e)&&(ec=!0))}function bo(e,t,n,r){q=e;var i=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=i)throw Error(a(301));if(i+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Rs,o=t(n,r)}while(lo);return o}function xo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(q.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}ao=0,so=oo=q=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?q.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=q.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?q.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw q.alternate===null?Error(a(467)):Error(a(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?q.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ba(mo,e,t),t=q,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Is:Ls),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return Ji(e)}throw Error(a(438,String(e)))}function Ao(e){var t=null,n=q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=q.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Do(),q.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ao&f)===f:(Bl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((ao&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,q.lanes|=p,Jl|=p;f=u.action,uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,q.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!hr(o,e.memoizedState)&&(ec=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);hr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=q,i=Eo(),o=Di;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!hr((oo||i).memoizedState,n);if(s&&(i.memoizedState=n,ec=!0),i=i.queue,ss(Ro.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,i,n,t),null),Rl===null)throw Error(a(349));o||ao&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t=Do(),q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function Bo(e){var t=Yr(e,2);t!==null&&vu(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,i){if(Ms(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(Di){var n=Rl.formState;if(n!==null){a:{var r=q;if(Di){if(Ei){b:{for(var i=Ei,a=ki;i.nodeType!==8;){if(!a){i=null;break b}if(i=mf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=mf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=ks.bind(null,q,r),r.dispatch=n,r=Vo(!1),a=js.bind(null,q,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ha?_a:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=q.updateQueue,t===null&&(t=Do(),q.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();q.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(q.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function ss(e,t){is(2048,8,e,t)}function cs(e){q.flags|=4;var t=q.updateQueue;if(t===null)t=Do(),q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Eo().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return is(4,2,e,t)}function ds(e,t){return is(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),is(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||ao&1073741824&&!(Bl&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),q.lanes|=e,Jl|=e,n)}function vs(e,t,n,r){return hr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(Bl&261930)?(ec=!0,e.memoizedState=n):(e=_u(),q.lanes|=e,Jl|=e,t):(e=_s(e,n,r),hr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,js(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,la(c,r),gu(e)):As(e,t,r,gu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ss(e).queue;ys(e,i,t,I,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},gu())}function ws(){return Ji(np)}function Ts(){return Eo().memoizedState}function Es(){return Eo().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Ia(n);var r=La(t,e,n);r!==null&&(vu(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=Jr(e,t,n,r),n!==null&&(vu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,gu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,hr(s,o))return qr(e,t,i,0),Rl===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return vu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(a(479))}else t=Jr(e,n,r,2),t!==null&&vu(t,e,2)}function Ms(e){var t=e.alternate;return e===q||t!==null&&t===q}function Ns(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Fs={readContext:Ji,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Fs.useEffectEvent=go;var Is={readContext:Ji,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=ks.bind(null,q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=ys.bind(null,q,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=q,i=To();if(Di){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Rl===null)throw Error(a(349));Bl&127||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Rl.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Ds.bind(null,q)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:Ji,use:ko,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:Ts,useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:Ji,use:ko,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Eo();return oo===null?_s(n,e,t):vs(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:Ts,useHostTransitionStatus:ws,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(vu(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(vu(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(vu(t,e,n),Ra(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Hr(e)}function Gs(e){console.error(e)}function Ks(e){Hr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Ia(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(ou===null?ou=new Set([this]):ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,i,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?Au():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===va?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Yu(e,r,i)),!1;case 22:return n.flags|=65536,r===va?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Yu(e,r,i)),!1}throw Error(a(435,n.tag))}return Yu(e,r,i),Au(),!1}if(Di)return t=Xa.current,t===null?(r!==Ai&&(t=Error(a(423),{cause:r}),Li(ui(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=ui(r,n),i=Ys(e.stateNode,r,i),za(e,i),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ai&&(e=Error(a(422),{cause:r}),Li(ui(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=ui(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Ys(n.stateNode,r,e),za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ou===null||!ou.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Xs(i),Zs(i,e,n,r),za(n,i),!1}n=n.return}while(n!==null);return!1}var $s=Error(a(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!ec?(Co(e,t,i),Ec(e,t,i)):(Di&&s&&Si(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?gr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(gr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pa(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&pa(t,null),Ja(),to(t)):(pa(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=fa();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&pa(t,null),Ja(),eo(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return ja(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if($a(t),(e=Ei)?(e=uf(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),i)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(ec||Gi(e,t,n,!1),i=(n&e.childLanes)!==0,ec||i){if(r=Rl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),vu(r,e,s),$s;Au(),t=lc(e,t,n)}else e=o.treeContext,Ei=mf(s.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=cc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return qi(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!ec?(Co(e,t,i),Ec(e,t,i)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!ec?(Co(e,t,a),Ec(e,t,a)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Na||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fa(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Na||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Fi(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ma()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function yc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ro.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(i?Qa(t):to(t),(e=Ei)?(e=uf(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return ff(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(to(t),i=t.mode,c=xc({mode:`hidden`,children:c},i),r=ai(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(null,r)):(Qa(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,i=t.mode,r=xc({mode:`visible`,children:r.children},i),c=ai(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,t=oc(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(t),ff(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Li({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=Rl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),vu(s,e,r),$s;df(c)||Au(),t=Sc(e,t,n)}else df(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=mf(c.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=bc(t,r.children),t.flags|=4096);return t}return i?(to(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,i,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(i=c.cachePool,i===null?i=ma():(l=ea._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return ja(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function wc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(ro,o),tc(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(ro,ro.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(i===D){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Us(r,t.pendingProps),mc(e,t,r,i,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Fa(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Va(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==i){i=ui(Error(a(424)),t),Li(i),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ei=mf(e.firstChild),Ti=t,Di=!0,Oi=null,ki=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===i){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Kd(se.current).createElement(n),r[U]=t,r[nt]=e,Bd(r,n,e),ft(r),t.stateNode=r):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&Di&&(r=t.stateNode=vf(t.type,t.pendingProps,se.current),Ti=t,ki=!0,i=Ei,rf(t.type)?(hf=i,Ei=mf(r.firstChild)):Ei=i),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((i=r=Ei)&&(r=cf(r,t.type,t.pendingProps,ki),r===null?i=!1:(t.stateNode=r,Ti=t,Ei=mf(r.firstChild),ki=!1,i=!0)),i||ji(t)),de(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Yd(i,o)?r=null:s!==null&&Yd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=vo(e,t,xo,null,null,n),np._currentValue=i),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=lf(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||ji(t)),null;case 13:return yc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,qi(t),i=Ji(i),r=r(i),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(i=fa(),i===null&&(i=Rl,o=ta(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Pa(t),Vi(t,ea,i)):((e.lanes&n)!==0&&(Fa(e,t),Ha(t,null,null,n),Va()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Vi(t,ea,r),r!==i.cache&&Wi(t,[ea],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Vi(t,ea,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Ac(e){e.flags|=4}function jc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw Sa=va,ga}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Jf(t))if(Du())e.flags|=8192;else throw Sa=va,ga}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,Ql|=t)}function Pc(e,t){if(!Di)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Fc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Ac(t),o===null?(Fc(t),jc(t,i,null,r,n)):(Fc(t),Mc(t,o))):o?o===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,o)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,i,e,r,n)),null;case 27:if(fe(t),n=se.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Fc(t),null}e=ae.current,Pi(t)?Mi(t,e):(e=vf(i,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(fe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Fc(t),null}if(o=ae.current,Pi(t))Mi(t,o);else{var s=Kd(se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[U]=t,o[nt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Bd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=se.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ti,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[U]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||ji(t,!0)}else e=Kd(e).createTextNode(r),e[U]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[U]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(a(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[U]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),i=!1}else i=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(no(t),t):(no(t),null)}return no(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return ue(),e===null&&Dd(t.stateNode.containerInfo),Fc(t),null;case 10:return Hi(t.type),Fc(t),null;case 19:if(L(ro),r=t.memoizedState,r===null)return Fc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Pc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return R(ro,ro.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>iu&&(t.flags|=128,i=!0,Pc(r,!1),t.lanes=4194304)}else{if(!i)if(e=io(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Fc(t),null}else 2*Te()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,i=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=ro.current,R(ro,i?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&L(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Fc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Lc(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(a(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(ro),null;case 4:return ue(),null;case 10:return Hi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&L(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Rc(e,t){switch(Ci(t),t.tag){case 3:Hi(ea),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:L(ro);break;case 10:Hi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&L(da);break;case 24:Hi(ea)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ju(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ju(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ju(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){Ju(e,e.return,t)}}}function Hc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ju(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ju(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ju(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ju(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ju(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Vd(r,e.type,n,t),r[nt]=t}catch(t){Ju(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rf(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bd(t,r,n),t[U]=e,t[nt]=n}catch(t){Ju(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,J=null;function nl(e,t){if(e=e.containerInfo,Wd=dp,e=br(e),xr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},dp=!1,J=t;J!==null;)if(t=J,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,J=e;else for(;J!==null;){switch(t=J,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ju(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)sf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:sf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&zc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ju(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ju(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wa(e,t)}catch(e){Ju(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Qu.bind(null,n),pf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Qc=i,$c=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&G(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=al,i=ol;rf(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),yf(n.stateNode),al=r,ol=i;break;case 5:$c||Wc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Ju(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Ju(n,t,e)}break;case 18:al!==null&&(ol?(e=al,af(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Lp(e)):af(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:Bc(2,n,t),$c||Bc(4,n,t),sl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,sl(e,t,n),$c=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Lp(e)}catch(e){Ju(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Lp(e)}catch(e){Ju(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(a(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=$u.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(rf(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(a(160));cl(o,s,i),al=null,ol=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(Bc(3,e,e.return),zc(3,e),Bc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=ml;if(pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[st]||o[U]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Bd(o,r,n),o[U]=e,ft(o),r=o;break a;case`link`:var s=Gf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Bd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Gf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Bd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[U]=e,ft(o),r=o}e.stateNode=r}else Kf(i,e.type,e.stateNode);else e.stateNode=Bf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Kf(i,e.type,e.stateNode):Bf(i,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){i=e.stateNode;try{Rt(i,``)}catch(t){Ju(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Kc(e,i,n===null?i:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ju(e,e.return,t)}}break;case 3:if(Wf=null,i=ml,ml=Sf(t.containerInfo),pl(t,e),ml=i,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Lp(t.containerInfo)}catch(t){Ju(e,e.return,t)}el&&(el=!1,_l(e));break;case 4:r=ml,ml=Sf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||i,$c=d||l,pl(t,e),$c=d,Qc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Qc||$c||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Ju(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Ju(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?of(m,!0):of(l.stateNode,!1)}catch(e){Ju(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Xc(e,Jc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Xc(e,Jc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Yc(e,Jc(e),s);break;default:throw Error(a(161))}}catch(t){Ju(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bc(4,t,t.return),yl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),yl(t);break;case 27:yf(t.stateNode);case 26:case 5:Wc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),zc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ju(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ua(c[i],s)}catch(e){Ju(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Uc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&zc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Ju(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Yf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=Sf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];J=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&Bc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];J=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;J!==null;){var n=J;switch(n.tag){case 0:case 11:case 15:Bc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,J=r;else a:for(n=e;J!==null;){r=J;var i=r.sibling,a=r.return;if(il(r),r===n){J=null;break a}if(i!==null){i.return=a,J=i;break a}J=a}}}var Fl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,zl=null,Bl=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,ou=null,su=0,cu=null,lu=null,uu=0,du=0,fu=null,pu=null,mu=0,hu=null;function gu(){return Ll&2&&Bl!==0?Bl&-Bl:P.T===null?H():hd()}function _u(){if(Zl===0)if(!(Bl&536870912)||Di){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),Zl=e}else Zl=536870912;return e=Xa.current,e!==null&&(e.flags|=32),Zl}function vu(e,t,n){(e===Rl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(Tu(e,0),Su(e,Bl,Zl,!1)),Je(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(Yl|=n),ql===4&&Su(e,Bl,Zl,!1)),sd(e))}function yu(e,t,n){if(Ll&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ge(e,t),i=r?Nu(e,t):ju(e,t,!0),o=r;do{if(i===0){Wl&&!r&&Su(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!xu(n)){i=ju(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(Tu(c,s).flags|=256),s=ju(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,i=4;break a}o=eu,eu=i,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Tu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=nu+300-Te(),10<i)){if(Su(r,t,Zl,!Ul),We(r,0,!0)!==0)break a;uu=t,r.timeoutHandle=Qd(bu.bind(null,r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),i);break a}bu(r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);sd(e)}function bu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},kl(t,a,d);var m=(a&62914560)===a?nu-Te():(a&4194048)===a?ru-Te():0;if(m=Zf(d,m),m!==null){uu=a,e.cancelPendingCommit=m(Bu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}Bu(e,t,a,n,r,i,o,s,c)}function xu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Su(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function Cu(){return Ll&6?!0:(cd(0,!1),!1)}function wu(){if(zl!==null){if(Vl===0)var e=zl.return;else e=zl,Bi=zi=null,wo(e),Ta=null,Ea=0,e=zl;for(;e!==null;)Rc(e.alternate,e),e=e.return;zl=null}}function Tu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,$d(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),uu=0,wu(),Rl=e,zl=n=ni(e.current,null),Bl=t,Vl=0,Hl=null,Ul=!1,Wl=Ge(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,Kr(),n}function Eu(e,t){q=null,P.H=Fs,t===ha||t===_a?(t=Ca(),Vl=3):t===ga?(t=Ca(),Vl=4):Vl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,zl===null&&(ql=1,qs(e,ui(t,e.current)))}function Du(){var e=Xa.current;return e===null?!0:(Bl&4194048)===Bl?Za===null:(Bl&62914560)===Bl||Bl&536870912?e===Za:!1}function Ou(){var e=P.H;return P.H=Fs,e===null?Fs:e}function ku(){var e=P.A;return P.A=Fl,e}function Au(){ql=4,Ul||(Bl&4194048)!==Bl&&Xa.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Rl===null||Su(Rl,Bl,Zl,!1)}function ju(e,t,n){var r=Ll;Ll|=2;var i=Ou(),a=ku();(Rl!==e||Bl!==t)&&(au=null,Tu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&zl!==null){var s=zl,c=Hl;switch(Vl){case 8:wu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Lu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Lu(e,s,c,l)}}Mu(),o=ql;break}catch(t){Eu(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,Ll=r,P.H=i,P.A=a,zl===null&&(Rl=null,Bl=0,Kr()),o}function Mu(){for(;zl!==null;)Fu(zl)}function Nu(e,t){var n=Ll;Ll|=2;var r=Ou(),i=ku();Rl!==e||Bl!==t?(au=null,iu=Te()+500,Tu(e,t)):Wl=Ge(e,t);a:do try{if(Vl!==0&&zl!==null){t=zl;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Lu(e,t,o,1);break;case 2:case 9:if(ya(o)){Vl=0,Hl=null,Iu(t);break}t=function(){Vl!==2&&Vl!==9||Rl!==e||(Vl=7),sd(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:ya(o)?(Vl=0,Hl=null,Iu(t)):(Vl=0,Hl=null,Lu(e,t,o,7));break;case 5:var s=null;switch(zl.tag){case 26:s=zl.memoizedState;case 5:case 27:var c=zl;if(s?Jf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)zl=l;else{var u=c.return;u===null?zl=null:(zl=u,Ru(u))}break b}}Vl=0,Hl=null,Lu(e,t,o,5);break;case 6:Vl=0,Hl=null,Lu(e,t,o,6);break;case 8:wu(),ql=6;break a;default:throw Error(a(462))}}Pu();break}catch(t){Eu(e,t)}while(1);return Bi=zi=null,P.H=r,P.A=i,Ll=n,zl===null?(Rl=null,Bl=0,Kr(),ql):0}function Pu(){for(;zl!==null&&!Ce();)Fu(zl)}function Fu(e){var t=kc(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Ru(e):zl=t}function Iu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Bl);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Bl);break;case 5:wo(t);default:Rc(n,t),t=zl=ri(t,Kl),t=kc(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Ru(e):zl=t}function Lu(e,t,n,r){Bi=zi=null,wo(t),Ta=null,Ea=0;var i=t.return;try{if(Qs(e,i,t,n,Bl)){ql=1,qs(e,ui(n,e.current)),zl=null;return}}catch(t){if(i!==null)throw zl=i,t;ql=1,qs(e,ui(n,e.current)),zl=null;return}t.flags&32768?(Di||r===1?e=!0:Wl||Bl&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),zu(t,e)):Ru(t)}function Ru(e){var t=e;do{if(t.flags&32768){zu(t,Ul);return}e=t.return;var n=Ic(t.alternate,t,Kl);if(n!==null){zl=n;return}if(t=t.sibling,t!==null){zl=t;return}zl=t=e}while(t!==null);ql===0&&(ql=5)}function zu(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,zl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){zl=e;return}zl=e=n}while(e!==null);ql=6,zl=null}function Bu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Gu();while(su!==0);if(Ll&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Gr,Ye(e,n,o,s,c,l),e===Rl&&(zl=Rl=null,Bl=0),lu=t,cu=e,uu=n,du=o,fu=i,pu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ed(ke,function(){return Ku(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Ll,Ll|=4;try{nl(e,t,n)}finally{Ll=s,F.p=i,P.T=r}}su=1,Vu(),Hu(),Uu()}}function Vu(){if(su===1){su=0;var e=cu,t=lu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ll;Ll|=4;try{hl(t,e);var a=Gd,o=br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&yr(s.ownerDocument.documentElement,s)){if(c!==null&&xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=vr(s,h),v=vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}dp=!!Wd,Gd=Wd=null}finally{Ll=i,F.p=r,P.T=n}}e.current=t,su=2}}function Hu(){if(su===2){su=0;var e=cu,t=lu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ll;Ll|=4;try{rl(e,t.alternate,t)}finally{Ll=i,F.p=r,P.T=n}}su=3}}function Uu(){if(su===4||su===3){su=0,we();var e=cu,t=lu,n=uu,r=pu;t.subtreeFlags&10256||t.flags&10256?su=5:(su=0,lu=cu=null,Wu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ou=null),$e(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}uu&3&&Gu(),sd(e),i=e.pendingLanes,n&261930&&i&42?e===hu?mu++:(mu=0,hu=e):mu=0,cd(0,!1)}}function Wu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Gu(){return Vu(),Hu(),Uu(),Ku()}function Ku(){if(su!==5)return!1;var e=cu,t=du;du=0;var n=$e(uu),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,Ll&6)throw Error(a(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,cd(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{F.p=i,P.T=r,Wu(e,t)}}function qu(e,t,n){t=ui(n,t),t=Ys(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Je(e,2),sd(e))}function Ju(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=ui(n,e),n=Xs(2),r=La(t,n,2),r!==null&&(Zs(n,r,t,e),Je(r,2),sd(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>Te()-nu?!(Ll&2)&&Tu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),sd(e)}function Zu(e,t){t===0&&(t=Ke()),e=Yr(e,t),e!==null&&(Je(e,t),sd(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return xe(e,t)}var td=null,nd=null,rd=!1,id=!1,ad=!1,od=0;function sd(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),id=!0,rd||(rd=!0,md())}function cd(e,t){if(!ad&&id){ad=!0;do for(var n=!1,r=td;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,pd(r,a))}else a=Bl,a=We(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,pd(r,a));r=r.next}while(n);ad=!1}}function ld(){ud()}function ud(){id=rd=!1;var e=0;od!==0&&Zd()&&(e=od);for(var t=Te(),n=null,r=td;r!==null;){var i=r.next,a=dd(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(id=!0)),r=i}su!==0&&su!==5||cd(e,!1),od!==0&&(od=0)}function dd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=B(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Bl,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),$e(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=z;break;default:n=ke}return r=fd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function fd(e,t){if(su!==0&&su!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gu()&&e.callbackNode!==n)return null;var r=Bl;return r=We(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),dd(e,Te()),e.callbackNode!=null&&e.callbackNode===n?fd.bind(null,e):null)}function pd(e,t){if(Gu())return null;yu(e,t,!0)}function md(){tf(function(){Ll&6?xe(De,ld):ud()})}function hd(){if(od===0){var e=aa;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),od=e}return od}function gd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function _d(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function vd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=gd((i[nt]||null).action),o=r.submitter;o&&(t=(t=o[nt]||null)?gd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(od!==0){var e=o?_d(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?_d(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var yd=0;yd<Br.length;yd++){var bd=Br[yd];Vr(bd.toLowerCase(),`on`+(bd[0].toUpperCase()+bd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var xd=`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(` `),Sd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(xd));function Cd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}}}}function wd(e,t){var n=t[it];n===void 0&&(n=t[it]=new Set);var r=e+`__bubble`;n.has(r)||(Od(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),Od(n,e,r,t)}var Ed=`_reactListening`+Math.random().toString(36).slice(2);function Dd(e){if(!e[Ed]){e[Ed]=!0,pt.forEach(function(t){t!==`selectionchange`&&(Sd.has(t)||Td(t,!1,e),Td(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ed]||(t[Ed]=!0,Td(`selectionchange`,!1,t))}}function Od(e,t,n,r){switch(vp(t)){case 2:var i=fp;break;case 8:i=pp;break;default:i=mp}n=i.bind(null,t,n,e),i=void 0,!nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function kd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=ct(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),o=[];a:{var s=zr.get(e);if(s!==void 0){var c=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:c=Mn;break;case`focusin`:u=`focus`,c=Cn;break;case`focusout`:u=`blur`,c=Cn;break;case`beforeblur`:case`afterblur`:c=Cn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Sn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Pn;break;case Mr:case Nr:case Pr:c=wn;break;case Rr:c=Fn;break;case`scroll`:case`scrollend`:c=gn;break;case`wheel`:c=In;break;case`copy`:case`cut`:case`paste`:c=Tn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Nn;break;case`toggle`:case`beforetoggle`:c=Ln}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=en(m,p),g!=null&&d.push(Ad(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[rt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?ct(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Nn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:ut(c),h=u==null?s:ut(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Md,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;c!==null&&Nd(o,s,c,d,!1),u!==null&&f!==null&&Nd(o,f,u,d,!0)}}a:{if(s=r?ut(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=rr;else if(Zn(s))if(ir)v=pr;else{v=dr;var y=ur}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Ht(r.elementType)&&(v=rr):v=fr;if(v&&=v(e,r)){Qn(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Pt(s,`number`,s.value)}switch(y=r?ut(r):window,e){case`focusin`:(Zn(y)||y.contentEditable===`true`)&&(Cr=y,wr=r,Tr=null);break;case`focusout`:Tr=wr=Cr=null;break;case`mousedown`:K=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:K=!1,Er(o,n,i);break;case`selectionchange`:if(Sr)break;case`keydown`:case`keyup`:Er(o,n,i)}var b;if(zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else qn?Gn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Hn&&n.locale!==`ko`&&(qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&qn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,qn=!0)),y=jd(r,x),0<y.length&&(x=new En(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Vn?Jn(e,n):Yn(e,n))&&(x=jd(r,`onBeforeInput`),0<x.length&&(y=new En(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),vd(o,e,r,n,i)}Cd(o,t)})}function Ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(Ad(e,i,a)),i=en(e,t),i!=null&&r.push(Ad(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Md(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(Ad(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Ad(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pd=/\r\n?/g,Fd=/\u0000|\uFFFD/g;function Id(e){return(typeof e==`string`?e:``+e).replace(Pd,`
|
|
10
|
-
`).replace(Fd,``)}function Ld(e,t){return t=Id(t),Id(e)===t}function Rd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Rd(e,t,`name`,i.name,i,null),Rd(e,t,`formEncType`,i.formEncType,i,null),Rd(e,t,`formMethod`,i.formMethod,i,null),Rd(e,t,`formTarget`,i.formTarget,i,null)):(Rd(e,t,`encType`,i.encType,i,null),Rd(e,t,`method`,i.method,i,null),Rd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&wd(`scroll`,e);break;case`onScrollEnd`:r!=null&&wd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:wd(`beforetoggle`,e),wd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function zd(e,t,n,r,i,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&wd(`scroll`,e);break;case`onScrollEnd`:r!=null&&wd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[nt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Bd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:wd(`error`,e),wd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Rd(e,t,o,s,n,null)}}i&&Rd(e,t,`srcSet`,n.srcSet,n,null),r&&Rd(e,t,`src`,n.src,n,null);return;case`input`:wd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Rd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in wd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Rd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in wd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Rd(e,t,s,c,n,null)}Lt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Rd(e,t,l,r,n,null)}return;case`dialog`:wd(`beforetoggle`,e),wd(`toggle`,e),wd(`cancel`,e),wd(`close`,e);break;case`iframe`:case`object`:wd(`load`,e);break;case`video`:case`audio`:for(r=0;r<xd.length;r++)wd(xd[r],e);break;case`image`:wd(`error`,e),wd(`load`,e);break;case`details`:wd(`toggle`,e);break;case`embed`:case`source`:case`link`:wd(`error`,e),wd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Rd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&zd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Rd(e,t,c,r,n,null))}function Vd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Rd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Rd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Rd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Rd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Rd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Rd(e,t,s,i,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Rd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Rd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Rd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Rd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&zd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||zd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Rd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Rd(e,t,f,p,r,m)}function Hd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ud(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Hd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Hd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Wd=null,Gd=null;function Kd(e){return e.nodeType===9?e:e.ownerDocument}function qd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Jd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Yd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xd=null;function Zd(){var e=window.event;return e&&e.type===`popstate`?e===Xd?!1:(Xd=e,!0):(Xd=null,!1)}var Qd=typeof setTimeout==`function`?setTimeout:void 0,$d=typeof clearTimeout==`function`?clearTimeout:void 0,ef=typeof Promise==`function`?Promise:void 0,tf=typeof queueMicrotask==`function`?queueMicrotask:ef===void 0?Qd:function(e){return ef.resolve(null).then(e).catch(nf)};function nf(e){setTimeout(function(){throw e})}function rf(e){return e===`head`}function af(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Lp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)yf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,yf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[st]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&yf(e.ownerDocument.body);n=i}while(n);Lp(t)}function of(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function sf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:sf(n),G(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function cf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[st])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=mf(e.nextSibling),e===null)break}return null}function lf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=mf(e.nextSibling),e===null))return null;return e}function uf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=mf(e.nextSibling),e===null))return null;return e}function df(e){return e.data===`$?`||e.data===`$~`}function ff(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function pf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function mf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var hf=null;function gf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return mf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function vf(e,t,n){switch(t=Kd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function yf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);G(e)}var bf=new Map,xf=new Set;function Sf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Cf=F.d;F.d={f:wf,r:Tf,D:Of,C:kf,L:Af,m:jf,X:Y,S:Mf,M:Nf};function wf(){var e=Cf.f(),t=Cu();return e||t}function Tf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):Cf.r(e)}var Ef=typeof document>`u`?null:document;function Df(e,t,n){var r=Ef;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xf.has(i)||(xf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Bd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Of(e){Cf.D(e),Df(`dns-prefetch`,e,null)}function kf(e,t){Cf.C(e,t),Df(`preconnect`,e,t)}function Af(e,t,n){Cf.L(e,t,n);var r=Ef;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=X(e);break;case`script`:a=Rf(e)}bf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(zf(a))||(t=r.createElement(`link`),Bd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function jf(e,t){Cf.m(e,t);var n=Ef;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rf(e)}if(!bf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),bf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zf(a)))return}r=n.createElement(`link`),Bd(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Mf(e,t,n){Cf.S(e,t,n);var r=Ef;if(r&&e){var i=dt(r).hoistableStyles,a=X(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bf.get(a))&&Hf(e,n);var c=o=r.createElement(`link`);ft(c),Bd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Y(e,t){Cf.X(e,t);var n=Ef;if(n&&e){var r=dt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=h({src:e,async:!0},t),(t=bf.get(i))&&Uf(e,t),a=n.createElement(`script`),ft(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Cf.M(e,t);var n=Ef;if(n&&e){var r=dt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=bf.get(i))&&Uf(e,t),a=n.createElement(`script`),ft(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var i=(i=se.current)?Sf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=X(n.href),n=dt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=X(n.href);var o=dt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),bf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bf.set(e,n),o||Lf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Rf(n),n=dt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function X(e){return`href="`+jt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Bd(t,`link`,n),ft(t),e.head.appendChild(t))}function Rf(e){return`[src="`+jt(e)+`"]`}function zf(e){return`script[async]`+e}function Bf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Bd(r,`style`,i),Vf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=X(n.href);var o=e.querySelector(Ff(i));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=If(n),(i=bf.get(i))&&Hf(r,i),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Bd(o,`link`,r),t.state.loading|=4,Vf(o,n.precedence,e),t.instance=o;case`script`:return o=Rf(n.src),(i=e.querySelector(zf(o)))?(t.instance=i,ft(i),i):(r=n,(i=bf.get(o))&&(r=h({},n),Uf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ft(i),Bd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vf(r,n.precedence,e));return t.instance}function Vf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wf=null;function Gf(e,t,n){if(Wf===null){var r=new Map,i=Wf=new Map;i.set(n,r)}else i=Wf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[st]||a[U]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Kf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Yf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=X(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Qf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=If(r),(i=bf.get(i))&&Hf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Bd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Qf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Xf=0;function Zf(e,t){return e.stylesheets&&e.count===0&&ep(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Xf===0&&(Xf=62500*Ud());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Qf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $f=null;function ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$f=new Map,t.forEach(tp,e),$f=null,Qf.call(e))}function tp(e,t){if(!(t.state.loading&4)){var n=$f.get(e);if(n)var r=n.get(null);else{n=new Map,$f.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Qf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var np={$$typeof:C,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function rp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ip(e,t,n,r,i,a,o,s,c,l,u,d){return e=new rp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function ap(e){return e?(e=Qr,e):Qr}function op(e,t,n,r,i,a){i=ap(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(vu(n,e,t),Ra(n,e,t))}function sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cp(e,t){sp(e,t),(e=e.alternate)&&sp(e,t)}function lp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&vu(t,e,67108864),cp(e,67108864)}}function up(e){if(e.tag===13||e.tag===31){var t=gu();t=V(t);var n=Yr(e,t);n!==null&&vu(n,e,t),cp(e,t)}}var dp=!0;function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,mp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,mp(e,t,n,r)}finally{F.p=a,P.T=i}}function mp(e,t,n,r){if(dp){var i=hp(r);if(i===null)kd(e,t,r,gp,n),Dp(e,r);else if(kp(i,e,t,n,r))r.stopPropagation();else if(Dp(e,r),t&4&&-1<Ep.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}sd(a),!(Ll&6)&&(iu=Te()+500,cd(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&vu(s,a,2),Cu(),cp(a,2)}if(a=hp(r),a===null&&kd(e,t,r,gp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else kd(e,t,r,null,n)}}function hp(e){return e=Jt(e),_p(e)}var gp=null;function _p(e){if(gp=null,e=ct(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gp=e,null}function vp(e){switch(e){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(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case z:return 268435456;default:return 32}default:return 32}}var yp=!1,bp=null,xp=null,Sp=null,Cp=new Map,wp=new Map,Tp=[],Ep=`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 Dp(e,t){switch(e){case`focusin`:case`focusout`:bp=null;break;case`dragenter`:case`dragleave`:xp=null;break;case`mouseover`:case`mouseout`:Sp=null;break;case`pointerover`:case`pointerout`:Cp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:wp.delete(t.pointerId)}}function Op(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kp(e,t,n,r,i){switch(t){case`focusin`:return bp=Op(bp,e,t,n,r,i),!0;case`dragenter`:return xp=Op(xp,e,t,n,r,i),!0;case`mouseover`:return Sp=Op(Sp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Cp.set(a,Op(Cp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,wp.set(a,Op(wp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ap(e){var t=ct(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,et(e.priority,function(){up(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,et(e.priority,function(){up(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Mp(e,t,n){jp(e)&&n.delete(t)}function Np(){yp=!1,bp!==null&&jp(bp)&&(bp=null),xp!==null&&jp(xp)&&(xp=null),Sp!==null&&jp(Sp)&&(Sp=null),Cp.forEach(Mp),wp.forEach(Mp)}function Pp(e,n){e.blockedOn===n&&(e.blockedOn=null,yp||(yp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Np)))}var Fp=null;function Ip(e){Fp!==e&&(Fp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fp===e&&(Fp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(_p(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Lp(e){function t(t){return Pp(t,e)}bp!==null&&Pp(bp,e),xp!==null&&Pp(xp,e),Sp!==null&&Pp(Sp,e),Cp.forEach(t),wp.forEach(t);for(var n=0;n<Tp.length;n++){var r=Tp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Tp.length&&(n=Tp[0],n.blockedOn===null);)Ap(n),n.blockedOn===null&&Tp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[nt]||null;if(typeof a==`function`)o||Ip(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[nt]||null)s=o.formAction;else if(_p(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Ip(n)}}}function Rp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function zp(e){this._internalRoot=e}Bp.prototype.render=zp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;op(n,gu(),e,t,null,null)},Bp.prototype.unmount=zp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;op(e.current,2,null,e,null,null),Cu(),t[rt]=null}};function Bp(e){this._internalRoot=e}Bp.prototype.unstable_scheduleHydration=function(e){if(e){var t=H();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tp.length&&t!==0&&t<Tp[n].priority;n++);Tp.splice(n,0,e),n===0&&Ap(e)}};var Vp=n.version;if(Vp!==`19.2.7`)throw Error(a(527,Vp,`19.2.7`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Up.isDisabled&&Up.supportsFiber)try{Ne=Up.inject(Hp),Pe=Up}catch{}}e.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r=``,i=Ws,o=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ip(e,1,!1,null,null,n,r,null,i,o,c,Rp),e[rt]=t.current,Dd(e),new zp(t)}})),u=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=i(),f=u(),p={type:`user`,id:`local-user`,name:`本地用户`,avatarUrl:null},m=p,h=(e,t)=>t;function g(e){m=e?.type===`user`?e:p}function _(e){h=e}var v=class extends Error{status;code;details;constructor(e,t){super(t.error?.message??h(`请求失败(${e})`,`Request failed (${e})`)),this.name=`ApiError`,this.status=e,this.code=t.error?.code??`REQUEST_FAILED`,this.details=t.error?.details}};function y(e){return new URL(e.replace(/^\//,``),document.baseURI).href}function b(e){let t=new URL(y(e));return t.protocol=t.protocol===`https:`?`wss:`:`ws:`,t.href}async function x(e,t){let n=new Headers(t?.headers);t?.body&&!n.has(`Content-Type`)&&n.set(`Content-Type`,`application/json`);let r=(t?.method??`GET`).toUpperCase();r!==`GET`&&r!==`HEAD`&&(n.set(`X-Taskboard-User-Id`,m.id),n.set(`X-Taskboard-User-Name`,encodeURIComponent(m.name)),m.avatarUrl&&m.avatarUrl.length<=2048&&(m.avatarUrl.startsWith(`https://`)||m.avatarUrl.startsWith(`http://`))&&n.set(`X-Taskboard-User-Avatar`,m.avatarUrl));let i=r===`GET`||r===`HEAD`,a;for(let o=0;;o+=1)try{a=await fetch(y(e),{...t,headers:n});break}catch(e){if(e instanceof Error&&e.name===`AbortError`)throw e;if(i&&o<2){await new Promise(e=>setTimeout(e,250*(o+1)));continue}let t=e instanceof Error&&e.name===`TimeoutError`?`timeout`:e instanceof TypeError?`browser-network`:`network`;throw new v(0,{error:{code:i?`READ_FAILED`:`SERVICE_UNAVAILABLE`,message:i?h(`暂时无法读取 Taskboard 数据。面板会自动重试,请稍后再试。`,`Taskboard data is temporarily unavailable. The panel will retry automatically.`):h(`暂时无法连接 Taskboard 服务,请稍后重试。`,`The Taskboard service is temporarily unavailable. Try again later.`),details:{method:r,failure:t}}})}let o;try{o=await a.json()}catch(e){if(e.name===`AbortError`)throw e;o={}}if(!a.ok)throw new v(a.status,o);return o}async function S(e){return(await x(`/api/projects`,{signal:e})).projects}async function C(e){try{return(await x(`/api/local/jira-connection`,{signal:e})).connection}catch(e){if(e instanceof v&&(e.code===`LOCAL_COMPANION_REQUIRED`||e.status===403&&e.code===`LOCAL_ONLY`||e.status===404))return{configured:!1,baseUrl:null,username:null,displayName:null,projects:[],projectId:`jira-my-tasks`,lastSyncedAt:null,insecureHttp:!1};throw e}}async function w(e){return(await x(`/api/local/jira-connection`,{method:`PUT`,body:JSON.stringify(e)})).connection}async function T(){return(await x(`/api/local/jira-connection/sync`,{method:`POST`})).connection}async function E(e,t){return x(`/api/local/projects/${encodeURIComponent(e)}/summary`,{signal:t})}async function D(e){return x(`/api/meta`,{signal:e})}async function O(e,t){return x(`/api/revisions?${new URLSearchParams({since:String(e)})}`,{signal:t})}async function k(e,t){let n=new URLSearchParams;for(let t of e)n.append(`threadId`,t);return(await x(`/api/local/codex-thread-progress?${n}`,{signal:t})).progress}async function ee(e){if(!e.threadId||e.threadRunning===void 0)return;let t=e.projects?.find(t=>t.id===e.projectId);await x(`/api/local/host-runtime`,{method:`PUT`,body:JSON.stringify({threadId:e.threadId,threadRunning:e.threadRunning,threadTodoProgress:e.threadTodoProgress??null,codexProjectId:t?.id??null,codexProjectKind:t?.projectKind??null,codexHostId:t?.hostId??null,workspacePath:t?.workspacePath??null})})}async function A(e,t,n){let r=new URLSearchParams;return n&&(r.set(`codexProjectId`,n.codexProjectId),r.set(`codexProjectKind`,n.codexProjectKind),r.set(`codexHostId`,n.codexHostId),r.set(`workspacePath`,n.workspacePath)),x(`/api/local/ai/catalog?projectId=${encodeURIComponent(e)}${r.size?`&${r}`:``}`,{signal:t})}async function te(e,t){let n=new URLSearchParams({trigger:e.trigger,query:e.query});return e.projectId&&n.set(`projectId`,e.projectId),e.threadId&&n.set(`threadId`,e.threadId),e.surface&&n.set(`surface`,e.surface),e.codexProjectId&&n.set(`codexProjectId`,e.codexProjectId),e.codexProjectKind&&n.set(`codexProjectKind`,e.codexProjectKind),e.codexHostId&&n.set(`codexHostId`,e.codexHostId),e.workspacePath&&n.set(`workspacePath`,e.workspacePath),x(`/api/local/ai/composer/candidates?${n}`,{signal:t})}async function j(e){return x(`/api/local/ai/composer/rebind`,{method:`POST`,body:JSON.stringify(e)})}async function M(e){return(await x(`/api/local/ai/threads`,{signal:e})).threads}async function N(e){return(await x(`/api/local/ai/threads`,{method:`POST`,body:JSON.stringify(e)})).thread}async function P(e,t){return x(`/api/local/ai/threads/${encodeURIComponent(e)}/summary`,{signal:t})}async function F(e,t){return x(`/api/local/ai/threads/${encodeURIComponent(e)}`,{signal:t})}async function I(e,t){return(await x(`/api/local/ai/threads/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)})).thread}async function ne(e){await x(`/api/local/ai/threads/${encodeURIComponent(e)}`,{method:`DELETE`})}async function re(e,t){return(await x(`/api/local/ai/threads/${encodeURIComponent(e)}/turns`,{method:`POST`,body:JSON.stringify(t)})).run}async function ie(e,t){return(await x(`/api/local/ai/threads/${encodeURIComponent(e)}/turns`,{method:`POST`,body:JSON.stringify(t)})).run}async function L(e){return(await x(`/api/local/ai/runs/${encodeURIComponent(e)}/interrupt`,{method:`POST`})).run}async function R(e){return(await x(`/api/local/ai/threads/${encodeURIComponent(e)}/compact`,{method:`POST`})).thread}function ae(e,t,n){let r=new EventSource(y(`/api/local/ai/threads/${encodeURIComponent(e)}/events`));return r.addEventListener(`ai.event`,()=>t(`ai.event`)),r.addEventListener(`ai.run`,()=>t(`ai.run`)),n&&r.addEventListener(`error`,n),()=>r.close()}async function oe(e){try{return(await x(`/api/device-workspaces`,{signal:e})).workspaces}catch(e){if(e instanceof v&&e.code===`LOCAL_COMPANION_REQUIRED`)return{};throw e}}async function se(e,t){return(await x(`/api/projects/${encodeURIComponent(e)}/readme`,{signal:t})).readme}async function ce(e,t,n){return(await x(`/api/projects/${encodeURIComponent(e)}/readme`,{method:`PUT`,body:JSON.stringify({content:t,...n===void 0?{}:{version:n}})})).readme}async function le(e,t){return(await x(`/api/projects/${encodeURIComponent(e)}/readme/attachments`,{method:`POST`,headers:{"Content-Type":t.type||`application/octet-stream`,"X-Taskboard-Filename":encodeURIComponent(t.name),"X-Taskboard-Attachment-Kind":`inline`},body:t})).attachment}async function ue(e){return(await x(`/api/projects`,{method:`POST`,body:JSON.stringify(e)})).project}async function de(e,t){return(await x(`/api/projects/${encodeURIComponent(e)}/labels`,{method:`POST`,body:JSON.stringify({label:t})})).project}async function fe(e,t){return(await x(`/api/projects/${encodeURIComponent(e)}/labels`,{method:`DELETE`,body:JSON.stringify({label:t})})).project}async function pe(e){await x(`/api/projects/${encodeURIComponent(e)}`,{method:`DELETE`})}async function me(e,t,n,r,i){let a=new URLSearchParams;t&&a.set(`codexProjectId`,t),n&&a.set(`codexThreadId`,n),i&&a.set(`workspacePath`,i);let o=a.size>0?`?${a}`:``;return x(`/api/projects/${encodeURIComponent(e)}/development-contexts${o}`,{signal:r})}async function he(e,t,n){let r=new URLSearchParams({archived:t});return e&&r.set(`projectId`,e),(await x(`/api/tasks?${r}`,{signal:n})).tasks}function ge(e,t){return he(e,`false`,t)}async function _e(e,t){return(await x(`/api/tasks/${encodeURIComponent(e)}`,{signal:t})).task}function ve(e,t){return he(e,`true`,t)}async function ye(e,t,n){return(await x(`/api/tasks`,{method:`POST`,body:JSON.stringify({projectId:e,...t,...n?{threadId:n}:{}})})).task}async function be(e,t,n){return(await x(`/api/tasks/${encodeURIComponent(e.id)}`,{method:`PATCH`,body:JSON.stringify({version:e.version,...t,...n?{threadId:n}:{}})})).task}async function xe(e,t,n,r,i){return(await x(`/api/tasks/${encodeURIComponent(e.id)}/move`,{method:`POST`,body:JSON.stringify({version:e.version,status:t,...n===void 0?{}:{sortOrder:n},...r===void 0?{}:{threadBinding:r},...i?{threadId:i}:{}})})).task}async function Se(e,t){return(await x(`/api/tasks/${encodeURIComponent(e.id)}/archive`,{method:`POST`,body:JSON.stringify({version:e.version,...t?{threadId:t}:{}})})).task}async function Ce(e,t){return(await x(`/api/tasks/${encodeURIComponent(e.id)}/restore`,{method:`POST`,body:JSON.stringify({version:e.version,...t?{threadId:t}:{}})})).task}async function we(e){await x(`/api/tasks/${encodeURIComponent(e.id)}`,{method:`DELETE`,body:JSON.stringify({version:e.version})})}async function Te(e,t,n,r,i){return x(`/api/tasks/${encodeURIComponent(e.id)}/relations/${t}/${encodeURIComponent(n)}`,{method:`POST`,body:JSON.stringify({version:e.version,...i?{origin:i}:{},...r?{threadId:r}:{}})})}async function Ee(e,t,n,r,i){return x(`/api/tasks/${encodeURIComponent(e.id)}/relations/${t}/${encodeURIComponent(n)}`,{method:`DELETE`,body:JSON.stringify({version:e.version,...i?{origin:i}:{},...r?{threadId:r}:{}})})}async function De(e,t){return(await x(`/api/tasks/${encodeURIComponent(e)}/comments`,{signal:t})).comments}async function Oe(e,t){return(await x(`/api/tasks/${encodeURIComponent(e)}/activities`,{signal:t})).activities}async function ke(e,t,n,r){return(await x(`/api/tasks/${encodeURIComponent(e)}/comments`,{method:`POST`,body:JSON.stringify({body:t,...n?{threadId:n}:{},...r===void 0?{}:{threadBinding:r}})})).comment}async function Ae(e,t,n){return(await x(`/api/comments/${encodeURIComponent(e.id)}`,{method:`PATCH`,body:JSON.stringify({version:e.version,body:t,...n?{threadId:n}:{}})})).comment}async function z(e,t){await x(`/api/comments/${encodeURIComponent(e.id)}`,{method:`DELETE`,body:JSON.stringify({version:e.version,...t?{threadId:t}:{}})})}async function je(e,t){return(await x(`/api/tasks/${encodeURIComponent(e)}/attachments`,{signal:t})).attachments}async function Me(e,t,n){return(await x(`/api/tasks/${encodeURIComponent(e)}/attachments`,{method:`POST`,headers:{"Content-Type":t.type||`application/octet-stream`,"X-Taskboard-Filename":encodeURIComponent(t.name),"X-Taskboard-Attachment-Kind":n},body:t})).attachment}async function Ne(e,t,n){return(await x(`/api/comments/${encodeURIComponent(e)}/attachments`,{method:`POST`,headers:{"Content-Type":t.type||`application/octet-stream`,"X-Taskboard-Filename":encodeURIComponent(t.name),"X-Taskboard-Attachment-Kind":n},body:t})).attachment}function Pe(e){return`api/attachments/${encodeURIComponent(e.id)}/content`}function Fe(e){return`api/attachments/${encodeURIComponent(e.id)}/download`}function Ie(e){if(/^\/?api\/attachments\/[^/?#]+\/content$/.test(e))return y(e);try{let t=new URL(e),n=t.pathname.match(/\/api\/attachments\/([^/]+)\/content$/);if(t.protocol===`http:`&&t.hostname===`127.0.0.1`&&n)return y(`/api/attachments/${n[1]}/content`)}catch{return e}return e}function Le(e,t){return Promise.all(e.map(e=>t(e.file,e.type===`pending-image`?`inline`:`attachment`)))}function Re(e,t,n){return t.reduce((e,t,r)=>{let i=n[r];if(!i)return e;let a=t.file.name.replace(/[\\[\]]/g,`\\$&`),o=t.type===`pending-image`,s=o?Pe(i):Fe(i);return e.replace(t.token,`${o?`!`:``}[${a}](${s})`)},e)}var ze={type:`agent`,id:`codex-agent`,name:`Codex Agent`,avatarUrl:null};function Be(e){return`${e.type}:${e.id}`}function Ve(e,t){return e===`codex-agent`?ze:t}function He(e,t){return e.type===`agent`?`codex-agent`:e.id===t.id?`current-user`:void 0}function Ue({tasks:e,draggedTaskId:t,draggedTaskHeight:n,isDropTarget:r}){let[i,a]=(0,d.useState)(),o=new Map(e.map((e,t)=>[e.id,t])),s=e.filter(e=>e.id!==t),c=new Map(s.map((e,t)=>[e.id,t])),l=t?o.get(t)??-1:-1,u=i?c.get(i)??s.length:s.length,f=r&&i!==void 0?u:-1,p=n+8;(0,d.useEffect)(()=>{(!r||!t)&&a(void 0)},[t,r]);function m(e,n){return Array.from(e.querySelectorAll(`[data-task-id]`)).filter(e=>e.dataset.taskId!==t).find(e=>n<e.getBoundingClientRect().top+e.offsetHeight/2)?.dataset.taskId??null}function h(){a(void 0)}function g(e){e.preventDefault(),e.dataTransfer.dropEffect=`move`,a(m(e.currentTarget,e.clientY))}function _(e){(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&h()}function v(e){if(!t||e===t)return 0;let n=0,r=o.get(e)??-1,i=c.get(e)??-1;return l>=0&&r>l&&(n-=p),f>=0&&i>=f&&(n+=p),n}return{findDropBefore:m,clearDropPreview:h,updateDropPreview:g,leaveDropPreview:_,getTaskDragShift:v}}var We=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Ge=n(((e,t)=>{t.exports=We()})),B=Ge(),Ke={zh:{language:`zh`,locale:`zh-CN`,text:e=>e},en:{language:`en`,locale:`en`,text:(e,t)=>t}},qe={zh:{backlog:`待立项`,todo:`等待认领`,in_progress:`处理中`,in_review:`等你确认`,blocked:`遇到阻碍`,done:`完成`,canceled:`取消`},en:{backlog:`Backlog`,todo:`To do`,in_progress:`In progress`,in_review:`In review`,blocked:`Blocked`,done:`Done`,canceled:`Canceled`}},Je={zh:{none:`无优先级`,urgent:`紧急`,high:`高`,medium:`中`,low:`低`},en:{none:`No priority`,urgent:`Urgent`,high:`High`,medium:`Medium`,low:`Low`}},Ye=(0,d.createContext)(`en`);function Xe(e){let t=e?.trim().replaceAll(`_`,`-`).toLowerCase()??``;return t===`zh`||t.startsWith(`zh-`)?`zh`:`en`}function Ze(e){return Ke[e]}function Qe(e,t){return qe[e][t]}function V(e,t){return Je[e][t]}function $e({language:e,children:t}){return(0,B.jsx)(Ye.Provider,{value:e,children:t})}function H(){return Ke[(0,d.useContext)(Ye)]}function et(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var tt=ut(/[A-Za-z]/),U=ut(/[\dA-Za-z]/),nt=ut(/[#-'*+\--9=?A-Z^-~]/);function rt(e){return e!==null&&(e<32||e===127)}var it=ut(/\d/),at=ut(/[\dA-Fa-f]/),ot=ut(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}var ct=ut(/\p{P}|\p{S}/u),lt=ut(/\s/);function ut(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dt(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var ft=(function(e){if(e==null)return _t;if(typeof e==`function`)return gt(e);if(typeof e==`object`)return Array.isArray(e)?pt(e):mt(e);if(typeof e==`string`)return ht(e);throw Error(`Expected function, string, or object as test`)});function pt(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ft(e[n]);return gt(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function mt(e){let t=e;return gt(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ht(e){return gt(t);function t(t){return t&&t.type===e}}function gt(e){return t;function t(t,n,r){return!!(vt(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function _t(){return!0}function vt(e){return typeof e==`object`&&!!e&&`type`in e}function yt(e){return e}var bt=[];function xt(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=ft(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+yt(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=bt,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=St(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function St(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?bt:[e]}function Ct(e,t,n){let r=ft((n||{}).ignore||[]),i=wt(t),a=-1;for(;++a<i.length;)xt(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function wt(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Tt(e[0]),Et(e[1])])}return t}function Tt(e){return typeof e==`string`?new RegExp(dt(e),`g`):e}function Et(e){return typeof e==`function`?e:function(){return e}}var Dt=`phrasing`,Ot=[`autolink`,`link`,`image`,`label`];function kt(){return{transforms:[Lt],enter:{literalAutolink:jt,literalAutolinkEmail:Mt,literalAutolinkHttp:Mt,literalAutolinkWww:Mt},exit:{literalAutolink:It,literalAutolinkEmail:Ft,literalAutolinkHttp:Nt,literalAutolinkWww:Pt}}}function At(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Dt,notInConstruct:Ot},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Dt,notInConstruct:Ot},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Dt,notInConstruct:Ot}]}}function jt(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Mt(e){this.config.enter.autolinkProtocol.call(this,e)}function Nt(e){this.config.exit.autolinkProtocol.call(this,e)}function Pt(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Ft(e){this.config.exit.autolinkEmail.call(this,e)}function It(e){this.exit(e)}function Lt(e){Ct(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Rt],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,zt]],{ignore:[`link`,`linkReference`]})}function Rt(e,t,n,r,i){let a=``;if(!Ht(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Bt(n)))return!1;let o=Vt(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function zt(e,t,n,r){return!Ht(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Bt(e){let 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 Vt(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=et(e,`(`),a=et(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Ht(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||lt(n)||ct(n))&&(!t||n!==47)}function Ut(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}$t.peek=Qt;function Wt(){this.buffer()}function Gt(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Kt(){this.buffer()}function qt(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Jt(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Yt(e){this.exit(e)}function Xt(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zt(e){this.exit(e)}function Qt(){return`[`}function $t(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function en(){return{enter:{gfmFootnoteCallString:Wt,gfmFootnoteCall:Gt,gfmFootnoteDefinitionLabelString:Kt,gfmFootnoteDefinition:qt},exit:{gfmFootnoteCallString:Jt,gfmFootnoteCall:Yt,gfmFootnoteDefinitionLabelString:Xt,gfmFootnoteDefinition:Zt}}}function tn(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$t},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
11
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?rn:nn))),s(),o}}function nn(e,t,n){return t===0?e:rn(e,t,n)}function rn(e,t,n){return(n?``:` `)+e}var an=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];un.peek=dn;function on(){return{canContainEols:[`delete`],enter:{strikethrough:cn},exit:{strikethrough:ln}}}function sn(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:an}],handlers:{delete:un}}}function cn(e){this.enter({type:`delete`,children:[]},e)}function ln(e){this.exit(e)}function un(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function dn(){return`~`}function fn(e){return e.length}function pn(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||fn,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=mn(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=hn(r[d]);else{let e=hn(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
12
|
-
`)}function mn(e){return e==null?``:String(e)}function hn(e){let 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 gn(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),_n);return i(),o}function _n(e,t,n){return`>`+(n?``:` `)+e}function vn(e,t){return yn(e,t.inConstruct,!0)&&!yn(e,t.notInConstruct,!1)}function yn(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function bn(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
13
|
-
`&&vn(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
14
|
-
`}function xn(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Sn(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 Cn(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function wn(e,t,n,r){let i=Cn(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Sn(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Tn);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(xn(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
15
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
16
|
-
`),a&&(u+=s.move(a+`
|
|
17
|
-
`)),u+=s.move(c),l(),u}function Tn(e,t,n){return(n?``:` `)+e}function En(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Dn(e,t,n,r){let i=En(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
18
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function On(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function kn(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function An(e){if(e===null||st(e)||lt(e))return 1;if(ct(e))return 2}function jn(e,t,n){let r=An(e),i=An(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mn.peek=Nn;function Mn(e,t,n,r){let i=On(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=jn(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=kn(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=jn(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+kn(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Nn(e,t,n){return n.options.emphasis||`*`}function Pn(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),xt(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Fn={};function In(e,t){let n=t||Fn;return Ln(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Ln(e,t,n){if(zn(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 Rn(e.children,t,n)}return Array.isArray(e)?Rn(e,t,n):``}function Rn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Ln(e[i],t,n);return r.join(``)}function zn(e){return!!(e&&typeof e==`object`)}function Bn(e,t){let n=!1;return Pn(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&In(e)&&(t.options.setext||n))}function Vn(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Bn(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
19
|
-
`,after:`
|
|
20
|
-
`});return r(),t(),o+`
|
|
21
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
22
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
23
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=kn(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Hn.peek=Un;function Hn(e){return e.value||``}function Un(){return`<`}Wn.peek=Gn;function Wn(e,t,n,r){let i=En(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Gn(){return`!`}Kn.peek=qn;function Kn(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function qn(){return`!`}Jn.peek=Yn;function Jn(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Yn(){return"`"}function Xn(e,t){let n=In(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))}Zn.peek=Qn;function Zn(e,t,n,r){let i=En(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Xn(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Qn(e,t,n){return Xn(e,n)?`<`:`[`}$n.peek=er;function $n(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function er(){return`[`}function tr(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nr(e){let t=tr(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function rr(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ir(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ar(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?rr(n):tr(n),s=e.ordered?o===`.`?`)`:`.`:nr(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),ir(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function or(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sr(e,t,n,r){let i=or(n),a=n.bulletCurrent||tr(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function cr(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var lr=ft([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ur(e,t,n,r){return(e.children.some(function(e){return lr(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function dr(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}fr.peek=pr;function fr(e,t,n,r){let i=dr(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=jn(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=kn(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=jn(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+kn(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function pr(e,t,n){return n.options.strong||`*`}function mr(e,t,n,r){return n.safe(e.value,r)}function hr(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function gr(e,t,n){let r=(ir(n)+(n.options.ruleSpaces?` `:``)).repeat(hr(n));return n.options.ruleSpaces?r.slice(0,-1):r}var _r={blockquote:gn,break:bn,code:wn,definition:Dn,emphasis:Mn,hardBreak:bn,heading:Vn,html:Hn,image:Wn,imageReference:Kn,inlineCode:Jn,link:Zn,linkReference:$n,list:ar,listItem:sr,paragraph:cr,root:ur,strong:fr,text:mr,thematicBreak:gr},vr=c(),yr=document.createElement(`i`);function br(e){let t=`&`+e+`;`;yr.innerHTML=t;let n=yr.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function xr(e,t){let 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)}var Sr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cr(e){return e.replace(Sr,wr)}function wr(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return xr(n.slice(t?2:1),t?16:10)}return br(n)||e}function Tr(){return{enter:{table:K,tableData:kr,tableHeader:kr,tableRow:Dr},exit:{codeText:Ar,table:Er,tableData:Or,tableHeader:Or,tableRow:Or}}}function K(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Er(e){this.exit(e),this.data.inTable=void 0}function Dr(e){this.enter({type:`tableRow`,children:[]},e)}function Or(e){this.exit(e)}function kr(e){this.enter({type:`tableCell`,children:[]},e)}function Ar(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jr));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jr(e,t){return t===`|`?t:e}function Mr(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
24
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
25
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return pn(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=_r.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Nr(){return{exit:{taskListCheckValueChecked:Fr,taskListCheckValueUnchecked:Fr,paragraph:Ir}}}function Pr(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Lr}}}function Fr(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Ir(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Lr(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=_r.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Rr(){return[kt(),en(),on(),Tr(),Nr()]}function zr(e){return{extensions:[At(),tn(e),sn(),Mr(e),Pr()]}}function Br(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Vr(e,t){return e.length>0?(Br(e,e.length,0,t),e):t}var Hr={}.hasOwnProperty;function Ur(e){let t={},n=-1;for(;++n<e.length;)Wr(t,e[n]);return t}function Wr(e,t){let n;for(n in t){let r=(Hr.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Hr.call(r,a)||(r[a]=[]);let e=i[a];Gr(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Gr(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Br(e,0,0,r)}var Kr={tokenize:oi,partial:!0},qr={tokenize:si,partial:!0},Jr={tokenize:ci,partial:!0},Yr={tokenize:li,partial:!0},Xr={tokenize:ui,partial:!0},Zr={name:`wwwAutolink`,tokenize:ii,previous:di},Qr={name:`protocolAutolink`,tokenize:ai,previous:fi},$r={name:`emailAutolink`,tokenize:ri,previous:pi},ei={};function ti(){return{text:ei}}for(var ni=48;ni<123;)ei[ni]=$r,ni++,ni===58?ni=65:ni===91&&(ni=97);ei[43]=$r,ei[45]=$r,ei[46]=$r,ei[95]=$r,ei[72]=[$r,Qr],ei[104]=[$r,Qr],ei[87]=[$r,Zr],ei[119]=[$r,Zr];function ri(e,t,n){let r=this,i,a;return o;function o(t){return!mi(t)||!pi.call(r,r.previous)||hi(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return mi(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Xr,u,l)(t):t===45||t===95||U(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&tt(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ii(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!di.call(r,r.previous)||hi(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Kr,e.attempt(qr,e.attempt(Jr,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ai(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&fi.call(r,r.previous)&&!hi(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(tt(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||rt(t)||st(t)||lt(t)||ct(t)?n(t):e.attempt(qr,e.attempt(Jr,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function oi(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function si(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Yr,c,s)(t):t===null||st(t)||lt(t)||t!==45&&ct(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function ci(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Yr,t,a)(o):o===null||st(o)||lt(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function li(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||st(o)||lt(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||st(e)||lt(e)?t(e):r(e)}function a(e){return tt(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):tt(t)?(e.consume(t),o):n(t)}}function ui(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return U(e)?n(e):t(e)}}function di(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function fi(e){return!tt(e)}function pi(e){return!(e===47||mi(e))}function mi(e){return e===43||e===45||e===46||e===95||U(e)}function hi(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function gi(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&U(e.charCodeAt(n+1))&&U(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function _i(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var vi={name:`attention`,resolveAll:yi,tokenize:bi};function yi(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};xi(d,-c),xi(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Vr(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Vr(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Vr(l,_i(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Vr(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Vr(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Br(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function bi(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=An(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=An(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function xi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Si={name:`autolink`,tokenize:Ci};function Ci(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return tt(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||U(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||U(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||rt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):nt(t)?(e.consume(t),l):n(t)}function u(e){return U(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||U(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function wi(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return G(r)?(e.enter(n),s(r)):t(r)}function s(r){return G(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Ti={partial:!0,tokenize:Ei};function Ei(e,t,n){return r;function r(t){return G(t)?wi(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||W(e)?t(e):n(e)}}var Di={continuation:{tokenize:ki},exit:Ai,name:`blockQuote`,tokenize:Oi};function Oi(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return G(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ki(e,t,n){let r=this;return i;function i(t){return G(t)?wi(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Di,t,n)(r)}}function Ai(e){e.exit(`blockQuote`)}var ji={name:`characterEscape`,tokenize:Mi};function Mi(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ot(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Ni={name:`characterReference`,tokenize:Pi};function Pi(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=U,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=at,u):(e.enter(`characterReferenceValue`),a=7,o=it,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===U&&!br(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Fi={partial:!0,tokenize:Ri},Ii={concrete:!0,name:`codeFenced`,tokenize:Li};function Li(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),G(t)?wi(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||W(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Fi,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),wi(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||W(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&G(t)?wi(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||W(t)?e.check(Fi,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||W(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),G(t)?wi(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),G(t)?wi(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||W(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ri(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var zi={name:`codeIndented`,tokenize:Vi},Bi={partial:!0,tokenize:Hi};function Vi(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),wi(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):W(t)?e.attempt(Bi,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||W(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Hi(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):wi(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):W(e)?i(e):n(e)}}var Ui={name:`codeText`,previous:Gi,resolve:Wi,tokenize:Ki};function Wi(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Gi(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Ki(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||W(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var qi=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ji(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ji(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ji(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Ji(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ji(this.left,t.reverse())}}};function Ji(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 Yi(e){let t={},n=-1,r,i,a,o,s,c,l,u=new qi(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Xi(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Br(e,0,1/0,u.slice(0)),!l}function Xi(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Zi={resolve:$i,tokenize:ea},Qi={partial:!0,tokenize:ta};function $i(e){return Yi(e),e}function ea(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):W(t)?e.check(Qi,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ta(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),wi(e,a,`linePrefix`)}function a(i){if(i===null||W(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function na(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||rt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||W(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||st(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||rt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function ra(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):W(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||W(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!G(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ia(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),wi(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||W(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function aa(e,t){let n;return r;function r(i){return W(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):G(i)?wi(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var oa={name:`definition`,tokenize:ca},sa={partial:!0,tokenize:la};function ca(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return ra.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return st(t)?aa(e,l)(t):l(t)}function l(t){return na(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(sa,d,d)(t)}function d(t){return G(t)?wi(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||W(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function la(e,t,n){return r;function r(t){return st(t)?aa(e,i)(t):n(t)}function i(t){return ia(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return G(t)?wi(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||W(e)?t(e):n(e)}}var ua={name:`hardBreakEscape`,tokenize:da};function da(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return W(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var fa={name:`headingAtx`,resolve:pa,tokenize:ma};function pa(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Br(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function ma(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||st(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||W(n)?(e.exit(`atxHeading`),t(n)):G(n)?wi(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||st(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var ha=`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`.split(`.`),ga=[`pre`,`script`,`style`,`textarea`],_a={concrete:!0,name:`htmlFlow`,resolveTo:ba,tokenize:xa},va={partial:!0,tokenize:Ca},ya={partial:!0,tokenize:Sa};function ba(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 xa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):tt(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):tt(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return tt(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||st(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ga.includes(l)?(i=1,r.interrupt?t(s):O(s)):ha.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||U(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return G(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||tt(t)?(e.consume(t),b):G(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||U(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):G(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):G(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||W(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||st(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||G(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||W(t)?O(t):G(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),te):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),N):W(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(va,I,k)(t)):t===null||W(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(ya,ee,I)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||W(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function te(t){return t===45?(e.consume(t),P):O(t)}function j(t){return t===47?(e.consume(t),o=``,M):O(t)}function M(t){if(t===62){let n=o.toLowerCase();return ga.includes(n)?(e.consume(t),F):O(t)}return tt(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),M):O(t)}function N(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||W(t)?(e.exit(`htmlFlowData`),I(t)):(e.consume(t),F)}function I(n){return e.exit(`htmlFlow`),t(n)}}function Sa(e,t,n){let r=this;return i;function i(t){return W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Ca(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ti,t,n)}}var wa={name:`htmlText`,tokenize:Ta};function Ta(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):tt(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):tt(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):W(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?te(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):W(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?te(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?te(t):W(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):W(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?te(e):y(e)}function x(t){return tt(t)?(e.consume(t),S):n(t)}function S(t){return t===45||U(t)?(e.consume(t),S):C(t)}function C(t){return W(t)?(o=C,j(t)):G(t)?(e.consume(t),C):te(t)}function w(t){return t===45||U(t)?(e.consume(t),w):t===47||t===62||st(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),te):t===58||t===95||tt(t)?(e.consume(t),E):W(t)?(o=T,j(t)):G(t)?(e.consume(t),T):te(t)}function E(t){return t===45||t===46||t===58||t===95||U(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):W(t)?(o=D,j(t)):G(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):W(t)?(o=O,j(t)):G(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):W(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||st(t)?T(t):(e.consume(t),ee)}function A(e){return e===47||e===62||st(e)?T(e):n(e)}function te(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),M}function M(t){return G(t)?wi(e,N,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):N(t)}function N(t){return e.enter(`htmlTextData`),o(t)}}var Ea={name:`labelEnd`,resolveAll:Aa,resolveTo:ja,tokenize:Ma},Da={tokenize:Na},Oa={tokenize:Pa},ka={tokenize:Fa};function Aa(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Br(e,0,e.length,n),e}function ja(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Vr(s,e.slice(a+1,a+r+3)),s=Vr(s,[[`enter`,u,t]]),s=Vr(s,_i(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Vr(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Vr(s,e.slice(o+1)),s=Vr(s,[[`exit`,c,t]]),Br(e,a,e.length,s),e}function Ma(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ut(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Da,u,o?u:d)(t):t===91?e.attempt(Oa,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ka,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Na(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return st(t)?aa(e,a)(t):a(t)}function a(t){return t===41?u(t):na(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return st(t)?aa(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?ia(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return st(t)?aa(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Pa(e,t,n){let r=this;return i;function i(t){return ra.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Fa(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Ia={name:`labelStartImage`,resolveAll:Ea.resolveAll,tokenize:La};function La(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Ra={name:`labelStartLink`,resolveAll:Ea.resolveAll,tokenize:za};function za(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Ba={name:`lineEnding`,tokenize:Va};function Va(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),wi(e,t,`linePrefix`)}}var Ha={name:`thematicBreak`,tokenize:Ua};function Ua(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||W(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),G(t)?wi(e,s,`whitespace`)(t):s(t))}}var Wa={continuation:{tokenize:Ja},exit:Xa,name:`list`,tokenize:qa},Ga={partial:!0,tokenize:Za},Ka={partial:!0,tokenize:Ya};function qa(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:it(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Ha,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return it(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ti,r.interrupt?n:u,e.attempt(Ga,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return G(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ja(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ti,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,wi(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!G(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ka,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,wi(e,e.attempt(Wa,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Ya(e,t,n){let r=this;return wi(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Xa(e){e.exit(this.containerState.type)}function Za(e,t,n){let r=this;return wi(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!G(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Qa={name:`setextUnderline`,resolveTo:$a,tokenize:eo};function $a(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function eo(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),G(t)?wi(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||W(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var to={tokenize:co,partial:!0};function no(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:q,continuation:{tokenize:oo},exit:so}},text:{91:{name:`gfmFootnoteCall`,tokenize:ao},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:ro,resolveTo:io}}}}function ro(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Ut(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function io(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function ao(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||st(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Ut(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return st(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function q(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||st(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Ut(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return st(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),wi(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function oo(e,t,n){return e.check(Ti,t,e.attempt(to,t,n))}function so(e){e.exit(`gfmFootnoteDefinition`)}function co(e,t,n){let r=this;return wi(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function lo(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Br(o,o.length,0,_i(s,e.slice(r+1,n),t)),Br(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Br(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=An(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=An(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var uo=class{constructor(){this.map=[]}add(e,t,n){fo(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function fo(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function po(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function mo(){return{flow:{null:{name:`table`,tokenize:ho,resolveAll:go}}}}function ho(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):W(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):G(t)?wi(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||st(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,G(t)?wi(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return G(t)?wi(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||W(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return G(t)?wi(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||W(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||W(n)?(e.exit(`tableRow`),t(n)):G(n)?wi(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||st(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function go(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new uo;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(vo(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=_o(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=_o(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=_o(f,t,o,i,n,d)):(o[0]=o[1],d=_o(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&vo(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=po(t.events,n))}return e}function _o(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},yo(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=yo(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=yo(t.events,n[2]),a=yo(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},yo(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function vo(e,t,n,r,i){let a=[],o=yo(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function yo(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var bo={name:`tasklistCheck`,tokenize:So};function xo(){return{text:{91:bo}}}function So(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return st(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return W(r)?t(r):G(r)?e.check({tokenize:Co},t,n)(r):n(r)}}function Co(e,t,n){return wi(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function wo(e){return Ur([ti(),no(),lo(e),mo(),xo()])}var To={};function Eo(e){let t=this,n=e||To,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(wo(n)),a.push(Rr()),o.push(zr(n))}var Do={tokenize:Oo};function Oo(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),wi(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return W(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ko={tokenize:jo},Ao={tokenize:Mo};function jo(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Br(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ao,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ao,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return W(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Br(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mo(e,t,n){return wi(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var No={tokenize:Po};function Po(e){let t=this,n=e.attempt(Ti,r,e.attempt(this.parser.constructs.flowInitial,i,wi(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Zi,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Fo={resolveAll:zo()},Io=Ro(`string`),Lo=Ro(`text`);function Ro(e){return{resolveAll:zo(e===`text`?Bo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function zo(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Bo(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Vo=e({attentionMarkers:()=>Yo,contentInitial:()=>Uo,disable:()=>Xo,document:()=>Ho,flow:()=>Go,flowInitial:()=>Wo,insideSpan:()=>Jo,string:()=>Ko,text:()=>qo}),Ho={42:Wa,43:Wa,45:Wa,48:Wa,49:Wa,50:Wa,51:Wa,52:Wa,53:Wa,54:Wa,55:Wa,56:Wa,57:Wa,62:Di},Uo={91:oa},Wo={[-2]:zi,[-1]:zi,32:zi},Go={35:fa,42:Ha,45:[Qa,Ha],60:_a,61:Qa,95:Ha,96:Ii,126:Ii},Ko={38:Ni,92:ji},qo={[-5]:Ba,[-4]:Ba,[-3]:Ba,33:Ia,38:Ni,42:vi,60:[Si,wa],91:Ra,92:[ua,ji],93:Ea,95:vi,96:Ui},Jo={null:[vi,Fo]},Yo={null:[42,95]},Xo={null:[]};function Zo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Vr(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=_i(a,l.events,l),l.events):[]}function f(e,t){return $o(p(e),t)}function p(e){return Qo(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){W(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Br(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Qo(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function $o(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
26
|
-
`;break;case-3:o=`\r
|
|
27
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function es(e){let t={constructs:Ur([Vo,...(e||{}).extensions||[]]),content:n(Do),defined:[],document:n(ko),flow:n(No),lazy:{},string:n(Io),text:n(Lo)};return t;function n(e){return n;function n(n){return Zo(t,e,n)}}}function ts(e){for(;!Yi(e););return e}var ns=/[\0\t\n\r]/g;function rs(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(ns.lastIndex=u,c=ns.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function is(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ss(e.position):`start`in e||`end`in e?ss(e):`line`in e||`column`in e?as(e):``}function as(e){return cs(e&&e.line)+`:`+cs(e&&e.column)}function ss(e){return as(e&&e.start)+`-`+as(e&&e.end)}function cs(e){return e&&typeof e==`number`?e:1}var ls={}.hasOwnProperty;function us(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ds(n)(ts(es(n).document().write(rs()(e,t,!0))))}function ds(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:L,characterReference:R,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(A),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(ee),htmlTextData:E,image:c(j),label:N,labelText:M,lineEnding:D,link:c(te),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:P,resourceTitleString:F,resource:I,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ps(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];ls.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||hs).call(a,void 0,e[0])}for(r.position={start:fs(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:fs(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:fs(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||hs).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+is({start:e.start,end:e.end})+`): it’s not open`);n.position.end=fs(e.end)}function u(){return In(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ut(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:fs(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=fs(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=fs(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Cr(t),n.identifier=Ut(t).toLowerCase()}function N(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function I(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ut(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function L(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=xr(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=br(t);let i=this.stack[this.stack.length-1];i.value+=r}function R(e){let t=this.stack.pop();t.position.end=fs(e.end)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function fs(e){return{line:e.line,column:e.column,offset:e.offset}}function ps(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ps(e,r):ms(e,r)}}function ms(e,t){let n;for(n in t)if(ls.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function hs(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+is({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+is({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+is({start:t.start,end:t.end})+`) is still open`)}function gs(e){let t=this;t.parser=n;function n(n){return us(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function _s(e){if(e)throw e}var vs=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function ys(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bs(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?xs(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function xs(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Ss=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=is(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ss.prototype.file=``,Ss.prototype.name=``,Ss.prototype.reason=``,Ss.prototype.message=``,Ss.prototype.stack=``,Ss.prototype.column=void 0,Ss.prototype.line=void 0,Ss.prototype.ancestors=void 0,Ss.prototype.cause=void 0,Ss.prototype.fatal=void 0,Ss.prototype.place=void 0,Ss.prototype.ruleId=void 0,Ss.prototype.source=void 0;var Cs={basename:ws,dirname:Ts,extname:Es,join:Ds,sep:`/`};function ws(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);As(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Ts(e){if(As(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Es(e){As(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ds(...e){let t=-1,n;for(;++t<e.length;)As(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Os(n)}function Os(e){As(e);let t=e.codePointAt(0)===47,n=ks(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ks(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function As(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var js={cwd:Ms};function Ms(){return`/`}function Ns(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ps(e){if(typeof e==`string`)e=new URL(e);else if(!Ns(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Fs(e)}function Fs(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Is=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Ls=class{constructor(e){let t;t=e?Ns(e)?{path:e}:typeof e==`string`||Vs(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:js.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Is.length;){let e=Is[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Is.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Cs.basename(this.path):void 0}set basename(e){zs(e,`basename`),Rs(e,`basename`),this.path=Cs.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Cs.dirname(this.path):void 0}set dirname(e){Bs(this.basename,`dirname`),this.path=Cs.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Cs.extname(this.path):void 0}set extname(e){if(Rs(e,`extname`),Bs(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Cs.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ns(e)&&(e=Ps(e)),zs(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Cs.basename(this.path,this.extname):void 0}set stem(e){zs(e,`stem`),Rs(e,`stem`),this.path=Cs.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ss(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Rs(e,t){if(e&&e.includes(Cs.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Cs.sep+"`")}function zs(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Bs(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Vs(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Hs=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Us=t(vs(),1),Ws={}.hasOwnProperty,Gs=new class e extends Hs{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=bs()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Us.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Js(`data`,this.frozen),this.namespace[e]=t,this):Ws.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Js(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Zs(e),n=this.parser||this.Parser;return Ks(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Ks(`process`,this.parser||this.Parser),qs(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Zs(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);$s(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Ks(`processSync`,this.parser||this.Parser),qs(`processSync`,this.compiler||this.Compiler),this.process(e,r),Xs(`processSync`,`process`,t),n;function r(e,r){t=!0,_s(e),n=r}}run(e,t,n){Ys(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Zs(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Xs(`runSync`,`run`,n),r;function i(e,t){_s(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Zs(t),r=this.compiler||this.Compiler;return qs(`stringify`,r),Ys(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Js(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,Us.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ys(o)&&ys(r)&&(r=(0,Us.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Ks(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function qs(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Js(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ys(e){if(!ys(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Xs(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zs(e){return Qs(e)?e:new Ls(e)}function Qs(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function $s(e){return typeof e==`string`||ec(e)}function ec(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var tc=[`backlog`,`todo`,`in_progress`,`in_review`,`blocked`,`done`,`canceled`],nc=[`none`,`urgent`,`high`,`medium`,`low`],rc=`composer.v1`,ic=[{name:`缺陷`,color:`#eb5757`},{name:`特性`,color:`#bb87fc`},{name:`for-claude`,color:`#5b8cff`},{name:`hold`,color:`#d99b25`},{name:`改进`,color:`#4ea7fc`},{name:`phase-1`,color:`#1d4ed8`},{name:`phase-2`,color:`#0f766e`},{name:`phase-3`,color:`#7c3aed`},{name:`phase-4`,color:`#b45309`},{name:`phase-5`,color:`#be123c`},{name:`phase-6`,color:`#475569`}];function ac(e){return ic.find(t=>t.name===e)?.color??`#8b8d92`}function oc(e,t=`zh`){return e===`缺陷`||e.toLocaleUpperCase()===`BUG`?`BUG`:e===`特性`||e===`新功能`?t===`zh`?`新功能`:`Feature`:e===`改进`?t===`zh`?`改进`:`Improvement`:e}function sc(e){return e===`缺陷`||e.toLocaleUpperCase()===`BUG`?`bug`:e===`特性`||e===`新功能`?`feature`:null}function cc(e,t=`zh`){let n=sc(e);return{name:oc(e,t),tone:n,color:n===`bug`?`#eb5757`:n===`feature`?`#bb87fc`:ac(e)}}function lc({actor:e,className:t=``}){return(0,B.jsx)(`span`,{className:`actor-avatar actor-avatar-${e.type}${t?` ${t}`:``}`,"aria-hidden":`true`,title:e.name,children:e.type===`agent`?(0,B.jsx)(`img`,{className:`actor-avatar-image actor-avatar-agent-image`,src:`codex-agent-logo.png`,alt:``}):e.avatarUrl?(0,B.jsx)(`img`,{className:`actor-avatar-image`,src:e.avatarUrl,alt:``,referrerPolicy:`no-referrer`}):e.name.slice(0,1)})}var uc=`data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.99895%2012.499C10.7606%2012.499%2013%2010.4844%2013%207.99948C13%205.51459%2010.7606%203.5%207.99895%203.5C5.23837%203.5%203%205.51459%203%207.99948C3%208.89566%203.29059%209.73085%203.7928%2010.4327C3.71068%2011.1459%203.50011%2011.8261%203.23479%2012.5C4.09349%2012.4539%204.94181%2012.2932%205.75637%2012.0225C6.4302%2012.3274%207.19352%2012.499%207.99895%2012.499Z'%20stroke='%231B1B1B'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/svg%3e`,dc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='070--linear-priority%202'%3e%3cpath%20id='Vector'%20d='M3%208H2C1.44772%208%201%208.44772%201%209V13C1%2013.5523%201.44772%2014%202%2014H3C3.55228%2014%204%2013.5523%204%2013V9C4%208.44772%203.55228%208%203%208Z'%20fill='black'/%3e%3cpath%20id='Vector_2'%20d='M8%205H7C6.44772%205%206%205.44772%206%206V13C6%2013.5523%206.44772%2014%207%2014H8C8.55228%2014%209%2013.5523%209%2013V6C9%205.44772%208.55228%205%208%205Z'%20fill='black'/%3e%3cpath%20id='Vector_3'%20d='M13%202H12C11.4477%202%2011%202.44772%2011%203V13C11%2013.5523%2011.4477%2014%2012%2014H13C13.5523%2014%2014%2013.5523%2014%2013V3C14%202.44772%2013.5523%202%2013%202Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e`,fc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='071--linear-priority-high%202'%3e%3cpath%20id='Vector'%20d='M3.5%208H2.5C1.94772%208%201.5%208.44772%201.5%209V13C1.5%2013.5523%201.94772%2014%202.5%2014H3.5C4.05228%2014%204.5%2013.5523%204.5%2013V9C4.5%208.44772%204.05228%208%203.5%208Z'%20fill='black'/%3e%3cpath%20id='Vector_2'%20d='M8.5%205H7.5C6.94772%205%206.5%205.44772%206.5%206V13C6.5%2013.5523%206.94772%2014%207.5%2014H8.5C9.05228%2014%209.5%2013.5523%209.5%2013V6C9.5%205.44772%209.05228%205%208.5%205Z'%20fill='black'/%3e%3cpath%20id='Vector_3'%20d='M13.5%202H12.5C11.9477%202%2011.5%202.44772%2011.5%203V13C11.5%2013.5523%2011.9477%2014%2012.5%2014H13.5C14.0523%2014%2014.5%2013.5523%2014.5%2013V3C14.5%202.44772%2014.0523%202%2013.5%202Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e`,pc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='072--linear-priority-low%202'%3e%3cpath%20id='Vector'%20d='M3.5%208H2.5C1.94772%208%201.5%208.44772%201.5%209V13C1.5%2013.5523%201.94772%2014%202.5%2014H3.5C4.05228%2014%204.5%2013.5523%204.5%2013V9C4.5%208.44772%204.05228%208%203.5%208Z'%20fill='black'/%3e%3cpath%20id='Vector_2'%20d='M8.5%205H7.5C6.94772%205%206.5%205.44772%206.5%206V13C6.5%2013.5523%206.94772%2014%207.5%2014H8.5C9.05228%2014%209.5%2013.5523%209.5%2013V6C9.5%205.44772%209.05228%205%208.5%205Z'%20fill='black'%20fill-opacity='0.4'/%3e%3cpath%20id='Vector_3'%20d='M13.5%202H12.5C11.9477%202%2011.5%202.44772%2011.5%203V13C11.5%2013.5523%2011.9477%2014%2012.5%2014H13.5C14.0523%2014%2014.5%2013.5523%2014.5%2013V3C14.5%202.44772%2014.0523%202%2013.5%202Z'%20fill='black'%20fill-opacity='0.4'/%3e%3c/g%3e%3c/svg%3e`,mc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='073--linear-priority-medium%202'%3e%3cpath%20id='Vector'%20d='M3.5%208H2.5C1.94772%208%201.5%208.44772%201.5%209V13C1.5%2013.5523%201.94772%2014%202.5%2014H3.5C4.05228%2014%204.5%2013.5523%204.5%2013V9C4.5%208.44772%204.05228%208%203.5%208Z'%20fill='black'/%3e%3cpath%20id='Vector_2'%20d='M8.5%205H7.5C6.94772%205%206.5%205.44772%206.5%206V13C6.5%2013.5523%206.94772%2014%207.5%2014H8.5C9.05228%2014%209.5%2013.5523%209.5%2013V6C9.5%205.44772%209.05228%205%208.5%205Z'%20fill='black'/%3e%3cpath%20id='Vector_3'%20d='M13.5%202H12.5C11.9477%202%2011.5%202.44772%2011.5%203V13C11.5%2013.5523%2011.9477%2014%2012.5%2014H13.5C14.0523%2014%2014.5%2013.5523%2014.5%2013V3C14.5%202.44772%2014.0523%202%2013.5%202Z'%20fill='black'%20fill-opacity='0.4'/%3e%3c/g%3e%3c/svg%3e`,hc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='074--linear-priority-none%202'%3e%3cpath%20id='Vector'%20opacity='0.9'%20d='M4%207.25H2C1.72386%207.25%201.5%207.47386%201.5%207.75V8.25C1.5%208.52614%201.72386%208.75%202%208.75H4C4.27614%208.75%204.5%208.52614%204.5%208.25V7.75C4.5%207.47386%204.27614%207.25%204%207.25Z'%20fill='black'/%3e%3cpath%20id='Vector_2'%20opacity='0.9'%20d='M9%207.25H7C6.72386%207.25%206.5%207.47386%206.5%207.75V8.25C6.5%208.52614%206.72386%208.75%207%208.75H9C9.27614%208.75%209.5%208.52614%209.5%208.25V7.75C9.5%207.47386%209.27614%207.25%209%207.25Z'%20fill='black'/%3e%3cpath%20id='Vector_3'%20opacity='0.9'%20d='M14%207.25H12C11.7239%207.25%2011.5%207.47386%2011.5%207.75V8.25C11.5%208.52614%2011.7239%208.75%2012%208.75H14C14.2761%208.75%2014.5%208.52614%2014.5%208.25V7.75C14.5%207.47386%2014.2761%207.25%2014%207.25Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e`,gc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23231;&%23180;&%23167;&%23230;&%23128;&%23165;'%3e%3cpath%20id='Vector'%20d='M8.00009%200.999984C4.13408%200.999975%201.00007%204.13413%201.00015%208.00015C1.00024%2011.866%204.13419%2015%208.00008%2015C11.866%2015%2015%2011.8659%2015%207.99999C15%204.13405%2011.866%200.999993%208.00009%200.999984ZM7%204H9L8.75391%208.99836H7.25L7%204ZM9%2011C9%2011.5523%208.55228%2012%208%2012C7.44772%2012%207%2011.5523%207%2011C7%2010.4477%207.44772%2010%208%2010C8.55228%2010%209%2010.4477%209%2011Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e`,_c=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='13.8333'%20height='13.8333'%20viewBox='0%200%2013.8333%2013.8333'%20fill='none'%3e%3cg%20id='Danger%20Circle'%3e%3cpath%20id='Stroke%201'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.75%206.91667C0.75%202.292%202.292%200.75%206.91667%200.75C11.5413%200.75%2013.0833%202.292%2013.0833%206.91667C13.0833%2011.5413%2011.5413%2013.0833%206.91667%2013.0833C2.292%2013.0833%200.75%2011.5413%200.75%206.91667Z'%20stroke='%23E4A019'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20d='M6.91667%204.31993V6.9166'%20stroke='%23E4A019'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%2015'%20d='M6.9138%209.24993H6.9198'%20stroke='%23E4A019'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,vc=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='13.8333'%20height='13.8333'%20viewBox='0%200%2013.8333%2013.8333'%20fill='none'%3e%3cg%20id='Danger%20Circle'%3e%3cpath%20id='Stroke%201'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.75%206.91667C0.75%202.292%202.292%200.75%206.91667%200.75C11.5413%200.75%2013.0833%202.292%2013.0833%206.91667C13.0833%2011.5413%2011.5413%2013.0833%206.91667%2013.0833C2.292%2013.0833%200.75%2011.5413%200.75%206.91667Z'%20stroke='%23F34E52'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20d='M6.91667%204.31993V6.9166'%20stroke='%23F34E52'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%2015'%20d='M6.9138%209.24993H6.9198'%20stroke='%23F34E52'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,yc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='12.688'%20height='13.8333'%20viewBox='0%200%2012.688%2013.8333'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Document'%3e%3cpath%20id='Stroke%201'%20d='M8.74053%209.38087H3.9272'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%202'%20d='M8.74053%206.87433H3.9272'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20d='M5.764%204.36813H3.92733'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%204'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.75%206.91667C0.75%2011.5413%202.14867%2013.0833%206.344%2013.0833C10.54%2013.0833%2011.938%2011.5413%2011.938%206.91667C11.938%202.292%2010.54%200.75%206.344%200.75C2.14867%200.75%200.75%202.292%200.75%206.91667Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,bc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23233;&%23129;&%23135;&%23229;&%23136;&%23176;&%23233;&%23152;&%23187;&%23229;&%23161;&%23158;'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1.83301%208.00065C1.83301%203.37598%203.37501%201.83398%207.99968%201.83398C12.6243%201.83398%2014.1663%203.37598%2014.1663%208.00065C14.1663%2012.6253%2012.6243%2014.1673%207.99968%2014.1673C3.37501%2014.1673%201.83301%2012.6253%201.83301%208.00065Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M8%205.4043V8.00097'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M7.99707%2010.334H8.00307'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,xc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23229;&%23143;&%23150;&%23230;&%23182;&%23136;'%3e%3cpath%20id='Stroke%201'%20d='M12.6463%203.40669L3.40066%2012.6523'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%202'%20d='M12.6523%2012.6521L3.39713%203.39692'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,Sc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23229;&%23174;&%23140;&%23230;&%23136;&%23144;'%3e%3cg%20id='Edit%20Square'%3e%3cpath%20id='Stroke%201'%20d='M8.00013%201.8334C3.37547%201.8334%201.83347%203.3754%201.83347%208.00007C1.83347%2012.6247%203.37547%2014.1667%208.00013%2014.1667C12.6248%2014.1667%2014.1668%2012.6247%2014.1668%208.00007'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cpath%20id='Stroke%203'%20d='M5.33301%207.08462L7.94717%2010L13.333%204'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,Cc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23232;&%23191;&%23155;&%23232;&%23161;&%23140;&%23228;&%23184;&%23173;'%3e%3cpath%20id='Vector'%20d='M7.99968%201.83398C3.37501%201.83398%201.83301%203.37598%201.83301%208.00065C1.83301%2012.6253%203.37501%2014.1673%207.99968%2014.1673C12.6243%2014.1673%2014.1663%2012.6253%2014.1663%208.00065'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.0187%202.86909C12.3567%202.28309%2011.3454%202.34442%2010.7594%203.00642C10.7594%203.00642%207.84669%206.29642%206.83669%207.43842C5.82536%208.57976%206.56669%2010.1564%206.56669%2010.1564C6.56669%2010.1564%208.23603%2010.6851%209.23203%209.55976C10.2287%208.43442%2013.1561%205.12842%2013.1561%205.12842C13.7421%204.46642%2013.6801%203.45509%2013.0187%202.86909Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M10.0059%203.86719L12.4025%205.98919'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,wc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='13.836'%20height='11.236'%20viewBox='0%200%2013.836%2011.236'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Show'%3e%3cpath%20id='Stroke%201'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.026%205.618C9.026%206.782%208.082%207.726%206.918%207.726C5.754%207.726%204.81%206.782%204.81%205.618C4.81%204.45333%205.754%203.51%206.918%203.51C8.082%203.51%209.026%204.45333%209.026%205.618Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.75%205.618C0.75%207.80467%203.51133%2010.486%206.918%2010.486C10.324%2010.486%2013.086%207.80667%2013.086%205.618C13.086%203.42933%2010.324%200.75%206.918%200.75C3.51133%200.75%200.75%203.43133%200.75%205.618Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,Tc=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23231;&%23173;&%23137;&%23229;&%23190;&%23133;&%23232;&%23174;&%23164;&%23233;&%23162;&%23134;'%3e%3cpath%20id='Vector'%20d='M13.1578%2011.498H8.84277'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.84277%2011.4981C2.84277%2012.8593%203.2967%2013.3127%204.6573%2013.3127C6.0179%2013.3127%206.47183%2012.8593%206.47183%2011.4981C6.47183%2010.1369%206.0179%209.68359%204.6573%209.68359C3.2967%209.68359%202.84277%2010.1369%202.84277%2011.4981Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M8.84277%204.50391H13.1572'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.47242%204.50398C6.47242%203.14338%206.01849%202.68945%204.65789%202.68945C3.2967%202.68945%202.84277%203.14338%202.84277%204.50398C2.84277%205.86517%203.2967%206.3185%204.65789%206.3185C6.01849%206.3185%206.47242%205.86517%206.47242%204.50398Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`;function Ec({children:e,color:t=`currentColor`,size:n=16,style:r,title:i,viewBox:a=`0 0 16 16`,...o}){return(0,B.jsxs)(`svg`,{...o,viewBox:a,width:n,height:n,fill:`currentColor`,color:t,focusable:`false`,role:i||o[`aria-label`]?`img`:void 0,"aria-hidden":i||o[`aria-label`]?void 0:!0,style:{color:t,fill:`currentColor`,stroke:`none`,...r},children:[i&&(0,B.jsx)(`title`,{children:i}),e]})}function Dc({color:e=`currentColor`,size:t=16,source:n,style:r,...i}){return(0,B.jsx)(`span`,{...i,"aria-hidden":!i[`aria-label`]||void 0,role:i[`aria-label`]?`img`:void 0,style:{backgroundColor:`currentColor`,color:e,display:`inline-block`,flex:`0 0 auto`,height:t,maskImage:`url("${n}")`,maskPosition:`center`,maskRepeat:`no-repeat`,maskSize:`contain`,WebkitMaskImage:`url("${n}")`,WebkitMaskPosition:`center`,WebkitMaskRepeat:`no-repeat`,WebkitMaskSize:`contain`,width:t,...r}})}var Oc={backlog:yc,todo:Tc,in_progress:Cc,in_review:wc,blocked:bc,done:Sc,canceled:xc},kc={backlog:`var(--status-backlog)`,todo:`var(--status-todo)`,in_progress:`var(--status-progress)`,in_review:`var(--status-review)`,blocked:`var(--status-blocked)`,done:`var(--status-done)`,canceled:`var(--status-canceled)`};function Ac({color:e,status:t,...n}){return(0,B.jsx)(Dc,{...n,color:e??kc[t],"data-status-icon":t,source:Oc[t]})}var jc={urgent:gc,high:fc,medium:mc,low:pc,none:hc};function Mc({color:e,priority:t,...n}){return(0,B.jsx)(Dc,{...n,color:e??(t?`var(--priority-${t})`:`currentColor`),"data-priority-icon":t??`generic`,source:t?jc[t]:dc})}function Nc({color:e=`black`,...t}){return(0,B.jsxs)(Ec,{...t,color:e,viewBox:`0 0 64 64`,children:[(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M29 3.96753C30.6566 3.96753 31.9995 5.31109 32 6.96753C32 8.62437 30.6568 9.96753 29 9.96753H19C14.0298 9.96753 10.0005 13.9973 10 18.9675V44.9675C10 49.9379 14.0294 53.9675 19 53.9675H45C49.9704 53.9675 54 49.9379 54 44.9675V34.9675C54.0004 33.3111 55.3436 31.9675 57 31.9675C58.6564 31.9675 59.9996 33.3111 60 34.9675V44.9675C60 53.2519 53.2844 59.9675 45 59.9675H19C10.7157 59.9675 4 53.2519 4 44.9675V18.9675C4.00048 10.6837 10.716 3.96753 19 3.96753H29Z`}),(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M53.7305 5.04571C55.1653 3.61134 57.4913 3.61112 58.9257 5.04571C60.3589 6.48039 60.3597 8.80683 58.9257 10.241L36.9493 32.2137C34.7242 34.4384 31.7618 35.774 28.6212 35.9676C28.2703 35.9884 27.9788 35.6975 28.0001 35.3465C28.194 32.206 29.5294 29.2435 31.754 27.0184L53.7305 5.04571Z`})]})}function Pc({color:e=`black`,...t}){return(0,B.jsxs)(Ec,{...t,color:e,viewBox:`0 0 64 64`,fill:`none`,children:[(0,B.jsx)(`path`,{d:`M22.8594 24.5756H41.1392`,fill:`none`,stroke:`currentColor`,strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,B.jsx)(`path`,{fill:`none`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M31.9988 6.66406C14.9668 6.66406 12.0894 9.14938 12.0894 29.1414C12.0894 51.5228 11.6708 57.3308 15.9268 57.3308C20.1801 57.3308 27.1268 47.5068 31.9988 47.5068C36.8708 47.5068 43.8176 57.3308 48.0708 57.3308C52.3268 57.3308 51.908 51.5228 51.908 29.1414C51.908 9.14938 49.0308 6.66406 31.9988 6.66406Z`,stroke:`currentColor`,strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Fc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{d:`M9.5 3.25a2.25 2.25 0 0 1 4.315-.894c.164.378.22.795.164 1.203A2.25 2.25 0 0 1 12.5 5.371V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.25 2.25 0 1 1-1.5 0V5.37a2.25 2.25 0 1 1 1.5 0v1.836a2.492 2.492 0 0 1 1-.208h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.499.75.75 0 0 0 0-1.5Zm-7.5 9.499a.75.75 0 1 0 0 1.499.75.75 0 0 0 0-1.5Z`})})}function Ic(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{d:`m12.643 7.69-3.714 3.714c-1.447 1.448-3.586 1.606-4.762.43-1.18-1.18-1.023-3.312.425-4.76l3.41-3.41c.934-.933 2.296-1.033 3.031-.297.735.734.633 2.1-.297 3.03L7.324 9.81c-.422.421-1.002.464-1.3.166-.297-.297-.255-.879.175-1.308L9.29 5.576a.707.707 0 0 0-1-1L5.2 7.668c-.952.951-1.06 2.423-.175 3.308.886.886 2.356.777 3.3-.166l3.412-3.413c1.452-1.451 1.62-3.707.297-5.03s-3.575-1.158-5.03.298l-3.41 3.41c-1.97 1.97-2.193 4.991-.426 6.758 1.764 1.765 4.793 1.54 6.762-.429l3.714-3.714a.707.707 0 0 0-1-1`})})}function Lc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{d:`M3 6.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z`})})}function Rc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{d:`M8.75 4C8.75 3.58579 8.41421 3.25 8 3.25C7.58579 3.25 7.25 3.58579 7.25 4V7.25H4C3.58579 7.25 3.25 7.58579 3.25 8C3.25 8.41421 3.58579 8.75 4 8.75H7.25V12C7.25 12.4142 7.58579 12.75 8 12.75C8.41421 12.75 8.75 12.4142 8.75 12V8.75H12C12.4142 8.75 12.75 8.41421 12.75 8C12.75 7.58579 12.4142 7.25 12 7.25H8.75V4Z`})})}function zc(e){return(0,B.jsxs)(Ec,{...e,children:[(0,B.jsx)(`path`,{d:`M12.7834 6.56006C12.7834 11.9061 13.5529 14.3226 8.37704 14.3226C3.20053 14.3226 3.98593 11.9061 3.98593 6.56006`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,B.jsx)(`path`,{d:`M13.767 4.51058H3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,B.jsx)(`path`,{d:`M10.6667 4.51048C10.6667 4.51048 11.019 2 8.38285 2C5.74729 2 6.09967 4.51048 6.09967 4.51048`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Bc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M7.331 1.07a3.2 3.2 0 0 1 1.338 0c.498.106.967.377 1.904.917l1.354.78c.937.541 1.406.812 1.747 1.19.301.334.53.728.669 1.156.157.484.157 1.025.157 2.107v1.56l-.003.718c-.007.63-.036 1.026-.154 1.389l-.057.158a3.2 3.2 0 0 1-.612.998l-.135.138c-.33.312-.792.578-1.612 1.051l-1.354.78-.623.357c-.55.309-.907.481-1.281.56l-.166.032a3.2 3.2 0 0 1-1.006 0l-.166-.031c-.374-.08-.73-.252-1.281-.561l-.623-.356-1.354-.78c-.82-.474-1.281-.74-1.612-1.052l-.135-.138a3.2 3.2 0 0 1-.612-.998l-.057-.158c-.118-.363-.147-.758-.154-1.39L1.5 8.78V7.22c0-.946 0-1.479.105-1.921l.052-.186c.122-.374.312-.723.56-1.028l.11-.128c.255-.284.583-.507 1.126-.83l.62-.36 1.354-.78c.82-.473 1.281-.739 1.718-.869zM3 7.22v1.56c0 1.183.018 1.439.084 1.643l.064.167q.11.246.292.449l.059.06c.151.143.427.318 1.323.835l1.354.78.632.36c.188.104.33.178.442.233V8.482l-4.247-1.93zm5.75 1.262v4.826c.212-.106.533-.282 1.074-.594l1.354-.78.628-.368c.499-.297.646-.407.754-.527l.113-.14q.158-.218.243-.476l.022-.081c.035-.144.051-.351.058-.835L13 8.78V7.22l-.004-.668zM7.82 2.51l-.177.027c-.159.034-.328.106-.835.39l-.632.359-1.354.78c-.896.517-1.172.692-1.323.834l-.059.06q-.046.051-.086.104l4.645 2.112 4.645-2.112-.084-.103c-.109-.12-.255-.23-.754-.528l-.628-.367-1.354-.78c-.897-.517-1.186-.668-1.386-.728l-.08-.021a1.7 1.7 0 0 0-.538-.027`,clipRule:`evenodd`})})}function Vc(e){return(0,B.jsx)(Dc,{...e,source:uc})}function Hc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{d:`M5.7002 6.30005L6.7002 8.00005L5.7002 9.70005M8.59961 9.6001H10.7996M7.20215 1.93018C7.96231 1.93039 8.65815 2.20565 9.19629 2.66162L9.3877 2.82373L9.63379 2.77881C9.8134 2.74642 9.99778 2.72904 10.1836 2.729C11.8882 2.72952 13.2711 4.11205 13.2715 5.81689L13.2578 6.09326C13.2492 6.18462 13.237 6.27556 13.2207 6.36572L13.1758 6.61182L13.3379 6.80322C13.7943 7.34178 14.0702 8.03877 14.0703 8.79932C14.0699 10.1375 13.2176 11.2764 12.0254 11.7046L11.79 11.7896L11.7051 12.0249C11.2769 13.2172 10.138 14.0695 8.7998 14.0698C8.03929 14.0698 7.34241 13.7941 6.80371 13.3374L6.61328 13.1753L6.36719 13.2202C6.27684 13.2365 6.18551 13.2487 6.09375 13.2573L5.81738 13.271C4.11286 13.2707 2.73101 11.8881 2.73047 10.1831C2.73049 9.997 2.74782 9.81293 2.78027 9.6333L2.8252 9.38721L2.66309 9.1958C2.29195 8.7578 2.03996 8.21562 1.95898 7.61963L1.93555 7.36084L1.93066 7.20068C1.93084 5.86226 2.78273 4.7218 3.97461 4.29346L4.20996 4.2085L4.29492 3.97412C4.72324 2.78211 5.86353 1.93019 7.20215 1.93018Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Uc({color:e=`#5D5D5F`,...t}){return(0,B.jsxs)(Ec,{...t,color:e,fill:`none`,children:[(0,B.jsx)(`path`,{fill:`none`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.4398 5.53325L9.65977 1.93325C9.17311 1.86659 8.62644 1.83325 8.02644 1.83325C3.83311 1.83325 2.43311 3.37992 2.43311 7.99992C2.43311 12.6266 3.83311 14.1666 8.02644 14.1666C12.2264 14.1666 13.6264 12.6266 13.6264 7.99992C13.6264 7.05325 13.5664 6.23325 13.4398 5.53325Z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,B.jsx)(`path`,{d:`M9.28955 1.88843V3.66243C9.28955 4.90109 10.2936 5.90443 11.5322 5.90443H13.4996`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,B.jsx)(`path`,{d:`M10.2667 10.3333H7M5 7L6 8L5 9`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Wc(e){return(0,B.jsx)(Ec,{...e,fill:`none`,children:(0,B.jsx)(`path`,{d:`M12.2429 9.4142L12.95 8.70709C14.5121 7.14499 14.5121 4.61233 12.95 3.05023C11.3879 1.48814 8.85522 1.48814 7.29312 3.05023L6.58601 3.75734M3.75759 6.58577L3.05048 7.29287C1.48838 8.85497 1.48838 11.3876 3.05048 12.9497C4.61258 14.5118 7.14524 14.5118 8.70733 12.9497L9.41444 12.2426M10.1215 5.87866L5.87891 10.1213`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})}function Gc({type:e,...t}){return(0,B.jsx)(Dc,{...t,source:e===`blocked_by`?_c:vc})}function Kc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15 5C15 2.79086 13.2091 1 11 1H5C2.79086 1 1 2.79086 1 5V11C1 13.2091 2.79086 15 5 15H6.25C6.66421 15 7 14.6642 7 14.25C7 13.8358 6.66421 13.5 6.25 13.5H5C3.61929 13.5 2.5 12.3807 2.5 11V6H13.5V6.25C13.5 6.66421 13.8358 7 14.25 7C14.6642 7 15 6.66421 15 6.25V5ZM11.5001 8C11.9143 8 12.2501 8.33579 12.2501 8.75V10.75L14.2501 10.75C14.6643 10.75 15.0001 11.0858 15.0001 11.5C15.0001 11.9142 14.6643 12.25 14.2501 12.25L12.2501 12.25V14.25C12.2501 14.6642 11.9143 15 11.5001 15C11.0859 15 10.7501 14.6642 10.7501 14.25V12.25H8.75C8.33579 12.25 8 11.9142 8 11.5C8 11.0858 8.33579 10.75 8.75 10.75L10.7501 10.75V8.75C10.7501 8.33579 11.0859 8 11.5001 8Z`})})}function qc(e){return(0,B.jsx)(Ec,{...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15 5C15 2.79086 13.2091 1 11 1H5C2.79086 1 1 2.79086 1 5V11C1 13.2091 2.79086 15 5 15H6.25C6.66421 15 7 14.6642 7 14.25C7 13.8358 6.66421 13.5 6.25 13.5H5C3.61929 13.5 2.5 12.3807 2.5 11V6H13.5V6.25C13.5 6.66421 13.8358 7 14.25 7C14.6642 7 15 6.66421 15 6.25V5ZM11 7.25C10.5858 7.25 10.25 7.58579 10.25 8C10.25 8.41421 10.5858 8.75 11 8.75C12.2426 8.75 13.25 9.75736 13.25 11H12.6403C12.2622 11 12.0952 11.4761 12.3904 11.7123L13.7501 12.8001C13.8962 12.917 14.1038 12.917 14.2499 12.8001L15.6095 11.7123C15.9048 11.4761 15.7378 11 15.3597 11H14.75C14.75 8.92893 13.071 7.25 11 7.25ZM6.64029 11H7.24998C7.24998 13.0711 8.92891 14.75 11 14.75C11.4142 14.75 11.75 14.4142 11.75 14C11.75 13.5858 11.4142 13.25 11 13.25C9.75734 13.25 8.74998 12.2426 8.74998 11H9.35967C9.73778 11 9.9048 10.5239 9.60955 10.2877L8.24986 9.1999C8.10377 9.08303 7.89619 9.08303 7.7501 9.1999L6.39041 10.2877C6.09516 10.5239 6.26218 11 6.64029 11Z`})})}function Jc(e){return(0,B.jsx)(qc,{...e})}function Yc({color:e=`black`,...t}){return(0,B.jsx)(Ec,{...t,color:e,size:t.size??18,viewBox:`0 0 18 18`,fill:`none`,children:(0,B.jsx)(`path`,{d:`M12.5067 5.96484V8.71484M12.5067 5.96484V3.46484C12.5067 2.77449 11.9471 2.21484 11.2567 2.21484C10.5664 2.21484 10.0067 2.77449 10.0067 3.46484M12.5067 5.96484C12.5067 5.27449 13.0664 4.71484 13.7567 4.71484C14.4471 4.71484 15.0067 5.27449 15.0067 5.96484V10.9282C15.0067 13.8201 12.1941 16.2218 9.42915 16.2836C5.88853 16.3626 4.16728 13.2449 2.29842 10.7653C1.84441 10.1629 1.90344 9.31811 2.43683 8.78473C3.32386 7.89769 4.30201 8.51015 5.00671 9.21484M10.0067 3.46484V7.21484M10.0067 3.46484V2.96484C10.0067 2.27449 9.44706 1.71484 8.75671 1.71484C8.06635 1.71484 7.50671 2.27449 7.50671 2.96484V4.46484M7.00671 11.2148L5.00671 9.21484M5.00671 9.21484V4.46484C5.00671 3.77449 5.56635 3.21484 6.25671 3.21484C6.94706 3.21484 7.50671 3.77449 7.50671 4.46484M7.50671 4.46484V7.21484`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Xc({color:e=`black`,...t}){return(0,B.jsx)(Ec,{...t,color:e,size:t.size??18,viewBox:`0 0 18 18`,fill:`none`,children:(0,B.jsx)(`path`,{d:`M6 7.5L7.55556 9.25L6 11M8.5 11H11M8.5 16C6.77292 16 5.48773 15.2635 4.55965 14.3558C2.67613 12.5138 2.5 9.66155 2.5 7.02699C2.5 6.05988 3.01595 5.16623 3.85349 4.68267L7 2.86603C7.9282 2.33013 9.0718 2.33013 10 2.86603L13.1465 4.68267C13.9841 5.16623 14.5 6.05988 14.5 7.02699C14.5 9.66155 14.3239 12.5138 12.4404 14.3558C11.5123 15.2635 10.2271 16 8.5 16Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Zc({color:e=`#DC865C`,...t}){return(0,B.jsx)(Ec,{...t,color:e,size:t.size??18,viewBox:`0 0 18 18`,fill:`none`,children:(0,B.jsx)(`path`,{d:`M8.5 6V10M8.5 12.5002V12.51M8.5 16C6.77292 16 5.48773 15.2635 4.55965 14.3558C2.67613 12.5138 2.5 9.66155 2.5 7.02699C2.5 6.05988 3.01595 5.16623 3.85349 4.68267L7 2.86603C7.9282 2.33013 9.0718 2.33013 10 2.86603L13.1465 4.68267C13.9841 5.16623 14.5 6.05988 14.5 7.02699C14.5 9.66155 14.3239 12.5138 12.4404 14.3558C11.5123 15.2635 10.2271 16 8.5 16Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Qc({color:e=`black`,...t}){return(0,B.jsxs)(Ec,{...t,color:e,viewBox:`0 0 64 64`,fill:`none`,children:[(0,B.jsx)(`g`,{clipPath:`url(#clip0_1105_20971)`,children:(0,B.jsx)(`path`,{d:`M21 30.9091L32 20L43 30.9091M32 20V44`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,B.jsx)(`defs`,{children:(0,B.jsx)(`clipPath`,{id:`clip0_1105_20971`,children:(0,B.jsx)(`rect`,{width:`24`,height:`26`,fill:`white`,transform:`translate(20 19)`})})})]})}function $c(e,t){function n(n){e.some(e=>e.current?.contains(n.target))||t()}return document.addEventListener(`pointerdown`,n),()=>document.removeEventListener(`pointerdown`,n)}function el(e,t){function n(n){n.type===`scroll`&&e.current?.contains(n.target)||t()}return window.addEventListener(`blur`,n),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`blur`,n),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}}var tl={alert:{content:(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M7.026 4.525a.5.5 0 0 1 .5-.525h.948a.5.5 0 0 1 .5.525l-.2 4a.5.5 0 0 1-.5.475h-.548a.5.5 0 0 1-.5-.475zM7 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0`,clipRule:`evenodd`})},check:{content:(0,B.jsx)(`path`,{d:`M6.336 13.6a1.049 1.049 0 0 1-.8-.376L2.632 9.736a.992.992 0 0 1 .152-1.424 1.056 1.056 0 0 1 1.456.152l2.008 2.4 5.448-8a1.048 1.048 0 0 1 1.432-.288A.992.992 0 0 1 13.424 4L7.2 13.144a1.04 1.04 0 0 1-.8.456h-.064Z`})},chevronDown:{content:(0,B.jsx)(`path`,{d:`M4.53 5.47a.75.75 0 0 0-1.06 1.06l4 4a.75.75 0 0 0 1.054.007l4-3.903a.75.75 0 0 0-1.048-1.073l-3.47 3.385L4.53 5.47Z`})},chevronLeft:{content:(0,B.jsx)(`path`,{d:`M10.7803 4.78033C11.0732 4.48744 11.0732 4.01256 10.7803 3.71967C10.4874 3.42678 10.0126 3.42678 9.71967 3.71967L5.71967 7.71967C5.42933 8.01001 5.42643 8.47986 5.71318 8.77376L9.61581 12.7738C9.90508 13.0702 10.3799 13.0761 10.6764 12.7868C10.9729 12.4976 10.9787 12.0227 10.6895 11.7262L7.30417 8.25649L10.7803 4.78033Z`})},chevronRight:{content:(0,B.jsx)(`path`,{d:`M5.46967 11.4697C5.17678 11.7626 5.17678 12.2374 5.46967 12.5303C5.76256 12.8232 6.23744 12.8232 6.53033 12.5303L10.5303 8.53033C10.8207 8.23999 10.8236 7.77014 10.5368 7.47624L6.63419 3.47624C6.34492 3.17976 5.87009 3.17391 5.57361 3.46318C5.27713 3.75244 5.27128 4.22728 5.56054 4.52376L8.94583 7.99351L5.46967 11.4697Z`})},close:{content:(0,B.jsx)(`path`,{d:`M2.96967 2.96967C3.26256 2.67678 3.73744 2.67678 4.03033 2.96967L8 6.939L11.9697 2.96967C12.2626 2.67678 12.7374 2.67678 13.0303 2.96967C13.3232 3.26256 13.3232 3.73744 13.0303 4.03033L9.061 8L13.0303 11.9697C13.2966 12.2359 13.3208 12.6526 13.1029 12.9462L13.0303 13.0303C12.7374 13.3232 12.2626 13.3232 11.9697 13.0303L8 9.061L4.03033 13.0303C3.73744 13.3232 3.26256 13.3232 2.96967 13.0303C2.67678 12.7374 2.67678 12.2626 2.96967 11.9697L6.939 8L2.96967 4.03033C2.7034 3.76406 2.6792 3.3474 2.89705 3.05379L2.96967 2.96967Z`})},codexSidebarExpand:{viewBox:`0 0 20 20`,content:(0,B.jsx)(`path`,{d:`M16.835 8.66301C16.835 7.71885 16.8347 7.05065 16.792 6.52824C16.7605 6.14232 16.7073 5.86904 16.6299 5.65227L16.5439 5.45207C16.32 5.01264 15.9796 4.64498 15.5615 4.3886L15.3779 4.28606C15.1308 4.16013 14.8165 4.08006 14.3018 4.03801C13.7794 3.99533 13.1112 3.99504 12.167 3.99504H7.83301C6.88885 3.99504 6.22065 3.99533 5.69824 4.03801C5.31232 4.06954 5.03904 4.12266 4.82227 4.20012L4.62207 4.28606C4.18264 4.50996 3.81498 4.85035 3.55859 5.26848L3.45605 5.45207C3.33013 5.69922 3.25006 6.01354 3.20801 6.52824C3.16533 7.05065 3.16504 7.71885 3.16504 8.66301V11.3271C3.16504 12.2712 3.16533 12.9394 3.20801 13.4618C3.25006 13.9766 3.33013 14.2909 3.45605 14.538L3.55859 14.7216C3.81498 15.1397 4.18266 15.4801 4.62207 15.704L4.82227 15.79C5.03904 15.8674 5.31234 15.9205 5.69824 15.9521C6.22065 15.9947 6.88885 15.995 7.83301 15.995H12.167C13.1112 15.995 13.7794 15.9947 14.3018 15.9521C14.8164 15.91 15.1308 15.8299 15.3779 15.704L15.5615 15.6015C15.9797 15.3451 16.32 14.9774 16.5439 14.538L16.6299 14.3378C16.7074 14.121 16.7605 13.8478 16.792 13.4618C16.8347 12.9394 16.835 12.2712 16.835 11.3271V8.66301ZM5.00195 13.3329V6.66692C5.00195 6.29965 5.29972 6.00188 5.66699 6.00188C6.03412 6.00204 6.33203 6.29975 6.33203 6.66692V13.3329C6.33203 13.7001 6.03412 13.9978 5.66699 13.998C5.29972 13.998 5.00195 13.7002 5.00195 13.3329ZM18.165 11.3271C18.165 12.2493 18.1653 12.9811 18.1172 13.5702C18.0745 14.0924 17.9916 14.5472 17.8125 14.9648L17.7295 15.1415C17.394 15.8 16.8834 16.3511 16.2568 16.7353L15.9814 16.8896C15.5157 17.1268 15.0069 17.2285 14.4102 17.2773C13.821 17.3254 13.0893 17.3251 12.167 17.3251H7.83301C6.91071 17.3251 6.17898 17.3254 5.58984 17.2773C5.06757 17.2346 4.61294 17.1508 4.19531 16.9716L4.01855 16.8896C3.36014 16.5541 2.80898 16.0434 2.4248 15.4169L2.27051 15.1415C2.03328 14.6758 1.93158 14.167 1.88281 13.5702C1.83468 12.9811 1.83496 12.2493 1.83496 11.3271V8.66301C1.83496 7.74072 1.83468 7.00898 1.88281 6.41985C1.93157 5.82309 2.03329 5.31432 2.27051 4.84856L2.4248 4.57317C2.80898 3.94666 3.36012 3.436 4.01855 3.10051L4.19531 3.0175C4.61285 2.83843 5.06771 2.75548 5.58984 2.71281C6.17898 2.66468 6.91071 2.66496 7.83301 2.66496H12.167C13.0893 2.66496 13.821 2.66468 14.4102 2.71281C15.0069 2.76157 15.5157 2.86329 15.9814 3.10051L16.2568 3.25481C16.8833 3.63898 17.394 4.19012 17.7295 4.84856L17.8125 5.02531C17.9916 5.44285 18.0745 5.89771 18.1172 6.41985C18.1653 7.00898 18.165 7.74072 18.165 8.66301V11.3271Z`})},copy:{content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M6.08 2.5v1.167h3.834V2.5H6.08Zm-1.5-.083C4.58 1.634 5.216 1 5.998 1h4c.783 0 1.417.634 1.417 1.417V3.75c0 .782-.634 1.417-1.417 1.417h-4A1.417 1.417 0 0 1 4.581 3.75V2.417Z`,clipRule:`evenodd`}),(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M4.087 3.749a.583.583 0 0 0-.583.583l.001 8.583a.583.583 0 0 0 .584.584h7.82a.583.583 0 0 0 .583-.584V4.332a.583.583 0 0 0-.584-.583H11a.75.75 0 0 1 0-1.5h.909a2.083 2.083 0 0 1 2.083 2.083v8.583A2.083 2.083 0 0 1 11.908 15h-7.82a2.083 2.083 0 0 1-2.083-2.084l-.001-8.583A2.084 2.084 0 0 1 4.087 2.25H5a.75.75 0 1 1 0 1.5h-.913Z`,clipRule:`evenodd`})]})},displayOptions:{content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 2.5C8.11933 2.5 9.06613 3.23584 9.38477 4.25H14.75C15.1642 4.25 15.5 4.58579 15.5 5C15.5 5.41421 15.1642 5.75 14.75 5.75H9.38477C9.06613 6.76416 8.11933 7.5 7 7.5C5.88067 7.5 4.93387 6.76416 4.61523 5.75H2.25C1.83579 5.75 1.5 5.41421 1.5 5C1.5 4.58579 1.83579 4.25 2.25 4.25H4.61523C4.93387 3.23584 5.88067 2.5 7 2.5ZM7 4C6.44772 4 6 4.44772 6 5C6 5.55228 6.44772 6 7 6C7.55228 6 8 5.55228 8 5C8 4.44772 7.55228 4 7 4Z`}),(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 13.5C8.88067 13.5 7.93387 12.7642 7.61523 11.75H2.25C1.83579 11.75 1.5 11.4142 1.5 11C1.5 10.5858 1.83579 10.25 2.25 10.25H7.61523C7.93387 9.23584 8.88067 8.5 10 8.5C11.1193 8.5 12.0661 9.23584 12.3848 10.25H14.75C15.1642 10.25 15.5 10.5858 15.5 11C15.5 11.4142 15.1642 11.75 14.75 11.75H12.3848C12.0661 12.7642 11.1193 13.5 10 13.5ZM10 12C10.5523 12 11 11.5523 11 11C11 10.4477 10.5523 10 10 10C9.44772 10 9 10.4477 9 11C9 11.5523 9.44772 12 10 12Z`})]})},expand:{content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M6.2168 8.72266C6.50798 8.42824 6.98279 8.4257 7.27734 8.7168C7.57154 9.00799 7.57423 9.48287 7.2832 9.77734L4.59863 12.5H6.2998C6.71402 12.5 7.0498 12.8358 7.0498 13.25C7.04964 13.6641 6.71392 14 6.2998 14H2.75C2.55116 14 2.36036 13.9208 2.21973 13.7803C2.07915 13.6397 2.00008 13.4488 2 13.25V9.75C2 9.33579 2.33579 9 2.75 9C3.16421 9 3.5 9.33579 3.5 9.75V11.4775L6.2168 8.72266Z`}),(0,B.jsx)(`path`,{d:`M13.25 2C13.4488 2.00006 13.6397 2.07917 13.7803 2.21973C13.9208 2.36033 14 2.55119 14 2.75V6.25C14 6.66414 13.6641 6.99988 13.25 7C12.8358 7 12.5 6.66421 12.5 6.25V4.52246L9.7832 7.27734C9.49206 7.57173 9.01721 7.57419 8.72266 7.2832C8.42838 6.99201 8.42575 6.51716 8.7168 6.22266L11.4014 3.5H9.7002C9.28598 3.5 8.9502 3.16421 8.9502 2.75C8.95028 2.33586 9.28603 2 9.7002 2H13.25Z`})]})},file:{content:(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M8.212 1.013a2.5 2.5 0 0 1 1.52.72l3.536 3.535A2.5 2.5 0 0 1 14 7.035V12.5l-.013.256a2.5 2.5 0 0 1-2.231 2.231L11.5 15h-7l-.256-.013a2.5 2.5 0 0 1-2.231-2.231L2 12.5v-9a2.5 2.5 0 0 1 2.244-2.487L4.5 1h3.465zM4.5 2.5a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V7.035q0-.018-.003-.035H8.75A1.75 1.75 0 0 1 7 5.25V2.5zm4 2.75c0 .138.112.25.25.25h2.629L8.672 2.793a1 1 0 0 0-.172-.137z`,clipRule:`evenodd`})},folder:{content:(0,B.jsx)(`path`,{d:`M6.32 3.5H3.75c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25v-4.5c0-.69-.56-1.25-1.25-1.25H9.08a1.75 1.75 0 0 1-1.27-.545L6.503 3.578A.25.25 0 0 0 6.32 3.5M3.75 2h2.57c.48 0 .939.197 1.27.545l1.308 1.377A.25.25 0 0 0 9.08 4h3.171A2.75 2.75 0 0 1 15 6.75v4.5A2.75 2.75 0 0 1 12.25 14h-8.5A2.75 2.75 0 0 1 1 11.25v-6.5A2.75 2.75 0 0 1 3.75 2`})},home:{content:(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M2.323 5.68A1 1 0 0 0 2 6.415v8.083a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3.515a2 2 0 0 1 4 0v3.515a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5V6.416a1 1 0 0 0-.323-.737L9.015 1.396a1.5 1.5 0 0 0-2.03 0z`,clipRule:`evenodd`})},moon:{content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M12.897 2.557c.268.208-.035.62-.373.552A5.5 5.5 0 0 0 11.434 3C8.555 3 6 5.239 6 8s2.553 5 5.435 5q.56-.001 1.09-.11c.337-.068.64.345.372.553A7.47 7.47 0 0 1 8.304 15C4.27 15 1 11.866 1 8s3.27-7 7.304-7c1.74 0 3.339.583 4.593 1.557`}),(0,B.jsx)(`path`,{d:`M9.12 8.195a.218.218 0 0 1 0-.39l.426-.212a4.58 4.58 0 0 0 2.046-2.047l.213-.426c.08-.16.31-.16.39 0l.213.426a4.58 4.58 0 0 0 2.046 2.047l.425.212c.161.08.161.31 0 .39l-.425.212a4.58 4.58 0 0 0-2.046 2.047l-.213.425a.218.218 0 0 1-.39 0l-.213-.425a4.58 4.58 0 0 0-2.046-2.047z`})]})},myIssues:{content:(0,B.jsx)(`path`,{fillRule:`evenodd`,d:`M1 4.75v-.5A3.25 3.25 0 0 1 4.25 1h.5a.75.75 0 0 1 0 1.5h-.5A1.75 1.75 0 0 0 2.5 4.25v.5a.75.75 0 0 1-1.5 0M11.25 1h.5A3.25 3.25 0 0 1 15 4.25v.5l-.004.077a.75.75 0 0 1-1.492 0L13.5 4.75v-.5a1.75 1.75 0 0 0-1.75-1.75h-.5a.75.75 0 0 1 0-1.5m-6.5 13.995h-.5A3.25 3.25 0 0 1 1 11.745v-.5l.004-.077a.75.75 0 0 1 1.492 0l.004.077v.5c0 .967.784 1.75 1.75 1.75h.5a.75.75 0 0 1 0 1.5m6.5.005h.5A3.25 3.25 0 0 0 15 11.75v-.5l-.004-.077a.75.75 0 0 0-1.492 0l-.004.077v.5a1.75 1.75 0 0 1-1.75 1.75h-.5a.75.75 0 0 0 0 1.5M10 8a2 2 0 1 1-4 0 2 2 0 0 1 4 0`,clipRule:`evenodd`})},openExternal:{content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{d:`M6.413 1.313c.241 0 .472-.005.643.166.17.17.266.342.266.583a.817.817 0 0 1-.266.602c-.17.17-.402.166-.643.166h-1.43c-.635-.018-1.144.292-1.485.633-.34.34-.632 1.003-.632 1.485v6.06c0 .481.192 1.044.532 1.384.341.341.904.733 1.386.733h6.259c.482 0 1.144-.292 1.485-.633.341-.34.633-1.003.633-1.485V9.721c0-.24-.005-.472.166-.642.17-.17.301-.267.542-.267a.91.91 0 0 1 .643.267c.17.17.166.401.166.642v1.286a3.635 3.635 0 0 1-3.449 3.63c-.072.004-.113.004-.186.005-2.366.06-3.694.06-6.06 0-.072-.001-.113 0-.186-.004a3.636 3.636 0 0 1-3.444-3.444c-.004-.073-.003-.114-.005-.187-.06-2.365 0-3.693 0-6.059a3.635 3.635 0 0 1 3.636-3.635h1.429Z`}),(0,B.jsx)(`path`,{d:`M14.675 6.063a.75.75 0 1 1-1.5 0v-2.19l-4.148 4.5a.75.75 0 1 1-1.06-1.06l4.148-4.5h-2.19a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75v4Z`})]})},panel:{content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.25 2C2.45508 2 1 3.45508 1 5.25V10.75C1 12.5449 2.45508 14 4.25 14H11.75C13.5449 14 15 12.5449 15 10.75V5.25C15 3.45508 13.5449 2 11.75 2H4.25ZM2.5 5.5C2.5 4.39543 3.39543 3.5 4.5 3.5H11.5C12.6046 3.5 13.5 4.39543 13.5 5.5V10.5C13.5 11.6046 12.6046 12.5 11.5 12.5H4.5C3.39543 12.5 2.5 11.6046 2.5 10.5V5.5Z`}),(0,B.jsx)(`rect`,{x:`10`,y:`5`,width:`1.5`,height:`6`,rx:`.75`})]})},pause:{content:(0,B.jsx)(`path`,{d:`M3.5 3.5a1 1 0 0 1 1-1H6a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4.5a1 1 0 0 1-1-1v-9ZM9 3.5a1 1 0 0 1 1-1h1.5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1v-9Z`})},play:{content:(0,B.jsx)(`path`,{d:`m5.604 2.41 7.23 4.502a1.375 1.375 0 0 1-.02 2.345L5.585 13.6a1.375 1.375 0 0 1-2.083-1.18V3.576A1.375 1.375 0 0 1 5.604 2.41Z`})},search:{content:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 2C9.76142 2 12 4.23858 12 7C12 8.11012 11.6375 9.13519 11.0254 9.96484L13.7803 12.7197L13.832 12.7764C14.0723 13.0709 14.0549 13.5057 13.7803 13.7803C13.5057 14.0549 13.0709 14.0723 12.7764 13.832L12.7197 13.7803L9.96484 11.0254C9.13519 11.6375 8.11012 12 7 12C4.23858 12 2 9.76142 2 7C2 4.23858 4.23858 2 7 2ZM7 3.5C5.067 3.5 3.5 5.067 3.5 7C3.5 8.933 5.067 10.5 7 10.5C8.933 10.5 10.5 8.933 10.5 7C10.5 5.067 8.933 3.5 7 3.5Z`})},sun:{content:(0,B.jsx)(`path`,{d:`M8.759 14.24a.76.76 0 0 1-1.52 0v-1.48a.76.76 0 1 1 1.52 0zm-3.587-3.413a.76.76 0 0 0-1.075 0L3.05 11.873a.76.76 0 1 0 1.075 1.075l1.047-1.046a.76.76 0 0 0 0-1.075m5.657 0a.76.76 0 0 0 0 1.074l1.046 1.047a.76.76 0 1 0 1.075-1.075l-1.047-1.046a.76.76 0 0 0-1.074 0m-.715-4.943a3 3 0 1 1-4.242 4.242 3 3 0 0 1 4.242-4.242M3.05 4.123a.76.76 0 1 1 1.075-1.075l1.047 1.047A.76.76 0 1 1 4.097 5.17zm8.825-1.074a.76.76 0 1 1 1.075 1.074L11.903 5.17a.76.76 0 1 1-1.075-1.075zm2.365 4.19a.76.76 0 1 1 0 1.52h-1.48a.76.76 0 0 1 0-1.52zM4 7.998a.76.76 0 0 0-.76-.76H1.76a.76.76 0 1 0 0 1.52h1.48c.42 0 .76-.34.76-.76M7.998 4c.42 0 .76-.34.76-.76V1.76a.76.76 0 0 0-1.52 0v1.48c0 .42.34.76.76.76`})},terminal:{viewBox:`0 0 24 24`,content:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,B.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`3`}),(0,B.jsx)(`path`,{d:`m7 8 3 3-3 3`}),(0,B.jsx)(`path`,{d:`M12 16h5`})]})}};function J({name:e,title:t,style:n,...r}){let i=tl[e];return(0,B.jsxs)(`svg`,{"data-linear-icon":e,viewBox:i.viewBox??`0 0 16 16`,width:`1em`,height:`1em`,fill:`currentColor`,focusable:`false`,role:t?`img`:void 0,"aria-hidden":!t||void 0,style:{fill:`currentColor`,stroke:`none`,...n},...r,children:[t&&(0,B.jsx)(`title`,{children:t}),i.content]})}function nl({availableLabels:e,selectedLabels:t,open:n,disabled:r=!1,className:i=``,triggerClassName:a,showIcon:o=!1,showSelectedAsChips:s=!1,placeholder:c,triggerContent:l,onOpenChange:u,onChange:f,onCreateLabel:p,onDeleteLabel:m}){let{language:h,text:g}=H(),_=c??g(`标签`,`Labels`),v=(0,d.useRef)(null),y=(0,d.useRef)(null),[b,x]=(0,d.useState)(``),[S,C]=(0,d.useState)(null),w=b.trim(),T=e.filter(e=>!w||e.toLocaleLowerCase().includes(w.toLocaleLowerCase())||oc(e,h).toLocaleLowerCase().includes(w.toLocaleLowerCase())),E=!!w&&!e.some(e=>e===w||oc(e,h).toLocaleLowerCase()===w.toLocaleLowerCase());(0,d.useEffect)(()=>{if(!n){x(``);return}let e=$c([v],()=>u(!1));function t(e){e.key===`Escape`&&(u(!1),y.current?.focus())}return window.addEventListener(`keydown`,t),()=>{e(),window.removeEventListener(`keydown`,t)}},[u,n]);function D(e){r||S||f(t.includes(e)?t.filter(t=>t!==e):[...t,e])}async function O(){let e=w;C(e);try{await p(e),f(t.includes(e)?t:[...t,e]),x(``)}catch{}finally{C(null)}}async function k(e){if(m){C(e);try{await m(e)}catch{}finally{C(null)}}}return(0,B.jsxs)(`div`,{ref:v,className:`composer-menu-anchor label-picker${i?` ${i}`:``}`,children:[(0,B.jsx)(`button`,{ref:y,type:`button`,className:a,disabled:r,"aria-label":g(`选择或创建标签`,`Select or create labels`),"aria-haspopup":`dialog`,"aria-expanded":n,onClick:()=>u(!n),children:l??(0,B.jsxs)(B.Fragment,{children:[o&&(0,B.jsx)(Pc,{color:`currentColor`}),t.length>0&&s?(0,B.jsx)(`span`,{className:`label-trigger-chips`,children:t.map(e=>{let t=cc(e,h);return(0,B.jsxs)(`span`,{className:`label-trigger-chip`,children:[t.tone&&(0,B.jsx)(`i`,{style:{background:t.color}}),t.name]},e)})}):(0,B.jsx)(`span`,{children:t.length>0?t.map(e=>oc(e,h)).join(`, `):_})]})}),n&&(0,B.jsxs)(`div`,{className:`composer-popover label-popover`,role:`dialog`,"aria-label":g(`选择或创建标签`,`Select or create labels`),children:[(0,B.jsx)(`input`,{autoFocus:!0,value:b,onChange:e=>x(e.target.value),placeholder:g(`添加标签…`,`Add labels…`),"aria-label":g(`搜索标签`,`Search labels`)}),(0,B.jsxs)(`div`,{className:`label-options`,role:`listbox`,"aria-label":g(`可用标签`,`Available labels`),"aria-multiselectable":`true`,children:[T.map(e=>{let n=cc(e,h);return(0,B.jsxs)(`div`,{className:`label-option-row`,role:`presentation`,children:[(0,B.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t.includes(e),disabled:r||S!==null,onClick:()=>D(e),children:[(0,B.jsx)(`i`,{style:{background:n.tone?n.color:`transparent`}}),(0,B.jsx)(`span`,{children:n.name}),t.includes(e)&&(0,B.jsx)(`b`,{children:(0,B.jsx)(J,{name:`check`})})]}),m&&(0,B.jsx)(`button`,{type:`button`,className:`label-delete-button`,disabled:r||S!==null,"aria-label":g(`删除标签 ${n.name}`,`Delete label ${n.name}`),title:g(`删除标签`,`Delete label`),onClick:()=>void k(e),children:(0,B.jsx)(zc,{color:`currentColor`})})]},e)}),E&&(0,B.jsxs)(`button`,{type:`button`,disabled:r||S!==null,onClick:()=>void O(),children:[(0,B.jsx)(`i`,{style:{background:cc(w,h).tone?cc(w,h).color:`transparent`}}),(0,B.jsx)(`span`,{children:g(`创建 “${w}”`,`Create “${w}”`)})]})]})]})]})}function rl({value:e,options:t,open:n,disabled:r=!1,className:i=``,popoverClassName:a=``,triggerClassName:o,triggerContent:s,ariaLabel:c,title:l,onOpenChange:u,onChange:f}){let p=(0,d.useRef)(null),m=(0,d.useRef)(null),h=(0,d.useRef)(null),[g,_]=(0,d.useState)({left:0,top:0}),[v,y]=(0,d.useState)(0),b=t.find(t=>t.value===e)??t[0],x=m.current?.closest(`dialog, [role='dialog']`)??document.body;function S(){return Array.from(h.current?.querySelectorAll(`[role='option']`)??[])}function C(t){u(!1),t.value!==e&&f(t.value),requestAnimationFrame(()=>m.current?.focus())}function w(e){let n=S(),r=n.indexOf(document.activeElement);if(e.key===`Tab`){requestAnimationFrame(()=>u(!1));return}if(e.key===`Enter`||e.key===` `){if(r<0)return;e.preventDefault(),C(t[r]);return}let i=r;if(e.key===`ArrowDown`)i=Math.min(r+1,n.length-1);else if(e.key===`ArrowUp`)i=Math.max(r-1,0);else if(e.key===`Home`)i=0;else if(e.key===`End`)i=n.length-1;else return;e.preventDefault(),y(i),n[i]?.focus()}function T(e){if(h.current?.matches(`:active`))return;let t=e.relatedTarget;(!t||!p.current?.contains(t)&&!h.current?.contains(t))&&u(!1)}(0,d.useLayoutEffect)(()=>{if(!n)return;let e=m.current,t=h.current;if(!e||!t)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=r.bottom+4+i.height>window.innerHeight-8&&r.top-4-i.height>=8,o=Math.max(8,Math.min(r.left,window.innerWidth-i.width-8)),s=a?r.top-i.height-4:r.bottom+4;_({left:o,top:Math.max(8,s)})},[n]),(0,d.useEffect)(()=>{if(!n)return;let r=Math.max(0,t.findIndex(t=>t.value===e));y(r),requestAnimationFrame(()=>S()[r]?.focus({preventScroll:!0}))},[n]),(0,d.useEffect)(()=>{if(!n)return;let e=$c([p,h],()=>u(!1));function t(e){e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),u(!1),m.current?.focus())}function r(e){e.type===`scroll`&&h.current?.contains(e.target)||u(!1)}window.addEventListener(`keydown`,t);let i=requestAnimationFrame(()=>{window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0)});return()=>{e(),window.removeEventListener(`keydown`,t),cancelAnimationFrame(i),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[u,n]);let E=n?(0,vr.createPortal)((0,B.jsx)(`div`,{ref:h,className:`composer-popover task-property-popover${a?` ${a}`:``}`,role:`listbox`,"aria-label":c,style:{position:`fixed`,left:g.left,top:g.top},onKeyDown:w,onBlur:T,children:(0,B.jsx)(`div`,{className:`task-property-options`,children:t.map((t,n)=>(0,B.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t.value===e,tabIndex:n===v?0:-1,className:`task-property-option${t.className?` ${t.className}`:``}`,onClick:()=>C(t),onFocus:()=>y(n),children:[(0,B.jsx)(`span`,{className:`task-property-option-icon`,children:t.icon}),(0,B.jsx)(`span`,{className:`task-property-option-label`,children:t.label}),t.value===e&&(0,B.jsx)(`span`,{className:`task-property-option-check`,children:(0,B.jsx)(J,{name:`check`})})]},t.value))})}),x):null;return(0,B.jsxs)(`div`,{ref:p,className:`task-property-picker${i?` ${i}`:``}`,onBlur:T,children:[(0,B.jsx)(`button`,{ref:m,type:`button`,className:o,disabled:r,"aria-label":c,"aria-haspopup":`listbox`,"aria-expanded":n,title:l,onClick:()=>u(!n),onKeyDown:e=>{e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),u(!0))},children:s??(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`task-property-trigger-icon`,children:b.icon}),(0,B.jsx)(`span`,{className:`task-property-trigger-label`,children:b.label})]})}),E]})}function il(e,t){return e.kind===`local-ai`?t(`内置 AI`,`Built-in AI`):e.source===`comment`?t(`评论对话`,`Comment conversation`):t(`任务对话`,`Task conversation`)}function al(e,t){return e.currentRun?.status===`running`?e.latestTodo?.total?`${e.latestTodo.completed}/${e.latestTodo.total}`:t(`正在处理`,`Processing`):e.kind===`local-ai`?t(`已暂停`,`Paused`):`Codex`}function ol({conversations:e,onOpenConversation:t}){let{text:n}=H(),[r,i]=(0,d.useState)(!1),[a,o]=(0,d.useState)({left:0,top:0,ready:!1}),s=(0,d.useRef)(null),c=(0,d.useRef)(null);if((0,d.useLayoutEffect)(()=>{if(!r)return;let e=s.current,t=c.current;if(!e||!t)return;let n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=Math.max(8,Math.min(window.innerWidth-i.width-8,n.right-i.width)),l=n.bottom+6,u=l+i.height<=window.innerHeight-8?l:Math.max(8,n.top-i.height-6);o({left:a,top:u,ready:!0})},[r,e.length]),(0,d.useEffect)(()=>{if(!r)return;let e=()=>i(!1),t=$c([s,c],e),n=el(c,e);function a(e){e.key===`Escape`&&(i(!1),s.current?.focus())}return window.addEventListener(`keydown`,a),()=>{t(),n(),window.removeEventListener(`keydown`,a)}},[r]),e.length===0)return null;function l(e){e.stopPropagation()}function u(e){i(!1),t(e)}let f=e.length>1;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{ref:s,className:`task-conversation-trigger${f?` is-multiple`:``}${r?` is-open`:``}`,type:`button`,draggable:!1,"aria-label":f?n(`查看 ${e.length} 个对话`,`View ${e.length} conversations`):n(`打开对话 ${e[0].title}`,`Open conversation ${e[0].title}`),"aria-haspopup":f?`menu`:void 0,"aria-expanded":f?r:void 0,title:f?n(`${e.length} 个对话`,`${e.length} conversations`):e[0].title,onPointerDown:l,onDragStart:e=>e.preventDefault(),onClick:t=>{t.stopPropagation(),f?i(e=>!e):u(e[0])},children:[(0,B.jsx)(Vc,{color:`currentColor`,size:16}),f&&(0,B.jsxs)(`span`,{children:[`+`,e.length]})]}),r&&f&&(0,vr.createPortal)((0,B.jsxs)(`div`,{ref:c,className:`task-conversation-menu`,role:`menu`,"aria-label":n(`选择对话`,`Select conversation`),style:{left:a.left,top:a.top,visibility:a.ready?`visible`:`hidden`},onClick:l,children:[(0,B.jsx)(`div`,{className:`task-conversation-menu-heading`,children:n(`关联对话`,`Linked conversations`)}),e.map(e=>(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>u(e),children:[(0,B.jsx)(`span`,{className:`task-conversation-menu-icon`,children:(0,B.jsx)(Vc,{color:`currentColor`,size:13})}),(0,B.jsxs)(`span`,{className:`task-conversation-menu-copy`,children:[(0,B.jsx)(`strong`,{children:e.title}),(0,B.jsx)(`small`,{children:il(e,n)})]}),(0,B.jsx)(`span`,{className:`task-conversation-menu-status${e.currentRun?.status===`running`?` is-running`:``}`,children:al(e,n)})]},e.key))]}),document.body)]})}var sl=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cstyle%3e%20.dot%20{%20fill:%20%2300a558;%20transform-box:%20fill-box;%20transform-origin:%20center;%20animation:%20wave%201200ms%20linear%20infinite;%20animation-delay:%20calc(var(--phase)%20*%20-150ms);%20}%20@keyframes%20wave%20{%200%25,%20100%25%20{%20transform:%20scale(0);%20}%2012.5%25,%2087.5%25%20{%20transform:%20scale(.25);%20}%2025%25,%2075%25%20{%20transform:%20scale(.5);%20}%2037.5%25,%2062.5%25%20{%20transform:%20scale(.75);%20}%2050%25%20{%20transform:%20scale(1);%20}%20}%20%3c/style%3e%3crect%20class='dot'%20style='--phase:0'%20x='2'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:1'%20x='5.333333'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:2'%20x='8.666667'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='12'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:1'%20x='2'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:2'%20x='5.333333'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='8.666667'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:4'%20x='12'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:2'%20x='2'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='5.333333'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:4'%20x='8.666667'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:5'%20x='12'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='2'%20y='12'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:4'%20x='5.333333'%20y='12'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:5'%20x='8.666667'%20y='12'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:6'%20x='12'%20y='12'%20width='2'%20height='2'/%3e%3c/svg%3e`,cl=Gs().use(gs).use(Eo);function ll(e){function t(e){if(e.type===`image`||e.type===`imageReference`||e.type===`definition`)return``;if(e.type===`break`)return` `;if(e.value!==void 0)return e.value;let n=e.type===`root`||e.type===`blockquote`||e.type===`list`||e.type===`listItem`||e.type===`table`||e.type===`tableRow`?` `:``;return e.children?.map(t).join(n)??``}return t(cl.parse(e)).replace(/\s+/g,` `).trim()}function ul(e,t){return new Intl.DateTimeFormat(t,{month:`numeric`,day:`numeric`}).format(new Date(`${e}T12:00:00`))}function dl(e,t,n){let r=new Intl.DateTimeFormat(t,{month:`numeric`,day:`numeric`}).format(new Date(e));return n(`${r}创建`,`Created ${r}`)}function fl(e,t){if(!e)return``;let n=Math.max(0,Math.floor((t-new Date(e).getTime())/1e3));if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m${n%60?`${n%60}s`:``}`:`${Math.floor(r/60)}h${r%60?`${r%60}m`:``}`}function pl(e){let t=e.description.match(/!\[[^\]]*\]\((?:<([^>]+)>|([^\s)]+))(?:\s+["'][^)]*["'])?\)/),n=t?.[1]??t?.[2];return n?Ie(n):null}function ml({src:e}){let t=(0,d.useRef)(null),n=(0,d.useRef)(null),[r,i]=(0,d.useState)(null),a=r?.clamped??!1,o=(0,d.useCallback)(()=>{let e=t.current,r=n.current;if(!e||!r)return;let a=Math.min(r.naturalWidth,e.clientWidth),o={width:r.naturalWidth,clamped:r.naturalHeight*a/r.naturalWidth>300};i(e=>e?.width===o.width&&e.clamped===o.clamped?e:o)},[]);return(0,d.useEffect)(()=>{let e=t.current;if(!e)return;let n=new ResizeObserver(o);return n.observe(e),()=>n.disconnect()},[o]),(0,B.jsx)(`div`,{ref:t,className:`task-card-media${a?` is-clamped`:``}`,style:r?{width:r.width}:void 0,children:(0,B.jsx)(`img`,{src:e,alt:``,loading:`lazy`,onLoad:e=>{n.current={naturalWidth:e.currentTarget.naturalWidth,naturalHeight:e.currentTarget.naturalHeight},o()}})})}function hl({presentation:e}){let{text:t}=H(),{processing:n}=e;if(!(n.total!==null&&n.total>0&&n.completed!==null))return null;let r=n.total,i=Math.max(0,Math.min(n.completed,r)),a=t(`处理进度 ${i}/${r}`,`Processing progress ${i}/${r}`);return(0,B.jsx)(`div`,{className:`card-progress-row`,children:(0,B.jsx)(`div`,{className:`task-progress-segments${n.running?` is-running`:``}`,"aria-label":a,title:a,children:Array.from({length:r},(e,t)=>(0,B.jsx)(`span`,{className:t<i?`is-complete`:``},t))})})}function gl({processing:e}){let{text:t}=H(),{running:n,startedAt:r}=e,[i,a]=(0,d.useState)(Date.now);(0,d.useEffect)(()=>{if(!n||!r)return;a(Date.now());let e=window.setInterval(()=>a(Date.now()),1e3);return()=>window.clearInterval(e)},[n,r]);let o=fl(r,i);return(0,B.jsx)(`span`,{className:`task-processing-label`,children:n?o?t(`已处理 ${o}...`,`Processing for ${o}...`):t(`正在处理...`,`Processing...`):t(`暂停处理`,`Processing paused`)})}function _l({presentation:e,onOpenConversation:t}){let n=e.processing.running;return(0,B.jsxs)(`div`,{className:`task-processing-row${n?` is-running`:` is-paused`}`,children:[n&&(0,B.jsx)(`img`,{className:`task-processing-glyph`,src:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cstyle%3e%20.dot%20{%20fill:%20%2300a558;%20transform-box:%20fill-box;%20transform-origin:%20center;%20animation:%20wave%201200ms%20linear%20infinite;%20animation-delay:%20calc(var(--phase)%20*%20-150ms);%20}%20@keyframes%20wave%20{%200%25,%20100%25%20{%20transform:%20scale(0);%20}%2012.5%25,%2087.5%25%20{%20transform:%20scale(.25);%20}%2025%25,%2075%25%20{%20transform:%20scale(.5);%20}%2037.5%25,%2062.5%25%20{%20transform:%20scale(.75);%20}%2050%25%20{%20transform:%20scale(1);%20}%20}%20%3c/style%3e%3crect%20class='dot'%20style='--phase:0'%20x='2'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:1'%20x='5.333333'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:2'%20x='8.666667'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='12'%20y='2'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:1'%20x='2'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:2'%20x='5.333333'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='8.666667'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:4'%20x='12'%20y='5.333333'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:2'%20x='2'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='5.333333'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:4'%20x='8.666667'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:5'%20x='12'%20y='8.666667'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:3'%20x='2'%20y='12'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:4'%20x='5.333333'%20y='12'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:5'%20x='8.666667'%20y='12'%20width='2'%20height='2'/%3e%3crect%20class='dot'%20style='--phase:6'%20x='12'%20y='12'%20width='2'%20height='2'/%3e%3c/svg%3e`,alt:``,"aria-hidden":`true`}),(0,B.jsx)(gl,{processing:e.processing}),(0,B.jsx)(`span`,{className:`task-processing-spacer`,"aria-hidden":`true`}),e.conversations.length>0&&(0,B.jsx)(ol,{conversations:e.conversations,onOpenConversation:t})]})}function vl({participants:e}){let{text:t}=H();return e.length===0?null:(0,B.jsx)(`span`,{className:`task-participants`,"aria-label":t(`参与人:${e.map(e=>e.name).join(`、`)}`,`Participants: ${e.map(e=>e.name).join(`, `)}`),children:e.map(e=>(0,B.jsx)(lc,{actor:e,className:`task-participant-avatar`},`${e.type}:${e.id}`))})}function yl({task:e}){let{language:t}=H();return(0,B.jsxs)(B.Fragment,{children:[e.labels.slice(0,2).map(e=>{let n=cc(e,t);return(0,B.jsxs)(`span`,{className:`label-chip${n.tone?` label-chip-${n.tone}`:``}`,children:[n.tone&&(0,B.jsx)(`i`,{"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:n.name})]},e)}),e.labels.length>2&&(0,B.jsxs)(`span`,{className:`label-more`,title:e.labels.slice(2).map(e=>cc(e,t).name).join(`, `),children:[`+`,e.labels.length-2]})]})}function bl({task:e,disabled:t,open:n,onOpenChange:r,onChange:i}){let{language:a,text:o}=H(),s=e.externalKey??e.identifier;return(0,B.jsx)(rl,{value:e.priority,options:nc.map(e=>({value:e,label:V(a,e),icon:(0,B.jsx)(Mc,{priority:e,size:14}),className:`priority-${e}`})),open:n,disabled:t,className:`card-property-control`,triggerClassName:`priority-chip priority-chip-${e.priority}`,ariaLabel:o(`${s} 优先级`,`${s} priority`),title:o(`优先级:${V(a,e.priority)}`,`Priority: ${V(a,e.priority)}`),onOpenChange:r,onChange:i})}function xl({task:e,disabled:t,onChange:n}){let{locale:r,text:i}=H(),a=e.externalKey??e.identifier;return e.dueDate?(0,B.jsxs)(`label`,{className:`due-date-chip card-property-control`,title:i(`截止日期 ${e.dueDate}`,`Due date ${e.dueDate}`),children:[(0,B.jsx)(Kc,{color:`currentColor`,size:12}),` `,ul(e.dueDate,r),(0,B.jsx)(`input`,{type:`date`,"aria-label":i(`${a} 截止日期`,`${a} due date`),value:e.dueDate,disabled:t,onChange:e=>n(e.target.value||null)})]}):null}function Sl({task:e,participants:t,currentUser:n,disabled:r,open:i,onOpenChange:a,onChange:o}){let{text:s}=H(),c=e.externalKey??e.identifier,l=Be(n),u=Be(e.assignee)===l?n:e.assignee,d=t.map(e=>Be(e)===l?n:e),f=[u,n,ze].filter((e,t,n)=>n.findIndex(t=>Be(t)===Be(e))===t);return(0,B.jsx)(rl,{value:Be(e.assignee),options:f.map(e=>({value:Be(e),label:Be(e)===l?s(`${e.name}(我)`,`${e.name} (me)`):e.name,icon:(0,B.jsx)(lc,{actor:e,className:`task-property-assignee-avatar`})})),open:i,disabled:r,className:`task-participants-control card-property-control`,triggerClassName:`task-assignee-trigger`,triggerContent:(0,B.jsx)(vl,{participants:d}),ariaLabel:s(`${c} 负责人`,`${c} assignee`),title:s(`负责人:${u.name}`,`Assignee: ${u.name}`),onOpenChange:a,onChange:e=>{let t=f.find(t=>Be(t)===e),r=t?He(t,n):void 0;r&&o(r)}})}function Cl({task:e,variant:t=`main`,presentation:n,isDragging:r,dragShift:i,isMoving:a,isSettling:o,isContextMenuOpen:s,availableLabels:c,projectName:l,currentUser:u,showCover:f,showBody:p,onCreateLabel:m,onEdit:h,onUpdate:g,onComplete:_,onContextMenu:v,onDragStart:y,onDragEnd:b,onOpenConversation:x}){let{locale:S,text:C}=H(),w=e.externalKey??e.identifier,[T,E]=(0,d.useState)(null),[D,O]=(0,d.useState)(null),k={type:e.creatorType,id:e.creatorId,name:e.creatorName,avatarUrl:e.creatorAvatarUrl},ee=e.status===`in_progress`,A=(e.status===`in_progress`||e.status===`in_review`||e.status===`blocked`||e.status===`done`||e.status===`canceled`)&&n.conversations.length>0,te=t===`main`&&e.participants.length>0,j=f?pl(e):null,M=(0,d.useMemo)(()=>p?ll(e.description):``,[p,e.description]),N=e.priority!==`none`||e.labels.length>0||e.dueDate,P=!!l||!ee&&(N||te||A),F=D!==null;function I(t,n){O(n),g(e,t).catch(()=>{}).finally(()=>O(e=>e===n?null:e))}return(0,B.jsxs)(`article`,{className:`task-card task-card-${t} status-${e.status}${ee?` is-processing-card`:``}${ee&&n.processing.running?` is-running-card`:``}${j?` has-media`:``}${n.unread?` is-unread`:``}${r?` is-dragging`:``}${i?` is-drag-shifted`:``}${a?` is-moving`:``}${o?` is-settling`:``}${s?` is-context-open`:``}${T?` is-property-menu-open`:``}`,style:{viewTransitionName:e.status===`in_review`?`review-task-${e.id}`:`none`,...i?{transform:`translate3d(0, ${i}px, 0)`}:{}},draggable:!a,"aria-labelledby":`task-${e.id}-title`,"data-task-id":e.id,"data-drag-shift":i||void 0,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),v(e,{x:t.clientX,y:t.clientY})},onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,e.id),t.dataTransfer.setData(`application/x-taskboard-task`,e.id),y(e,t.currentTarget.offsetHeight)},onDragEnd:b,children:[(0,B.jsx)(`button`,{className:`task-card-open`,type:`button`,"aria-label":C(`打开 ${w}: ${e.title}`,`Open ${w}: ${e.title}`),onClick:()=>h(e)}),(0,B.jsxs)(`div`,{className:`card-topline`,children:[(0,B.jsx)(`span`,{className:`card-reference`,children:(0,B.jsxs)(`span`,{className:`task-identifier`,children:[`ID: `,w]})}),n.unread&&(0,B.jsx)(`span`,{className:`task-unread-dot`,"aria-label":C(`有未读更新`,`Unread updates`)}),e.status===`in_review`&&_&&(0,B.jsxs)(`button`,{className:`task-card-complete`,type:`button`,"aria-label":C(`完成 ${w}`,`Complete ${w}`),title:C(`完成`,`Complete`),onClick:t=>{t.stopPropagation();let n=t.currentTarget.closest(`.task-card`);n.style.viewTransitionName=`completing-task`,document.startViewTransition(()=>_(e)).finished.then(()=>{n.style.viewTransitionName=`review-task-${e.id}`},()=>{n.style.viewTransitionName=`review-task-${e.id}`})},children:[(0,B.jsx)(`img`,{src:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='7.00004'%20height='6.03079'%20viewBox='0%200%207.00004%206.03079'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='check--check-form-validation-checkmark-success-add-addition-tick'%3e%3cpath%20id='Vector'%20d='M0.500023%203.73078L1.76002%205.35076C1.80254%205.40601%201.85702%205.45091%201.91937%205.48211C1.98172%205.51327%202.05032%205.52993%202.12002%205.53076C2.1886%205.53159%202.2565%205.51705%202.31878%205.48834C2.38105%205.45959%202.43613%205.41731%202.48002%205.36461L6.50002%200.500014'%20stroke='%23317CFF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,alt:``,"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:C(`完成`,`Complete`)})]}),t===`sidebar`&&(0,B.jsxs)(`span`,{className:`sidebar-card-creator`,children:[(0,B.jsx)(Sl,{task:e,participants:e.participants.length?e.participants:[k],currentUser:u,disabled:F||e.source===`jira`,open:T===`assignee`,onOpenChange:e=>E(e?`assignee`:null),onChange:e=>I({assigneeTarget:e},`assignee`)}),(0,B.jsx)(`span`,{children:dl(e.createdAt,S,C)})]})]}),(0,B.jsx)(`h3`,{id:`task-${e.id}-title`,children:e.title}),M&&(0,B.jsx)(`p`,{className:`task-card-description`,children:M}),j&&(0,B.jsx)(ml,{src:j},j),P&&(0,B.jsxs)(`div`,{className:`card-properties`,"aria-label":C(`议题属性`,`Issue properties`),children:[l&&(0,B.jsxs)(`span`,{className:`project-chip`,title:l,children:[(0,B.jsx)(Bc,{color:`currentColor`}),(0,B.jsx)(`span`,{children:l})]}),!ee&&e.priority!==`none`&&(0,B.jsx)(bl,{task:e,disabled:F,open:T===`priority`,onOpenChange:e=>E(e?`priority`:null),onChange:e=>I({priority:e},`priority`)}),!ee&&e.labels.length>0&&(0,B.jsx)(nl,{availableLabels:c,selectedLabels:e.labels,open:T===`labels`,disabled:F,className:`card-label-picker card-property-control`,triggerClassName:`card-label-trigger`,triggerContent:(0,B.jsx)(yl,{task:e}),onOpenChange:e=>E(e?`labels`:null),onChange:e=>I({labels:e},`labels`),onCreateLabel:m}),!ee&&(0,B.jsx)(xl,{task:e,disabled:F,onChange:e=>I({dueDate:e,...e?{}:{recurrence:null}},`dueDate`)}),!ee&&te&&(0,B.jsx)(Sl,{task:e,participants:e.participants,currentUser:u,disabled:F||e.source===`jira`,open:T===`assignee`,onOpenChange:e=>E(e?`assignee`:null),onChange:e=>I({assigneeTarget:e},`assignee`)}),!ee&&A&&(0,B.jsx)(`span`,{className:`card-properties-spacer`,"aria-hidden":`true`}),!ee&&A&&(0,B.jsx)(ol,{conversations:n.conversations,onOpenConversation:x})]}),ee&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(hl,{presentation:n}),(0,B.jsx)(_l,{presentation:n,onOpenConversation:x})]})]})}var wl={backlog:{label:`待立项`,tone:`backlog`},todo:{label:`等待认领`,tone:`todo`},in_progress:{label:`处理中`,tone:`progress`},in_review:{label:`等你确认`,tone:`review`},blocked:{label:`遇到阻碍`,tone:`blocked`},done:{label:`完成`,tone:`done`},canceled:{label:`取消`,tone:`canceled`}};function Tl({scrollRef:e,status:t,tasks:n,presentations:r,emptyMessage:i,isDropTarget:a,draggedTaskId:o,draggedTaskHeight:s,movingTaskId:c,settlingTaskId:l,contextMenuTaskId:u,availableLabels:d,projectNames:f,currentUser:p,showCover:m,showBody:h,createEnabled:g=!0,onCreateLabel:_,onCreate:v,onEdit:y,onUpdate:b,onComplete:x,onContextMenu:S,onDragStart:C,onDragEnd:w,onDragEnter:T,onDrop:E,onOpenConversation:D}){let{language:O,text:k}=H(),ee=wl[t],A=Qe(O,t),{findDropBefore:te,clearDropPreview:j,updateDropPreview:M,leaveDropPreview:N,getTaskDragShift:P}=Ue({tasks:n,draggedTaskId:o,draggedTaskHeight:s,isDropTarget:a});function F(e){e.preventDefault();let n=e.dataTransfer.getData(`application/x-taskboard-task`)||e.dataTransfer.getData(`text/plain`);n&&E(t,n,te(e.currentTarget,e.clientY)),j()}return(0,B.jsxs)(`section`,{className:`board-column status-${t}${a?` is-drop-target`:``}`,"aria-labelledby":`column-${t}`,onDragEnter:()=>T(t),onDragOver:e=>{T(t),M(e)},onDragLeave:N,onDrop:F,children:[(0,B.jsxs)(`header`,{className:`column-header`,children:[(0,B.jsxs)(`div`,{className:`column-heading`,children:[(0,B.jsx)(`span`,{className:`column-status-icon status-icon-${ee.tone}`,children:(0,B.jsx)(Ac,{status:t,color:`var(--column-status-color)`,size:14})}),(0,B.jsxs)(`h2`,{id:`column-${t}`,children:[A,n.length>0?` ${n.length}`:``]})]}),g&&(0,B.jsx)(`div`,{className:`column-actions`,children:(0,B.jsx)(`button`,{type:`button`,className:`icon-button add-task-button`,onClick:()=>v(t),"aria-label":k(`在${A}中新建议题`,`Create issue in ${A}`),title:k(`添加到${A}`,`Add to ${A}`),children:(0,B.jsx)(Rc,{color:`var(--column-status-color)`,size:12})})})]}),(0,B.jsxs)(`div`,{className:`column-list`,ref:e,children:[n.map(e=>{let t=P(e.id);return(0,B.jsx)(Cl,{task:e,presentation:r[e.id],isDragging:o===e.id,dragShift:t,isMoving:c===e.id,isSettling:l===e.id,isContextMenuOpen:u===e.id,availableLabels:d,projectName:f?.[e.projectId],currentUser:p,showCover:m,showBody:h,onCreateLabel:t=>_(t,e.projectId),onEdit:y,onUpdate:b,onComplete:x,onContextMenu:S,onDragStart:C,onDragEnd:w,onOpenConversation:D},e.id)}),n.length===0&&(0,B.jsx)(`div`,{className:`column-empty`,children:i})]})]})}var El=[`todo`,`in_progress`,`blocked`,`in_review`],Dl=[`backlog`,`done`,`canceled`],Ol={cover:!0,body:!1,mainStatuses:[...El],sidebarStatuses:[...Dl,`archived`],hiddenStatuses:[]};function kl({settings:e,onChange:t,onReset:n}){let{language:r,text:i}=H(),a=(0,d.useRef)(null),o=(0,d.useRef)(null),s=(0,d.useRef)(null),[c,l]=(0,d.useState)(!1),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)({left:0,top:0,ready:!1}),[h,g]=(0,d.useState)(null),[_,v]=(0,d.useState)(0),[y,b]=(0,d.useState)(null);(0,d.useLayoutEffect)(()=>{if(!c||!a.current||!o.current)return;let e=a.current.getBoundingClientRect(),t=o.current.getBoundingClientRect(),n=Math.max(8,Math.min(e.right-t.width,window.innerWidth-t.width-8)),r=e.bottom+8+t.height<=window.innerHeight?e.bottom+8:Math.max(8,e.top-t.height-8);m({left:n,top:r,ready:!0})},[c]),(0,d.useEffect)(()=>{if(!c)return;let e=$c([o,a],()=>l(!1));function t(e){e.key===`Escape`&&(l(!1),a.current?.focus())}return document.addEventListener(`keydown`,t),()=>{e(),document.removeEventListener(`keydown`,t)}},[c]),(0,d.useEffect)(()=>{if(!u)return;s.current?.focus();function e(e){e.key===`Escape`&&(f(!1),a.current?.focus())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u]);function x(t){return t===`main`?e.mainStatuses:t===`sidebar`?e.sidebarStatuses:e.hiddenStatuses}function S(n,r,i){let a={main:e.mainStatuses.filter(e=>e!==n),sidebar:e.sidebarStatuses.filter(e=>e!==n),hidden:e.hiddenStatuses.filter(e=>e!==n)},o=a[r],s=i?o.indexOf(i):-1;o.splice(s>=0?s:o.length,0,n),t({...e,mainStatuses:a.main,sidebarStatuses:a.sidebar,hiddenStatuses:a.hidden})}function C(e,t){return Array.from(e.querySelectorAll(`[data-display-status]`)).filter(e=>e.dataset.displayStatus!==h).find(e=>t<e.getBoundingClientRect().top+e.offsetHeight/2)?.dataset.displayStatus??null}function w(e,t){if(!h||e===h)return 0;let n=x(t),r=n.filter(e=>e!==h),i=n.indexOf(e),a=r.indexOf(e),o=n.indexOf(h),s=y?.placement===t?y.beforeStatus?r.indexOf(y.beforeStatus):r.length:-1,c=0,l=_+8;return o>=0&&i>o&&(c-=l),s>=0&&a>=s&&(c+=l),c}function T(e,t){e.preventDefault();let n=e.dataTransfer.getData(`application/x-taskboard-display-status`)||e.dataTransfer.getData(`text/plain`);n&&S(n,t,C(e.currentTarget,e.clientY)),g(null),v(0),b(null)}function E(){f(!1),a.current?.focus()}let D=c?(0,vr.createPortal)((0,B.jsxs)(`div`,{ref:o,className:`project-automation-menu board-display-menu no-drag`,role:`dialog`,"aria-label":i(`显示设置`,`Display settings`),style:{left:p.left,top:p.top,visibility:p.ready?`visible`:`hidden`},children:[(0,B.jsx)(`div`,{className:`project-automation-menu-heading`,children:(0,B.jsx)(`strong`,{children:i(`显示设置`,`Display settings`)})}),(0,B.jsxs)(`div`,{className:`project-automation-switch`,children:[(0,B.jsx)(`span`,{children:i(`封面`,`Cover`)}),(0,B.jsx)(`button`,{type:`button`,className:`board-setting-switch`+(e.cover?` is-on`:``),role:`switch`,"aria-label":i(`显示封面`,`Show cover`),"aria-checked":e.cover,onClick:()=>t({...e,cover:!e.cover}),children:(0,B.jsx)(`span`,{"aria-hidden":`true`})})]}),(0,B.jsxs)(`div`,{className:`project-automation-switch`,children:[(0,B.jsx)(`span`,{children:i(`正文`,`Body`)}),(0,B.jsx)(`button`,{type:`button`,className:`board-setting-switch`+(e.body?` is-on`:``),role:`switch`,"aria-label":i(`显示正文`,`Show body`),"aria-checked":e.body,onClick:()=>t({...e,body:!e.body}),children:(0,B.jsx)(`span`,{"aria-hidden":`true`})})]}),(0,B.jsxs)(`button`,{className:`display-settings-more`,type:`button`,"aria-haspopup":`dialog`,onClick:()=>{l(!1),f(!0)},children:[(0,B.jsx)(`span`,{children:i(`更多显示设置`,`More display settings`)}),(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`›`})]})]}),document.body):null,O=u?(0,vr.createPortal)((0,B.jsx)(`div`,{className:`display-settings-backdrop no-drag`,onPointerDown:e=>{e.target===e.currentTarget&&E()},children:(0,B.jsxs)(`div`,{className:`display-settings-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`display-settings-title`,children:[(0,B.jsxs)(`header`,{className:`display-settings-header`,children:[(0,B.jsx)(`h2`,{id:`display-settings-title`,children:i(`更多显示设置`,`More display settings`)}),(0,B.jsx)(`button`,{ref:s,className:`icon-button display-settings-close`,type:`button`,"aria-label":i(`关闭显示设置`,`Close display settings`),onClick:E,children:(0,B.jsx)(J,{name:`close`})})]}),(0,B.jsx)(`div`,{className:`display-settings-columns`,children:[[`main`,i(`正常显示`,`Main board`)],[`sidebar`,i(`侧边栏显示`,`Sidebar`)],[`hidden`,i(`隐藏`,`Hidden`)]].map(([e,t])=>(0,B.jsxs)(`section`,{className:`display-settings-column`+(y?.placement===e?` is-drop-target`:``),"aria-label":t,onDragOver:t=>{t.preventDefault(),t.dataTransfer.dropEffect=`move`,b({placement:e,beforeStatus:C(t.currentTarget,t.clientY)})},onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&b(null)},onDrop:t=>T(t,e),children:[(0,B.jsx)(`h3`,{children:t}),(0,B.jsx)(`div`,{className:`display-settings-status-list`,children:x(e).map(t=>{let n=w(t,e);return(0,B.jsxs)(`div`,{className:`display-settings-status-item status-${t}`+(h===t?` is-dragging`:``)+(n?` is-drag-shifted`:``)+(y?.placement===e&&y.beforeStatus===t?` is-drop-before`:``),style:n?{transform:`translate3d(0, ${n}px, 0)`}:void 0,draggable:!0,"data-display-status":t,onDragStart:e=>{e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.setData(`application/x-taskboard-display-status`,t),g(t),v(e.currentTarget.offsetHeight)},onDragEnd:()=>{g(null),v(0),b(null)},children:[t===`archived`?(0,B.jsx)(zc,{color:`var(--display-status-color)`,size:15}):(0,B.jsx)(Ac,{status:t,color:`var(--display-status-color)`,size:15}),(0,B.jsx)(`span`,{children:t===`archived`?i(`已归档`,`Archived`):t===`blocked`?i(`遇到阻碍(默认隐藏)`,`Blocked (hidden by default)`):Qe(r,t)})]},t)})})]},e))}),(0,B.jsx)(`footer`,{className:`display-settings-footer`,children:(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,onClick:n,children:i(`重置为默认`,`Reset to default`)})})]})}),document.body):null;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{ref:a,className:`task-filter-trigger board-card-display-trigger`+(c||u?` is-open`:``),type:`button`,"aria-label":i(`显示设置`,`Display settings`),"aria-haspopup":`dialog`,"aria-expanded":c,title:i(`显示设置`,`Display settings`),onClick:()=>{c||m({left:0,top:0,ready:!1}),l(e=>!e)},children:(0,B.jsx)(J,{name:`displayOptions`})}),D,O]})}var Al=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Tick%20Square'%3e%3cpath%20id='Stroke%201'%20d='M4.50829%207.00002L6.1701%208.66112L9.49231%205.33892'%20stroke='%235D5D5F'%20stroke-width='1.05'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%202'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.525001%207.00002C0.525001%2011.8559%202.14411%2013.475%207.00002%2013.475C11.8559%2013.475%2013.475%2011.8559%2013.475%207.00002C13.475%202.14411%2011.8559%200.525001%207.00002%200.525001C2.14411%200.525001%200.525001%202.14411%200.525001%207.00002Z'%20stroke='%235D5D5F'%20stroke-width='1.05'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,jl=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Edit%20Square'%3e%3cpath%20id='Stroke%201'%20d='M7.00002%200.525001C2.14411%200.525001%200.525001%202.14411%200.525001%207.00002C0.525001%2011.8559%202.14411%2013.475%207.00002%2013.475C11.8559%2013.475%2013.475%2011.8559%2013.475%207.00002'%20stroke='%235D5D5F'%20stroke-width='1.05'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.2698%201.61259C11.5747%200.997292%2010.5128%201.06169%209.89753%201.75679C9.89753%201.75679%206.83922%205.2113%205.77872%206.4104C4.71682%207.60881%205.49522%209.26431%205.49522%209.26431C5.49522%209.26431%207.24803%209.81941%208.29383%208.63782C9.34033%207.45621%2012.4141%203.9849%2012.4141%203.9849C13.0294%203.28979%2012.9643%202.2279%2012.2698%201.61259Z'%20stroke='%235D5D5F'%20stroke-width='1.05'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%205'%20d='M9.10618%202.6605L11.6227%204.8886'%20stroke='%235D5D5F'%20stroke-width='1.05'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,Ml=[`urgent`,`high`,`medium`,`low`,`none`],Nl=[`#5e6ad2`,`#d25e5e`,`#5eccd2`,`#f9ac28`,`#85d254`,`#5482d2`,`#bf49d7`],Pl=864e5,Fl=7*Pl,Il=new Set([`in_progress`,`in_review`,`blocked`]);function Ll(e,t,n){let r=n!==void 0&&new Date(e).getFullYear()!==new Date(n).getFullYear();return new Intl.DateTimeFormat(t,{year:r?`numeric`:void 0,month:`short`,day:`numeric`}).format(e)}function Rl(e){let t=new Date(e.createdAt).getTime();return e.startDate?Math.max(t,Vl(e.startDate)):e.status===`done`?t:Math.max(t,new Date(e.updatedAt).getTime())}function zl(e,t,n){let r=e.filter(e=>e.status!==`canceled`),i=r.filter(e=>e.status===`done`),a=r.filter(e=>Il.has(e.status)),o=r.filter(e=>e.status===`done`||Il.has(e.status)),s=n?new Date(n).getTime():t,c=Math.min(s,t),l=(t-c)/12,u=Array.from({length:13},(e,n)=>{let a=n===12?t:c+l*n,s=n===0?c-1:c+l*(n-1);return{timestamp:a,scope:r.filter(e=>new Date(e.createdAt).getTime()<=a).length,started:o.filter(e=>Rl(e)<=a).length,completed:i.filter(e=>new Date(e.updatedAt).getTime()<=a).length,completions:i.filter(e=>{let t=new Date(e.updatedAt).getTime();return t>s&&t<=a}).length}});u[u.length-1]={...u[u.length-1],scope:r.length,started:o.length,completed:i.length};let d=r.length-i.length,f=Math.max(c,t-28*Pl),p=i.filter(e=>new Date(e.updatedAt).getTime()>=f).length,m=Math.max(1,(t-f)/Fl),h=Math.max(1,(t-c)/Fl),g=p>0?p/m:i.length/h,_=d>0&&g>0?{optimisticAt:t+d/(g*1.4)*Fl,conservativeAt:t+d/(g*.6)*Fl}:null;return{scope:r.length,started:a.length,completed:i.length,unstarted:Math.max(0,r.length-o.length),points:u,forecast:_}}function Bl(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function Vl(e){return new Date(`${e}T00:00:00`).getTime()}function Hl(e,t){return new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`}).format(new Date(`${e}T12:00:00`))}function Ul({projectId:e,summary:t,summaryReady:n,animateSummary:r,onSummaryAnimationStart:i}){let{text:a}=H(),[o,s]=(0,d.useState)(``),[c,l]=(0,d.useState)(!0),[u]=(0,d.useState)(r),f=(0,d.useRef)(!1),p=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{!u||f.current||(f.current=!0,i(e))},[u,i,e]),(0,d.useEffect)(()=>{if(!n){s(``),l(u);return}if(!u||p.current){s(t),l(!1);return}let e=Array.from(t),r=0,i;p.current=!0,s(``),l(!0);function a(){if(r+=1,s(e.slice(0,r).join(``)),r>=e.length){l(!1);return}let t=e[r-1],n=/[。!?]/.test(t)?140:/[,;:]/.test(t)?80:t===` `?12:26;i=setTimeout(a,n)}return i=setTimeout(a,180),()=>clearTimeout(i)},[u,e,t,n]),(0,B.jsxs)(`section`,{className:`dashboard-codex-summary`,"aria-label":a(`Codex 项目总结`,`Codex project summary`),children:[(0,B.jsx)(`div`,{className:`dashboard-summary-bubble`,children:(0,B.jsx)(`p`,{className:c?`is-typing`:void 0,"aria-label":n?t:a(`Codex 正在整理项目总结`,`Codex is preparing the project summary`),children:o})}),(0,B.jsx)(`img`,{className:`dashboard-codex-mark`,src:`codex-agent-logo.png`,alt:``,"aria-hidden":`true`})]})}function Wl({progressData:e,todayValue:t}){let{locale:n,text:r}=H(),[i,a]=(0,d.useState)(null),o=new Date(t);o.setMonth(o.getMonth()+3);let s=o.getTime(),c=(0,d.useMemo)(()=>{let n=Math.max(1,e.scope),r=e=>227-e/n*199,i=e.points.map((t,n)=>({...t,x:0+294*n/(e.points.length-1)})),a=e=>i.map((t,n)=>`${n===0?`M`:`L`}${t.x.toFixed(2)} ${r(t[e]).toFixed(2)}`).join(` `),o=a(`completed`),c=e.forecast?{optimisticX:294+132*(e.forecast.optimisticAt-t)/(s-t),conservativeX:294+132*(e.forecast.conservativeAt-t)/(s-t)}:null;return{left:0,right:426,top:28,bottom:227,currentX:294,y:r,points:i,scopePath:`${a(`scope`)} L426 ${r(e.scope).toFixed(2)}`,startedPath:a(`started`),completedPath:o,completedArea:`${o} L294 227 L0 227 Z`,forecast:c,maximumCompletions:Math.max(1,...e.points.map(e=>e.completions))}},[e,s,t]),l=i===null?null:c.points[i];return(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-tertiary-panel dashboard-progress-panel`,children:[(0,B.jsxs)(`header`,{className:`dashboard-progress-header`,children:[(0,B.jsx)(`div`,{className:`dashboard-progress-title`,children:(0,B.jsx)(`span`,{children:r(`累计进度`,`Cumulative progress`)})}),(0,B.jsxs)(`div`,{className:`dashboard-progress-legend`,children:[(0,B.jsxs)(`span`,{className:`tone-scope`,children:[(0,B.jsx)(`i`,{}),r(`范围`,`Scope`),` `,(0,B.jsx)(`strong`,{children:e.scope})]}),(0,B.jsxs)(`span`,{className:`tone-started`,children:[(0,B.jsx)(`i`,{}),r(`已开始`,`Started`),` `,(0,B.jsx)(`strong`,{children:e.started})]}),(0,B.jsxs)(`span`,{className:`tone-completed`,children:[(0,B.jsx)(`i`,{}),r(`已完成`,`Completed`),` `,(0,B.jsx)(`strong`,{children:e.completed})]})]})]}),(0,B.jsx)(`div`,{className:`dashboard-progress-body`,children:(0,B.jsxs)(`svg`,{className:`dashboard-progress-chart`,viewBox:`0 0 426 272`,role:`img`,"aria-label":r(`项目累计进度:范围 ${e.scope},已开始 ${e.started},已完成 ${e.completed}`,`Cumulative project progress: scope ${e.scope}, started ${e.started}, completed ${e.completed}`),children:[(0,B.jsxs)(`defs`,{children:[(0,B.jsxs)(`linearGradient`,{id:`dashboard-progress-area`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,B.jsx)(`stop`,{offset:`0`,stopColor:`#22b889`,stopOpacity:`.18`}),(0,B.jsx)(`stop`,{offset:`1`,stopColor:`#22b889`,stopOpacity:`0`})]}),(0,B.jsxs)(`linearGradient`,{id:`dashboard-progress-forecast-area`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,B.jsx)(`stop`,{offset:`0`,stopColor:`#22b889`,stopOpacity:`.11`}),(0,B.jsx)(`stop`,{offset:`1`,stopColor:`#22b889`,stopOpacity:`.025`})]})]}),(0,B.jsx)(`line`,{className:`dashboard-progress-baseline`,x1:c.left,y1:c.bottom,x2:c.right,y2:c.bottom}),(0,B.jsx)(`path`,{className:`dashboard-progress-completed-area`,d:c.completedArea}),c.forecast?(0,B.jsx)(`path`,{className:`dashboard-progress-forecast-area`,d:`M${c.currentX} ${c.y(e.completed)} L${c.forecast.optimisticX} ${c.y(e.scope)} L${c.forecast.conservativeX} ${c.y(e.scope)} Z`}):null,(0,B.jsx)(`path`,{className:`dashboard-progress-line tone-scope`,d:c.scopePath}),(0,B.jsx)(`path`,{className:`dashboard-progress-line tone-started`,d:c.startedPath}),(0,B.jsx)(`path`,{className:`dashboard-progress-line tone-completed`,d:c.completedPath}),c.forecast?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{className:`dashboard-progress-projection`,d:`M${c.currentX} ${c.y(e.completed)} L${c.forecast.optimisticX} ${c.y(e.scope)}`}),(0,B.jsx)(`path`,{className:`dashboard-progress-projection`,d:`M${c.currentX} ${c.y(e.completed)} L${c.forecast.conservativeX} ${c.y(e.scope)}`})]}):null,c.points.slice(1).map((e,t)=>{if(!e.completions)return null;let n=8+e.completions/c.maximumCompletions*20;return(0,B.jsx)(`rect`,{className:`dashboard-progress-delivery-bar`,x:e.x-4/2,y:c.bottom-n,width:4,height:n,rx:`2`},`${e.timestamp}-${t}`)}),(0,B.jsx)(`line`,{className:`dashboard-progress-now-line`,x1:c.currentX,y1:c.top-4,x2:c.currentX,y2:c.bottom+7}),(0,B.jsx)(`circle`,{className:`dashboard-progress-point tone-scope`,cx:c.currentX,cy:c.y(e.scope),r:`4`}),(0,B.jsx)(`circle`,{className:`dashboard-progress-point tone-started`,cx:c.currentX,cy:c.y(e.completed+e.started),r:`4`}),(0,B.jsx)(`circle`,{className:`dashboard-progress-point tone-completed`,cx:c.currentX,cy:c.y(e.completed),r:`4`}),l?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`line`,{className:`dashboard-progress-hover-line`,x1:l.x,y1:c.top-2,x2:l.x,y2:c.bottom+5}),(0,B.jsxs)(`g`,{className:`dashboard-progress-tooltip`,transform:`translate(${l.x>c.right-172?l.x-172:l.x+10} 8)`,children:[(0,B.jsx)(`rect`,{width:`162`,height:`80`,rx:`9`}),(0,B.jsx)(`text`,{className:`dashboard-progress-tooltip-date`,x:`12`,y:`20`,children:Ll(l.timestamp,n)}),(0,B.jsxs)(`text`,{x:`12`,y:`40`,children:[r(`范围`,`Scope`),` `,l.scope]}),(0,B.jsxs)(`text`,{x:`12`,y:`58`,children:[r(`已开始`,`Started`),` `,Math.max(0,l.started-l.completed)]}),(0,B.jsxs)(`text`,{x:`88`,y:`58`,children:[r(`已完成`,`Completed`),` `,l.completed]}),(0,B.jsxs)(`text`,{className:`dashboard-progress-tooltip-delta`,x:`88`,y:`40`,children:[`Δ `,l.scope-(c.points[Math.max(0,i-1)]?.scope??l.scope)]})]})]}):null,c.points.map((e,t)=>{let i=(c.currentX-c.left)/(c.points.length-1);return(0,B.jsx)(`rect`,{className:`dashboard-progress-hitbox`,x:Math.max(c.left,e.x-i/2),y:c.top-6,width:t===0||t===c.points.length-1?i/2:i,height:c.bottom-c.top+16,fill:`transparent`,role:`button`,tabIndex:0,"aria-label":r(`${Ll(e.timestamp,n)}:范围 ${e.scope},已开始 ${Math.max(0,e.started-e.completed)},已完成 ${e.completed}`,`${Ll(e.timestamp,n)}: scope ${e.scope}, started ${Math.max(0,e.started-e.completed)}, completed ${e.completed}`),onMouseEnter:()=>a(t),onMouseLeave:()=>a(null),onFocus:()=>a(t),onBlur:()=>a(null),onClick:()=>a(t),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&a(t)}},`${e.timestamp}-${t}`)}),(0,B.jsx)(`text`,{className:`dashboard-progress-axis-label`,x:c.left,y:`260`,children:Ll(c.points[0].timestamp,n)}),(0,B.jsx)(`text`,{className:`dashboard-progress-axis-label is-current`,x:c.currentX,y:`260`,textAnchor:`middle`,children:Ll(t,n)}),(0,B.jsx)(`text`,{className:`dashboard-progress-axis-label`,x:c.right,y:`260`,textAnchor:`end`,children:Ll(s,n,t)})]})})]})}function Gl({projectId:e,projectCreatedAt:t,isAllProjects:n,tasks:r,presentations:i,currentUser:a,animateSummary:o,onSummaryAnimationStart:s,onOpenTask:c,onOpenConversation:l}){let{language:u,locale:f,text:p}=H(),[m,h]=(0,d.useState)(null),[g,_]=(0,d.useState)(!1);(0,d.useEffect)(()=>{if(n){h(null),_(!1);return}let t=!1,r,i=new AbortController;h(null),_(!1);async function a(){let n=6e4;try{let r=await E(e,i.signal);if(t)return;h(r),_(!1),r.refreshing&&(n=2e3)}catch(e){if(t||e instanceof Error&&e.name===`AbortError`)return;_(!0)}t||(r=setTimeout(a,n))}return a(),()=>{t=!0,i.abort(),r&&clearTimeout(r)}},[n,e]);let v=new Date;v.setHours(0,0,0,0);let y=v.getTime(),{activeTasks:b,completedTasks:x,overdueTasks:S,upcomingTasks:C,completionRate:w,roleContributions:T,completedTotal:D,priorityCounts:O,labelCounts:k,totalLabelAssignments:ee,visibleLabelCounts:A,maximumVisibleLabelCount:te,contributionWeeks:j,contributionMaximum:M,contributionDateFormatter:N,monthMarkers:P,metrics:F}=(0,d.useMemo)(()=>{let e=y+14*864e5,t=r.filter(e=>e.status!==`done`&&e.status!==`canceled`),n=r.filter(e=>e.status===`done`),i=t.filter(e=>e.dueDate&&Vl(e.dueDate)<y),a=t.filter(t=>t.dueDate&&Vl(t.dueDate)<=e).sort((e,t)=>(e.dueDate??``).localeCompare(t.dueDate??``)).slice(0,5),o=r.length?Math.round(n.length/r.length*100):0,s=new Map;for(let e of r){let t=`${e.assignee.type}:${e.assignee.id}`,n=s.get(t);s.set(t,{actor:e.assignee,count:(n?.count??0)+ +(e.status===`done`)})}let c=[...s.values()].sort((e,t)=>t.count-e.count),l=Math.max(1,n.length),d=Ml.map(e=>({priority:e,label:V(u,e),count:r.filter(t=>t.priority===e).length})),m=new Map;for(let e of r)for(let t of e.labels)m.set(t,(m.get(t)??0)+1);let h=[...m.entries()].map(([e,t])=>({label:e,count:t,sortName:cc(e).name,presentation:cc(e,u)})).sort((e,t)=>t.count-e.count||e.sortName.localeCompare(t.sortName)),g=Math.max(1,h.reduce((e,t)=>e+t.count,0)),_=(h.length>12?[...h.slice(0,11),{label:`__other__`,count:h.slice(11).reduce((e,t)=>e+t.count,0),presentation:{...cc(`其他`),name:p(`其他(${h.length-11}个)`,`Other (${h.length-11})`)}}]:h).map((e,t)=>({...e,color:e.label===`__other__`?`var(--dashboard-other-label-color)`:Nl[t%Nl.length]})),v=Math.max(1,..._.map(e=>e.count)),b=new Map;for(let e of r){let t=Bl(new Date(e.activityUpdatedAt));b.set(t,(b.get(t)??0)+1)}let x=new Date(y);x.setDate(x.getDate()-x.getDay()-357);let S=Array.from({length:52},(e,t)=>Array.from({length:7},(e,n)=>{let r=new Date(x);r.setDate(r.getDate()+t*7+n);let i=Bl(r);return{date:r,key:i,count:b.get(i)??0,future:r.getTime()>y}})),C=Math.max(1,...S.flat().map(e=>e.count)),w=new Intl.DateTimeFormat(f,{month:`short`}),T=new Intl.DateTimeFormat(f,{year:`numeric`,month:`short`,day:`numeric`}),E=S.flatMap((e,t)=>{let n=e.find(e=>e.date.getDate()===1);return n?[{weekIndex:t,label:w.format(n.date)}]:[]});return E[0]?.weekIndex!==0&&E.unshift({weekIndex:0,label:w.format(x)}),{activeTasks:t,completedTasks:n,overdueTasks:i,upcomingTasks:a,completionRate:o,roleContributions:c,completedTotal:l,priorityCounts:d,labelCounts:h,totalLabelAssignments:g,visibleLabelCounts:_,maximumVisibleLabelCount:v,contributionWeeks:S,contributionMaximum:C,contributionDateFormatter:T,monthMarkers:E,metrics:[{label:Qe(u,`in_progress`),value:r.filter(e=>e.status===`in_progress`).length,tone:`progress`},{label:Qe(u,`in_review`),value:r.filter(e=>e.status===`in_review`).length,tone:`review`},{label:Qe(u,`blocked`),value:r.filter(e=>e.status===`blocked`).length,tone:`blocked`},{label:p(`已逾期`,`Overdue`),value:i.length,tone:`overdue`},{label:Qe(u,`backlog`),value:r.filter(e=>e.status===`backlog`).length,tone:`backlog`}]}},[u,f,r,p,y]),I=(0,d.useMemo)(()=>{let e=n?r.reduce((e,t)=>!e||t.createdAt<e?t.createdAt:e,null):null;return zl(r,y,t??e)},[n,t,r,y]),ne=(0,d.useMemo)(()=>r.filter(e=>i[e.id]?.processing.running),[i,r]),re=(0,d.useMemo)(()=>b.filter(e=>e.status===`blocked`||i[e.id]?.unread).sort((e,t)=>{let n=+!!i[e.id]?.unread;return+!!i[t.id]?.unread-n||t.activityUpdatedAt.localeCompare(e.activityUpdatedAt)}).slice(0,5),[b,i]),ie=n?p(`所有项目共有 ${r.length} 个议题,${x.length} 个已完成,${b.length} 个尚未结束;当前 ${r.filter(e=>e.status===`blocked`).length} 个遇到阻碍,${S.length} 个已逾期。`,`Across all projects, ${r.length} issues are tracked: ${x.length} completed and ${b.length} still open; ${r.filter(e=>e.status===`blocked`).length} are blocked and ${S.length} overdue.`):m?.summary??(m?.refreshing?p(`Codex 正在整理当前项目的进展、风险和下一步重点…`,`Codex is reviewing the project's progress, risks, and next steps…`):g||m?.error?p(`Codex 暂时无法生成项目总结。`,`Codex cannot generate the project summary now.`):p(`Codex 正在整理当前项目的进展、风险和下一步重点…`,`Codex is reviewing the project's progress, risks, and next steps…`)),L=new Date().getHours(),R=L<12?p(`上午好`,`Good morning`):L<18?p(`下午好`,`Good afternoon`):p(`晚上好`,`Good evening`),ae=new Intl.DateTimeFormat(f,{month:`long`,day:`numeric`}).format(v),oe=p(`${R},${a.name},今天是${ae},${ie}`,`${R}, ${a.name}. Today is ${ae}. ${ie}`),se=n||m!==null||g;return(0,B.jsx)(`div`,{className:`dashboard-view`,children:(0,B.jsxs)(`div`,{className:`dashboard-content`,children:[(0,B.jsxs)(`div`,{className:`dashboard-overview`,children:[(0,B.jsxs)(`header`,{className:`dashboard-heading`,children:[(0,B.jsx)(`h1`,{children:p(`项目完成度`,`Project completion`)}),(0,B.jsxs)(`div`,{className:`dashboard-hero-value`,children:[(0,B.jsxs)(`strong`,{children:[w,`%`]}),(0,B.jsx)(`span`,{children:p(`${x.length} 个已完成 · ${b.length} 个尚未结束`,`${x.length} completed · ${b.length} remaining`)})]})]}),(0,B.jsx)(Ul,{projectId:e,summary:oe,summaryReady:se,animateSummary:o,onSummaryAnimationStart:s})]}),(0,B.jsx)(`div`,{className:`dashboard-metrics`,children:F.map(e=>{let t=b.length?Math.round(e.value/b.length*100):0;return(0,B.jsxs)(`article`,{className:`dashboard-metric tone-${e.tone}`,children:[(0,B.jsx)(`span`,{className:`dashboard-metric-label`,children:e.label}),(0,B.jsxs)(`div`,{className:`dashboard-metric-value`,children:[(0,B.jsx)(`strong`,{children:e.value}),(0,B.jsxs)(`b`,{children:[t,`%`]})]}),(0,B.jsx)(`span`,{className:`dashboard-metric-meter`,"aria-hidden":`true`,children:(0,B.jsx)(`i`,{style:{width:`${t}%`}})})]},e.label)})}),(0,B.jsx)(`div`,{className:`dashboard-analysis-heading`,children:(0,B.jsx)(`h2`,{children:p(`项目分析`,`Project analysis`)})}),(0,B.jsxs)(`div`,{className:`dashboard-grid`,children:[(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-primary-panel dashboard-priority-panel`,children:[(0,B.jsx)(`header`,{children:(0,B.jsx)(`span`,{children:p(`优先级`,`Priority`)})}),(0,B.jsx)(`div`,{className:`dashboard-priority-list`,children:O.map(e=>(0,B.jsxs)(`div`,{className:`dashboard-priority-row priority-${e.priority}`,children:[(0,B.jsxs)(`span`,{className:`dashboard-priority-name`,children:[(0,B.jsx)(Mc,{priority:e.priority,size:13}),e.label]}),(0,B.jsx)(`span`,{className:`dashboard-priority-track`,children:(0,B.jsx)(`i`,{style:{width:`${r.length?e.count/r.length*100:0}%`}})}),(0,B.jsx)(`strong`,{children:e.count})]},e.priority))})]}),(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-primary-panel dashboard-attention-panel`,children:[(0,B.jsx)(`header`,{children:(0,B.jsx)(`span`,{children:p(`需要关注(未读、阻塞)`,`Needs attention (unread, blocked)`)})}),(0,B.jsx)(`div`,{className:`dashboard-task-list`,children:re.length?re.map(e=>(0,B.jsxs)(`button`,{type:`button`,className:`dashboard-attention-row`,onClick:()=>c(e),children:[(0,B.jsx)(`span`,{className:`dashboard-attention-mark`,"aria-hidden":`true`,children:i[e.id]?.unread&&(0,B.jsx)(`i`,{})}),(0,B.jsx)(`strong`,{children:e.title}),(0,B.jsxs)(`small`,{children:[`ID: `,e.externalKey??e.identifier]})]},e.id)):(0,B.jsx)(`div`,{className:`dashboard-empty`,children:p(`当前没有需要关注的议题`,`No issues need attention`)})})]}),(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-primary-panel dashboard-running-panel`,children:[(0,B.jsx)(`header`,{children:(0,B.jsx)(`span`,{children:p(`运行中对话`,`Active conversations`)})}),(0,B.jsx)(`div`,{className:`dashboard-task-list`,children:ne.length?ne.map(e=>(0,B.jsxs)(`article`,{className:`dashboard-running-card`,onClick:()=>c(e),children:[(0,B.jsxs)(`button`,{type:`button`,className:`dashboard-running-open`,onClick:t=>{t.stopPropagation(),c(e)},children:[(0,B.jsxs)(`small`,{children:[`ID: `,e.externalKey??e.identifier]}),(0,B.jsx)(`strong`,{children:e.title})]}),(0,B.jsxs)(`div`,{className:`dashboard-running-footer`,children:[(0,B.jsxs)(`span`,{className:`task-processing is-running`,children:[(0,B.jsx)(`img`,{className:`task-processing-glyph`,src:sl,alt:``,"aria-hidden":`true`}),(0,B.jsx)(`span`,{className:`task-processing-label`,children:p(`正在处理…`,`Processing…`)})]}),(0,B.jsx)(ol,{conversations:i[e.id].conversations,onOpenConversation:l})]})]},e.id)):(0,B.jsx)(`div`,{className:`dashboard-empty`,children:p(`当前没有运行中的对话`,`No active conversations`)})})]}),(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-secondary-panel dashboard-role-panel`,children:[(0,B.jsxs)(`header`,{children:[(0,B.jsx)(`span`,{children:p(`角色贡献`,`Role contributions`)}),(0,B.jsx)(`b`,{children:T.length})]}),T.length?(0,B.jsxs)(`div`,{className:`dashboard-role-body`,children:[(0,B.jsx)(`div`,{className:`dashboard-role-stack`,"aria-hidden":`true`,children:T.filter(e=>e.count>0).map((e,t)=>(0,B.jsx)(`i`,{className:`tone-${t%5}`,style:{width:`${e.count/D*100}%`}},`${e.actor.type}:${e.actor.id}`))}),(0,B.jsx)(`div`,{className:`dashboard-role-list`,children:T.map((e,t)=>(0,B.jsxs)(`div`,{className:`dashboard-role-row`,children:[(0,B.jsx)(lc,{actor:e.actor}),(0,B.jsxs)(`span`,{className:`dashboard-role-copy`,children:[(0,B.jsx)(`strong`,{children:e.actor.name}),(0,B.jsx)(`small`,{children:p(`${e.count} 个已完成议题`,`${e.count} completed ${e.count===1?`issue`:`issues`}`)})]}),(0,B.jsxs)(`span`,{className:`dashboard-role-share tone-${t%5}`,children:[Math.round(e.count/D*100),`%`]})]},`${e.actor.type}:${e.actor.id}`))})]}):(0,B.jsx)(`div`,{className:`dashboard-empty`,children:p(`当前没有角色数据`,`No role data`)})]}),(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-secondary-panel dashboard-contribution-panel`,children:[(0,B.jsx)(`header`,{children:(0,B.jsx)(`span`,{children:p(`贡献图`,`Contribution chart`)})}),(0,B.jsx)(`div`,{className:`dashboard-contribution-body`,children:(0,B.jsxs)(`div`,{className:`dashboard-contribution-chart`,children:[(0,B.jsx)(`div`,{className:`dashboard-contribution-months`,"aria-hidden":`true`,children:P.map(e=>(0,B.jsx)(`span`,{style:{gridColumn:e.weekIndex+1},children:e.label},`${e.weekIndex}-${e.label}`))}),(0,B.jsxs)(`div`,{className:`dashboard-contribution-main`,children:[(0,B.jsxs)(`div`,{className:`dashboard-contribution-weekdays`,"aria-hidden":`true`,children:[(0,B.jsx)(`span`,{style:{gridRow:2},children:p(`一`,`M`)}),(0,B.jsx)(`span`,{style:{gridRow:4},children:p(`三`,`W`)}),(0,B.jsx)(`span`,{style:{gridRow:6},children:p(`五`,`F`)})]}),(0,B.jsx)(`div`,{className:`dashboard-contribution-grid`,"aria-label":p(`过去一年议题贡献图`,`Issue contributions over the past year`),children:j.flat().map(e=>(0,B.jsx)(`span`,{className:`dashboard-contribution-cell level-${e.count===0?0:Math.min(4,Math.ceil(e.count/M*4))}${e.future?` is-future`:``}`,title:e.future?void 0:p(`${N.format(e.date)} · ${e.count} 个议题更新`,`${N.format(e.date)} · ${e.count} issue ${e.count===1?`update`:`updates`}`)},e.key))})]}),(0,B.jsxs)(`div`,{className:`dashboard-contribution-legend`,"aria-label":p(`贡献强度图例`,`Contribution intensity legend`),children:[(0,B.jsx)(`span`,{children:p(`少`,`Less`)}),[0,1,2,3,4].map(e=>(0,B.jsx)(`i`,{className:`dashboard-contribution-cell level-${e}`},e)),(0,B.jsx)(`span`,{children:p(`多`,`More`)})]})]})})]}),(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-tertiary-panel dashboard-upcoming-panel`,children:[(0,B.jsx)(`header`,{children:(0,B.jsx)(`span`,{children:p(`即将到期`,`Due soon`)})}),(0,B.jsx)(`div`,{className:`dashboard-task-list`,children:C.length?C.map(e=>(0,B.jsxs)(`button`,{type:`button`,className:`dashboard-upcoming-row`,onClick:()=>c(e),children:[(0,B.jsx)(`img`,{src:e.status===`in_review`?Al:jl,alt:``,"aria-hidden":`true`}),(0,B.jsx)(`strong`,{children:e.title}),(0,B.jsxs)(`time`,{children:[`ID: `,e.externalKey??e.identifier,` | `,Hl(e.dueDate,f)]})]},e.id)):(0,B.jsx)(`div`,{className:`dashboard-empty`,children:p(`近期没有到期议题`,`No issues are due soon`)})})]}),(0,B.jsxs)(`section`,{className:`dashboard-panel dashboard-tertiary-panel dashboard-label-panel`,children:[(0,B.jsx)(`header`,{children:(0,B.jsxs)(`span`,{children:[p(`标签分布`,`Label distribution`),` `,Math.min(12,k.length)]})}),A.length?(0,B.jsx)(`div`,{className:`dashboard-label-chart`,children:A.map(e=>(0,B.jsxs)(`div`,{className:`dashboard-label-chart-row`,children:[(0,B.jsx)(`strong`,{children:e.presentation.name}),(0,B.jsxs)(`span`,{children:[Math.round(e.count/ee*100),`% | `,(0,B.jsx)(`b`,{children:e.count})]}),(0,B.jsx)(`i`,{"aria-hidden":`true`,style:{width:`${e.count/te*100}%`,background:e.color}})]},e.label))}):(0,B.jsx)(`div`,{className:`dashboard-empty`,children:p(`当前没有标签数据`,`No label data`)})]}),(0,B.jsx)(Wl,{progressData:I,todayValue:y})]})]})})}var Kl=`taskboard.composer-reference.v1`,ql=`taskboard://composer-reference/v1`,Jl=new Set([`skill`,`agent`]);function Yl(e,t){if(typeof e!=`string`||e.length===0)throw TypeError(`${t} must be a non-empty string`);return e}function Xl(e){let t=``;for(let n of new TextEncoder().encode(Yl(e,`stableId`)))t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Zl(e){let t=Yl(e,`referenceKey`);if(!/^[A-Za-z0-9_-]+$/.test(t))throw TypeError(`referenceKey must be unpadded base64url`);let n;try{let e=`${t.replace(/-/g,`+`).replace(/_/g,`/`)}${`=`.repeat((4-t.length%4)%4)}`,r=Uint8Array.from(atob(e),e=>e.charCodeAt(0));n=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0}).decode(r)}catch{throw TypeError(`referenceKey is not canonical base64url UTF-8`)}if(!n||Xl(n)!==t)throw TypeError(`referenceKey is not canonical base64url UTF-8`);return n}function Ql(e,t){try{let n=Zl(e);return t===`skill`&&n!==n.normalize(`NFC`)?null:n}catch{return null}}function $l(e){if(!Jl.has(e))throw TypeError(`kind must be 'skill' or 'agent'`);return e}function eu(e){return Yl(e,`label`).replace(/[\\[\]]/g,`\\$&`)}function tu(e,t,n){let r=Xl(e===`skill`?Yl(t,`stableId`).normalize(`NFC`):Yl(t,`stableId`)),i=`${ql}/${$l(e)}/${r}`;return{format:Kl,kind:e,referenceKey:r,markdown:`[${eu(n)}](${i})`}}function nu(e){let t=new Map;if(!e||!e.type)throw Error(`mdast-util-definitions expected node`);return Pn(e,`definition`,function(e){let n=ru(e.identifier);n&&!t.get(n)&&t.set(n,e)}),n;function n(e){let n=ru(e);return t.get(n)}}function ru(e){return String(e||``).toUpperCase()}var iu=`issue`;function au(e){return new URLSearchParams(e).get(iu)?.trim().toUpperCase()||null}function ou(e,t,n){let r=new URL(e);return t?r.searchParams.set(`project`,t):r.searchParams.delete(`project`),n?r.searchParams.set(iu,n.trim().toUpperCase()):r.searchParams.delete(iu),r}function su(e,t){try{let n=new URL(t);n.search=``,n.hash=``;let r=new URL(e,n);if(r.origin!==n.origin)return null;if(r.pathname===n.pathname){let e=au(r.search),t=r.searchParams.get(`project`);if(e&&t)return{type:`issue`,projectId:t,identifier:e}}let i=new URL(`api/attachments/`,n).pathname,a=r.pathname.startsWith(i)?r.pathname.slice(i.length):r.pathname.startsWith(`/api/attachments/`)?r.pathname.slice(17):``,o=/^([^/]+)\/(content|download)$/.exec(a);return o?{type:`attachment`,attachmentId:decodeURIComponent(o[1]),endpoint:o[2]}:null}catch{return null}}var cu=[],lu=0,uu=Gs().use(gs).use(Eo),du=new Set([`ADDRESS`,`BLOCKQUOTE`,`DIV`,`H1`,`H2`,`H3`,`H4`,`H5`,`H6`,`LI`,`OL`,`P`,`PRE`,`UL`]);function fu(e){return lu+=1,`${e}-${Date.now().toString(36)}-${lu.toString(36)}`}function pu(e=``){return{id:fu(`text`),type:`text`,text:e}}function mu(e,t=null){let n=fu(`image`),r={id:n,type:`pending-image`,token:`<!--taskboard-inline-image:${n}-->`,file:e,dataUrl:t,dataUrlReady:Promise.resolve()};if(!t){let t=new FileReader;r.dataUrlReady=new Promise((e,n)=>{t.addEventListener(`load`,()=>{r.dataUrl=t.result,e()}),t.addEventListener(`error`,()=>n(t.error))}),t.readAsDataURL(e)}return r}function hu(e){let t=fu(`attachment`);return{id:t,type:`pending-attachment`,token:`<!--taskboard-inline-attachment:${t}-->`,file:e}}var gu=/^taskboard:\/\/composer-reference\/v1\/(skill|agent)\/([A-Za-z0-9_-]+)$/,_u=/^taskboard:\/\/composer-reference\/([^/]+)\/([^/]+)\/([A-Za-z0-9_-]+)$/,vu=/^taskboard:\/\/composer-reference\/v1\/pending-image\/([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)$/;function yu(e,t){let n=vu.exec(e),r=n?Ql(n[1]):null;if(!n||!r?.startsWith(`image/`))return null;try{let e=`${n[2].replace(/-/g,`+`).replace(/_/g,`/`)}${`=`.repeat((4-n[2].length%4)%4)}`,i=atob(e),a=new Uint8Array(i.length);for(let e=0;e<i.length;e+=1)a[e]=i.charCodeAt(e);return{file:new File([a],t||`image`,{type:r}),dataUrl:`data:${r};base64,${e}`}}catch{return null}}function bu(e){if(e.type===`text`)return e.value??``;if(!e.children)return null;let t=``;for(let n of e.children){let e=bu(n);if(e===null)return null;t+=e}return t}function xu(e,t){if(e.type!==`link`||!e.url)return null;let n=_u.exec(e.url);if(!n||!Ql(n[3],n[2]))return null;let r=bu(e),i=t.slice(e.position.start.offset,e.position.end.offset);if(!r||!i.startsWith(`[`)||!i.endsWith(`](${e.url})`))return null;let a=gu.exec(e.url);if(!a)return{type:`unsupported-reference`,start:e.position.start.offset,end:e.position.end.offset,markdown:i,referenceUri:e.url,label:r};let o=a[1],s=a[2];return{type:`${o}-reference`,start:e.position.start.offset,end:e.position.end.offset,markdown:i,referenceKey:s,label:r}}function Su(e=``,t=cu,n=[],r=document.baseURI){let i=[],a=[],o=uu.parse(e),s=nu(o),c=[o];for(;c.length>0;){let i=c.pop();if(i.type===`image`){let e=i.alt??``,t=yu(i.url,e);t?a.push({type:`pending-image`,start:i.position.start.offset,end:i.position.end.offset,...t}):a.push({type:`persisted-image`,start:i.position.start.offset,end:i.position.end.offset,alt:e,url:i.url})}if(i.type===`imageReference`){let e=s(i.identifier);e&&a.push({type:`persisted-image`,start:i.position.start.offset,end:i.position.end.offset,alt:i.alt??``,url:e.url})}let o=!1,l=!1;if(i.type===`link`&&i.url){let e=su(i.url,r);if(e?.type===`attachment`&&e.endpoint===`download`){let t=bu(i);if(t){let r=n.find(t=>t.id===e.attachmentId);a.push({type:`persisted-attachment`,start:i.position.start.offset,end:i.position.end.offset,attachmentId:e.attachmentId,contentType:r?.contentType??null,size:r?.size??null,filename:t,url:i.url}),o=!0}}if(e?.type===`issue`){let{projectId:n,identifier:r}=e,o=t.find(e=>e.projectId===n&&e.identifier===r);a.push({type:`issue-reference`,start:i.position.start.offset,end:i.position.end.offset,identifier:o?.externalKey??r,projectId:n,taskId:o?.id??null}),l=!0}}let u=o||l?null:xu(i,e);u&&a.push(u),i.children&&c.push(...i.children)}a.sort((e,t)=>e.start-t.start);let l=0;for(let t of a)t.start>l&&i.push(pu(e.slice(l,t.start))),t.type===`pending-image`?i.push(mu(t.file,t.dataUrl)):t.type===`persisted-image`?i.push({id:fu(`image`),type:`persisted-image`,markdown:t.markdown??e.slice(t.start,t.end),alt:t.alt,url:t.url}):t.type===`persisted-attachment`?i.push({id:fu(`attachment`),type:`persisted-attachment`,markdown:e.slice(t.start,t.end),attachmentId:t.attachmentId,contentType:t.contentType,size:t.size,filename:t.filename,url:t.url}):t.type===`issue-reference`?i.push({id:fu(`issue`),type:`issue-reference`,markdown:e.slice(t.start,t.end),identifier:t.identifier,projectId:t.projectId,taskId:t.taskId}):t.type===`unsupported-reference`?i.push({id:fu(`unsupported`),type:t.type,markdown:t.markdown,label:t.label,referenceUri:t.referenceUri}):i.push({id:fu(t.type===`skill-reference`?`skill`:`agent`),type:t.type,markdown:t.markdown,label:t.label,referenceKey:t.referenceKey}),l=t.end;l<e.length&&i.push(pu(e.slice(l)));let u=ku(i);return u.map((e,t)=>{if(e.type!==`text`)return e;let n=Eu(u[t-1],r),i=Eu(u[t+1],r),a=e.text;return n&&i&&/^\n+$/.test(a)?a=a.slice(1):(n&&a.startsWith(`
|
|
28
|
-
`)&&(a=a.slice(1)),i&&a.endsWith(`
|
|
29
|
-
`)&&(a=a.slice(0,-1))),a===e.text?e:{...e,text:a}})}function Cu(e){return e.filter(e=>e.type===`pending-image`)}function wu(e){return e.filter(e=>e.type===`pending-attachment`)}function Tu(e){return e.map(e=>e.type===`text`?e.text:e.type===`pending-image`||e.type===`pending-attachment`?``:e.markdown).join(``)}function Eu(e,t=document.baseURI){if(e?.type===`persisted-image`){let n=su(e.url,t);return n?.type===`attachment`&&n.endpoint===`content`}return e?.type===`pending-image`||e?.type===`pending-attachment`||e?.type===`persisted-attachment`}function Du(e,t,n){let r=``,i=!1,a=!1;return e.forEach((o,s)=>{let c=t(o);if(o.type===`text`&&Eu(e[s-1],n)&&Eu(e[s+1],n)&&/^\n*$/.test(c)){r+=`\n${c}`,i=!1,a=!0;return}if(c){if(Eu(o,n)){r&&!a&&(r+=`
|
|
30
|
-
`),r+=c,i=!0,a=!1;return}i&&(r+=`
|
|
31
|
-
`),r+=c,i=!1,a=!1}}),r}function Ou(e,t=document.baseURI){return Du(e,e=>e.type===`text`?e.text:e.type===`pending-image`||e.type===`pending-attachment`?e.token:e.markdown,t)}function ku(e){let t=[];for(let n of e){let e=t.at(-1);(Au(n)&&e?.type!==`text`||e&&Au(e)&&n.type!==`text`)&&t.push(pu());let r=t.at(-1);n.type===`text`&&r?.type===`text`?t[t.length-1]={...r,text:r.text+n.text}:t.push(n)}return t.length===0?[pu()]:(t[0].type!==`text`&&t.unshift(pu()),t.at(-1)?.type!==`text`&&t.push(pu()),t)}function Au(e){return e.type===`issue-reference`||e.type===`skill-reference`||e.type===`agent-reference`||e.type===`unsupported-reference`}function ju(e,t=document.baseURI){return Du(e,e=>e.type===`text`?e.text:e.type===`pending-image`?Mu(e)??e.file.name:e.type===`pending-attachment`?e.file.name:e.markdown,t)}function Mu(e){let t=e.dataUrl?.match(/^data:([^;,]+);base64,(.+)$/);if(!t)return null;let n=Xl(t[1]),r=t[2].replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``);return`![${e.file.name.replace(/[\\[\]]/g,`\\$&`)}](taskboard://composer-reference/v1/pending-image/${n}.${r})`}function Nu(e){return e.map(e=>{if(e.type!==`persisted-image`||/^!\[(?:\\.|[^\]])*\]\(/.test(e.markdown))return e;let t=e.alt.replace(/[\\[\]]/g,`\\$&`);return{...e,markdown:``}})}function Pu(e,t,n=document.baseURI){e.setData(`text/plain`,ju(Nu(t),n))}function Fu(e,t,n=r.baseURI){if(!e)return null;let r=new DOMParser().parseFromString(e,`text/html`),i=``,a=!1,o=e=>{if(e.nodeType===Node.TEXT_NODE){i+=e.textContent??``;return}if(e.nodeType!==Node.ELEMENT_NODE)return;let r=e;if([`SCRIPT`,`STYLE`].includes(r.tagName))return;let s=r.dataset.taskboardInlineMediaMarkdown;if(s){i+=s,a=!0;return}if(r.tagName===`BUTTON`)return;if(r.tagName===`A`){let e=r.getAttribute(`href`)??``,s=su(e,n);if(s?.type===`issue`){let{projectId:e,identifier:n}=s,r=t.find(t=>t.projectId===e&&t.identifier===n)?.externalKey??n,o=new URLSearchParams({project:e,issue:n});i+=`[@${r}](?${o})`,a=!0;return}if(e){let t=i.length;for(let e of r.childNodes)o(e);let n=i.slice(t);i=`${i.slice(0,t)}[${n}](${e})`,a=!0;return}}if(r.tagName===`IMG`){let e=r.getAttribute(`src`);if(e){let t=su(e,n),o=t?.type===`attachment`&&t.endpoint===`content`?`api/attachments/${encodeURIComponent(t.attachmentId)}/content`:e,s=(r.getAttribute(`alt`)??``).replace(/[\\[\]]/g,`\\$&`);i+=``,a=!0}return}if(r.tagName===`BR`){i+=`
|
|
32
|
-
`;return}let c=du.has(r.tagName);c&&i&&!i.endsWith(`
|
|
33
|
-
`)&&(i+=`
|
|
34
|
-
`);for(let e of r.childNodes)o(e);c&&r.nextSibling&&!i.endsWith(`
|
|
35
|
-
`)&&(i+=`
|
|
36
|
-
`)};for(let e of r.body.childNodes)o(e);return a?Su(i,t,[],n):null}function Iu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Lu={},Ru={},zu={},Bu;function Vu(){if(Bu)return zu;Bu=1;function e(e){return e==null}function t(e){return typeof e==`object`&&!!e}function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function a(e){return e===0&&1/e==-1/0}return zu.isNothing=e,zu.isObject=t,zu.toArray=n,zu.repeat=i,zu.isNegativeZero=a,zu.extend=r,zu}var Hu,Uu;function Wu(){if(Uu)return Hu;Uu=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
37
|
-
|
|
38
|
-
`+e.mark.snippet),r+` `+n):r}function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(t){return this.name+`: `+e(this,t)},Hu=t,Hu}var Gu,Ku;function qu(){if(Ku)return Gu;Ku=1;let e=Vu();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function n(t,n){return e.repeat(` `,n-t.length)+t}function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||=79,typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(r.buffer);)s.push(c.index),o.push(c.index+c[0].length),r.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(r.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=t(r.buffer,o[l-a],s[l-a],r.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),d)+` | `+c.str+`
|
|
39
|
-
`+u}let p=t(r.buffer,o[l],s[l],r.position,f);u+=e.repeat(` `,i.indent)+n((r.line+1).toString(),d)+` | `+p.str+`
|
|
40
|
-
`,u+=e.repeat(`-`,i.indent+d+3+p.pos)+`^
|
|
41
|
-
`;for(let a=1;a<=i.linesAfter&&!(l+a>=s.length);a++){let c=t(r.buffer,o[l+a],s[l+a],r.position-(o[l]-o[l+a]),f);u+=e.repeat(` `,i.indent)+n((r.line+a+1).toString(),d)+` | `+c.str+`
|
|
42
|
-
`}return u.replace(/\n$/,``)}return Gu=r,Gu}var Ju,Yu;function Xu(){if(Yu)return Ju;Yu=1;let e=Wu(),t=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],n=[`scalar`,`sequence`,`mapping`];function r(e){let t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function i(i,a){if(a||={},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e(`Unknown option "`+n+`" is met in definition of "`+i+`" YAML type.`)}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(e){return e},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=r(a.styleAliases||null),n.indexOf(this.kind)===-1)throw new e(`Unknown kind "`+this.kind+`" is specified for "`+i+`" YAML type.`)}return Ju=i,Ju}var Zu,Qu;function $u(){if(Qu)return Zu;Qu=1;let e=Wu(),t=Xu();function n(e,t){let n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function r(){let e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(let e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(t);return e}function i(e){return this.extend(e)}return i.prototype.extend=function(a){let o=[],s=[];if(a instanceof t)s.push(a);else if(Array.isArray(a))s=s.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(o=o.concat(a.implicit)),a.explicit&&(s=s.concat(a.explicit));else throw new e(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);o.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(n.loadKind&&n.loadKind!==`scalar`)throw new e(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(n.multi)throw new e(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),s.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});let c=Object.create(i.prototype);return c.implicit=(this.implicit||[]).concat(o),c.explicit=(this.explicit||[]).concat(s),c.compiledImplicit=n(c,`implicit`),c.compiledExplicit=n(c,`explicit`),c.compiledTypeMap=r(c.compiledImplicit,c.compiledExplicit),c},Zu=i,Zu}var ed,td;function nd(){return td?ed:(td=1,ed=new(Xu())(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:function(e){return e===null?``:e}}),ed)}var rd,id;function ad(){return id?rd:(id=1,rd=new(Xu())(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:function(e){return e===null?[]:e}}),rd)}var od,sd;function cd(){return sd?od:(sd=1,od=new(Xu())(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:function(e){return e===null?{}:e}}),od)}var ld,ud;function dd(){return ud?ld:(ud=1,ld=new($u())({explicit:[nd(),ad(),cd()]}),ld)}var fd,pd;function md(){if(pd)return fd;pd=1;let e=Xu();function t(e){if(e===null)return!0;let t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}function n(){return null}function r(e){return e===null}return fd=new e(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{canonical:function(){return`~`},lowercase:function(){return`null`},uppercase:function(){return`NULL`},camelcase:function(){return`Null`},empty:function(){return``}},defaultStyle:`lowercase`}),fd}var hd,gd;function _d(){if(gd)return hd;gd=1;let e=Xu();function t(e){if(e===null)return!1;let t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}function n(e){return e===`true`||e===`True`||e===`TRUE`}function r(e){return Object.prototype.toString.call(e)===`[object Boolean]`}return hd=new e(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{lowercase:function(e){return e?`true`:`false`},uppercase:function(e){return e?`TRUE`:`FALSE`},camelcase:function(e){return e?`True`:`False`}},defaultStyle:`lowercase`}),hd}var vd,yd;function bd(){if(yd)return vd;yd=1;let e=Vu(),t=Xu();function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function r(e){return e>=48&&e<=55}function i(e){return e>=48&&e<=57}function a(e){if(e===null)return!1;let t=e.length,a=0,s=!1;if(!t)return!1;let c=e[a];if((c===`-`||c===`+`)&&(c=e[++a]),c===`0`){if(a+1===t)return!0;if(c=e[++a],c===`b`){for(a++;a<t;a++){if(c=e[a],c!==`0`&&c!==`1`)return!1;s=!0}return s&&isFinite(o(e))}if(c===`x`){for(a++;a<t;a++){if(!n(e.charCodeAt(a)))return!1;s=!0}return s&&isFinite(o(e))}if(c===`o`){for(a++;a<t;a++){if(!r(e.charCodeAt(a)))return!1;s=!0}return s&&isFinite(o(e))}}for(;a<t;a++){if(!i(e.charCodeAt(a)))return!1;s=!0}return s?isFinite(o(e)):!1}function o(e){let t=e,n=1,r=t[0];if((r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function s(e){return o(e)}function c(t){return Object.prototype.toString.call(t)===`[object Number]`&&t%1==0&&!e.isNegativeZero(t)}return vd=new t(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:a,construct:s,predicate:c,represent:{binary:function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},octal:function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)}},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),vd}var xd,Sd;function Cd(){if(Sd)return xd;Sd=1;let e=Vu(),t=Xu(),n=RegExp(`^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),r=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function i(e){return e===null||!n.test(e)?!1:isFinite(parseFloat(e,10))?!0:r.test(e)}function a(e){let t=e.toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}let o=/^[-+]?[0-9]+e/;function s(t,n){if(isNaN(t))switch(n){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(t===1/0)switch(n){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(t===-1/0)switch(n){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(e.isNegativeZero(t))return`-0.0`;let r=t.toString(10);return o.test(r)?r.replace(`e`,`.e`):r}function c(t){return Object.prototype.toString.call(t)===`[object Number]`&&(t%1!=0||e.isNegativeZero(t))}return xd=new t(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:i,construct:a,predicate:c,represent:s,defaultStyle:`lowercase`}),xd}var wd,Td;function Ed(){return Td?wd:(Td=1,wd=dd().extend({implicit:[md(),_d(),bd(),Cd()]}),wd)}var Dd,Od;function kd(){return Od?Dd:(Od=1,Dd=Ed(),Dd)}var Ad,jd;function Md(){if(jd)return Ad;jd=1;let e=Xu(),t=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),n=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function r(e){return e===null?!1:t.exec(e)!==null||n.exec(e)!==null}function i(e){let r=0,i=null,a=t.exec(e);if(a===null&&(a=n.exec(e)),a===null)throw Error(`Date resolve error`);let o=+a[1],s=a[2]-1,c=+a[3];if(!a[4])return new Date(Date.UTC(o,s,c));let l=+a[4],u=+a[5],d=+a[6];if(a[7]){for(r=a[7].slice(0,3);r.length<3;)r+=`0`;r=+r}if(a[9]){let e=+a[10],t=+(a[11]||0);i=(e*60+t)*6e4,a[9]===`-`&&(i=-i)}let f=new Date(Date.UTC(o,s,c,l,u,d,r));return i&&f.setTime(f.getTime()-i),f}function a(e){return e.toISOString()}return Ad=new e(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:r,construct:i,instanceOf:Date,represent:a}),Ad}var Nd,Pd;function Fd(){if(Pd)return Nd;Pd=1;let e=Xu();function t(e){return e===`<<`||e===null}return Nd=new e(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:t}),Nd}var Id,Ld;function Rd(){if(Ld)return Id;Ld=1;let e=Xu();function t(e){if(e===null)return!1;let t=0,n=e.length;for(let r=0;r<n;r++){let n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
43
|
-
\r`.indexOf(e.charAt(r));if(!(n>64)){if(n<0)return!1;t+=6}}return t%8==0}function n(e){let t=e.replace(/[\r\n=]/g,``),n=t.length,r=0,i=[];for(let e=0;e<n;e++)e%4==0&&e&&(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)),r=r<<6|`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
44
|
-
\r`.indexOf(t.charAt(e));let a=n%4*6;return a===0?(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)):a===18?(i.push(r>>10&255),i.push(r>>2&255)):a===12&&i.push(r>>4&255),new Uint8Array(i)}function r(e){let t=``,n=0,r=e.length,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
45
|
-
\r`;for(let a=0;a<r;a++)a%3==0&&a&&(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[a];let a=r%3;return a===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):a===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):a===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}function i(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}return Id=new e(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:t,construct:n,predicate:i,represent:r}),Id}var zd,Bd;function Vd(){if(Bd)return zd;Bd=1;let e=Xu(),t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(e===null)return!0;let r={},i=e;for(let e=0,a=i.length;e<a;e+=1){let a=i[e],o=!1;if(n.call(a)!==`[object Object]`)return!1;let s;for(s in a)if(t.call(a,s))if(!o)o=!0;else return!1;if(!o||t.call(r,s))return!1;Object.defineProperty(r,s,{value:!0})}return!0}function i(e){return e===null?[]:e}return zd=new e(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:r,construct:i}),zd}var Hd,Ud;function Wd(){if(Ud)return Hd;Ud=1;let e=Xu(),t=Object.prototype.toString;function n(e){if(e===null)return!0;let n=e,r=Array(n.length);for(let e=0,i=n.length;e<i;e+=1){let i=n[e];if(t.call(i)!==`[object Object]`)return!1;let a=Object.keys(i);if(a.length!==1)return!1;r[e]=[a[0],i[a[0]]]}return!0}function r(e){if(e===null)return[];let t=e,n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1){let r=t[e],i=Object.keys(r);n[e]=[i[0],r[i[0]]]}return n}return Hd=new e(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:n,construct:r}),Hd}var Gd,Kd;function qd(){if(Kd)return Gd;Kd=1;let e=Xu(),t=Object.prototype.hasOwnProperty;function n(e){if(e===null)return!0;let n=e;for(let e in n)if(t.call(n,e)&&n[e]!==null)return!1;return!0}function r(e){return e===null?{}:e}return Gd=new e(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:n,construct:r}),Gd}var Jd,Yd;function Xd(){return Yd?Jd:(Yd=1,Jd=kd().extend({implicit:[Md(),Fd()],explicit:[Rd(),Vd(),Wd(),qd()]}),Jd)}var Zd;function Qd(){if(Zd)return Ru;Zd=1;let e=Vu(),t=Wu(),n=qu(),r=Xd(),i=Object.prototype.hasOwnProperty,a=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=/[\x85\u2028\u2029]/,s=/[,\[\]{}]/,c=/^(?:!|!!|![0-9A-Za-z-]+!)$/,l=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function u(e){return Object.prototype.toString.call(e)}function d(e){return e===10||e===13}function f(e){return e===9||e===32}function p(e){return e===9||e===32||e===10||e===13}function m(e){return e===44||e===91||e===93||e===123||e===125}function h(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}function g(e){return e===120?2:e===117?4:e===85?8:0}function _(e){return e>=48&&e<=57?e-48:-1}function v(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return`
|
|
46
|
-
`;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`
`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}function y(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function b(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}let x=Array(256),S=Array(256);for(let e=0;e<256;e++)x[e]=+!!v(e),S[e]=v(e);function C(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||r,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:100,this.maxTotalMergeKeys=typeof t.maxTotalMergeKeys==`number`?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function w(e,r){let i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=n(i),new t(r,i)}function T(e,t){throw w(e,t)}function E(e,t){e.onWarning&&e.onWarning.call(null,w(e,t))}function D(e,t,n){let r=e.anchorMapTransactions;if(r.length!==0){let n=r[r.length-1];i.call(n,t)||(n[t]={existed:i.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}function O(e){e.anchorMapTransactions.push(Object.create(null))}function k(e){let t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(n.length===0)return;let r=n[n.length-1],a=Object.keys(t);for(let e=0,n=a.length;e<n;e+=1){let n=a[e];i.call(r,n)||(r[n]=t[n])}}function ee(e){let t=e.anchorMapTransactions.pop(),n=Object.keys(t);for(let r=n.length-1;r>=0;--r){let i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}function A(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}function te(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}let j={YAML:function(e,t,n){e.version!==null&&T(e,`duplication of %YAML directive`),n.length!==1&&T(e,`YAML directive accepts exactly one argument`);let r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);r===null&&T(e,`ill-formed argument of the YAML directive`);let i=parseInt(r[1],10),a=parseInt(r[2],10);i!==1&&T(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&E(e,`unsupported YAML version of the document`)},TAG:function(e,t,n){let r;n.length!==2&&T(e,`TAG directive accepts exactly two arguments`);let a=n[0];r=n[1],c.test(a)||T(e,`ill-formed tag handle (first argument) of the TAG directive`),i.call(e.tagMap,a)&&T(e,`there is a previously declared suffix for "`+a+`" tag handle`),l.test(r)||T(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{r=decodeURIComponent(r)}catch{T(e,`tag prefix is malformed: `+r)}e.tagMap[a]=r}};function M(e,t,n,r){if(t<n){let i=e.input.slice(t,n);if(r)for(let t=0,n=i.length;t<n;t+=1){let n=i.charCodeAt(t);n===9||n>=32&&n<=1114111||T(e,`expected valid JSON character`)}else a.test(i)&&T(e,`the stream contains non-printable characters`);e.result+=i}}function N(t,n,r,a){e.isObject(r)||T(t,`cannot merge mappings; the provided source object is unacceptable`);let o=Object.keys(r);for(let e=0,s=o.length;e<s;e+=1){let s=o[e];t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&T(t,`merge keys exceeded maxTotalMergeKeys (`+t.maxTotalMergeKeys+`)`),i.call(n,s)||(b(n,s,r[s]),a[s]=!0)}}function P(e,t,n,r,a,o,s,c,l){if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(let t=0,n=a.length;t<n;t+=1)Array.isArray(a[t])&&T(e,`nested arrays are not supported inside keys`),typeof a==`object`&&u(a[t])===`[object Object]`&&(a[t]=`[object Object]`)}if(typeof a==`object`&&u(a)===`[object Object]`&&(a=`[object Object]`),a=String(a),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(o))for(let r=0,i=o.length;r<i;r+=1)N(e,t,o[r],n);else N(e,t,o,n);else!e.json&&!i.call(n,a)&&i.call(t,a)&&(e.line=s||e.line,e.lineStart=c||e.lineStart,e.position=l||e.position,T(e,`duplicated mapping key`)),b(t,a,o),delete n[a];return t}function F(e){let t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):T(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function I(e,t,n){let r=0,i=e.input.charCodeAt(e.position);for(;i!==0;){for(;f(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(d(i))for(F(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&E(e,`deficient indentation`),r}function ne(e){let t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||p(n)))}function re(t,n){n===1?t.result+=` `:n>1&&(t.result+=e.repeat(`
|
|
47
|
-
`,n-1))}function ie(e,t,n){let r,i,a,o,s,c,l=e.kind,u=e.result,h=e.input.charCodeAt(e.position);if(p(h)||m(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96)return!1;if(h===63||h===45){let t=e.input.charCodeAt(e.position+1);if(p(t)||n&&m(t))return!1}for(e.kind=`scalar`,e.result=``,r=i=e.position,a=!1;h!==0;){if(h===58){let t=e.input.charCodeAt(e.position+1);if(p(t)||n&&m(t))break}else if(h===35){if(p(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&ne(e)||n&&m(h))break;else if(d(h))if(o=e.line,s=e.lineStart,c=e.lineIndent,I(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=i,e.line=o,e.lineStart=s,e.lineIndent=c;break}a&&=(M(e,r,i,!1),re(e,e.line-o),r=i=e.position,!1),f(h)||(i=e.position+1),h=e.input.charCodeAt(++e.position)}return M(e,r,i,!1),e.result?!0:(e.kind=l,e.result=u,!1)}function L(e,t){let n,r,i=e.input.charCodeAt(e.position);if(i!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(M(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0;else d(i)?(M(e,n,r,!0),re(e,I(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ne(e)?T(e,`unexpected end of the document within a single quoted scalar`):(e.position++,f(i)||(r=e.position));T(e,`unexpected end of the stream within a single quoted scalar`)}function R(e,t){let n,r,i,a=e.input.charCodeAt(e.position);if(a!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;)if(a===34)return M(e,n,e.position,!0),e.position++,!0;else if(a===92){if(M(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),d(a))I(e,!1,t);else if(a<256&&x[a])e.result+=S[a],e.position++;else if((i=g(a))>0){let t=i,n=0;for(;t>0;t--)a=e.input.charCodeAt(++e.position),(i=h(a))>=0?n=(n<<4)+i:T(e,`expected hexadecimal character`);e.result+=y(n),e.position++}else T(e,`unknown escape sequence`);n=r=e.position}else d(a)?(M(e,n,r,!0),re(e,I(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ne(e)?T(e,`unexpected end of the document within a double quoted scalar`):(e.position++,f(a)||(r=e.position));T(e,`unexpected end of the stream within a double quoted scalar`)}function ae(e,t){let n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)l=93,f=!1,s=[];else if(v===123)l=125,f=!0,s={};else return!1;for(e.anchor!==null&&D(e,e.anchor,s),v=e.input.charCodeAt(++e.position);v!==0;){if(I(e,!0,t),v=e.input.charCodeAt(e.position),v===l)return e.position++,e.tag=o,e.anchor=c,e.kind=f?`mapping`:`sequence`,e.result=s,!0;n?v===44&&T(e,`expected the node content, but found ','`):T(e,`missed comma between flow collection entries`),g=h=_=null,u=d=!1,v===63&&p(e.input.charCodeAt(e.position+1))&&(u=d=!0,e.position++,I(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,pe(e,t,1,!1,!0),g=e.tag,h=e.result,I(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===r)&&v===58&&(u=!0,v=e.input.charCodeAt(++e.position),I(e,!0,t),pe(e,t,1,!1,!0),_=e.result),f?P(e,s,m,g,h,_,r,i,a):u?s.push(P(e,null,m,g,h,_,r,i,a)):s.push(h),I(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}T(e,`unexpected end of the stream within a flow collection`)}function oe(t,n){let r,i=1,a=!1,o=!1,s=n,c=0,l=!1,u,p=t.input.charCodeAt(t.position);if(p===124)r=!1;else if(p===62)r=!0;else return!1;for(t.kind=`scalar`,t.result=``;p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)i===1?i=p===43?3:2:T(t,`repeat of a chomping mode identifier`);else if((u=_(p))>=0)u===0?T(t,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?T(t,`repeat of an indentation width identifier`):(s=n+u-1,o=!0);else break;if(f(p)){do p=t.input.charCodeAt(++t.position);while(f(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!d(p)&&p!==0)}for(;p!==0;){for(F(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!o||t.lineIndent<s)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>s&&(s=t.lineIndent),d(p)){c++;continue}if(!o&&s===0&&T(t,`missing indentation for block scalar`),t.lineIndent<s){i===3?t.result+=e.repeat(`
|
|
48
|
-
`,a?1+c:c):i===1&&a&&(t.result+=`
|
|
49
|
-
`);break}r?f(p)?(l=!0,t.result+=e.repeat(`
|
|
50
|
-
`,a?1+c:c)):l?(l=!1,t.result+=e.repeat(`
|
|
51
|
-
`,c+1)):c===0?a&&(t.result+=` `):t.result+=e.repeat(`
|
|
52
|
-
`,c):t.result+=e.repeat(`
|
|
53
|
-
`,a?1+c:c),a=!0,o=!0,c=0;let n=t.position;for(;!d(p)&&p!==0;)p=t.input.charCodeAt(++t.position);M(t,n,t.position,!1)}return!0}function se(e,t){let n=e.tag,r=e.anchor,i=[],a=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&D(e,e.anchor,i);let o=e.input.charCodeAt(e.position);for(;o!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,T(e,`tab characters must not be used in indentation`)),!(o!==45||!p(e.input.charCodeAt(e.position+1))));){if(a=!0,e.position++,I(e,!0,-1)&&e.lineIndent<=t){i.push(null),o=e.input.charCodeAt(e.position);continue}let n=e.line;if(pe(e,t,3,!1,!0),i.push(e.result),I(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&o!==0)T(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=r,e.kind=`sequence`,e.result=i,!0):!1}function ce(e,t,n){let r,i,a,o,s=e.tag,c=e.anchor,l={},u=Object.create(null),d=null,m=null,h=null,g=!1,_=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&D(e,e.anchor,l);let v=e.input.charCodeAt(e.position);for(;v!==0;){!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,T(e,`tab characters must not be used in indentation`));let y=e.input.charCodeAt(e.position+1),b=e.line;if((v===63||v===58)&&p(y))v===63?(g&&(P(e,l,u,d,m,null,i,a,o),d=m=h=null),_=!0,g=!0,r=!0):g?(g=!1,r=!0):T(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=y;else{if(i=e.line,a=e.lineStart,o=e.position,!pe(e,n,2,!1,!0))break;if(e.line===b){for(v=e.input.charCodeAt(e.position);f(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),p(v)||T(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(P(e,l,u,d,m,null,i,a,o),d=m=h=null),_=!0,g=!1,r=!1,d=e.tag,m=e.result;else if(_)T(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=s,e.anchor=c,!0}else if(_)T(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=s,e.anchor=c,!0}if((e.line===b||e.lineIndent>t)&&(g&&(i=e.line,a=e.lineStart,o=e.position),pe(e,t,4,!0,r)&&(g?m=e.result:h=e.result),g||(P(e,l,u,d,m,h,i,a,o),d=m=h=null),I(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===b||e.lineIndent>t)&&v!==0)T(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&P(e,l,u,d,m,null,i,a,o),_&&(e.tag=s,e.anchor=c,e.kind=`mapping`,e.result=l),_}function le(e){let t=!1,n=!1,r,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;e.tag!==null&&T(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(n=!0,r=`!!`,o=e.input.charCodeAt(++e.position)):r=`!`;let u=e.position;if(t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(u,e.position),o=e.input.charCodeAt(++e.position)):T(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!p(o);)o===33&&(n?T(e,`tag suffix cannot contain exclamation marks`):(r=e.input.slice(u-1,e.position+1),c.test(r)||T(e,`named tag handle cannot contain such characters`),n=!0,u=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(u,e.position),s.test(a)&&T(e,`tag suffix cannot contain flow indicator characters`)}a&&!l.test(a)&&T(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{T(e,`tag name is malformed: `+a)}return t?e.tag=a:i.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r===`!`?e.tag=`!`+a:r===`!!`?e.tag=`tag:yaml.org,2002:`+a:T(e,`undeclared tag handle "`+r+`"`),!0}function ue(e){let t=e.input.charCodeAt(e.position);if(t!==38)return!1;e.anchor!==null&&T(e,`duplication of an anchor property`),t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!p(t)&&!m(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&T(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(n,e.position),!0}function de(e){let t=e.input.charCodeAt(e.position);if(t!==42)return!1;t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!p(t)&&!m(t);)t=e.input.charCodeAt(++e.position);e.position===n&&T(e,`name of an alias node must contain at least one character`);let r=e.input.slice(n,e.position);return i.call(e.anchorMap,r)||T(e,`unidentified alias "`+r+`"`),e.result=e.anchorMap[r],I(e,!0,-1),!0}function fe(e,t,n,r){let i=A(e);return O(e),te(e,t),e.tag=null,e.anchor=null,e.kind=null,e.result=null,ce(e,n,r)&&e.kind===`mapping`?(k(e),!0):(ee(e),te(e,i),!1)}function pe(e,t,n,r,a){let o,s,c=1,l=!1,u=!1,d=null,f,p,m;e.depth>=e.maxDepth&&T(e,`nesting exceeded maxDepth (`+e.maxDepth+`)`),e.depth+=1,e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let h=o=s=n===4||n===3;if(r&&I(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;;){let n=e.input.charCodeAt(e.position),r=A(e);if(l&&(n===33&&e.tag!==null||n===38&&e.anchor!==null)||!le(e)&&!ue(e))break;d===null&&(d=r),I(e,!0,-1)?(l=!0,s=h,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1}if(s&&=l||a,c===1||n===4)if(p=n===1||n===2?t:t+1,m=e.position-e.lineStart,c===1)if(s&&(se(e,m)||ce(e,m,p))||ae(e,p))u=!0;else{let t=e.input.charCodeAt(e.position);d!==null&&h&&!s&&t!==124&&t!==62&&fe(e,d,d.position-d.lineStart,p)||o&&oe(e,p)||L(e,p)||R(e,p)?u=!0:de(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&T(e,`alias node should not have any properties`)):ie(e,p,n===1)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&D(e,e.anchor,e.result)}else c===0&&(u=s&&se(e,m));if(e.tag===null)e.anchor!==null&&D(e,e.anchor,e.result);else if(e.tag===`?`){e.result!==null&&e.kind!==`scalar`&&T(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`);for(let t=0,n=e.implicitTypes.length;t<n;t+=1)if(f=e.implicitTypes[t],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&D(e,e.anchor,e.result);break}}else if(e.tag!==`!`){if(i.call(e.typeMap[e.kind||`fallback`],e.tag))f=e.typeMap[e.kind||`fallback`][e.tag];else{f=null;let t=e.typeMap.multi[e.kind||`fallback`];for(let n=0,r=t.length;n<r;n+=1)if(e.tag.slice(0,t[n].tag.length)===t[n].tag){f=t[n];break}}f||T(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&f.kind!==e.kind&&T(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+f.kind+`", not "`+e.kind+`"`),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&D(e,e.anchor,e.result)):T(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),--e.depth,e.tag!==null||e.anchor!==null||u}function me(e){let t=e.position,n=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(I(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;r!==0&&!p(r);)r=e.input.charCodeAt(++e.position);let a=e.input.slice(t,e.position),o=[];for(a.length<1&&T(e,`directive name must not be less than one character in length`);r!==0;){for(;f(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!d(r));break}if(d(r))break;for(t=e.position;r!==0&&!p(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}r!==0&&F(e),i.call(j,a)?j[a](e,a,o):E(e,`unknown document directive "`+a+`"`)}if(I(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,I(e,!0,-1)):n&&T(e,`directives end mark is expected`),pe(e,e.lineIndent-1,4,!1,!0),I(e,!0,-1),e.checkLineBreaks&&o.test(e.input.slice(t,e.position))&&E(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&ne(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,I(e,!0,-1));return}e.position<e.length-1&&T(e,`end of the stream or a document separator is expected`)}function he(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
54
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));let n=new C(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,T(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)me(n);return n.documents}function ge(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);let r=he(e,n);if(typeof t!=`function`)return r;for(let e=0,n=r.length;e<n;e+=1)t(r[e])}function _e(e,n){let r=he(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new t(`expected a single document in the stream, but found more`)}}return Ru.loadAll=ge,Ru.load=_e,Ru}var $d={},ef;function tf(){if(ef)return $d;ef=1;let e=Vu(),t=Wu(),n=Xd(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=65279,o={};o[0]=`\\0`,o[7]=`\\a`,o[8]=`\\b`,o[9]=`\\t`,o[10]=`\\n`,o[11]=`\\v`,o[12]=`\\f`,o[13]=`\\r`,o[27]=`\\e`,o[34]=`\\"`,o[92]=`\\\\`,o[133]=`\\N`,o[160]=`\\_`,o[8232]=`\\L`,o[8233]=`\\P`;let s=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],c=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function l(e,t){if(t===null)return{};let n={},r=Object.keys(t);for(let a=0,o=r.length;a<o;a+=1){let o=r[a],s=String(t[o]);o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2));let c=e.compiledTypeMap.fallback[o];c&&i.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s}return n}function u(n){let r,i,a=n.toString(16).toUpperCase();if(n<=255)r=`x`,i=2;else if(n<=65535)r=`u`,i=4;else if(n<=4294967295)r=`U`,i=8;else throw new t(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+r+e.repeat(`0`,i-a.length)+a}function d(t){this.schema=t.schema||n,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=l(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType===`"`?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer==`function`?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}function f(t,n){let r=e.repeat(` `,n),i=0,a=``,o=t.length;for(;i<o;){let e,n=t.indexOf(`
|
|
55
|
-
`,i);n===-1?(e=t.slice(i),i=o):(e=t.slice(i,n+1),i=n+1),e.length&&e!==`
|
|
56
|
-
`&&(a+=r),a+=e}return a}function p(t,n){return`
|
|
57
|
-
`+e.repeat(` `,t.indent*n)}function m(e,t){for(let n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}function h(e){return e===32||e===9}function g(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==a||e>=65536&&e<=1114111}function _(e){return g(e)&&e!==a&&e!==13&&e!==10}function v(e,t,n){let r=_(e),i=r&&!h(e);return(n?r:r&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!i)||_(t)&&!h(t)&&e===35||t===58&&i}function y(e){return g(e)&&e!==a&&!h(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}function b(e){return!h(e)&&e!==58}function x(e,t){let n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function S(e){return/^\n* /.test(e)}function C(e,t,n,r,i,a,o,s){let c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=y(x(e,0))&&b(x(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=x(e,c),!g(l))return 5;h&&=v(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=x(e,c),l===10)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!g(l))return 5;h&&=v(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?1:a===2?5:2:n>9&&S(e)?5:o?a===2?5:2:f?4:3}function w(e,n,r,i,a){e.dump=(function(){if(n.length===0)return e.quotingType===2?`""`:`''`;if(!e.noCompatMode&&(s.indexOf(n)!==-1||c.test(n)))return e.quotingType===2?`"`+n+`"`:`'`+n+`'`;let o=e.indent*Math.max(1,r),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),u=i||e.flowLevel>-1&&r>=e.flowLevel;function d(t){return m(e,t)}switch(C(n,u,e.indent,l,d,e.quotingType,e.forceQuotes&&!i,a)){case 1:return n;case 2:return`'`+n.replace(/'/g,`''`)+`'`;case 3:return`|`+T(n,e.indent)+E(f(n,o));case 4:return`>`+T(n,e.indent)+E(f(D(n,l),o));case 5:return`"`+k(n)+`"`;default:throw new t(`impossible error: invalid scalar style`)}})()}function T(e,t){let n=S(e)?String(t):``,r=e[e.length-1]===`
|
|
58
|
-
`;return n+(r&&(e[e.length-2]===`
|
|
59
|
-
`||e===`
|
|
60
|
-
`)?`+`:r?``:`-`)+`
|
|
61
|
-
`}function E(e){return e[e.length-1]===`
|
|
62
|
-
`?e.slice(0,-1):e}function D(e,t){let n=/(\n+)([^\n]*)/g,r=(function(){let r=e.indexOf(`
|
|
63
|
-
`);return r=r===-1?e.length:r,n.lastIndex=r,O(e.slice(0,r),t)})(),i=e[0]===`
|
|
64
|
-
`||e[0]===` `,a,o;for(;o=n.exec(e);){let e=o[1],n=o[2];a=n[0]===` `,r+=e+(!i&&!a&&n!==``?`
|
|
65
|
-
`:``)+O(n,t),i=a}return r}function O(e,t){if(e===``||e[0]===` `)return e;let n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
|
|
66
|
-
`+e.slice(i,a),i=a+1),o=s;return c+=`
|
|
67
|
-
`,e.length-i>t&&o>i?c+=e.slice(i,o)+`
|
|
68
|
-
`+e.slice(o+1):c+=e.slice(i),c.slice(1)}function k(e){let t=``,n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=x(e,r);let i=o[n];!i&&g(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||u(n)}return t}function ee(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i<a;i+=1){let a=n[i];e.replacer&&(a=e.replacer.call(n,String(i),a)),(N(e,t,a,!1,!1)||a===void 0&&N(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump)}e.tag=i,e.dump=`[`+r+`]`}function A(e,t,n,r){let i=``,a=e.tag;for(let a=0,o=n.length;a<o;a+=1){let o=n[a];e.replacer&&(o=e.replacer.call(n,String(a),o)),(N(e,t+1,o,!0,!0,!1,!0)||o===void 0&&N(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=p(e,t)),e.dump&&e.dump.charCodeAt(0)===10?i+=`-`:i+=`- `,i+=e.dump)}e.tag=a,e.dump=i||`[]`}function te(e,t,n){let r=``,i=e.tag,a=Object.keys(n);for(let i=0,o=a.length;i<o;i+=1){let o=``;r!==``&&(o+=`, `),e.condenseFlow&&(o+=`"`);let s=a[i],c=n[s];e.replacer&&(c=e.replacer.call(n,s,c)),N(e,t,s,!1,!1)&&(e.dump.length>1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),N(e,t,c,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}function j(e,n,r,i){let a=``,o=e.tag,s=Object.keys(r);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new t(`sortKeys must be a boolean or a function`);for(let t=0,o=s.length;t<o;t+=1){let o=``;(!i||a!==``)&&(o+=p(e,n));let c=s[t],l=r[c];if(e.replacer&&(l=e.replacer.call(r,c,l)),!N(e,n+1,c,!0,!0,!0))continue;let u=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024;u&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`?`:o+=`? `),o+=e.dump,u&&(o+=p(e,n)),N(e,n+1,l,!0,u)&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}function M(e,n,a){let o=a?e.explicitTypes:e.implicitTypes;for(let s=0,c=o.length;s<c;s+=1){let c=o[s];if((c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n==`object`&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(a?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag=`?`,c.represent){let a=e.styleMap[c.tag]||c.defaultStyle,o;if(r.call(c.represent)===`[object Function]`)o=c.represent(n,a);else if(i.call(c.represent,a))o=c.represent[a](n,a);else throw new t(`!<`+c.tag+`> tag resolver accepts not "`+a+`" style`);e.dump=o}return!0}}return!1}function N(e,n,i,a,o,s,c){e.tag=null,e.dump=i,M(e,i,!1)||M(e,i,!0);let l=r.call(e.dump),u=a;a&&=e.flowLevel<0||e.flowLevel>n;let d=l===`[object Object]`||l===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(i),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&n>0)&&(o=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l===`[object Object]`)a&&Object.keys(e.dump).length!==0?(j(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(te(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object Array]`)a&&e.dump.length!==0?(e.noArrayIndent&&!c&&n>0?A(e,n-1,e.dump,o):A(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(ee(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object String]`)e.tag!==`?`&&w(e,e.dump,n,s,u);else if(l===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new t(`unacceptable kind of an object to dump `+l)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}function P(e,t){let n=[],r=[];F(e,n,r);let i=r.length;for(let e=0;e<i;e+=1)t.duplicates.push(n[r[e]]);t.usedDuplicates=Array(i)}function F(e,t,n){if(typeof e==`object`&&e){let r=t.indexOf(e);if(r!==-1)n.indexOf(r)===-1&&n.push(r);else if(t.push(e),Array.isArray(e))for(let r=0,i=e.length;r<i;r+=1)F(e[r],t,n);else{let r=Object.keys(e);for(let i=0,a=r.length;i<a;i+=1)F(e[r[i]],t,n)}}}function I(e,t){t||={};let n=new d(t);n.noRefs||P(e,n);let r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),N(n,0,r,!0,!0)?n.dump+`
|
|
69
|
-
`:``}return $d.dump=I,$d}var nf;function rf(){if(nf)return Lu;nf=1;let e=Qd(),t=tf();function n(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}return Lu.Type=Xu(),Lu.Schema=$u(),Lu.FAILSAFE_SCHEMA=dd(),Lu.JSON_SCHEMA=Ed(),Lu.CORE_SCHEMA=kd(),Lu.DEFAULT_SCHEMA=Xd(),Lu.load=e.load,Lu.loadAll=e.loadAll,Lu.dump=t.dump,Lu.YAMLException=Wu(),Lu.types={binary:Rd(),float:Cd(),map:cd(),null:md(),pairs:Wd(),set:qd(),timestamp:Md(),bool:_d(),int:bd(),merge:Fd(),omap:Vd(),seq:ad(),str:nd()},Lu.safeLoad=n(`safeLoad`,`load`),Lu.safeLoadAll=n(`safeLoadAll`,`loadAll`),Lu.safeDump=n(`safeDump`,`dump`),Lu}var{Type:af,Schema:of,FAILSAFE_SCHEMA:sf,JSON_SCHEMA:cf,CORE_SCHEMA:lf,DEFAULT_SCHEMA:uf,load:df,loadAll:ff,dump:pf,YAMLException:mf,types:hf,safeLoad:gf,safeLoadAll:_f,safeDump:vf}=Iu(rf());function yf(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var bf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sf={};function Cf(e,t){return((t||Sf).jsx?xf:bf).test(e)}var wf=/[ \t\n\f\r]/g;function Tf(e){return typeof e==`object`?e.type===`text`&&Ef(e.value):Ef(e)}function Ef(e){return e.replace(wf,``)===``}var Df=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Df.prototype.normal={},Df.prototype.property={},Df.prototype.space=void 0;function Of(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Df(n,r,t)}function kf(e){return e.toLowerCase()}var Af=class{constructor(e,t){this.attribute=t,this.property=e}};Af.prototype.attribute=``,Af.prototype.booleanish=!1,Af.prototype.boolean=!1,Af.prototype.commaOrSpaceSeparated=!1,Af.prototype.commaSeparated=!1,Af.prototype.defined=!1,Af.prototype.mustUseProperty=!1,Af.prototype.number=!1,Af.prototype.overloadedBoolean=!1,Af.prototype.property=``,Af.prototype.spaceSeparated=!1,Af.prototype.space=void 0;var jf=e({boolean:()=>Y,booleanish:()=>Nf,commaOrSpaceSeparated:()=>Lf,commaSeparated:()=>If,number:()=>X,overloadedBoolean:()=>Pf,spaceSeparated:()=>Ff}),Mf=0,Y=Rf(),Nf=Rf(),Pf=Rf(),X=Rf(),Ff=Rf(),If=Rf(),Lf=Rf();function Rf(){return 2**++Mf}var zf=Object.keys(jf),Bf=class extends Af{constructor(e,t,n,r){let i=-1;if(super(e,t),Vf(this,`space`,r),typeof n==`number`)for(;++i<zf.length;){let e=zf[i];Vf(this,zf[i],(n&jf[e])===jf[e])}}};Bf.prototype.defined=!0;function Vf(e,t,n){n&&(e[t]=n)}function Hf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Bf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[kf(r)]=r,n[kf(a.attribute)]=r}return new Df(t,n,e.space)}var Uf=Hf({properties:{ariaActiveDescendant:null,ariaAtomic:Nf,ariaAutoComplete:null,ariaBusy:Nf,ariaChecked:Nf,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:Ff,ariaCurrent:null,ariaDescribedBy:Ff,ariaDetails:null,ariaDisabled:Nf,ariaDropEffect:Ff,ariaErrorMessage:null,ariaExpanded:Nf,ariaFlowTo:Ff,ariaGrabbed:Nf,ariaHasPopup:null,ariaHidden:Nf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ff,ariaLevel:X,ariaLive:null,ariaModal:Nf,ariaMultiLine:Nf,ariaMultiSelectable:Nf,ariaOrientation:null,ariaOwns:Ff,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Nf,ariaReadOnly:Nf,ariaRelevant:null,ariaRequired:Nf,ariaRoleDescription:Ff,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Nf,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Wf(e,t){return t in e?e[t]:t}function Gf(e,t){return Wf(e,t.toLowerCase())}var Kf=Hf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:If,acceptCharset:Ff,accessKey:Ff,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alpha:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:Ff,autoFocus:Y,autoPlay:Y,blocking:Ff,capture:null,charSet:null,checked:Y,cite:null,className:Ff,closedBy:null,colorSpace:null,cols:X,colSpan:X,command:null,commandFor:null,content:null,contentEditable:Nf,controls:Y,controlsList:Ff,coords:X|If,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:Pf,draggable:Nf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:Ff,height:X,hidden:Pf,high:X,href:null,hrefLang:null,htmlFor:Ff,httpEquiv:Ff,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:Ff,itemRef:Ff,itemScope:Y,itemType:Ff,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Y,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Y,muted:Y,name:null,nonce:null,noModule:Y,noValidate:Y,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:Y,optimum:X,pattern:null,ping:Ff,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:Ff,required:Y,reversed:Y,rows:X,rowSpan:X,sandbox:Ff,scope:null,scoped:Y,seamless:Y,selected:Y,shadowRootClonable:Y,shadowRootCustomElementRegistry:Y,shadowRootDelegatesFocus:Y,shadowRootMode:null,shadowRootSerializable:Y,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Nf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:Y,useMap:null,value:Nf,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ff,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Y,declare:Y,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Y,noHref:Y,noShade:Y,noWrap:Y,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Nf,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Y,disablePictureInPicture:Y,disableRemotePlayback:Y,exportParts:If,part:Ff,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:Gf}),qf=Hf({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:Lf,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:Ff,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:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:Y,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,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:If,g2:If,glyphName:If,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:Lf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,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:X,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:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ff,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Lf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Lf,rev:Lf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Lf,requiredFeatures:Lf,requiredFonts:Lf,requiredFormats:Lf,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:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:Lf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Lf,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Lf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Wf}),Jf=Hf({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()}}),Yf=Hf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Gf}),Xf=Hf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Zf={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`},Qf=/[A-Z]/g,$f=/-[a-z]/g,ep=/^data[-\w.:]+$/i;function tp(e,t){let n=kf(t),r=t,i=Af;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ep.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace($f,rp);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!$f.test(e)){let n=e.replace(Qf,np);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Bf}return new i(r,t)}function np(e){return`-`+e.toLowerCase()}function rp(e){return e.charAt(1).toUpperCase()}var ip=Of([Uf,Kf,Jf,Yf,Xf],`html`),ap=Of([Uf,qf,Jf,Yf,Xf],`svg`);function op(e){return e.join(` `).trim()}var sp=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
70
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(!(e.charAt(0)!=`/`||e.charAt(1)!=`*`)){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),cp=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(sp());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),lp=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),up=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(cp()),r=lp();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),dp=pp(`end`),fp=pp(`start`);function pp(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function mp(e){let t=fp(e),n=dp(e);if(t&&n)return{start:t,end:n}}var hp=t(up(),1),gp={}.hasOwnProperty,_p=new Map,vp=/[A-Z]/g,yp=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),bp=new Set([`td`,`th`]);function xp(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Mp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=jp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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`?ap:ip,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Sp(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Sp(e,t,n){if(t.type===`element`)return Cp(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return wp(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ep(e,t,n);if(t.type===`mdxjsEsm`)return Tp(e,t);if(t.type===`root`)return Dp(e,t,n);if(t.type===`text`)return Op(e,t)}function Cp(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ap,e.schema=i),e.ancestors.push(t);let a=Rp(e,t.tagName,!1),o=Np(e,t),s=Fp(e,t);return yp.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Tf(e)})),kp(e,o,a,t),Ap(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function wp(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}zp(e,t.position)}function Tp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zp(e,t.position)}function Ep(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ap,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Rp(e,t.name,!0),o=Pp(e,t),s=Fp(e,t);return kp(e,o,a,t),Ap(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Dp(e,t,n){let r={};return Ap(r,Fp(e,t)),e.create(t,e.Fragment,r,n)}function Op(e,t){return t.value}function kp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ap(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function jp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Mp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=fp(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Np(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&gp.call(t.properties,i)){let a=Ip(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&bp.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Pp(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else zp(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else zp(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function Fp(e,t){let n=[],r=-1,i=e.passKeys?new Map:_p;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Sp(e,a,o);s!==void 0&&n.push(s)}return n}function Ip(e,t,n){let r=tp(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?yf(n):op(n)),r.property===`style`){let t=typeof n==`object`?n:Lp(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Bp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Zf[r.property]||r.property:r.attribute,n]}}function Lp(e,t){try{return(0,hp.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ss("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function Rp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Cf(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Cf(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return gp.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);zp(e)}function zp(e,t){let n=new Ss("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function Bp(e){let t={},n;for(n in e)gp.call(e,n)&&(t[Vp(n)]=e[n]);return t}function Vp(e){let t=e.replace(vp,Hp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Hp(e){return`-`+e.toLowerCase()}var Up={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`]};function Wp(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Gp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
71
|
-
`}]}function Kp(e,t){let n=t.value?t.value+`
|
|
72
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function qp(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=gi(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Xp(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function $p(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qp(e,t);let i={src:gi(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function em(e,t){let n={src:gi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function tm(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function nm(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qp(e,t);let i={href:gi(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function rm(e,t){let n={href:gi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function im(e,t,n){let r=e.all(t),i=n?am(n):om(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
73
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
74
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function am(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=om(n[r])}return t}function om(e){return e.spread??e.children.length>1}function sm(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function cm(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lm(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function um(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dm(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=fp(t.children[1]),o=dp(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function fm(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function pm(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var mm=9,hm=32;function gm(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(_m(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(_m(t.slice(i),i>0,!1)),a.join(``)}function _m(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===mm||t===hm;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===mm||t===hm;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function vm(e,t){let n={type:`text`,value:gm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ym(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var bm={blockquote:Wp,break:Gp,code:Kp,delete:qp,emphasis:Jp,footnoteReference:Yp,heading:Xp,html:Zp,imageReference:$p,image:em,inlineCode:tm,linkReference:nm,link:rm,listItem:im,list:sm,paragraph:cm,root:lm,strong:um,table:dm,tableCell:pm,tableRow:fm,text:vm,thematicBreak:ym,toml:xm,yaml:xm,definition:xm,footnoteDefinition:xm};function xm(){}var Sm=typeof self==`object`?self:globalThis,Cm=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Sm[e](t)},wm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Sm[e]==`function`?Cm(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Cm(a,o),i)};return r},Tm=e=>wm(new Map,e)(0),Em=``,{toString:Dm}={},{keys:Om}=Object,km=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Dm.call(e).slice(8,-1);switch(n){case`Array`:return[1,Em];case`Object`:return[2,Em];case`Date`:return[3,Em];case`RegExp`:return[4,Em];case`Map`:return[5,Em];case`Set`:return[6,Em];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Am=([e,t])=>e===0&&(t===`function`||t===`symbol`),jm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=km(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Om(r))(e||!Am(km(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?Em:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Am(km(n))||Am(km(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Am(km(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Mm=(e,{json:t,lossy:n}={})=>{let r=[];return jm(!(t||n),!!t,new Map,r)(e),r},Nm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Tm(Mm(e,t)):structuredClone(e):(e,t)=>Tm(Mm(e,t));function Pm(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Fm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Im(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Pm,r=e.options.footnoteBackLabel||Fm,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=gi(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Nm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
75
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
76
|
-
`}]}}var Lm={}.hasOwnProperty,Rm={};function zm(e,t){let n=t||Rm,r=new Map,i=new Map,a={all:s,applyData:Vm,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...bm,...n.handlers},one:o,options:n,patch:Bm,wrap:Um};return Pn(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Lm.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Nm(n);return r.children=a.all(e),r}return Nm(e)}return(a.options.unknownHandler||Hm)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Wm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Wm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Bm(e,t){e.position&&(t.position=mp(e))}function Vm(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Nm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Hm(e,t){let n=t.data||{},r=`value`in t&&!(Lm.call(n,`hProperties`)||Lm.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Um(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
77
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
78
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
79
|
-
`}),n}function Wm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gm(e,t){let n=zm(e,t),r=n.one(e,void 0),i=Im(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
80
|
-
`},i)),a}function Km(e,t){return e&&`run`in e?async function(n,r){let i=Gm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Gm(n,{file:r,...e||t})}}var qm=[],Jm={allowDangerousHtml:!0},Ym=/^(https?|ircs?|mailto|xmpp)$/i,Xm=[{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 Zm(e){let t=Qm(e),n=$m(e);return eh(t.runSync(t.parse(n),n),e)}function Qm(e){let t=e.rehypePlugins||qm,n=e.remarkPlugins||qm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Jm}:Jm;return Gs().use(gs).use(n).use(Km,r).use(t)}function $m(e){let t=e.children||``,n=new Ls;return typeof t==`string`?n.value=t:``+t,n}function eh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||th;for(let e of Xm)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Pn(e,l),xp(e,{Fragment:B.Fragment,components:i,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Up)if(Object.hasOwn(Up,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Up[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function th(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ym.test(e.slice(0,t))?e:``}function nh(e){Ct(e,[/\r?\n|\r/g,rh])}function rh(){return{type:`break`}}function ih(){return function(e){nh(e)}}var ah=`modulepreload`,oh=function(e,t){return new URL(e,t).href},sh={},ch=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=oh(t,n),t=s(t),t in sh)return;sh[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ah,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},lh=/<!--[\s\S]*?-->/g,uh=/@import|url\s*\(\s*(?!(?:['"]\s*)?#)/i,dh=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,fh=/^\s*(?:(?:Person(?:_Ext)?|System(?:Db|Queue)?(?:_Ext)?)\s*\((?:(?:"[^"\r\n]*"|[^,\r\n]*)\s*,){3}|(?:(?:Container|Component)(?:Db|Queue)?(?:_Ext)?|Deployment_Node|Node(?:_[LR])?)\s*\((?:(?:"[^"\r\n]*"|[^,\r\n]*)\s*,){4}|(?:Rel(?:_(?:Up|Down|Left|Right|Back|[UDLR]))?|BiRel)\s*\((?:(?:"[^"\r\n]*"|[^,\r\n]*)\s*,){5}|RelIndex\s*\((?:(?:"[^"\r\n]*"|[^,\r\n]*)\s*,){6}|UpdateElementStyle\s*\((?:(?:"[^"\r\n]*"|[^,\r\n]*)\s*,){6})\s*(?:\$sprite\s*=\s*)?["']?\s*(?:https?:)?\/\//im,ph=/(?:^|[;\r\n])\s*properties\s+[^:\r\n;]+\s*:[^\S\r\n]*/gim;function mh(e,t){let n=0,r=!1,i=!1;for(let a=t;a<e.length;a+=1){let t=e[a];if(r)i?i=!1:t===`\\`?i=!0:t===`"`&&(r=!1);else if(t===`"`)r=!0;else if(t===`{`)n+=1;else if(t===`}`&&(--n,n===0))return a}return-1}function hh(e){let t=e.replace(/^\s*%%(?!\{)[^\n]+\n?/gm,``).trimStart(),n=[{start:/^\s*[xo<]?--\s*/,end:/^\s*[xo<]?--+[-xo>]\s*/},{start:/^\s*[xo<]?==\s*/,end:/^\s*[xo<]?==+[=xo>]\s*/},{start:/^\s*[xo<]?-\.\s*/,end:/^\s*[xo<]?-?\.+-[xo>]?\s*/}],r=!1,i=null;for(let e=0;e<t.length;e+=1){let a=t.slice(e);if(t[e]===`"`){r=!r;continue}if(r)continue;if(i){let t=a.match(i);t&&(i=null,e+=t[0].length-1);continue}let o=n.map(({end:e})=>a.match(e)).find(Boolean);if(o){e+=o[0].length-1;continue}let s=n.map(({start:e,end:t})=>({end:t,match:a.match(e)})).find(({match:e})=>e);if(s?.match){i=s.end,e+=s.match[0].length-1;continue}if(!t.startsWith(`@{`,e))continue;let c=e+1,l=mh(t,c);if(l<0)continue;let u=t.slice(c+1,l),d=u.includes(`
|
|
81
|
-
`)?`${u}\n`:`{\n${u}\n}`;try{let e=df(d,{schema:cf});if(typeof e==`object`&&e&&!Array.isArray(e)&&e.img)return!0}catch{continue}e=l}return!1}function gh(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=e.themeCSS;return typeof t==`string`&&uh.test(t)}function _h(e){let t=e.match(dh);if(t){let e=t[1],n=e?t[2].split(`
|
|
82
|
-
`).map(t=>t.startsWith(e)?t.slice(e.length):t).join(`
|
|
83
|
-
`):t[2];try{let e=df(n,{schema:cf});if(typeof e==`object`&&e&&!Array.isArray(e)&&gh(e.config))return!0}catch{}}for(let t of e.matchAll(/%%\{\s*(?:init|initialize)\b\s*:?\s*([\s\S]*?)\}%%/gi))try{if(gh(JSON.parse(t[1].trim().replace(/'/g,`"`))))return!0}catch{continue}let n=[],r=0,i=null,a=!1;for(let t=0;t<e.length;t+=1){let o=e[t];a?a=!1:o===`\\`?a=!0:i?o===i&&(i=null):o===`"`||o===`'`||o==="`"?i=o:(o===`;`||o===`\r`||o===`
|
|
84
|
-
`)&&(n.push(e.slice(r,t)),o===`\r`&&e[t+1]===`
|
|
85
|
-
`&&(t+=1),r=t+1)}return n.push(e.slice(r)),n.some(e=>/^\s*(?:style\s+\S+|classDef\s+\S+|linkStyle\s+\S+|rect\b|UpdateElementStyle\s*\(|UpdateRelStyle\s*\()/i.test(e)&&uh.test(e))}function vh(e){if(fh.test(e)||hh(e))return!0;for(let t of e.matchAll(ph)){let n=t.index+t[0].length,r=e.slice(n).match(/^:?(?:no)?wrap:[^\S\r\n]*/);if(r&&(n+=r[0].length),e[n]!==`{`)continue;let i=mh(e,n);if(!(i<0))try{let t=JSON.parse(e.slice(n,i+1)).icon;if(typeof t==`string`){let e=t.trim();if(e!==``&&!e.startsWith(`@`))return!0}}catch{continue}}return!1}function yh(e,t){if(!t.startsWith(`#`)||t.length===1)return!1;let n=e.localName===`svg`?e:e.ownerSVGElement;if(!n)return!1;let r=t.slice(1);return n.id===r||[...n.querySelectorAll(`[id]`)].some(e=>e.id===r)}function bh(){return(e,t)=>{let n=String(t.value??``),r=[],i=e=>{if(e.type===`text`&&e.value&&e.position?.start.offset!==void 0&&e.position.end.offset!==void 0){let t=e.position.start.offset,i=n.slice(t,e.position.end.offset);[...i.matchAll(/&(?:#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});!--/gi)].filter(e=>{let t=0;for(let n=(e.index??0)-1;n>=0&&i[n]===`\\`;--n)t+=1;return t%2==0}).forEach(n=>{if(Cr(n[0])!==`<!--`)return;let a=Cr(i.slice(0,n.index??0)).length;e.value.startsWith(`<!--`,a)&&r.push({kind:`open`,node:e,sourceOffset:t+(n.index??0),sourceEndOffset:t+(n.index??0)+n[0].length,valueOffset:a,valueEndOffset:a+4})}),[...i.matchAll(/--&(?:#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi)].forEach(n=>{if(Cr(n[0])!==`-->`)return;let a=Cr(i.slice(0,n.index??0)).length;e.value.startsWith(`-->`,a)&&r.push({kind:`close`,node:e,sourceOffset:t+(n.index??0),sourceEndOffset:t+(n.index??0)+n[0].length,valueOffset:a,valueEndOffset:a+3})})}e.children?.forEach(i)};i(e);let a=[],o=null;r.sort((e,t)=>e.sourceOffset-t.sourceOffset).forEach(e=>{e.kind===`open`?o||=e:o&&=(a.push({open:o,close:e}),null)});let s=e=>e.position?.start.offset!==void 0&&e.position.end.offset!==void 0&&a.some(t=>t.open.sourceOffset<=e.position.start.offset&&e.position.end.offset<=t.close.sourceEndOffset),c=(e,t=!1)=>{if(!t&&s(e))return!1;if(e.type===`html`&&e.value)return e.value=e.value.replace(lh,``),e.value.trim().length>0;if(e.type===`text`&&e.value&&e.position?.start.offset!==void 0&&e.position.end.offset!==void 0){let t=a.flatMap(t=>e.position.end.offset<=t.open.sourceOffset||t.close.sourceEndOffset<=e.position.start.offset?[]:[{start:t.open.node===e?t.open.valueOffset:0,end:t.close.node===e?t.close.valueEndOffset:e.value.length}]).sort((e,t)=>t.start-e.start);for(let n of t)e.value=e.value.slice(0,n.start)+e.value.slice(n.end);return e.value.length>0}return!(e.children&&(e.children=e.children.filter(e=>c(e)),!t&&e.children.length===0))};c(e,!0);let l=e.children;if(!l||l.length<2)return;let u=[];l.forEach((e,t)=>{let r=l[t-1]?.position?.end.offset,i=e.position?.start.offset;if(r!==void 0&&i!==void 0){let e=n.slice(r,i);if(/^[\t \r\n]*$/.test(e)){let t=Math.max(0,(e.match(/\r\n|\r|\n/g)?.length??0)-2);for(let e=0;e<t;e+=1)u.push({type:`paragraph`,children:[],data:{hName:`div`,hProperties:{className:[`markdown-blank-line`],"aria-hidden":`true`}}})}}u.push(e)}),e.children=u}}function xh(e){let t=d.Children.toArray(e).find(e=>(0,d.isValidElement)(e)&&e.type===`code`);return{language:t?.props.className?.match(/(?:^|\s)language-([^\s]+)/)?.[1]?.toLowerCase()??null,source:d.Children.toArray(t?.props.children).join(``)}}function Sh({source:e,error:t}){let{text:n}=H();return(0,B.jsxs)(`div`,{className:`markdown-mermaid-fallback`,role:t?`alert`:void 0,children:[t&&(0,B.jsx)(`p`,{children:n(`无法渲染 Mermaid 图,下面显示图表源码。`,`Unable to render Mermaid diagram. Showing its source instead.`)}),(0,B.jsxs)(`details`,{open:t,children:[(0,B.jsx)(`summary`,{children:n(`Mermaid 源码`,`Mermaid source`)}),(0,B.jsx)(`pre`,{children:(0,B.jsx)(`code`,{className:`language-mermaid`,children:e})})]})]})}function Ch({source:e}){let{text:t}=H(),n=`taskboard-mermaid-${(0,d.useId)().replace(/[^A-Za-z0-9_-]/g,``)}`,[r,i]=(0,d.useState)(()=>typeof document<`u`&&document.documentElement.dataset.theme===`dark`?`dark`:`light`),[a,o]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(typeof document>`u`)return;let e=document.documentElement,t=new MutationObserver(()=>{i(e.dataset.theme===`dark`?`dark`:`light`)});return t.observe(e,{attributes:!0,attributeFilter:[`data-theme`]}),()=>t.disconnect()},[]),(0,d.useEffect)(()=>{let t=!1;if(o(null),vh(e)||_h(e)){o({source:e,theme:r,error:!0});return}return Promise.all([ch(()=>import(`./mermaid.core-POz2Xcvr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url),ch(()=>import(`./purify.es-Bwt4ulIK.js`),[],import.meta.url)]).then(async([i,a])=>{let s=i.default,c=a.default,l=(e,t)=>{if(!(e instanceof Element)||e.localName!==`use`)return;let n=e.getAttribute(`href`)??e.getAttribute(`xlink:href`);n&&yh(e,n)&&(t.allowedTags.use=!0)},u=(e,t)=>{t.attrName!==`href`&&t.attrName!==`xlink:href`||(yh(e,t.attrValue)?t.forceKeepAttr=!0:t.keepAttr=!1)};c.addHook(`uponSanitizeElement`,l),c.addHook(`uponSanitizeAttribute`,u);try{s.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,theme:r===`dark`?`dark`:`default`,htmlLabels:!1,secure:[`htmlLabels`]});let{svg:i}=await s.render(n,e),a=c.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:[`foreignObject`,`image`,`script`],FORBID_ATTR:[`href`,`xlink:href`]}),l=document.createElement(`template`);if(l.innerHTML=a,l.content.children.length!==1||l.content.firstElementChild?.localName!==`svg`)throw Error(`Mermaid did not produce a usable SVG document.`);l.content.querySelectorAll(`style`).forEach(e=>{uh.test(e.textContent??``)&&e.remove()}),l.content.querySelectorAll(`[style]`).forEach(e=>{uh.test(e.getAttribute(`style`)??``)&&e.removeAttribute(`style`)}),t||o({source:e,theme:r,svg:l.innerHTML})}finally{c.removeHook(`uponSanitizeElement`,l),c.removeHook(`uponSanitizeAttribute`,u)}}).catch(()=>{t||o({source:e,theme:r,error:!0})}),()=>{t=!0}},[n,e,r]);let s=a?.source===e&&a.theme===r?a:null;return s?`error`in s?(0,B.jsx)(`div`,{className:`markdown-mermaid`,children:(0,B.jsx)(Sh,{source:e,error:!0})}):(0,B.jsx)(`div`,{className:`markdown-mermaid`,role:`img`,"aria-label":t(`Mermaid 图`,`Mermaid diagram`),dangerouslySetInnerHTML:{__html:s.svg}}):(0,B.jsx)(`div`,{className:`markdown-mermaid`,"aria-busy":`true`,children:(0,B.jsx)(Sh,{source:e})})}function wh({children:e,...t}){let{language:n,source:r}=xh(e);return n===`mermaid`?(0,B.jsx)(Ch,{source:r}):(0,B.jsx)(`pre`,{...t,children:e})}var Th=(0,d.createContext)(null);function Eh({node:e,href:t,children:n,className:r,...i}){let{value:a,onLinkClick:o,renderLink:s}=(0,d.useContext)(Th),c=s?.(t,n),l=c!=null,u=e?.position?.start.offset,f=e?.position?.end.offset,p=typeof u==`number`&&typeof f==`number`?a.slice(u,f):void 0,m=!!(p&&/^\[[\s\S]*\]\(taskboard:\/\/composer-reference\/[^)]+\)$/.test(p));return(0,d.isValidElement)(c)&&c.type===`video`?c:(0,B.jsx)(`a`,{...i,className:[r,l?`issue-reference-link`:``].filter(Boolean).join(` `)||void 0,"data-taskboard-inline-media-markdown":l||m?p:void 0,href:t,target:`_blank`,rel:`noreferrer`,onClick:e=>o?.(e,t),children:l?c:n})}function Dh({node:e,...t}){let{value:n,onImageClick:r}=(0,d.useContext)(Th),i=e?.position?.start.offset,a=e?.position?.end.offset,o=typeof i==`number`&&typeof a==`number`?n.slice(i,a):void 0,s=o&&/^!\[(?:\\.|[^\]])*\]\(/.test(o)?o:void 0;return(0,B.jsx)(`img`,{...t,className:[t.className,r?`is-previewable`:``].filter(Boolean).join(` `)||void 0,"data-taskboard-inline-media-markdown":s,onClick:r})}function Oh({value:e,onCopy:t,onImageClick:n,onLinkClick:r,renderLink:i}){return(0,B.jsx)(`div`,{className:`issue-description-document`,onCopy:t,children:(0,B.jsx)(Th.Provider,{value:{value:e,onImageClick:n,onLinkClick:r,renderLink:i},children:(0,B.jsx)(Zm,{remarkPlugins:[Eo,bh,ih],urlTransform:e=>th(Ie(e)),components:{a:Eh,img:Dh,pre:wh},children:e})})})}function kh(e,t){let n=su(e,document.baseURI);if(n?.type!==`issue`)return null;let{projectId:r,identifier:i}=n,a=t.find(e=>e.projectId===r&&e.identifier===i)??null;return{identifier:a?.externalKey??i,task:a}}function Ah(e,t){let n=su(e,document.baseURI);return n?.type!==`attachment`||n.endpoint!==`download`?null:t.find(e=>e.id===n.attachmentId)??null}function jh(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(+(e<10*1024))} KB`:`${(e/(1024*1024)).toFixed(+(e<10*1024*1024))} MB`}var Mh=(0,d.memo)(function({value:e,referenceTasks:t,onOpenTask:n,attachments:r=[],enableImagePreview:i=!1,onOpenAttachment:a}){let[o,s]=(0,d.useState)(null);return(0,d.useEffect)(()=>{if(!o)return;function e(e){e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),s(null))}return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[o]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Oh,{value:e,onImageClick:i?e=>{e.preventDefault(),e.stopPropagation(),s({src:e.currentTarget.currentSrc,alt:e.currentTarget.alt})}:void 0,onCopy:e=>{let n=e.currentTarget.ownerDocument.getSelection();if(!n||n.rangeCount===0||n.isCollapsed)return;let r=n.getRangeAt(0);if(!e.currentTarget.contains(r.startContainer)||!e.currentTarget.contains(r.endContainer))return;let i=r.cloneRange(),a=e.currentTarget.ownerDocument.createElement(`div`);a.append(i.cloneContents());let o=Fu(a.innerHTML,t);o&&(e.preventDefault(),Pu(e.clipboardData,o))},renderLink:e=>{let n=e?Ah(e,r):null;if(n)return n.contentType.startsWith(`video/`)?(0,B.jsx)(`video`,{className:`document-inline-video`,src:Pe(n),"aria-label":n.filename,controls:!0}):(0,B.jsxs)(`span`,{className:`document-attachment-card`,children:[(0,B.jsx)(`span`,{className:`attachment-file-icon`,"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`file`})}),(0,B.jsxs)(`span`,{className:`attachment-copy composer-attachment-copy`,children:[(0,B.jsx)(`strong`,{children:n.filename}),(0,B.jsx)(`span`,{children:jh(n.size)})]})]});let i=e?kh(e,t):null;if(!i)return null;let{task:a}=i;return a?(0,B.jsxs)(`span`,{className:`issue-reference-inline issue-reference-status-${a.status}`,children:[(0,B.jsxs)(`span`,{className:`issue-reference-identity`,children:[(0,B.jsx)(`span`,{className:`status-icon issue-reference-status status-icon-${wl[a.status].tone}`,children:(0,B.jsx)(Ac,{status:a.status,color:`var(--column-status-color)`,size:15})}),(0,B.jsx)(`span`,{className:`issue-reference-id`,children:a.externalKey??a.identifier})]}),(0,B.jsx)(`span`,{className:`issue-reference-title`,children:a.title})]}):(0,B.jsx)(`span`,{className:`issue-reference-inline`,children:(0,B.jsx)(`span`,{className:`issue-reference-identity`,children:(0,B.jsx)(`span`,{className:`issue-reference-id`,children:i.identifier})})})},onLinkClick:(e,i)=>{let o=i?Ah(i,r):null;if(o&&a){e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&a(e,o);return}let s=i?kh(i,t):null;!s||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),s.task&&n(s.task))}}),o&&(0,vr.createPortal)((0,B.jsx)(`div`,{className:`display-settings-backdrop image-preview-backdrop`,role:`presentation`,onClick:e=>{e.stopPropagation(),e.target===e.currentTarget&&s(null)},children:(0,B.jsxs)(`div`,{className:`image-preview-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":o.alt||`Image preview`,children:[(0,B.jsx)(`img`,{src:o.src,alt:o.alt}),(0,B.jsx)(`button`,{className:`icon-button display-settings-close image-preview-close`,type:`button`,"aria-label":`Close image preview`,onClick:()=>s(null),children:(0,B.jsx)(J,{name:`close`})})]})}),document.body)]})}),Nh={};function Ph(e){let t=Nh[e];if(t)return t;t=Nh[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]=`%`+(`0`+r.toString(16).toUpperCase()).slice(-2)}return t}function Fh(e,t){typeof t!=`string`&&(t=Fh.defaultChars);let n=Ph(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t=``;for(let r=0,i=e.length;r<i;r+=3){let a=parseInt(e.slice(r+1,r+3),16);if(a<128){t+=n[a];continue}if((a&224)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((n&192)==128){let e=a<<6&1984|n&63;e<128?t+=`��`:t+=String.fromCharCode(e),r+=3;continue}}if((a&240)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((n&192)==128&&(i&192)==128){let e=a<<12&61440|n<<6&4032|i&63;e<2048||e>=55296&&e<=57343?t+=`���`:t+=String.fromCharCode(e),r+=6;continue}}if((a&248)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((n&192)==128&&(i&192)==128&&(o&192)==128){let e=a<<18&1835008|n<<12&258048|i<<6&4032|o&63;e<65536||e>1114111?t+=`����`:(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(e&1023))),r+=9;continue}}t+=`�`}return t})}Fh.defaultChars=`;/?:@&=+$,#`,Fh.componentChars=``;var Ih={};function Lh(e){let t=Ih[e];if(t)return t;t=Ih[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push(`%`+(`0`+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Rh(e,t,n){typeof t!=`string`&&(n=t,t=Rh.defaultChars),n===void 0&&(n=!0);let r=Lh(t),i=``;for(let t=0,a=e.length;t<a;t++){let o=e.charCodeAt(t);if(n&&o===37&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<a){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+=`%EF%BF%BD`;continue}i+=encodeURIComponent(e[t])}return i}Rh.defaultChars=`;/?:@&=+$,-_.!~*'()#`,Rh.componentChars=`-_.!~*'()`;function zh(e){let t=``;return t+=e.protocol||``,t+=e.slashes?`//`:``,t+=e.auth?e.auth+`@`:``,e.hostname&&e.hostname.indexOf(`:`)!==-1?t+=`[`+e.hostname+`]`:t+=e.hostname||``,t+=e.port?`:`+e.port:``,t+=e.pathname||``,t+=e.search||``,t+=e.hash||``,t}function Bh(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Vh=/^([a-z0-9.+-]+:)/i,Hh=/:[0-9]*$/,Uh=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Wh=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
|
|
86
|
-
`,` `],Gh=[`/`,`?`,`#`],Kh=255,qh=/^[+a-z0-9A-Z_-]{0,63}$/,Jh=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Yh={javascript:!0,"javascript:":!0},Xh={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Zh(e,t){if(e&&e instanceof Bh)return e;let n=new Bh;return n.parse(e,t),n}Bh.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=Uh.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=Vh.exec(a);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)===`//`,i&&!(o&&Yh[o])&&(a=a.substr(2),this.slashes=!0)),!Yh[o]&&(i||o&&!Xh[o])){let e=-1;for(let t=0;t<Gh.length;t++)r=a.indexOf(Gh[t]),r!==-1&&(e===-1||r<e)&&(e=r);let t,n;n=e===-1?a.lastIndexOf(`@`):a.lastIndexOf(`@`,e),n!==-1&&(t=a.slice(0,n),a=a.slice(n+1),this.auth=t),e=-1;for(let t=0;t<Wh.length;t++)r=a.indexOf(Wh[t]),r!==-1&&(e===-1||r<e)&&(e=r);e===-1&&(e=a.length),a[e-1]===`:`&&e--;let i=a.slice(0,e);a=a.slice(e),this.parseHost(i),this.hostname=this.hostname||``;let o=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(qh)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(qh)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(Jh);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>Kh&&(this.hostname=``),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf(`#`);s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let c=a.indexOf(`?`);return c!==-1&&(this.search=a.substr(c),a=a.slice(0,c)),a&&(this.pathname=a),Xh[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},Bh.prototype.parseHost=function(e){let t=Hh.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Qh=e({decode:()=>Fh,encode:()=>Rh,format:()=>zh,parse:()=>Zh}),$h=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,eg=/[\0-\x1F\x7F-\x9F]/,tg=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ng=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,rg=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,ig=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ag=e({Any:()=>$h,Cc:()=>eg,Cf:()=>tg,P:()=>ng,S:()=>rg,Z:()=>ig}),og=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),sg=new Uint16Array(`Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢`.split(``).map(e=>e.charCodeAt(0))),cg=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),lg=String.fromCodePoint??function(e){let t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function ug(e){return e>=55296&&e<=57343||e>1114111?65533:cg.get(e)??e}var dg;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(dg||={});var fg=32,pg;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(pg||={});function mg(e){return e>=dg.ZERO&&e<=dg.NINE}function hg(e){return e>=dg.UPPER_A&&e<=dg.UPPER_F||e>=dg.LOWER_A&&e<=dg.LOWER_F}function gg(e){return e>=dg.UPPER_A&&e<=dg.UPPER_Z||e>=dg.LOWER_A&&e<=dg.LOWER_Z||mg(e)}function _g(e){return e===dg.EQUALS||gg(e)}var vg;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(vg||={});var yg;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(yg||={});var bg=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=vg.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yg.Strict}startEntity(e){this.decodeMode=e,this.state=vg.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case vg.EntityStart:return e.charCodeAt(t)===dg.NUM?(this.state=vg.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=vg.NamedEntity,this.stateNamedEntity(e,t));case vg.NumericStart:return this.stateNumericStart(e,t);case vg.NumericDecimal:return this.stateNumericDecimal(e,t);case vg.NumericHex:return this.stateNumericHex(e,t);case vg.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|fg)===dg.LOWER_X?(this.state=vg.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=vg.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(mg(r)||hg(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(mg(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===dg.SEMI)this.consumed+=1;else if(this.decodeMode===yg.Strict)return 0;return this.emitCodePoint(ug(this.result),this.consumed),this.errors&&(e!==dg.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&pg.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=Sg(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===yg.Attribute&&(i===0||_g(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&pg.VALUE_LENGTH)>>14,i!==0){if(a===dg.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yg.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&pg.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~pg.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case vg.NamedEntity:return this.result!==0&&(this.decodeMode!==yg.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case vg.NumericDecimal:return this.emitNumericEntity(0,2);case vg.NumericHex:return this.emitNumericEntity(0,3);case vg.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case vg.EntityStart:return 0}}};function xg(e){let t=``,n=new bg(e,e=>t+=lg(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf(`&`,a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=o===0?i+1:i}let o=t+e.slice(i);return t=``,o}}function Sg(e,t,n,r){let i=(t&pg.BRANCH_LENGTH)>>7,a=t&pg.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var Cg=xg(og);xg(sg);function wg(e,t=yg.Legacy){return Cg(e,t)}function Tg(e){return Cg(e,yg.Strict)}var Eg=e({arrayReplaceAt:()=>Mg,asciiTrim:()=>t_,assign:()=>jg,escapeHtml:()=>Gg,escapeRE:()=>qg,fromCodePoint:()=>Pg,has:()=>Ag,isMdAsciiPunct:()=>Qg,isPunctChar:()=>Xg,isPunctCharCode:()=>Zg,isSpace:()=>Jg,isString:()=>Og,isValidEntityCode:()=>Ng,isWhiteSpace:()=>Yg,lib:()=>n_,normalizeReference:()=>$g,unescapeAll:()=>Bg,unescapeMd:()=>zg});function Dg(e){return Object.prototype.toString.call(e)}function Og(e){return Dg(e)===`[object String]`}var kg=Object.prototype.hasOwnProperty;function Ag(e,t){return kg.call(e,t)}function jg(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!=`object`)throw TypeError(t+`must be object`);Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function Mg(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Ng(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Pg(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var Fg=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Ig=RegExp(Fg.source+`|&([a-z#][a-z0-9]{1,31});`,`gi`),Lg=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Rg(e,t){if(t.charCodeAt(0)===35&&Lg.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Ng(n)?Pg(n):e}let n=wg(e);return n===e?e:n}function zg(e){return e.indexOf(`\\`)<0?e:e.replace(Fg,`$1`)}function Bg(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(Ig,function(e,t,n){return t||Rg(e,n)})}var Vg=/[&<>"]/,Hg=/[&<>"]/g,Ug={"&":`&`,"<":`<`,">":`>`,'"':`"`};function Wg(e){return Ug[e]}function Gg(e){return Vg.test(e)?e.replace(Hg,Wg):e}var Kg=/[.?*+^$[\]\\(){}|-]/g;function qg(e){return e.replace(Kg,`\\$&`)}function Jg(e){switch(e){case 9:case 32:return!0}return!1}function Yg(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Xg(e){return ng.test(e)||rg.test(e)}function Zg(e){return Xg(Pg(e))}function Qg(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function $g(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function e_(e){return e===32||e===9||e===10||e===13}function t_(e){let t=0;for(;t<e.length&&e_(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&e_(e.charCodeAt(n));n--);return e.slice(t,n+1)}var n_={mdurl:Qh,ucmicro:ag};function r_(e,t,n){let r,i,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}}let l=-1;return i&&(l=e.pos),e.pos=c,l}function i_(e,t,n){let r,i=t,a={ok:!1,pos:0,str:``};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return a;if(r===62)return a.pos=i+1,a.str=Bg(e.slice(t+1,i)),a.ok=!0,a;if(r===92&&i+1<n){i+=2;continue}i++}return a}let o=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(o++,o>32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=Bg(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function a_(e,t,n,r){let i,a=t,o={ok:!1,can_continue:!1,pos:0,str:``,marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(a>=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a<n;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=Bg(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<n&&a++,a++}return o.can_continue=!0,o.str+=Bg(e.slice(t,a)),o}var o_=e({parseLinkDestination:()=>i_,parseLinkLabel:()=>r_,parseLinkTitle:()=>a_}),s_={};s_.code_inline=function(e,t,n,r,i){let a=e[t];return`<code`+i.renderAttrs(a)+`>`+Gg(a.content)+`</code>`},s_.code_block=function(e,t,n,r,i){let a=e[t];return`<pre`+i.renderAttrs(a)+`><code>`+Gg(e[t].content)+`</code></pre>
|
|
87
|
-
`},s_.fence=function(e,t,n,r,i){let a=e[t],o=a.info?Bg(a.info).trim():``,s=``,c=``;if(o){let e=o.split(/(\s+)/g);s=e[0],c=e.slice(2).join(``)}let l;if(l=n.highlight&&n.highlight(a.content,s,c)||Gg(a.content),l.indexOf(`<pre`)===0)return l+`
|
|
88
|
-
`;if(o){let e=a.attrIndex(`class`),t=a.attrs?a.attrs.slice():[];e<0?t.push([`class`,n.langPrefix+s]):(t[e]=t[e].slice(),t[e][1]+=` `+n.langPrefix+s);let r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${i.renderAttrs(a)}>${l}</code></pre>\n`},s_.image=function(e,t,n,r,i){let a=e[t];return a.attrs[a.attrIndex(`alt`)][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},s_.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
89
|
-
`:`<br>
|
|
90
|
-
`},s_.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
91
|
-
`:`<br>
|
|
92
|
-
`:`
|
|
93
|
-
`},s_.text=function(e,t){return Gg(e[t].content)},s_.html_block=function(e,t){return e[t].content},s_.html_inline=function(e,t){return e[t].content};function c_(){this.rules=jg({},s_)}c_.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` `+Gg(e.attrs[t][0])+`="`+Gg(e.attrs[t][1])+`"`;return r},c_.prototype.renderToken=function(e,t,n){let r=e[t],i=``;if(r.hidden)return``;r.block&&r.nesting!==-1&&t&&e[t-1].hidden&&(i+=`
|
|
94
|
-
`),i+=(r.nesting===-1?`</`:`<`)+r.tag,i+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(i+=` /`);let a=!1;if(r.block&&(a=!0,r.nesting===1&&t+1<e.length)){let n=e[t+1];(n.type===`inline`||n.hidden||n.nesting===-1&&n.tag===r.tag)&&(a=!1)}return i+=a?`>
|
|
95
|
-
`:`>`,i},c_.prototype.renderInline=function(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r},c_.prototype.renderInlineAsText=function(e,t,n){let r=``;for(let i=0,a=e.length;i<a;i++)switch(e[i].type){case`text`:r+=e[i].content;break;case`image`:r+=this.renderInlineAsText(e[i].children,t,n);break;case`html_inline`:case`html_block`:r+=e[i].content;break;case`softbreak`:case`hardbreak`:r+=`
|
|
96
|
-
`;break;default:}return r},c_.prototype.render=function(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;o===`inline`?r+=this.renderInline(e[a].children,t,n):i[o]===void 0?r+=this.renderToken(e,a,t,n):r+=i[o](e,a,t,n,this)}return r};function l_(){this.__rules__=[],this.__cache__=null}l_.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},l_.prototype.__compile__=function(){let e=this,t=[``];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},l_.prototype.at=function(e,t,n){let r=this.__find__(e),i=n||{};if(r===-1)throw Error(`Parser rule not found: `+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},l_.prototype.before=function(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: `+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},l_.prototype.after=function(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: `+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},l_.prototype.push=function(e,t,n){let r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},l_.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name `+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},l_.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},l_.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name `+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},l_.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function u_(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content=``,this.markup=``,this.info=``,this.meta=null,this.block=!1,this.hidden=!1}u_.prototype.attrIndex=function(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},u_.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},u_.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},u_.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},u_.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+` `+t};function d_(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}d_.prototype.Token=u_;var f_=/\r\n?|\n/g,p_=/\0/g;function m_(e){let t;t=e.src.replace(f_,`
|
|
97
|
-
`),t=t.replace(p_,`�`),e.src=t}function h_(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function g_(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function __(e){return/^<a[>\s]/i.test(e)}function v_(e){return/^<\/a\s*>/i.test(e)}function y_(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!==`inline`||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,i=0;for(let a=r.length-1;a>=0;a--){let o=r[a];if(o.type===`link_close`){for(a--;r[a].level!==o.level&&r[a].type!==`link_open`;)a--;continue}if(o.type===`html_inline`&&(__(o.content)&&i>0&&i--,v_(o.content)&&i++),!(i>0)&&o.type===`text`&&e.md.linkify.test(o.content)){let i=o.content,s=e.md.linkify.match(i),c=[],l=o.level,u=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type===`text_special`&&(s=s.slice(1));for(let t=0;t<s.length;t++){let n=s[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let a=s[t].text;a=s[t].schema?s[t].schema===`mailto:`&&!/^mailto:/i.test(a)?e.md.normalizeLinkText(`mailto:`+a).replace(/^mailto:/,``):e.md.normalizeLinkText(a):e.md.normalizeLinkText(`http://`+a).replace(/^http:\/\//,``);let o=s[t].index;if(o>u){let t=new e.Token(`text`,``,0);t.content=i.slice(u,o),t.level=l,c.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=l++,d.markup=`linkify`,d.info=`auto`,c.push(d);let f=new e.Token(`text`,``,0);f.content=a,f.level=l,c.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--l,p.markup=`linkify`,p.info=`auto`,c.push(p),u=s[t].lastIndex}if(u<i.length){let t=new e.Token(`text`,``,0);t.content=i.slice(u),t.level=l,c.push(t)}t[n].children=r=Mg(r,a,c)}}}}var b_=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,x_=/\((c|tm|r)\)/i,S_=/\((c|tm|r)\)/gi,C_={c:`©`,r:`®`,tm:`™`};function w_(e,t){return C_[t.toLowerCase()]}function T_(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(S_,w_)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function E_(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&b_.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function D_(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(x_.test(e.tokens[t].content)&&T_(e.tokens[t].children),b_.test(e.tokens[t].content)&&E_(e.tokens[t].children))}var O_=/['"]/,k_=/['"]/g,A_=`’`;function j_(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function M_(e,t){let n=``,r=0;t.sort((e,t)=>e.pos-t.pos);for(let i=0;i<t.length;i++){let a=t[i];n+=e.slice(r,a.pos)+a.ch,r=a.pos+1}return n+e.slice(r)}function N_(e,t){let n,r=[],i={};for(let a=0;a<e.length;a++){let o=e[a],s=e[a].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,o.type!==`text`)continue;let c=o.content,l=0,u=c.length;OUTER:for(;l<u;){k_.lastIndex=l;let o=k_.exec(c);if(!o)break;let d=!0,f=!0;l=o.index+1;let p=o[0]===`'`,m=32;if(o.index-1>=0)m=c.charCodeAt(o.index-1);else for(n=a-1;n>=0&&!(e[n].type===`softbreak`||e[n].type===`hardbreak`);n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(l<u)h=c.charCodeAt(l);else for(n=a+1;n<e.length&&!(e[n].type===`softbreak`||e[n].type===`hardbreak`);n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}let g=Qg(m)||Zg(m),_=Qg(h)||Zg(h),v=Yg(m),y=Yg(h);if(y?d=!1:_&&(v||g||(d=!1)),v?f=!1:g&&(y||_||(f=!1)),h===34&&o[0]===`"`&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=_),!d&&!f){p&&j_(i,a,o.index,A_);continue}if(f)for(n=r.length-1;n>=0;n--){let e=r[n];if(r[n].level<s)break;if(e.single===p&&r[n].level===s){e=r[n];let s,c;p?(s=t.md.options.quotes[2],c=t.md.options.quotes[3]):(s=t.md.options.quotes[0],c=t.md.options.quotes[1]),j_(i,a,o.index,c),j_(i,e.token,e.pos,s),r.length=n;continue OUTER}}d?r.push({token:a,pos:o.index,single:p,level:s}):f&&p&&j_(i,a,o.index,A_)}}Object.keys(i).forEach(function(t){e[t].content=M_(e[t].content,i[t])})}function P_(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!O_.test(e.tokens[t].content)||N_(e.tokens[t].children,e)}function F_(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var I_=[[`normalize`,m_],[`block`,h_],[`inline`,g_],[`linkify`,y_],[`replacements`,D_],[`smartquotes`,P_],[`text_join`,F_]];function L_(){this.ruler=new l_;for(let e=0;e<I_.length;e++)this.ruler.push(I_[e][0],I_[e][1])}L_.prototype.process=function(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)},L_.prototype.State=d_;function R_(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType=`root`,this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,a=i.length,o=!1;t<a;t++){let s=i.charCodeAt(t);if(!o)if(Jg(s)){n++,s===9?r+=4-r%4:r++;continue}else o=!0;(s===10||t===a-1)&&(s!==10&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}R_.prototype.push=function(e,t,n){let r=new u_(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},R_.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},R_.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},R_.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&Jg(this.src.charCodeAt(e));e++);return e},R_.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!Jg(this.src.charCodeAt(--e)))return e+1;return e},R_.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},R_.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},R_.prototype.getLines=function(e,t,n,r){if(e>=t)return``;let i=Array(t-e);for(let a=0,o=e;o<t;o++,a++){let e=0,s=this.bMarks[o],c=s,l;for(l=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];c<l&&e<n;){let t=this.src.charCodeAt(c);if(Jg(t))t===9?e+=4-(e+this.bsCount[o])%4:e++;else if(c-s<this.tShift[o])e++;else break;c++}e>n?i[a]=Array(e-n+1).join(` `)+this.src.slice(c,l):i[a]=this.src.slice(c,l)}return i.join(``)},R_.prototype.Token=u_;var z_=65536;function B_(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function V_(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function H_(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!Jg(s)||o===45&&Jg(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!Jg(t))return!1;a++}let c=B_(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=B_(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=V_(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:`+u[t]]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=B_(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=V_(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>z_))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:`+u[t]]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}function U_(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
98
|
-
`,a.map=[t,e.line],!0}function W_(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function G_(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(Jg(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function K_(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!Jg(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function q_(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!Jg(e.src.charCodeAt(r))?-1:r}function J_(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!Jg(a))?-1:i}function Y_(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function X_(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=J_(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=q_(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){C=!0;break}if(C)break;if(d){if(p=J_(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=q_(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&Y_(e,h),!0}function Z_(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}else if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!Jg(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!Jg(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&Jg(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&Jg(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=$g(c.slice(1,l));return _?r?!0:(e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d}),e.line=o,!0):!1}var Q_=`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`.split(`.`),$_=RegExp(`^(?:<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),ev=RegExp(`^(?:<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>)`),tv=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(`+Q_.join(`|`)+`)(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(ev.source+`\\s*$`),/^$/,!1]];function nv(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<tv.length&&!tv[s][0].test(o);s++);if(s===tv.length)return!1;if(r)return tv[s][2];let c=t+1,l=tv[s][1].test(``);if(!tv[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),tv[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function rv(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!Jg(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&Jg(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h`+String(s),1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=t_(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h`+String(s),-1);return d.markup=`########`.slice(0,s),!0}function iv(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=i,!1;let c=t_(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h`+String(a),1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h`+String(a),-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function av(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=t_(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var ov=[[`table`,H_,[`paragraph`,`reference`]],[`code`,U_],[`fence`,W_,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,G_,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,K_,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,X_,[`paragraph`,`reference`,`blockquote`]],[`reference`,Z_],[`html_block`,nv,[`paragraph`,`reference`,`blockquote`]],[`heading`,rv,[`paragraph`,`reference`,`blockquote`]],[`lheading`,iv],[`paragraph`,av]];function sv(){this.ruler=new l_;for(let e=0;e<ov.length;e++)this.ruler.push(ov[e][0],ov[e][1],{alt:(ov[e][2]||[]).slice()})}sv.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}},sv.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},sv.prototype.State=R_;function cv(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=``,this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}cv.prototype.pushPending=function(){let e=new u_(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e},cv.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new u_(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},cv.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)==55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)==56320){let t=this.src.charCodeAt(e-2);i=(t&64512)==55296?65536+(t-55296<<10)+(i-56320):65533}else(i&64512)==55296&&(i=65533);let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32;if((s&64512)==55296){let e=this.src.charCodeAt(a+1);s=(e&64512)==56320?65536+(s-55296<<10)+(e-56320):65533}else(s&64512)==56320&&(s=65533);let c=Qg(i)||Zg(i),l=Qg(s)||Zg(s),u=Yg(i),d=Yg(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}},cv.prototype.Token=u_;function lv(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function uv(e,t){let n=e.pos;for(;n<e.posMax&&!lv(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var dv=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function fv(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=e.pending.match(dv);if(!i)return!1;let a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,l]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(s);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=s.length-a.length,!0}function pv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0);else e.push(`softbreak`,`br`,0);for(n++;n<i&&Jg(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var mv=[];for(let e=0;e<256;e++)mv.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){mv[e.charCodeAt(0)]=1});function hv(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),Jg(i));)n++;return e.pos=n,!0}if(i===32){if(!t){let t=e.push(`text_special`,``,0);t.content=`\\`,t.markup=`\\`,t.info=`escape`}return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);i<256&&mv[i]!==0?t.content=a:t.content=o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function gv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(r,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=r)return t||(e.pending+=a),e.pos+=o,!0;let s=n,c;for(;(c=e.src.indexOf("`",s))!==-1;){for(s=c+1;s<i&&e.src.charCodeAt(s)===96;)s++;let r=s-c;if(r===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a,t.content=e.src.slice(n,c).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=s,!0}e.backticks[r]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function _v(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function vv(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function yv(e){let t=e.tokens_meta,n=e.tokens_meta.length;vv(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&vv(e,t[r].delimiters)}var bv={tokenize:_v,postProcess:yv};function xv(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function Sv(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function Cv(e){let t=e.tokens_meta,n=e.tokens_meta.length;Sv(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Sv(e,t[r].delimiters)}var wv={tokenize:xv,postProcess:Cv};function Tv(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),!(!Jg(n)&&n!==10));m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),!(!Jg(n)&&n!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),!(!Jg(n)&&n!==10));m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),a=e.env.references[$g(r)],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];t.attrs=n,s&&n.push([`title`,s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function Ev(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),!(!Jg(n)&&n!==10));a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),!(!Jg(n)&&n!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),!(!Jg(n)&&n!==10));a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),o=e.env.references[$g(i)],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),i=[[`src`,u],[`alt`,``]];n.attrs=i,n.children=t,n.content=r,c&&i.push([`title`,c])}return e.pos=a,e.posMax=f,!0}var Dv=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Ov=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function kv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Ov.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(Dv.test(a)){let n=e.md.normalizeLink(`mailto:`+a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function Av(e){return/^<a[>\s]/i.test(e)}function jv(e){return/^<\/a\s*>/i.test(e)}function Mv(e){let t=e|32;return t>=97&&t<=122}function Nv(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Mv(i))return!1;let a=e.src.slice(r).match($_);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Av(t.content)&&e.linkLevel++,jv(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Pv=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Fv=/^&([a-z][a-z0-9]{1,31});/i;function Iv(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Pv);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=Ng(t)?Pg(t):Pg(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(Fv);if(r){let n=Tg(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function Lv(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function Rv(e){let t=e.tokens_meta,n=e.tokens_meta.length;Lv(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&Lv(t[e].delimiters)}function zv(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var Bv=[[`text`,uv],[`linkify`,fv],[`newline`,pv],[`escape`,hv],[`backticks`,gv],[`strikethrough`,bv.tokenize],[`emphasis`,wv.tokenize],[`link`,Tv],[`image`,Ev],[`autolink`,kv],[`html_inline`,Nv],[`entity`,Iv]],Vv=[[`balance_pairs`,Rv],[`strikethrough`,bv.postProcess],[`emphasis`,wv.postProcess],[`fragments_join`,zv]];function Hv(){this.ruler=new l_;for(let e=0;e<Bv.length;e++)this.ruler.push(Bv[e][0],Bv[e][1]);this.ruler2=new l_;for(let e=0;e<Vv.length;e++)this.ruler2.push(Vv[e][0],Vv[e][1])}Hv.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos},Hv.prototype.tokenize=function(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Hv.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)},Hv.prototype.State=cv;function Uv(e){let t={};e||={},t.src_Any=$h.source,t.src_Cc=eg.source,t.src_Z=ig.source,t.src_P=ng.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);let n=`[><|]`;return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function Wv(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function Gv(e){return Object.prototype.toString.call(e)}function Kv(e){return Gv(e)===`[object String]`}function qv(e){return Gv(e)===`[object Object]`}function Jv(e){return Gv(e)===`[object RegExp]`}function Yv(e){return Gv(e)===`[object Function]`}function Xv(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var Zv={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Qv(e){return Object.keys(e||{}).reduce(function(e,t){return e||Zv.hasOwnProperty(t)},!1)}var $v={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},ey=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,ty=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function ny(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function ry(){return function(e,t){t.normalize(e)}}function iy(e){let t=e.re=Uv(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(ey),n.push(t.src_xn),t.src_tlds=n.join(`|`);function r(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),`i`),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),`ig`),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),`i`),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),`ig`),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),`i`),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),`ig`),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),`i`);let i=[];e.__compiled__={};function a(e,t){throw Error(`(LinkifyIt) Invalid schema "${e}": ${t}`)}Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(n===null)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,qv(n)){Jv(n.validate)?r.validate=ny(n.validate):Yv(n.validate)?r.validate=n.validate:a(t,n),Yv(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=ry();return}if(Kv(n)){i.push(t);return}a(t,n)}),i.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:ry()};let o=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(Xv).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`ig`),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,`i`),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,`i`)}function ay(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}function oy(e,t){if(!(this instanceof oy))return new oy(e,t);t||Qv(e)&&(t=e,e={}),this.__opts__=Wv({},Zv,t),this.__schemas__=Wv({},$v,e),this.__compiled__={},this.__tlds__=ty,this.__tlds_replaced__=!1,this.re={},iy(this)}oy.prototype.add=function(e,t){return this.__schemas__[e]=t,iy(this),this},oy.prototype.set=function(e){return this.__opts__=Wv(this.__opts__,e),this},oy.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&e.indexOf(`@`)>=0&&e.match(this.re.email_fuzzy)!==null)},oy.prototype.pretest=function(e){return this.re.pretest.test(e)},oy.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},oy.prototype.match=function(e){let t=[],n=[],r=[],i=[],a,o,s;function c(e,t){return e?t?e.index===t.index?e.lastIndex>=t.lastIndex?e:t:e.index<t.index?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;(a=s.exec(e))!==null;)o=this.testSchemaAt(e,a[2],s.lastIndex),o&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__[`http:`])for(s=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)r.push({schema:``,index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`])for(s=this.re.email_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)i.push({schema:`mailto:`,index:a.index+a[1].length,lastIndex:a.index+a[0].length});let l=[0,0,0],u=0;for(;;){let a=[n[l[0]],i[l[1]],r[l[2]]],o=c(c(a[0],a[1]),a[2]);if(!o)break;if(o===a[0]?l[0]++:o===a[1]?l[1]++:l[2]++,o.index<u)continue;let s=new ay(e,o.schema,o.index,o.lastIndex);this.__compiled__[s.schema].normalize(s,this),t.push(s),u=o.lastIndex}return t.length?t:null},oy.prototype.matchAtStart=function(e){if(!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new ay(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},oy.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),iy(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,iy(this),this)},oy.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)},oy.prototype.onCompile=function(){};var sy=2147483647,cy=36,ly=1,uy=26,dy=38,fy=700,py=72,my=128,hy=`-`,gy=/^xn--/,_y=/[^\0-\x7F]/,vy=/[\x2E\u3002\uFF0E\uFF61]/g,yy={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},by=cy-ly,xy=Math.floor,Sy=String.fromCharCode;function Cy(e){throw RangeError(yy[e])}function wy(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Ty(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(vy,`.`);let i=wy(e.split(`.`),t).join(`.`);return r+i}function Ey(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var Dy=e=>String.fromCodePoint(...e),Oy=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:cy},ky=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ay=function(e,t,n){let r=0;for(e=n?xy(e/fy):e>>1,e+=xy(e/t);e>455;r+=cy)e=xy(e/by);return xy(r+36*e/(e+dy))},jy=function(e){let t=[],n=e.length,r=0,i=my,a=py,o=e.lastIndexOf(hy);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&Cy(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=cy;;i+=cy){s>=n&&Cy(`invalid-input`);let o=Oy(e.charCodeAt(s++));o>=cy&&Cy(`invalid-input`),o>xy((sy-r)/t)&&Cy(`overflow`),r+=o*t;let c=i<=a?ly:i>=a+uy?uy:i-a;if(o<c)break;let l=cy-c;t>xy(sy/l)&&Cy(`overflow`),t*=l}let c=t.length+1;a=Ay(r-o,c,o==0),xy(r/c)>sy-i&&Cy(`overflow`),i+=xy(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},My=function(e){let t=[];e=Ey(e);let n=e.length,r=my,i=0,a=py;for(let n of e)n<128&&t.push(Sy(n));let o=t.length,s=o;for(o&&t.push(hy);s<n;){let n=sy;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>xy((sy-i)/c)&&Cy(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>sy&&Cy(`overflow`),n===r){let e=i;for(let n=cy;;n+=cy){let r=n<=a?ly:n>=a+uy?uy:n-a;if(e<r)break;let i=e-r,o=cy-r;t.push(Sy(ky(r+i%o,0))),e=xy(i/o)}t.push(Sy(ky(e,0))),a=Ay(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},Ny={version:`2.3.1`,ucs2:{decode:Ey,encode:Dy},decode:jy,encode:My,toASCII:function(e){return Ty(e,function(e){return _y.test(e)?`xn--`+My(e):e})},toUnicode:function(e){return Ty(e,function(e){return gy.test(e)?jy(e.slice(4).toLowerCase()):e})}},Py={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},Fy=/^(vbscript|javascript|file|data):/,Iy=/^data:image\/(gif|png|jpeg|webp);/;function Ly(e){let t=e.trim().toLowerCase();return!Fy.test(t)||Iy.test(t)}var Ry=[`http:`,`https:`,`mailto:`];function zy(e){let t=Zh(e,!0);if(t.hostname&&(!t.protocol||Ry.indexOf(t.protocol)>=0))try{t.hostname=Ny.toASCII(t.hostname)}catch{}return Rh(zh(t))}function By(e){let t=Zh(e,!0);if(t.hostname&&(!t.protocol||Ry.indexOf(t.protocol)>=0))try{t.hostname=Ny.toUnicode(t.hostname)}catch{}return Fh(zh(t),Fh.defaultChars+`%`)}function Vy(e,t){if(!(this instanceof Vy))return new Vy(e,t);t||Og(e)||(t=e||{},e=`default`),this.inline=new Hv,this.block=new sv,this.core=new L_,this.renderer=new c_,this.linkify=new oy,this.validateLink=Ly,this.normalizeLink=zy,this.normalizeLinkText=By,this.utils=Eg,this.helpers=jg({},o_),this.options={},this.configure(e),t&&this.set(t)}Vy.prototype.set=function(e){return jg(this.options,e),this},Vy.prototype.configure=function(e){let t=this;if(Og(e)){let t=e;if(e=Py[t],!e)throw Error('Wrong `markdown-it` preset "'+t+`", check name`)}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Vy.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): `+r);return this},Vy.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): `+r);return this},Vy.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Vy.prototype.parse=function(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Vy.prototype.render=function(e,t){return t||={},this.renderer.render(this.parse(e,t),this.options,t)},Vy.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Vy.prototype.renderInline=function(e,t){return t||={},this.renderer.render(this.parseInline(e,t),this.options,t)};for(var Hy={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},Uy={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},Wy=typeof navigator<`u`&&/Mac/.test(navigator.platform),Gy=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ky=0;Ky<10;Ky++)Hy[48+Ky]=Hy[96+Ky]=String(Ky);for(var Ky=1;Ky<=24;Ky++)Hy[Ky+111]=`F`+Ky;for(var Ky=65;Ky<=90;Ky++)Hy[Ky]=String.fromCharCode(Ky+32),Uy[Ky]=String.fromCharCode(Ky);for(var qy in Hy)Uy.hasOwnProperty(qy)||(Uy[qy]=Hy[qy]);function Jy(e){var t=!(Wy&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Gy&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Uy:Hy)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}function Yy(e){this.content=e}Yy.prototype={constructor:Yy,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Yy(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Yy(n)},addToStart:function(e,t){return new Yy([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Yy(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Yy(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Yy.from(e),e.size?new Yy(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Yy.from(e),e.size?new Yy(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Yy.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Yy.from=function(e){if(e instanceof Yy)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Yy(t)};function Xy(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&$y(e.charCodeAt(r-1))&&Qy(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=Xy(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Zy(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&$y(e.charCodeAt(i-1))&&Qy(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=Zy(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}function Qy(e){return e>=56320&&e<57344}function $y(e){return e>=55296&&e<56320}var Z=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Xy(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Zy(this,e,t,n)}findIndex(e){if(e==0)return tb(0,e);if(e==this.size)return tb(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?tb(t+1,i):tb(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};Z.empty=new Z([],0);var eb={index:0,offset:0};function tb(e,t){return eb.index=e,eb.offset=t,eb}function nb(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!nb(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!nb(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var rb=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&nb(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};rb.none=[];var ib=class extends Error{},Q=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=ob(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ab(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(Z.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};Q.empty=new Q(Z.empty,0,0);function ab(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ab(a.content,t-i-1,n-i-1)))}function ob(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=ob(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function sb(e,t,n){if(n.openStart>e.depth)throw new ib(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ib(`Inconsistent open depths`);return cb(e,t,n,0)}function cb(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=cb(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return pb(a,hb(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return pb(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=gb(n,e);return pb(a,mb(e,i,o,t,r))}}function lb(e,t){if(!t.type.compatibleContent(e.type))throw new ib(`Cannot join `+t.type.name+` onto `+e.type.name)}function ub(e,t,n){let r=e.node(n);return lb(r,t.node(n)),r}function db(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function fb(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(db(e.nodeAfter,r),a++));for(let e=a;e<o;e++)db(i.child(e),r);t&&t.depth==n&&t.textOffset&&db(t.nodeBefore,r)}function pb(e,t){if(!e.type.validContent(t))throw new ib(`Invalid content for node `+e.type.name);return e.copy(t)}function mb(e,t,n,r,i){let a=e.depth>i&&ub(e,t,i+1),o=r.depth>i&&ub(n,r,i+1),s=[];return fb(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(lb(a,o),db(pb(a,mb(e,t,n,r,i+1)),s)):(a&&db(pb(a,hb(e,t,i+1)),s),fb(t,n,i,s),o&&db(pb(o,hb(n,r,i+1)),s)),fb(r,null,i,s),new Z(s)}function hb(e,t,n){let r=[];return fb(null,e,n,r),e.depth>n&&db(pb(ub(e,t,n+1),hb(e,t,n+1)),r),fb(t,null,n,r),new Z(r)}function gb(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(Z.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var _b=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return rb.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new xb(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=bb.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else bb.set(t,r=new vb);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%yb,i}},vb=class{constructor(){this.elts=[],this.i=0}},yb=12,bb=new WeakMap,xb=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Sb=Object.create(null),Cb=class e{constructor(e,t,n,r=rb.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Z.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&nb(this.attrs,t||e.defaultAttrs||Sb)&&rb.sameSet(this.marks,n||rb.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Q.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new Q(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return sb(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return _b.resolveCached(this,e)}resolveNoCache(e){return _b.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Tb(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=Z.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=rb.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!rb.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=Z.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};Cb.prototype.text=void 0;var wb=class e extends Cb{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Tb(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Tb(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var Eb=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Db(t,n);if(r.next==null)return e.empty;let i=Ob(r);r.next&&r.err(`Unexpected trailing text`);let a=Rb(Fb(i));return zb(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return Z.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
99
|
-
`)}};Eb.empty=new Eb(!0);var Db=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function Ob(e){let t=[];do t.push(kb(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function kb(e){let t=[];do t.push(Ab(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Ab(e){let t=Pb(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=Mb(e,t);else break;return t}function jb(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function Mb(e,t){let n=jb(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:jb(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function Nb(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function Pb(e){if(e.eat(`(`)){let t=Ob(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=Nb(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function Fb(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function Ib(e,t){return t-e}function Lb(e,t){let n=[];return r(t),n.sort(Ib);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Rb(e){let t=Object.create(null);return n(Lb(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Lb(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new Eb(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Ib);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function zb(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Bb(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Vb(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function Hb(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}function Ub(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Kb(e,r,t[r]);return n}var Wb=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=Ub(e,n.attrs),this.defaultAttrs=Bb(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Eb.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Vb(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new Cb(this,this.computeAttrs(e),Z.from(t),rb.setFrom(n))}createChecked(e=null,t,n){return t=Z.from(t),this.checkContent(t),new Cb(this,this.computeAttrs(e),t,rb.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=Z.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(Z.empty,!0);return i?new Cb(this,e,t.append(i),rb.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Hb(this.attrs,e,`node`,this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:rb.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function Gb(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Kb=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?Gb(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},qb=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Ub(e,r.attrs),this.excluded=null;let i=Bb(this.attrs);this.instance=i?new rb(this,i):null}create(e=null){return!e&&this.instance?this.instance:new rb(this,Vb(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Hb(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},Jb=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Yy.from(e.nodes),t.marks=Yy.from(e.marks||{}),this.nodes=Wb.compile(this.spec.nodes,this),this.marks=qb.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=Eb.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Yb(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Yb(this,n.split(` `))}this.nodeFromJSON=e=>Cb.fromJSON(this,e),this.markFromJSON=e=>rb.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof Wb))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new wb(n,n.defaultAttrs,e,rb.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function Yb(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Xb(e){return e.tag!=null}function Zb(e){return e.style!=null}var Qb=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Xb(e))this.tags.push(e);else if(Zb(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new sx(this,t,!1);return n.addAll(e,rb.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new sx(this,t,!0);return n.addAll(e,rb.none,t.from,t.to),Q.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(lx(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=ux(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=ux(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},$b={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ex={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tx={ol:!0,ul:!0},nx=1,rx=2,ix=4;function ax(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?nx:0)|(t===`full`?rx:0)}var ox=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=rb.none,this.match=i||(a&ix?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Z.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&nx)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=Z.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Z.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!$b.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},sx=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=ax(null,t.preserveWhitespace,0)|(n?ix:0);i=r?new ox(r.type,r.attrs,rb.none,!0,t.topMatch||r.type.contentMatch,a):n?new ox(null,null,rb.none,!0,null,a):new ox(e.schema.topNodeType,null,rb.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&rx?`full`:this.localPreserveWS||(r.options&nx)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
100
|
-
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;tx.hasOwnProperty(a)&&this.parser.normalizeLists&&cx(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:ex.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if($b.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
101
|
-
`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=rb.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):dx(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=ax(e,i,a.options);a.options&ix&&a.content.length==0&&(o|=ix);let s=rb.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):dx(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new ox(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=nx);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function cx(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&tx.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function lx(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ux(e){let t={};for(let n in e)t[n]=e[n];return t}function dx(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var fx=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=mx(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return mx(t).createTextNode(e.text);let{dom:n,contentDOM:r}=vx(mx(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&vx(mx(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:vx(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=px(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return px(e.marks)}};function px(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function mx(e){return e.document||window.document}var hx=new WeakMap;function gx(e){let t=hx.get(e);return t===void 0&&hx.set(e,t=_x(e)),t}function _x(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function vx(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=gx(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=vx(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var yx=65535,bx=2**16;function xx(e,t){return e+t*bx}function Sx(e){return e&yx}function Cx(e){return(e-(e&yx))/bx}var wx=1,Tx=2,Ex=4,Dx=8,Ox=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Dx)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&Ex)>0}},kx=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=Sx(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+Cx(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:xx(o/3,e-s),f=e==s?Tx:e==u?wx:Ex;return(t<0?e!=s:e!=u)&&(f|=Dx),new Ox(a,f,d)}r+=l-c}return n?e+r:new Ox(e+r,0,null)}touches(e,t){let n=0,r=Sx(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};kx.empty=new kx([]);var Ax=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Ox(e,r,null)}},jx=Object.create(null),Mx=class{getMap(){return kx.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=jx[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in jx)throw RangeError(`Duplicate use of step JSON ID `+e);return jx[e]=t,t.prototype.jsonID=e,t}},Nx=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof ib)return e.fail(t.message);throw t}}};function Px(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(Px(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return Z.fromArray(r)}var Fx=class e extends Mx{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new Q(Px(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return Nx.fromReplace(e,this.from,this.to,i)}invert(){return new Ix(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Mx.jsonID(`addMark`,Fx);var Ix=class e extends Mx{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Q(Px(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return Nx.fromReplace(e,this.from,this.to,n)}invert(){return new Fx(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Mx.jsonID(`removeMark`,Ix);var Lx=class e extends Mx{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Nx.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Nx.fromReplace(e,this.pos,this.pos+1,new Q(Z.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new Rx(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Mx.jsonID(`addNodeMark`,Lx);var Rx=class e extends Mx{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Nx.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Nx.fromReplace(e,this.pos,this.pos+1,new Q(Z.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Lx(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Mx.jsonID(`removeNodeMark`,Rx);var zx=class e extends Mx{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Vx(e,this.from,this.to)?Nx.fail(`Structure replace would overwrite content`):Nx.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new kx([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Q.empty:new Q(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Q.empty:new Q(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,Q.fromJSON(t,n.slice),!!n.structure)}};zx.MAP_BIAS=1,Mx.jsonID(`replace`,zx);var Bx=class e extends Mx{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(Vx(e,this.from,this.gapFrom)||Vx(e,this.gapTo,this.to)))return Nx.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Nx.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?Nx.fromReplace(e,this.from,this.to,n):Nx.fail(`Content does not fit in gap`)}getMap(){return new kx([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,Q.fromJSON(t,n.slice),n.insert,!!n.structure)}};Mx.jsonID(`replaceAround`,Bx);function Vx(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function Hx(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new Ix(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new Fx(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function Ux(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof qb){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new Ix(t.from,t.to,t.style)))}function Wx(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new zx(s,l,Q.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new Ix(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new Q(Z.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new zx(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(Z.empty,!0);e.replace(s,s,new Q(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function Gx(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Kx(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!Gx(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function qx(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=Z.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=Z.from(r.node(e).copy(u)),d++):c--;let f=Z.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=Z.from(i.node(e).copy(f)),p++):l++;e.step(new Bx(c,l,o,s,new Q(u.append(f),d,p),u.size-d,!0))}function Jx(e,t,n=null,r=e){let i=Xx(e,t),a=i&&Zx(r,t);return a?i.map(Yx).concat({type:t,attrs:n}).concat(a.map(Yx)):null}function Yx(e){return{type:e,attrs:null}}function Xx(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function Zx(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function Qx(e,t,n){let r=Z.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=Z.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new Bx(i,a,i,a,new Q(r,0,0),n.length,!0))}function $x(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&nS(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&tS(e,t,n,a),Wx(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new Bx(c,l,c+1,l-1,new Q(Z.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&eS(e,t,n,a),!1}})}function eS(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function tS(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
102
|
-
`))}})}function nS(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function rS(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new Bx(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new Q(Z.from(o),0,0),1,!0))}function iS(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function aS(e,t,n=1,r){let i=e.doc.resolve(t),a=Z.empty,o=Z.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=Z.from(i.node(e).copy(a));let t=r&&r[s];o=Z.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new zx(t,t,new Q(a.append(o),n,n),!0))}function oS(e,t){let n=e.resolve(t),r=n.index();return cS(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function sS(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function cS(e,t){return!!(e&&t&&!e.isLeaf&&sS(e,t))}function lS(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&cS(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function uS(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);tS(e,r.node(),r.before(),s)}o.inlineContent&&Wx(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new zx(l,c.map(t+n,-1),Q.empty,!0)),r===!0){let t=e.doc.resolve(l);eS(e,t.node(),t.before(),e.steps.length)}return e}function dS(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function fS(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function pS(e,t,n=t,r=Q.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return mS(i,a,r)?new zx(t,n,r):new hS(i,a,r).fit()}function mS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var hS=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Z.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=Z.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new Q(i,a,o);return e>-1?new Bx(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new zx(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=vS(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(Z.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=vS(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new Q(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=vS(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new Q(gS(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Q(gS(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(yS(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=_S(this.placed,t,Z.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?Q.empty:new Q(gS(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new Q(gS(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!bS(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=bS(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=bS(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=_S(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=_S(this.placed,this.depth,Z.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Z.empty,!0);e.childCount&&(this.placed=_S(this.placed,this.frontier.length,e))}};function gS(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(gS(e.firstChild.content,t-1,n)))}function _S(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(_S(e.lastChild.content,t-1,n)))}function vS(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function yS(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,yS(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Z.empty,!0)))),e.copy(r)}function bS(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!xS(n,a.content,o)?s:null}function xS(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function SS(e){return e.spec.defining||e.spec.definingForContent}function CS(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(mS(i,a,r))return e.step(new zx(t,n,r));let o=DS(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=SS(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new Q(wS(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function wS(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(wS(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Z.empty,!0))}return e}function TS(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=dS(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Q(Z.from(r),0,0))}function ES(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),o=!1;for(let e=r.depth;e>a;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>a;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let a=DS(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function DS(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var OS=class e extends Mx{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return Nx.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return Nx.fromReplace(e,this.pos,this.pos+1,new Q(Z.from(r),0,+!t.isLeaf))}getMap(){return kx.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};Mx.jsonID(`attr`,OS);var kS=class e extends Mx{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return Nx.ok(n)}getMap(){return kx.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};Mx.jsonID(`docAttr`,kS);var AS=class extends Error{};AS=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},AS.prototype=Object.create(Error.prototype),AS.prototype.constructor=AS,AS.prototype.name=`TransformError`;var jS=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ax}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new AS(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=Q.empty){let r=pS(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new Q(Z.from(n),0,0))}delete(e,t){return this.replace(e,t,Q.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return CS(this,e,t,n),this}replaceRangeWith(e,t,n){return TS(this,e,t,n),this}deleteRange(e,t){return ES(this,e,t),this}lift(e,t){return qx(this,e,t),this}join(e,t=1){return uS(this,e,t),this}wrap(e,t){return Qx(this,e,t),this}setBlockType(e,t=e,n,r=null){return $x(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return rS(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new OS(e,t,n)),this}setDocAttribute(e,t){return this.step(new kS(e,t)),this}addNodeMark(e,t){return this.step(new Lx(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof rb)t.isInSet(n.marks)&&this.step(new Rx(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new Rx(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return aS(this,e,t,n),this}addMark(e,t,n){return Hx(this,e,t,n),this}removeMark(e,t,n){return Ux(this,e,t,n),this}clearIncompatible(e,t,n){return Wx(this,e,t,n),this}},MS=Object.create(null),NS=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new PS(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Q.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?Q.empty:t),o==0&&US(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),US(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new LS(e):HS(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?HS(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):HS(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new BS(e.node(0))}static atStart(e){return HS(e,e,0,0,1)||new BS(e)}static atEnd(e){return HS(e,e,e.content.size,e.childCount,-1)||new BS(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=MS[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in MS)throw RangeError(`Duplicate use of selection JSON ID `+e);return MS[e]=t,t.prototype.jsonID=e,t}getBookmark(){return LS.between(this.$anchor,this.$head).getBookmark()}};NS.prototype.visible=!0;var PS=class{constructor(e,t){this.$from=e,this.$to=t}},FS=!1;function IS(e){!FS&&!e.parent.inlineContent&&(FS=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var LS=class e extends NS{constructor(e,t=e){IS(e),IS(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return NS.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=Q.empty){if(super.replace(e,t),t==Q.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new RS(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=NS.findFrom(n,r,!0)||NS.findFrom(n,-r,!0);if(e)n=e.$head;else return NS.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(NS.findFrom(t,-r,!0)||NS.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};NS.jsonID(`text`,LS);var RS=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return LS.between(e.resolve(this.anchor),e.resolve(this.head))}},$=class e extends NS{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?NS.near(a):new e(a)}content(){return new Q(Z.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new zS(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};$.prototype.visible=!1,NS.jsonID(`node`,$);var zS=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new RS(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&$.isSelectable(n)?new $(t):NS.near(t)}},BS=class e extends NS{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Q.empty){if(t==Q.empty){e.delete(0,e.doc.content.size);let t=NS.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return VS}};NS.jsonID(`all`,BS);var VS={map(){return this},resolve(e){return new BS(e)}};function HS(e,t,n,r,i,a=!1){if(t.inlineContent)return LS.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=HS(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&$.isSelectable(r))return $.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function US(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof zx||i instanceof Bx))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(NS.near(e.doc.resolve(o),n))}var WS=1,GS=2,KS=4,qS=class extends jS{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|WS)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&WS)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=GS,this}ensureMarks(e){return rb.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&GS)>0}addStep(e,t){super.addStep(e,t),this.updated&=-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||rb.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(NS.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=KS,this}get scrolledIntoView(){return(this.updated&KS)>0}};function JS(e,t){return!t||!e?e:e.bind(t)}var YS=class{constructor(e,t,n){this.name=e,this.init=JS(t.init,n),this.apply=JS(t.apply,n)}},XS=[new YS(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new YS(`selection`,{init(e,t){return e.selection||NS.atStart(t.doc)},apply(e){return e.selection}}),new YS(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new YS(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],ZS=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=XS.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new YS(e.key,e.spec.state,e))})}},QS=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new qS(this)}static create(t){let n=new ZS(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new ZS(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new ZS(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=Cb.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=NS.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function $S(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=$S(i,t,{})),n[r]=i}return n}var eC=class{constructor(e){this.spec=e,this.props={},e.props&&$S(e.props,this,this.props),this.key=e.key?e.key.key:nC(`plugin`)}getState(e){return e[this.key]}},tC=Object.create(null);function nC(e){return e in tC?e+`$`+ ++tC[e]:(tC[e]=0,e+`$`)}var rC=class{constructor(e=`key`){this.key=nC(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},iC=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),aC=typeof navigator<`u`&&/Win/.test(navigator.platform);function oC(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))iC?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function sC(e){let t=Object.create(null);for(let n in e)t[oC(n)]=e[n];return t}function cC(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function lC(e){return new eC({props:{handleKeyDown:uC(e)}})}function uC(e){let t=sC(e);return function(e,n){let r=Jy(n),i,a=t[cC(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[cC(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(aC&&n.ctrlKey&&n.altKey)&&(i=Hy[n.keyCode])&&i!=r){let r=t[cC(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}var dC=200,fC=function(){};fC.prototype.append=function(e){return e.length?(e=fC.from(e),!this.length&&e||e.length<dC&&this.leafAppend(e)||this.length<dC&&e.leafPrepend(this)||this.appendInner(e)):this},fC.prototype.prepend=function(e){return e.length?fC.from(e).append(this):this},fC.prototype.appendInner=function(e){return new mC(this,e)},fC.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?fC.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},fC.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},fC.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},fC.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},fC.from=function(e){return e instanceof fC?e:e&&e.length?new pC(e):fC.empty};var pC=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=dC)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=dC)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(fC);fC.empty=new pC([]);var mC=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(fC),hC=500,gC=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new vC(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new vC(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new vC(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>bC&&(s=_C(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Ax;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new vC(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new vC(i,o,l))}else r.push(new vC(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new vC(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>hC&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new vC(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(fC.from(i.reverse()),a)}};gC.empty=new gC(fC.empty,0);function _C(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var vC=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},yC=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},bC=20;function xC(e,t,n,r){let i=n.getMeta(kC),a;if(i)return i.historyState;n.getMeta(AC)&&(e=new yC(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(kC))return o.getMeta(kC).redo?new yC(e.done.addTransform(n,void 0,r,OC(t)),e.undone,CC(n.mapping.maps),e.prevTime,e.prevComposition):new yC(e.done,e.undone.addTransform(n,void 0,r,OC(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!SC(n,e.prevRanges)),s=o?wC(e.prevRanges,n.mapping):CC(n.mapping.maps);return new yC(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,OC(t)),gC.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new yC(e.done.rebased(n,a),e.undone.rebased(n,a),wC(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new yC(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),wC(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function SC(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function CC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function wC(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function TC(e,t,n){let r=OC(t),i=kC.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new yC(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(kC,{redo:n,historyState:c})}var EC=!1,DC=null;function OC(e){let t=e.plugins;if(DC!=t){EC=!1,DC=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){EC=!0;break}}return EC}var kC=new rC(`history`),AC=new rC(`closeHistory`);function jC(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new eC({key:kC,state:{init(){return new yC(gC.empty,gC.empty,null,0,-1)},apply(t,n,r){return xC(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?NC:n==`historyRedo`?PC:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function MC(e,t){return(n,r)=>{let i=kC.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=TC(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var NC=MC(!1,!0),PC=MC(!0,!0),FC=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function IC(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var LC=(e,t,n)=>{let r=IC(e,n);if(!r)return!1;let i=BC(r);if(!i){let n=r.blockRange(),i=n&&Kx(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(iw(e,i,t,-1))return!0;if(r.parent.content.size==0&&(RC(a,`end`)||$.isSelectable(a)))for(let n=r.depth;;n--){let o=pS(e.doc,r.before(n),r.after(n),Q.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(RC(a,`end`)?NS.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):$.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1};function RC(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var zC=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=BC(r)}let o=a&&a.nodeBefore;return!o||!$.isSelectable(o)?!1:(t&&t(e.tr.setSelection($.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function BC(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function VC(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var HC=(e,t,n)=>{let r=VC(e,n);if(!r)return!1;let i=WC(r);if(!i)return!1;let a=i.nodeAfter;if(iw(e,i,t,1))return!0;if(r.parent.content.size==0&&(RC(a,`start`)||$.isSelectable(a))){let n=pS(e.doc,r.before(),r.after(),Q.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(RC(a,`start`)?NS.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):$.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},UC=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=WC(r)}let o=a&&a.nodeAfter;return!o||!$.isSelectable(o)?!1:(t&&t(e.tr.setSelection($.create(e.doc,a.pos)).scrollIntoView()),!0)};function WC(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var GC=(e,t)=>{let n=e.selection,r=n instanceof $,i;if(r){if(n.node.isTextblock||!oS(e.doc,n.from))return!1;i=n.from}else if(i=lS(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection($.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},KC=(e,t)=>{let n=e.selection,r;if(n instanceof $){if(n.node.isTextblock||!oS(e.doc,n.to))return!1;r=n.to}else if(r=lS(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},qC=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&Kx(i);return a==null?!1:(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},JC=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
103
|
-
`).scrollIntoView()),!0)};function YC(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var XC=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=YC(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(NS.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},ZC=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof BS||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=YC(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(LS.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},QC=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(iS(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Kx(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function $C(e){return(t,n)=>{if(t.selection instanceof $&&t.selection.node.isBlock){let{$from:e}=t.selection;return!e.parentOffset||!iS(t.doc,e.pos)?!1:(n&&n(t.tr.split(e.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let r=t.tr;!t.selection.empty&&(t.selection instanceof LS||t.selection instanceof BS)&&r.deleteSelection();let{$from:i}=r.selection,a=r.steps.length,o=[],s,c,l=!1,u=!1;for(let t=i.depth;;t--)if(i.node(t).isBlock){l=i.end(t)==i.pos+(i.depth-t),u=i.start(t)==i.pos-(i.depth-t),c=YC(i.node(t-1).contentMatchAt(i.indexAfter(t-1)));let n=e&&e(i.parent,l,i);o.unshift(n||(l&&c?{type:c}:null)),s=t;break}else{if(t==1)return!1;o.unshift(null)}let d=i.pos,f=iS(r.doc,d,o.length,o);if(f||=(o[0]=c?{type:c}:null,iS(r.doc,d,o.length,o)),!f)return!1;if(r.split(d,o.length,o),!l&&u&&i.node(s).type!=c){let e=r.mapping.slice(a),t=e.map(i.before(s)),n=r.doc.resolve(t);c&&i.node(s-1).canReplaceWith(n.index(),n.index()+1,c)&&r.setNodeMarkup(e.map(i.before(s)),c)}return n&&n(r.scrollIntoView()),!0}}var ew=$C(),tw=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a==0?!1:(i=n.before(a),t&&t(e.tr.setSelection($.create(e.doc,i))),!0)},nw=(e,t)=>(t&&t(e.tr.setSelection(new BS(e.doc))),!0);function rw(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||oS(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function iw(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&rw(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=Z.empty;for(let e=o.length-1;e>=0;e--)s=Z.from(o[e].create(null,s));s=Z.from(i.copy(s));let c=e.tr.step(new Bx(t.pos-1,r,t.pos,r,new Q(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&oS(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:NS.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&Kx(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&RC(a,`start`,!0)&&RC(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=Z.empty;for(let e=o.length-1;e>=0;e--)r=Z.from(o[e].copy(r));n(e.tr.step(new Bx(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new Q(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function aw(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(LS.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var ow=aw(-1),sw=aw(1);function cw(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a),s=o&&Jx(o,e,t);return s?(r&&r(n.tr.wrap(o,s).scrollIntoView()),!0):!1}}function lw(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}}function uw(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:a,$to:o}=t[i],s=a.depth==0&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(a.pos,o.pos,(e,t)=>{if(s||!r&&e.isAtom&&e.isInline&&t>=a.pos&&t+e.nodeSize<=o.pos)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)}),s)return!0}return!1}function dw(e){let t=[];for(let n=0;n<e.length;n++){let{$from:r,$to:i}=e[n];r.doc.nodesBetween(r.pos,i.pos,(e,n)=>{if(e.isAtom&&e.content.size&&e.isInline&&n>=r.pos&&n+e.nodeSize<=i.pos)return n+1>r.pos&&t.push(new PS(r,r.doc.resolve(n+1))),r=r.doc.resolve(n+1+e.content.size),!1}),r.pos<i.pos&&t.push(new PS(r,i))}return t}function fw(e,t=null,n){let r=(n&&n.removeWhenPresent)!==!1,i=(n&&n.enterInlineAtoms)!==!1,a=!(n&&n.includeWhitespace);return function(n,o){let{empty:s,$cursor:c,ranges:l}=n.selection;if(s&&!c||!uw(n.doc,l,e,i))return!1;if(o)if(c)e.isInSet(n.storedMarks||c.marks())?o(n.tr.removeStoredMark(e)):o(n.tr.addStoredMark(e.create(t)));else{let s,c=n.tr;i||(l=dw(l)),s=r?!l.some(t=>n.doc.rangeHasMark(t.$from.pos,t.$to.pos,e)):!l.every(t=>{let n=!1;return c.doc.nodesBetween(t.$from.pos,t.$to.pos,(r,i,a)=>{if(n)return!1;n=!e.isInSet(r.marks)&&!!a&&a.type.allowsMarkType(e)&&!(r.isText&&/^\s*$/.test(r.textBetween(Math.max(0,t.$from.pos-i),Math.min(r.nodeSize,t.$to.pos-i))))}),!n});for(let n=0;n<l.length;n++){let{$from:r,$to:i}=l[n];if(!s)c.removeMark(r.pos,i.pos,e);else{let n=r.pos,o=i.pos,s=r.nodeAfter,l=i.nodeBefore,u=a&&s&&s.isText?/^\s*/.exec(s.text)[0].length:0,d=a&&l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+u<o&&(n+=u,o-=d),c.addMark(n,o,e.create(t))}}o(c.scrollIntoView())}return!0}}function pw(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var mw=pw(FC,LC,zC),hw=pw(FC,HC,UC),gw={Enter:pw(JC,ZC,QC,ew),"Mod-Enter":XC,Backspace:mw,"Mod-Backspace":mw,"Shift-Backspace":mw,Delete:hw,"Mod-Delete":hw,"Mod-a":nw},_w={"Ctrl-h":gw.Backspace,"Alt-Backspace":gw[`Mod-Backspace`],"Ctrl-d":gw.Delete,"Ctrl-Alt-Backspace":gw[`Mod-Delete`],"Alt-Delete":gw[`Mod-Delete`],"Alt-d":gw[`Mod-Delete`],"Ctrl-a":ow,"Ctrl-e":sw};for(let e in gw)_w[e]=gw[e];var vw=(typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform()==`darwin`)?_w:gw;function yw(e={}){return new eC({view(t){return new bw(t,e)}})}var bw=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(!t||i)return null;let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=fS(this.editorView.state.doc,a,this.editorView.dragging.slice);e!=null&&(a=e)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);t!=null&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},xw=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Sw=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Cw=null,ww=function(e,t,n){let r=Cw||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Tw=function(){Cw=null},Ew=function(e,t,n,r){return n&&(Ow(e,t,n,r,-1)||Ow(e,t,n,r,1))},Dw=/^(img|br|input|textarea|hr)$/i;function Ow(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:kw(e))){let n=e.parentNode;if(!n||n.nodeType!=1||Nw(e)||Dw.test(e.nodeName)||e.contentEditable==`false`)return!1;t=xw(e)+(i<0?0:1),e=n}else if(e.nodeType==1){let n=e.childNodes[t+(i<0?-1:0)];if(n.nodeType==1&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?kw(e):0}else return!1}}function kw(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Aw(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=kw(e)}else if(e.parentNode&&!Nw(e))t=xw(e),e=e.parentNode;else return null}}function jw(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Nw(e))t=xw(e)+1,e=e.parentNode;else return null}}function Mw(e,t,n){for(let r=t==0,i=t==kw(e);r||i;){if(e==n)return!0;let t=xw(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==kw(e)}}function Nw(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Pw=function(e){return e.focusNode&&Ew(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Fw(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function Iw(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Lw(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(kw(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(kw(r.startContainer),r.startOffset)}}}var Rw=typeof navigator<`u`?navigator:null,zw=typeof document<`u`?document:null,Bw=Rw&&Rw.userAgent||``,Vw=/Edge\/(\d+)/.exec(Bw),Hw=/MSIE \d/.exec(Bw),Uw=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bw),Ww=!!(Hw||Uw||Vw),Gw=Hw?document.documentMode:Uw?+Uw[1]:Vw?+Vw[1]:0,Kw=!Ww&&/gecko\/(\d+)/i.test(Bw);Kw&&+(/Firefox\/(\d+)/.exec(Bw)||[0,0])[1];var qw=!Ww&&/Chrome\/(\d+)/.exec(Bw),Jw=!!qw,Yw=qw?+qw[1]:0,Xw=!Ww&&!!Rw&&/Apple Computer/.test(Rw.vendor),Zw=Xw&&(/Mobile\/\w+/.test(Bw)||!!Rw&&Rw.maxTouchPoints>2),Qw=Zw||(Rw?/Mac/.test(Rw.platform):!1),$w=Rw?/Win/.test(Rw.platform):!1,eT=/Android \d/.test(Bw),tT=!!zw&&`webkitFontSmoothing`in zw.documentElement.style,nT=tT?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function rT(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function iT(e,t){return typeof e==`number`?e:e[t]}function aT(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function oT(e,t,n){if(!xT(t)&&t.left==0)return;let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=Sw(o);continue}let e=o,n=e==a.body,s=n?rT(a):aT(e),c=0,l=0;if(t.top<s.top+iT(r,`top`)?l=-(s.top-t.top+iT(i,`top`)):t.bottom>s.bottom-iT(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+iT(i,`top`)-s.top:t.bottom-s.bottom+iT(i,`bottom`)),t.left<s.left+iT(r,`left`)?c=-(s.left-t.left+iT(i,`left`)):t.right>s.right-iT(r,`right`)&&(c=t.right-s.right+iT(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:Sw(o)}}function sT(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:cT(e.dom)}}function cT(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Sw(r));return t}function lT({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;uT(n,r==0?0:r-t)}function uT(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var dT=null;function fT(e){if(e.setActive)return e.setActive();if(dT)return e.focus(dT);let t=cT(e);e.focus(dT==null?{get preventScroll(){return dT={preventScroll:!0},!0}}:void 0),dT||(dT=!1,uT(t,0))}function pT(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(u.nodeType==1)e=u.getClientRects();else if(u.nodeType==3)e=ww(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?mT(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:pT(n,i)}function mT(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=ST(r,1);if(n.top!=n.bottom&&hT(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function hT(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function gT(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function _T(e,t,n){let{node:r,offset:i}=pT(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function vT(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function yT(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(n.nodeType==1){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(hT(t,i))return yT(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function bT(e,t){let n=e.dom.ownerDocument,r,i=0,a=Lw(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType==1?o:o.parentNode)){let n=e.dom.getBoundingClientRect();if(!hT(t,n)||(o=yT(e.dom,t,n),!o))return null}if(Xw)for(let e=o;r&&e;e=Sw(e))e.draggable&&(r=void 0);if(o=gT(o,t),r){if(Kw&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;tT&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=vT(e,r,i,t))}s??=_T(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function xT(e){return e.top<e.bottom||e.left<e.right}function ST(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(xT(e))return e}return Array.prototype.find.call(n,xT)||e.getBoundingClientRect()}var CT=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function wT(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=tT||Kw;if(r.nodeType==3)if(o&&(CT.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=ST(ww(r,i,i),n);if(Kw&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=ST(ww(r,i-1,i-1),-1);if(t.top==e.top){let n=ST(ww(r,i,i+1),-1);if(n.top!=e.top)return TT(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,TT(ST(ww(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==kw(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return ET(e.getBoundingClientRect(),!1)}if(a==null&&i<kw(r)){let e=r.childNodes[i];if(e.nodeType==1)return ET(e.getBoundingClientRect(),!0)}return ET(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==kw(r))){let e=r.childNodes[i-1],t=e.nodeType==3?ww(e,kw(e)-+!o):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return TT(ST(t,1),!1)}if(a==null&&i<kw(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?ww(e,0,+!o):e.nodeType==1?e:null:null;if(t)return TT(ST(t,-1),!0)}return TT(ST(r.nodeType==3?ww(r):r,-n),n>=0)}function TT(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function ET(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function DT(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function OT(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return DT(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=wT(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=ww(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var kT=/[\u0590-\u08ac]/;function AT(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!kT.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:DT(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var jT=null,MT=null,NT=!1;function PT(e,t,n){return jT==t&&MT==n?NT:(jT=t,MT=n,NT=n==`up`||n==`down`?OT(e,t,n):AT(e,t,n))}var FT=0,IT=1,LT=2,RT=3,zT=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=FT,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>xw(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e||i instanceof KT){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof BT&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?xw(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?xw(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=xw(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=xw(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((Kw||Xw)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
104
|
-
`),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:xw(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(Kw&&l.focusNode&&l.focusNode!=s.node&&l.focusNode.nodeType==1){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&Xw)&&Ew(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Ew(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&Kw)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?LT:IT,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=RT:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?LT:RT}n=a}this.dirty=LT}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?LT:IT;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},BT=class extends zT{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.hasAttribute(`contenteditable`)||(a.contentEditable=`false`),a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==FT&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},VT=class extends zT{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},HT=class e extends zT{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=fx.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&RT||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=RT&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=FT){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=FT}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=lE(a,n,o,r)),t>0&&(a=lE(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},UT=class e extends zT{constructor(e,t,n,r,i,a,o){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=fx.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=eE(u,r,n),l?c=new qT(t,n,r,i,u,d||null,f,l):n.isText?new GT(t,n,r,i,u,f):new e(t,n,r,i,u,d||null,f)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(t.preserveWhitespace=`full`),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find(t=>t.nodeType==1&&e.indexOf(t.parentNode)<0&&this.dom.contains(t));n?t.contentElement=n:t.getContent=()=>Z.empty}}return t}matchesNode(e,t,n){return this.dirty==FT&&e.eq(this.node)&&tE(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new rE(this,a&&a.node,e);oE(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?rb.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e,l);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==LT)&&(a&&this.protectLocalComposition(e,a),JT(this.contentDOM,this.children,e),Zw&&sE(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof LS)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=cE(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&=void 0}let a=new VT(this,i,t,r);e.input.compositionNodes.push(a),this.children=lE(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==RT||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=FT}updateOuterDeco(e){if(tE(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=QT(this.dom,this.nodeDOM,ZT(this.outerDeco,this.node,t),ZT(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function WT(e,t,n,r,i){eE(r,t,e);let a=new UT(void 0,e,t,n,r,r,r);return a.contentDOM&&a.updateChildren(i,0),a}var GT=class e extends UT{constructor(e,t,n,r,i,a){super(e,t,n,r,i,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==RT||this.dirty!=FT&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=FT||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=FT,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=RT)}get domAtom(){return!1}isText(e){return this.node.text==e}},KT=class extends zT{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==FT&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},qT=class extends UT{constructor(e,t,n,r,i,a,o,s){super(e,t,n,r,i,a,o),this.spec=s}update(e,t,n,r){if(this.dirty==RT)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function JT(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=nE(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof HT){let t=r?r.previousSibling:e.lastChild;JT(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=nE(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var YT=function(e){e&&(this.nodeName=e)};YT.prototype=Object.create(null);var XT=[new YT];function ZT(e,t,n){if(e.length==0)return XT;let r=n?XT[0]:new YT,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new YT(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new YT(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function QT(e,t,n,r){if(n==XT&&r==XT)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=XT[0],i=t)}$T(i,o||XT[0],a)}return i}function $T(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function eE(e,t,n){return QT(e,e,XT,ZT(t,n,e.nodeType!=1))}function tE(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function nE(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var rE=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=iE(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=FT,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i<0&&this.index<this.top.children.length){let t=this.top.children[this.index];t instanceof HT&&t.dirty!=RT&&t.mark.type==e[a].type&&t.spec.update&&!this.isLocked(t.dom)&&t.spec.update(e[a])&&(t.mark=e[a],i=this.index,this.changed=!0)}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=HT.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==RT&&a.dom==a.contentDOM&&(a.dirty=LT),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof UT){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=RT&&tE(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=LT,u.updateChildren(r,a+1),u.dirty=FT),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!tE(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=UT.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=UT.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new BT(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof HT;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof GT)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Xw||Jw)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new KT(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function iE(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof HT)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function aE(e,t){return e.type.side-t.type.side}function oE(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u)if(d){d.sort(aE);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function sE(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function cE(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function lE(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function uE(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(Pw(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&$.isSelectable(e)&&i.parent&&!(e.isInline&&Mw(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new $(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=xE(e,u,s,n)}return l}function dE(e){return e.editable?e.hasFocus():CE(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function fE(e,t=!1){let n=e.state.selection;if(yE(e,n),!dE(e))return;let r=e.input.mouseDown;if(!t&&Jw&&r){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Ew(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)&&r.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)vE(e);else{let{anchor:r,head:i}=n,a,o;pE&&!(n instanceof LS)&&(n.$from.parent.inlineContent||(a=mE(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=mE(e,n.to))),e.docView.setSelection(r,i,e,t),pE&&(a&&gE(a),o&&gE(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&_E(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var pE=Xw||Jw&&Yw<63;function mE(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(Xw&&i&&i.contentEditable==`false`)return hE(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return hE(i);if(a)return hE(a)}}function hE(e){return e.contentEditable=`true`,Xw&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function gE(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function _E(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!dE(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function vE(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,xw(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Ww&&Gw<=11&&(n.disabled=!0,n.disabled=!1)}function yE(e,t){if(t instanceof $){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(bE(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else bE(e)}function bE(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function xE(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||LS.between(t,n,r)}function SE(e){return e.editable&&!e.hasFocus()?!1:CE(e)}function CE(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function wE(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ew(t.node,t.offset,n.anchorNode,n.anchorOffset)}function TE(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&NS.findFrom(a,t)}function EE(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function DE(e,t,n){let r=e.state.selection;if(r instanceof LS){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return EE(e,new LS(r.$anchor,a))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=TE(e.state,t);return n&&n instanceof $?EE(e,n):!1}else if(!(Qw&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?$.isSelectable(i)?EE(e,new $(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):tT?EE(e,new LS(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else if(r instanceof $&&r.node.isInline)return EE(e,new LS(t>0?r.$to:r.$from));else{let n=TE(e.state,t);return n?EE(e,n):!1}}function OE(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function kE(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function AE(e,t){return t<0?jE(e):ME(e)}function jE(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(Kw&&n.nodeType==1&&r<OE(n)&&kE(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(kE(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(NE(n))break;else{let t=n.previousSibling;for(;t&&kE(t,-1);)i=n.parentNode,a=xw(t),t=t.previousSibling;if(t)n=t,r=OE(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?IE(e,n,r):i&&IE(e,i,a)}function ME(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=OE(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if(kE(e,1))a=n,o=++r;else break}else if(NE(n))break;else{let t=n.nextSibling;for(;t&&kE(t,1);)a=t.parentNode,o=xw(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=OE(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&IE(e,a,o)}function NE(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function PE(e,t){for(;e&&t==e.childNodes.length&&!Nw(e);)t=xw(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=0}}function FE(e,t){for(;e&&!t&&!Nw(e);)t=xw(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function IE(e,t,n){if(t.nodeType!=3){let e,r;(r=PE(t,n))?(t=r,n=0):(e=FE(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Pw(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&fE(e)},50)}function LE(e,t){let n=e.state.doc.resolve(t);if(!(Jw||$w)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function RE(e,t,n){let r=e.state.selection;if(r instanceof LS&&!r.empty||n.indexOf(`s`)>-1||Qw&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=TE(e.state,t);if(n&&n instanceof $)return EE(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof BS?NS.near(n,t):NS.findFrom(n,t);return o?EE(e,o):!1}return!1}function zE(e,t){if(!(e.state.selection instanceof LS))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function BE(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function VE(e){if(!Xw||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;BE(e,n,`true`),setTimeout(()=>BE(e,n,`false`),20)}return!1}function HE(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function UE(e,t){let n=t.keyCode,r=HE(t);if(n==8||Qw&&n==72&&r==`c`)return zE(e,-1)||AE(e,-1);if(n==46&&!t.shiftKey||Qw&&n==68&&r==`c`)return zE(e,1)||AE(e,1);if(n==13||n==27)return!0;if(n==37||Qw&&n==66&&r==`c`){let t=n==37?LE(e,e.state.selection.from)==`ltr`?-1:1:-1;return DE(e,t,r)||AE(e,t)}else if(n==39||Qw&&n==70&&r==`c`){let t=n==39?LE(e,e.state.selection.from)==`ltr`?1:-1:1;return DE(e,t,r)||AE(e,t)}else if(n==38||Qw&&n==80&&r==`c`)return RE(e,-1,r)||AE(e,-1);else if(n==40||Qw&&n==78&&r==`c`)return VE(e)||RE(e,1,r)||AE(e,1);else if(r==(Qw?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function WE(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||fx.fromSchema(e.state.schema),s=eD(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=$E[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
|
|
105
|
-
|
|
106
|
-
`),slice:t}}function GE(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new Q(Z.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
107
|
-
`))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=fx.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=rD(n),tT&&iD(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||Qb.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!KE.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=aD(QE(s,+u[1],+u[2]),u[4]);else if(s=Q.maxOpen(qE(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=QE(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var KE=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function qE(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&YE(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=XE(a[a.length-1],i.length));let n=JE(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return Z.from(a)}return e}function JE(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Z.from(e));return e}function YE(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=YE(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Z.from(JE(n,e,i+1))))}}function XE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,XE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Z.empty,!0);return e.copy(n.append(r))}function ZE(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=ZE(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(Z.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function QE(e,t,n){return t<e.openStart&&(e=new Q(ZE(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Q(ZE(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var $E={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]};function eD(){return document.implementation.createHTMLDocument(`title`)}var tD=null;function nD(e){let t=window.trustedTypes;if(!t)return e;if(!tD){if(tD=t.defaultPolicy)try{return tD.createHTML(e)}catch{}tD=t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e})}return tD.createHTML(e)}function rD(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=eD(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(e),a;if((a=i&&$E[i[1].toLowerCase()])&&(e=a.map(e=>`<`+e+`>`).join(``)+e+a.map(e=>`</`+e+`>`).reverse().join(``)),r.innerHTML=nD(e),a)for(let e=0;e<a.length;e++)r=r.querySelector(a[e])||r;for(let e=0;e<n.styleSheets.length;e++){let t=n.styleSheets[e];for(let e=0;e<t.rules.length;e++){let n=t.rules[e];if(n instanceof CSSStyleRule){let e=r.querySelectorAll(n.selectorText);for(let t=0;t<e.length;t++)e[t].style.cssText+=n.style.cssText}}}return r}function iD(e){let t=e.querySelectorAll(Jw?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function aD(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;try{t.checkAttrs(r[e+1])}catch{break}i=Z.from(t.create(r[e+1],i)),a++,o++}return new Q(i,a,o)}var oD={},sD={},cD={touchstart:!0,touchmove:!0},lD=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function uD(e){for(let t in oD){let n=oD[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{hD(e,t)&&!mD(e,t)&&(e.editable||!(t.type in sD))&&n(e,t)},cD[t]?{passive:!0}:void 0)}Xw&&e.dom.addEventListener(`input`,()=>null),pD(e)}function dD(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function fD(e){e.input.mouseDown&&e.input.mouseDown.done(),e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function pD(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>mD(e,t))})}function mD(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function hD(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function gD(e,t){!mD(e,t)&&oD[t.type]&&(e.editable||!(t.type in sD))&&oD[t.type](e,t)}sD.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!ND(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(eT&&Jw&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Zw&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,Fw(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||UE(e,n)?n.preventDefault():dD(e,`key`)},sD.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},sD.keypress=(e,t)=>{let n=t;if(ND(e)||!n.charCode||n.ctrlKey&&!n.altKey||Qw&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof LS)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function _D(e){return{left:e.clientX,top:e.clientY}}function vD(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function yD(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function bD(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function xD(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(bD(e,new $(n),`pointer`),!0):!1}function SD(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof $&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if($.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i==null?!1:(bD(e,$.create(e.state.doc,i),`pointer`),!0)}function CD(e,t,n,r,i){return yD(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?SD(e,n):xD(e,n))}function wD(e,t,n,r){return yD(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function TD(e,t,n,r){return yD(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||ED(e,n,r)}function ED(e,t,n){if(n.button!=0)return!1;let r=DD(e,t,!0),i=e.state.doc;return r?(bD(e,r,`pointer`),r instanceof LS&&i.eq(e.state.doc)&&(e.input.mouseDown=new MD(e,r)),!0):!1}function DD(e,t,n){let r=e.state.doc;if(t==-1)return r.inlineContent?LS.create(r,0,r.content.size):null;let i=r.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e),a=i.before(e);if(t.inlineContent)return LS.create(r,a+1,a+1+t.content.size);if(n&&$.isSelectable(t))return $.create(r,a)}return null}function OD(e){return zD(e)}var kD=Qw?`metaKey`:`ctrlKey`;oD.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=OD(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&vD(n,e.input.lastClick)&&!n[kD]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let o=e.posAtCoords(_D(n));o&&(a==`singleClick`?e.input.mouseDown=new jD(e,o,n,!!r):(a==`doubleClick`?wD:TD)(e,o.pos,o.inside,n)?n.preventDefault():dD(e,`pointer`))};var AD=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},jD=class extends AD{constructor(e,t,n,r){super(e),this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[kD],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof $&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Kw&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),dD(e,`pointer`)}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||fE(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(_D(e))),this.updateAllowDefault(e),this.allowDefault||!t?dD(this.view,`pointer`):CD(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Xw&&this.mightDrag&&!this.mightDrag.node.isAtom||Jw&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(bD(this.view,NS.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):dD(this.view,`pointer`)}move(e){this.updateAllowDefault(e),dD(this.view,`pointer`),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},MD=class extends AD{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),dD(this.view,`pointer`);let t=this.view.posAtCoords(_D(e)),n=t&&DD(this.view,t.inside,!1);if(!n)return;let{doc:r}=this.view.state,i=this.startSelection,[a,o]=n.from<i.from?[i.to,n.from]:[i.from,n.to];bD(this.view,LS.create(r,a,o),`pointer`)}};oD.touchstart=e=>{e.input.lastTouch=Date.now(),OD(e),dD(e,`pointer`)},oD.touchmove=e=>{e.input.lastTouch=Date.now(),dD(e,`pointer`)},oD.contextmenu=e=>OD(e);function ND(e,t){return e.composing?!0:Xw&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var PD=eT?5e3:-1;sD.compositionstart=sD.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof LS&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||Jw&&$w&&FD(e)))e.markCursor=e.state.storedMarks||n.marks(),zD(e,!0),e.markCursor=null;else if(zD(e,!t.selection.empty),Kw&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}else n=t,r=-1}}e.input.composing=!0}ID(e,PD)};function FD(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable==`false`}sD.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,ID(e,20))};function ID(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>zD(e),t))}function LD(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function RD(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Aw(t.focusNode,t.focusOffset),r=jw(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}function zD(e,t=!1){if(!(eT&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),LD(e),t||e.docView&&e.docView.dirty){let n=uE(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function BD(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var VD=Ww&&Gw<15||Zw&&nT<604;oD.copy=sD.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=VD?null:n.clipboardData,{dom:o,text:s}=WE(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):BD(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function HD(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function UD(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?WD(e,r.value,null,i,t):WD(e,r.textContent,r.innerHTML,i,t)},50)}function WD(e,t,n,r,i){let a=GE(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||Q.empty)))return!0;if(!a)return!1;let o=HD(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function GD(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}sD.paste=(e,t)=>{let n=t;if(e.composing&&!eT)return;let r=VD?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&WD(e,GD(r),r.getData(`text/html`),i,n)?n.preventDefault():UD(e,n)};var KD=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},qD=Qw?`altKey`:`ctrlKey`;function JD(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[qD]:!n}oD.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(_D(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof $?i.to-1:i.to))){if(r&&r.mightDrag)o=$.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=$.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=WE(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!Jw||Yw>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(VD?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,VD||n.dataTransfer.setData(`text/plain`,c),e.dragging=new KD(l,JD(e,n),o)},oD.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},sD.dragover=sD.dragenter=(e,t)=>t.preventDefault(),sD.drop=(e,t)=>{try{YD(e,t,e.dragging)}finally{e.dragging=null}};function YD(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(_D(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=GE(e,GD(t.dataTransfer),VD?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&JD(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||Q.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?fS(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&$.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new $(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(xE(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}oD.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&fE(e)},20))},oD.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},oD.beforeinput=(e,t)=>{if(eT&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,Fw(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in sD)oD[e]=sD[e];function XD(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var ZD=class e{constructor(e,t){this.toDOM=e,this.spec=t||nO,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new eO(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&XD(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},QD=class e{constructor(e,t){this.attrs=e,this.spec=t||nO}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new eO(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&XD(this.attrs,t.attrs)&&XD(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},$D=class e{constructor(e,t){this.attrs=e,this.spec=t||nO}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new eO(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&XD(this.attrs,t.attrs)&&XD(this.spec,t.spec)}destroy(){}},eO=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new ZD(n,r))}static inline(t,n,r,i){return new e(t,n,new QD(r,i))}static node(t,n,r,i){return new e(t,n,new $D(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof QD}get widget(){return this.type instanceof ZD}},tO=[],nO={},rO=class e{constructor(e,t){this.local=e.length?e:tO,this.children=t.length?t:tO}static create(e,t){return t.length?dO(t,e,0,nO):iO}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==iO||e.maps.length==0?this:this.mapInner(e,t,0,0,n||nO)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?oO(this.children,o||[],t,n,r,i,a):o?new e(o.sort(fO),tO):iO}add(t,n){return n.length?this==iO?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=lO(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,dO(s,e,o+1,nO)),a+=3}});let o=sO(a?uO(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(fO):this.local,i||this.children)}remove(e){return e.length==0||this==iO?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==iO?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):iO}forChild(t,n){if(this==iO)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof QD){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(fO),tO);return r?new aO([t,r]):t}return r||iO}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return pO(this.localsInner(e))}localsInner(e){if(this==iO)return tO;if(e.inlineContent||!this.local.some(QD.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof QD||t.push(this.local[e]);return t}forEachSet(e){e(this)}};rO.empty=new rO([],[]),rO.removeOverlap=pO;var iO=rO.empty,aO=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,nO));return e.from(r)}forChild(t,n){if(n.isLeaf)return rO.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=iO&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}return t?pO(n?t:t.sort(fO)):tO}static from(t){switch(t.length){case 0:return iO;case 1:return t[0];default:return new e(t.every(e=>e instanceof rO)?t:t.reduce((e,t)=>e.concat(t instanceof rO?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function oO(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==iO?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=dO(cO(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new rO(t.sort(fO),s)}function sO(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new eO(i.from+t,i.to+t,i.type))}return n}function cO(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function lO(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function uO(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function dO(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=lO(e,t,o+n);if(s){a=!0;let e=dO(s,t,n+o+1,r);e!=iO&&i.push(o,o+t.nodeSize,e)}});let o=sO(a?uO(e):e,-n).sort(fO);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new rO(o,i):iO}function fO(e,t){return e.from-t.from||e.to-t.to}function pO(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),mO(t,i+1,a.copy(r.to,a.to)));continue}else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),mO(t,i,r.copy(a.from,r.to)));break}}}return t}function mO(e,t,n){for(;t<e.length&&fO(n,e[t])>0;)t++;e.splice(t,0,n)}function hO(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=iO&&t.push(r)}),e.cursorWrapper&&t.push(rO.create(e.state.doc,[e.cursorWrapper.deco])),aO.from(t)}var gO={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},_O=Ww&&Gw<=11,vO=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},yO=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new vO,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);Ww&&Gw<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():Xw&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),_O&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,gO)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(SE(this.view)){if(this.suppressingSelectionUpdates)return fE(this.view);if(Ww&&Gw<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ew(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=Sw(n))t.add(n);for(let r=e.anchorNode;r;r=Sw(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&SE(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||Jw&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(e=>e.type==`childList`&&e.removedNodes.length))){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&t.nodeType==1;){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(Kw&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||TO(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Pw(n)&&(c=uE(e))&&c.eq(NS.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,fE(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),SO(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,EO(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||fE(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(Ww&&Gw<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?xw(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?xw(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}else if(e.type==`attributes`)return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}},bO=new WeakMap,xO=!1;function SO(e){if(!bO.has(e)&&(bO.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Kw,xO)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),xO=!0}}function CO(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Ew(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function wO(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return CO(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?CO(e,n):null}function TO(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function EO(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||e.nodeType!=1||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function DO(e,t,n,r){let{node:i,fromOffset:a,toOffset:o,from:s,to:c}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,d=l.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:l.anchorOffset}],Pw(l)||u.push({node:l.focusNode,offset:l.focusOffset})),Jw&&e.input.lastKeyCode===8)for(let e=o;e>a;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){o=e;break}if(!n||n.size)break}let f=e.state.doc,p=e.someProp(`domParser`)||Qb.fromSchema(e.state.schema),m=f.resolve(s),h=null,g=p.parse(i,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:a,to:o,preserveWhitespace:m.parent.type.whitespace!=`pre`||`full`,findPositions:u,ruleFromNode:OO(r),context:m});if(u&&u[0].pos!=null){let e=u[0].pos,t=u[1]&&u[1].pos;t??=e,h={anchor:e+s,head:t+s}}return{doc:g,sel:h,from:s,to:c}}var OO=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName==`BR`&&t.parentNode){if(Xw&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}else if(t.parentNode.lastChild==t||Xw&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName==`IMG`&&t.getAttribute(`mark-placeholder`))return{ignore:!0};return null},kO=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function AO(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=uE(e,t);if(n&&!e.state.selection.eq(n)){if(Jw&&eT&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,Fw(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=DO(e,t,n,i),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=FO(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(Zw&&e.input.lastIOSEnter>Date.now()-225||eT)&&i.some(e=>e.nodeType==1&&!kO.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,Fw(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof LS&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=jO(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof LS&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),Ww&&Gw<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((Zw&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&h.pos<l.doc.content.size&&(!h.sameParent(g)||!h.parent.inlineContent)&&h.pos<g.pos&&!/\S/.test(l.doc.textBetween(h.pos,g.pos,``,``)))&&e.someProp(`handleKeyDown`,t=>t(e,Fw(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&NO(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,Fw(8,`Backspace`)))){eT&&Jw&&e.domObserver.suppressSelectionUpdates();return}Jw&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),eT&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,Fw(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=jO(e,n.doc,l.sel);t&&!(Jw&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||Ww&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v)if(h.pos==g.pos){Ww&&Gw<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>fE(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=MO(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x());else e.dispatch(x())}function jO(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:xE(e,t.resolve(n.anchor),t.resolve(n.head))}function MO(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(Z.from(l).eq(e))return{mark:s,type:o}}function NO(e,t,n,r,i){if(n-t<=i.pos-r.pos||PO(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(PO(a,!0,!0));return!o.parent.isTextblock||o.pos>n||PO(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function PO(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function FO(e,t,n,r,i){let a=e.findDiffStart(t,n),o=n+e.size,s=n+t.size;if(a==null)return null;let{a:c,b:l}=e.findDiffEnd(t,o,s);if(i==`end`){let e=Math.max(0,a-Math.min(c,l));r-=c+e-a}if(c<a&&o<s){let e=r<=a&&r>=c?a-r:0;a-=e,l=a+(l-c),c=a}else if(l<a){let e=r<=a&&r>=l?a-r:0;a-=e,c=a+(c-l),l=a}return{start:a,endA:c,endB:l}}var IO=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new lD,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(UO),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=zO(this),RO(this),this.nodeViews=VO(this),this.docView=WT(this.state.doc,LO(this),hO(this),this.dom,this),this.domObserver=new yO(this,(e,t,n,r)=>AO(this,e,t,n,r)),this.domObserver.start(),uD(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&pD(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(UO),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(LD(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=VO(this);HO(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&pD(this),this.editable=zO(this),RO(this);let o=hO(this),s=LO(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&sT(this);if(i){this.domObserver.stop();let t=l&&(Ww||Jw)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&BO(n.selection,e.selection);if(l){let n=Jw?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=RD(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=WT(e.doc,s,o,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(t=!0)}let i=this.input.mouseDown;t||!(i&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&wE(this)&&i.delaySelUpdate())?fE(this,t):(yE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&lT(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp(`handleScrollToSelection`,e=>e(this)))if(this.state.selection instanceof $){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&oT(this,t.getBoundingClientRect(),e)}else oT(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new KD(e.slice,e.move,r<0?void 0:$.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(Ww){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&fT(this.dom),fE(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return bT(this,e)}coordsAtPos(e,t=1){return wT(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return PT(this,t||this.state,e)}pasteHTML(e,t){return WD(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return WD(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return WE(this,e)}destroy(){this.docView&&(fD(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],hO(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Tw())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return gD(this,e)}domSelectionRange(){let e=this.domSelection();return e?Xw&&this.root.nodeType===11&&Iw(this.dom.ownerDocument)==this.dom&&wO(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};IO.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function LO(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[eO.node(0,e.state.doc.content.size,t)]}function RO(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:eO.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function zO(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function BO(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function VO(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function HO(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function UO(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}var WO=class e extends NS{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):NS.near(r)}content(){return Q.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new GO(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!qO(e)||!JO(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!$.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};WO.prototype.visible=!1,WO.findFrom=WO.findGapCursorFrom,NS.jsonID(`gapcursor`,WO);var GO=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return WO.valid(t)?new WO(t):NS.near(t)}};function KO(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function qO(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||KO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function JO(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||KO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function YO(){return new eC({props:{decorations:ek,createSelectionBetween(e,t,n){return t.pos==n.pos&&WO.valid(n)?new WO(n):null},handleClick:QO,handleKeyDown:XO,handleDOMEvents:{beforeinput:$O}}})}var XO=uC({ArrowLeft:ZO(`horiz`,-1),ArrowRight:ZO(`horiz`,1),ArrowUp:ZO(`vert`,-1),ArrowDown:ZO(`vert`,1)});function ZO(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof LS){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=WO.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new WO(c))),!0):!1}}function QO(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!WO.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&$.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new WO(r))),!0)}function $O(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof WO))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=Z.empty;for(let e=r.length-1;e>=0;e--)i=Z.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new Q(i,0,0));return a.setSelection(LS.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function ek(e){if(!(e.selection instanceof WO))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,rO.create(e.doc,[eO.widget(e.selection.head,t,{key:`gapcursor`})])}function tk(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)nk(e,arguments[t]);return e}function nk(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)nk(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}var rk=`http://www.w3.org/2000/svg`,ik=`http://www.w3.org/1999/xlink`,ak=`ProseMirror-icon`;function ok(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function sk(e,t){let n=(e.nodeType==9?e:e.ownerDocument)||document,r=n.createElement(`button`);if(r.className=ak,r.type=`button`,t.path){let{path:i,width:a,height:o}=t,s=`pm-icon-`+ok(i).toString(16);n.getElementById(s)||ck(e,s,t);let c=r.appendChild(n.createElementNS(rk,`svg`));c.style.width=a/o+`em`,c.appendChild(n.createElementNS(rk,`use`)).setAttributeNS(ik,`href`,/([^#]*)/.exec(n.location.toString())[1]+`#`+s)}else if(t.dom)r.appendChild(t.dom.cloneNode(!0));else{let{text:e,css:i}=t;r.appendChild(n.createElement(`span`)).textContent=e||``,i&&(r.firstChild.style.cssText=i)}return r}function ck(e,t,n){let[r,i]=e.nodeType==9?[e,e.body]:[e.ownerDocument||document,e],a=r.getElementById(`ProseMirror-icon-collection`);a||(a=r.createElementNS(rk,`svg`),a.id=`ProseMirror-icon-collection`,a.style.display=`none`,i.insertBefore(a,i.firstChild));let o=r.createElementNS(rk,`symbol`);o.id=t,o.setAttribute(`viewBox`,`0 0 `+n.width+` `+n.height),o.appendChild(r.createElementNS(rk,`path`)).setAttribute(`d`,n.path),a.appendChild(o)}var lk=`ProseMirror-menu`,uk=class{constructor(e){this.spec=e}render(e){let t=this.spec,n=t.render?t.render(e):t.icon?sk(e.root,t.icon):t.label?tk(`button`,{type:`button`},dk(e,t.label)):null;if(!n)throw RangeError(`MenuItem without icon or label property`);if(t.title){let r=typeof t.title==`function`?t.title(e.state):t.title;n.setAttribute(`title`,dk(e,r))}t.class&&n.classList.add(t.class),t.css&&(n.style.cssText+=t.css),n.addEventListener(`click`,r=>{if(!n.classList.contains(`ProseMirror-menu-disabled`)){let i=document.activeElement==n||document.activeElement==e.dom;t.run(e.state,e.dispatch,e,r),i&&document.activeElement==n&&e.focus()}}),n.addEventListener(`mousedown`,e=>e.preventDefault());function r(e){if(t.select){let r=t.select(e);if(n.style.display=r?``:`none`,!r)return!1}let r=!0;if(t.enable&&(r=t.enable(e)||!1,jk(n,`ProseMirror-menu-disabled`,!r),n.setAttribute(`aria-disabled`,(!r).toString())),t.active){let i=r&&t.active(e)||!1;jk(n,`ProseMirror-menu-active`,i),n.setAttribute(`aria-pressed`,i.toString())}return!0}return{dom:n,update:r}}};function dk(e,t){return e._props.translate?e._props.translate(t):t}var fk={time:0,node:null};function pk(e){fk.time=Date.now(),fk.node=e.target}function mk(e){return Date.now()-100<fk.time&&fk.node&&e.contains(fk.node)}var hk=class{constructor(e,t={}){this.options=t,this.focusables=[],this.focusIndex=0,this.focusTimeout=-1,this.options=t||{},this.content=Array.isArray(e)?e:[e]}render(e){let t=vk(this.content,e);this.focusables=t.focusables;let n=e.dom.ownerDocument.defaultView||window,r=tk(`button`,{type:`button`,class:`ProseMirror-menu-dropdown `+(this.options.class||``),style:this.options.css,"aria-haspopup":`menu`,"aria-expanded":`false`},dk(e,this.options.label||``));this.options.title&&r.setAttribute(`title`,dk(e,this.options.title));let i=tk(`div`,{class:`ProseMirror-menu-dropdown-wrap`},r),a=null,o=null,s=()=>{a&&a.close()&&(a=null,n.removeEventListener(`click`,o))};r.addEventListener(`click`,e=>{if(pk(e),a)s();else{if(a=this.expand(i,t.dom,r),n.addEventListener(`click`,o=()=>{mk(i)||s()}),e.detail===0){let e=gk(this.focusables,-1,1);e!=null&&this.setFocusIndex(e)}a.node.addEventListener(`keydown`,e=>{pk(e),_k(this,e,`vertical`)||e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),r.focus(),s())}),a.node.addEventListener(`focusout`,()=>{clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{let e=n.document.activeElement;e&&a&&!a.node.contains(e)&&s()},20)})}}),r.addEventListener(`mousedown`,e=>e.preventDefault());function c(e){let n=t.update(e);return i.style.display=n?``:`none`,n}return{dom:i,update:c,focusable:r}}expand(e,t,n){let r=tk(`div`,{class:`ProseMirror-menu-dropdown-menu `+(this.options.class||``)},t),i=!1;function a(){return i?!1:(i=!0,e.removeChild(r),n.ariaControlsElements=[],n.setAttribute(`aria-expanded`,`false`),!0)}return e.appendChild(r),n.ariaControlsElements=[t],n.setAttribute(`aria-expanded`,`true`),{close:a,node:r}}setFocusIndex(e){if(this.focusables.length<=1)return;this.focusables[this.focusIndex].setAttribute(`tabindex`,`-1`),this.focusIndex=e;let t=this.focusables[e];t.setAttribute(`tabindex`,`0`),t.focus()}};function gk(e,t,n){let r=e.length;for(let i=0,a=t+n;;a+=n,i++){let t=(a+r)%r;if(e[t].style.display!=`none`)return t;if(i==r)return null}}function _k(e,t,n){let{focusables:r,focusIndex:i}=e,a=t.key==(n==`vertical`?`ArrowDown`:`ArrowRight`)?gk(r,i,1):t.key==(n==`vertical`?`ArrowUp`:`ArrowLeft`)?gk(r,i,-1):t.key==`Home`?gk(r,-1,1):t.key==`End`?gk(r,r.length,-1):null;return a==null?!1:(t.preventDefault(),t.stopPropagation(),e.setFocusIndex(a),!0)}function vk(e,t){let n=[],r=[],i=[];for(let a=0;a<e.length;a++){let{dom:o,update:s,focusable:c}=e[a].render(t);n.push(tk(`li`,{class:`${lk}-dropdown-item`,role:`menuitem`,tabindex:`-1`},o)),r.push(c||o),i.push(s)}function a(e){let t=!1;for(let r=0;r<n.length;r++){let a=n[r],o=i[r](e);o&&(t=!0),a.style.display=o?``:`none`}return t}return{dom:tk(`ul`,{role:`menu`},n),update:a,focusables:r}}function yk(e,t){return n=>{let r=!1;for(let i=0;i<e.length;i++){let a=e[i](n);t[i].style.display=a?``:`none`,a&&(r=!0)}return r}}var bk=class{constructor(e,t={}){this.options=t,this.focusables=[],this.focusIndex=0,this.focusTimeout=-1,this.content=Array.isArray(e)?e:[e]}render(e){let t=vk(this.content,e);this.focusables=t.focusables;let n=e.dom.ownerDocument.defaultView||window,r=tk(`button`,{type:`button`,class:`ProseMirror-menu-submenu-label`},dk(e,this.options.label||``)),i=tk(`div`,{class:`ProseMirror-menu-submenu-wrap`},r,tk(`div`,{class:`ProseMirror-menu-submenu`},t.dom)),a=null,o=e=>{if(e.preventDefault(),e.stopPropagation(),pk(e),jk(i,`ProseMirror-menu-submenu-wrap-active`,!0),a||n.addEventListener(`click`,a=()=>{mk(i)||(i.classList.remove(`ProseMirror-menu-submenu-wrap-active`),n.removeEventListener(`click`,a),a=null)}),!(e.type==`click`&&e.detail)){let e=gk(this.focusables,-1,1);e!=null&&this.setFocusIndex(e)}};r.addEventListener(`click`,o),r.addEventListener(`keydown`,e=>{e.key===`ArrowRight`&&o(e)}),r.addEventListener(`mousedown`,e=>e.preventDefault()),t.dom.addEventListener(`keydown`,e=>{pk(e),_k(this,e,`vertical`)||(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),e.stopPropagation(),jk(i,`ProseMirror-menu-submenu-wrap-active`,!1),r.focus())}),t.dom.addEventListener(`focusout`,()=>{clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{let e=n.document.activeElement;e&&!t.dom.contains(e)&&i.classList.remove(`ProseMirror-menu-submenu-wrap-active`)},20)});function s(e){let n=t.update(e);return i.style.display=n?``:`none`,n}return{dom:i,update:s,focusable:r}}setFocusIndex(e){if(this.focusables.length<=1)return;this.focusables[this.focusIndex].setAttribute(`tabindex`,`-1`),this.focusIndex=e;let t=this.focusables[e];t.setAttribute(`tabindex`,`0`),t.focus()}};function xk(e,t){let n=document.createDocumentFragment(),r=[],i=[],a=[];for(let o=0;o<t.length;o++){let s=t[o],c=[],l=[];for(let t=0;t<s.length;t++){let{dom:r,update:a,focusable:o}=s[t].render(e);i.push(o||r);let u=tk(`span`,{class:`ProseMirror-menuitem`},r);n.appendChild(u),l.push(u),c.push(a)}c.length&&(r.push(yk(c,l)),o<t.length-1&&a.push(n.appendChild(Sk())))}function o(e){let t=!1,n=!1;for(let i=0;i<r.length;i++){let o=r[i](e);i&&(a[i-1].style.display=n&&o?``:`none`),n=o,o&&(t=!0)}return t}return{dom:n,update:o,focusables:i}}function Sk(){return tk(`span`,{class:`ProseMirror-menuseparator`,role:`separator`})}var Ck={join:{width:800,height:900,path:`M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z`},lift:{width:1024,height:1024,path:`M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z`},selectParentNode:{text:`⬚`,css:`font-weight: bold`},undo:{width:1024,height:1024,path:`M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z`},redo:{width:1024,height:1024,path:`M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z`},strong:{width:805,height:1024,path:`M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z`},em:{width:585,height:1024,path:`M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z`},code:{width:896,height:1024,path:`M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z`},link:{width:951,height:1024,path:`M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z`},bulletList:{width:768,height:896,path:`M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z`},orderedList:{width:768,height:896,path:`M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z`},blockquote:{width:640,height:896,path:`M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z`}},wk=new uk({title:`Join with above block`,run:GC,select:e=>GC(e),icon:Ck.join}),Tk=new uk({title:`Lift out of enclosing block`,run:qC,select:e=>qC(e),icon:Ck.lift}),Ek=new uk({title:`Select parent node`,run:tw,select:e=>tw(e),icon:Ck.selectParentNode}),Dk=new uk({title:`Undo last change`,run:NC,enable:e=>NC(e),icon:Ck.undo}),Ok=new uk({title:`Redo last undone change`,run:PC,enable:e=>PC(e),icon:Ck.redo});function kk(e,t){let n={run(n,r){return cw(e,t.attrs)(n,r)},select(n){return cw(e,t.attrs)(n)}};for(let e in t)n[e]=t[e];return new uk(n)}function Ak(e,t){let n=lw(e,t.attrs),r={run:n,enable(e){return n(e)},active(n){let{$from:r,to:i,node:a}=n.selection;return a?a.hasMarkup(e,t.attrs):i<=r.end()&&r.parent.hasMarkup(e,t.attrs)}};for(let e in t)r[e]=t[e];return new uk(r)}function jk(e,t,n){n?e.classList.add(t):e.classList.remove(t)}var Mk=`ProseMirror-menubar`;function Nk(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent;return!/Edge\/\d/.test(e)&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e)}function Pk(e){return new eC({view(t){return new Fk(t,e)}})}var Fk=class{constructor(e,t){this.editorView=e,this.options=t,this.focusables=[],this.focusIndex=0,this.spacer=null,this.maxHeight=0,this.widthForMaxHeight=0,this.floating=!1,this.scrollHandler=null,this.root=e.root,this.wrapper=tk(`div`,{class:`ProseMirror-menubar-wrapper`}),this.menu=this.wrapper.appendChild(tk(`div`,{class:Mk,role:`toolbar`})),this.menu.className=Mk,this.menu.ariaControlsElements=[e.dom],e.dom.parentNode&&e.dom.parentNode.replaceChild(this.wrapper,e.dom),t.position===`after`?this.wrapper.insertBefore(e.dom,this.wrapper.firstChild):this.wrapper.appendChild(e.dom);let{dom:n,update:r,focusables:i}=xk(this.editorView,this.options.content);if(this.contentUpdate=r,this.focusables=i,this.menu.appendChild(n),t.floating&&!Nk()){this.updateFloat();let e=Rk(this.wrapper);this.scrollHandler=t=>{let n=this.editorView.root;(n.body||n).contains(this.wrapper)?this.updateFloat(t.target.getBoundingClientRect?t.target:void 0):e.forEach(e=>e.removeEventListener(`scroll`,this.scrollHandler))},e.forEach(e=>e.addEventListener(`scroll`,this.scrollHandler))}for(let e=0;e<i.length;e++){let t=i[e];e&&t.setAttribute(`tabindex`,`-1`),t.addEventListener(`focus`,()=>{this.focusIndex!==e&&(this.focusables[this.focusIndex].setAttribute(`tabindex`,`-1`),t.setAttribute(`tabindex`,`0`),this.focusIndex=e)})}this.menu.addEventListener(`keydown`,e=>{_k(this,e,`horizontal`)}),this.update()}setFocusIndex(e){if(this.focusables.length<=1)return;this.focusables[this.focusIndex].setAttribute(`tabindex`,`-1`),this.focusIndex=e;let t=this.focusables[e];t.setAttribute(`tabindex`,`0`),t.focus()}update(){if(this.editorView.root!=this.root){let{dom:e,update:t}=xk(this.editorView,this.options.content);this.contentUpdate=t,this.menu.replaceChild(e,this.menu.firstChild),this.root=this.editorView.root}let e=this.editorView.dom.ownerDocument.activeElement==this.focusables[this.focusIndex];if(this.contentUpdate(this.editorView.state),e&&this.focusables[this.focusIndex].style.display==`none`){let e=gk(this.focusables,this.focusIndex,1);e!=null&&this.setFocusIndex(e)}this.floating?this.updateScrollCursor():(this.menu.offsetWidth!=this.widthForMaxHeight&&(this.widthForMaxHeight=this.menu.offsetWidth,this.maxHeight=0),this.menu.offsetHeight>this.maxHeight&&(this.maxHeight=this.menu.offsetHeight,this.menu.style.minHeight=this.maxHeight+`px`))}updateScrollCursor(){let e=this.editorView.root.getSelection();if(!e.focusNode)return;let t=e.getRangeAt(0).getClientRects(),n=t[Ik(e)?0:t.length-1];if(!n)return;let r=this.menu.getBoundingClientRect();if(n.top<r.bottom&&n.bottom>r.top){let e=Lk(this.wrapper);e&&(e.scrollTop-=r.bottom-n.top)}}updateFloat(e){let t=this.wrapper,n=t.getBoundingClientRect(),r=e?Math.max(0,e.getBoundingClientRect().top):0;if(this.floating)if(n.top>=r||n.bottom<this.menu.offsetHeight+10)this.floating=!1,this.menu.style.position=this.menu.style.left=this.menu.style.top=this.menu.style.width=``,this.menu.style.display=``,this.spacer.parentNode.removeChild(this.spacer),this.spacer=null;else{let i=(t.offsetWidth-t.clientWidth)/2;this.menu.style.left=n.left+i+`px`,this.menu.style.display=n.top>(this.editorView.dom.ownerDocument.defaultView||window).innerHeight?`none`:``,e&&(this.menu.style.top=r+`px`)}else if(n.top<r&&n.bottom>=this.menu.offsetHeight+10){this.floating=!0;let n=this.menu.getBoundingClientRect();this.menu.style.left=n.left+`px`,this.menu.style.width=n.width+`px`,e&&(this.menu.style.top=r+`px`),this.menu.style.position=`fixed`,this.spacer=tk(`div`,{class:`ProseMirror-menubar-spacer`,style:`height: ${n.height}px`}),t.insertBefore(this.spacer,this.menu)}}destroy(){this.wrapper.parentNode&&this.wrapper.parentNode.replaceChild(this.editorView.dom,this.wrapper)}};function Ik(e){return e.anchorNode==e.focusNode?e.anchorOffset>e.focusOffset:e.anchorNode.compareDocumentPosition(e.focusNode)==Node.DOCUMENT_POSITION_FOLLOWING}function Lk(e){for(let t=e.parentNode;t;t=t.parentNode)if(t.scrollHeight>t.clientHeight)return t}function Rk(e){let t=[e.ownerDocument.defaultView||window];for(let n=e.parentNode;n;n=n.parentNode)t.push(n);return t}function zk(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return Bk(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function Bk(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new xb(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new xb(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=Jx(a,n,r,t);return s?(e&&Vk(e,t,s,i,n),!0):!1}function Vk(e,t,n,r,i){let a=Z.empty;for(let e=n.length-1;e>=0;e--)a=Z.from(n[e].type.create(n[e].attrs,a));e.step(new Bx(t.start-(r?2:0),t.end,t.start,t.end,new Q(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&iS(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function Hk(e,t){return function(n,r){let{$from:i,$to:a,node:o}=n.selection;if(o&&o.isBlock||i.depth<2||!i.sameParent(a))return!1;let s=i.node(-1);if(s.type!=e)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=e||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let t=Z.empty,a=i.index(-1)?1:i.index(-2)?2:3;for(let e=i.depth-a;e>=i.depth-3;e--)t=Z.from(i.node(e).copy(t));let o=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;t=t.append(Z.from(e.createAndFill()));let s=i.before(i.depth-(a-1)),c=n.tr.replace(s,i.after(-o),new Q(t,4-a,0)),l=-1;c.doc.nodesBetween(s,c.doc.content.size,(e,t)=>{if(l>-1)return!1;e.isTextblock&&e.content.size==0&&(l=t+1)}),l>-1&&c.setSelection(NS.near(c.doc.resolve(l))),r(c.scrollIntoView())}return!0}let c=a.pos==i.end()?s.contentMatchAt(0).defaultType:null,l=n.tr.delete(i.pos,a.pos),u=c?[t?{type:e,attrs:t}:null,{type:c}]:void 0;return iS(l.doc,i.pos,2,u)?(r&&r(l.split(i.pos,2,u).scrollIntoView()),!0):!1}}function Uk(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?Wk(t,n,e,a):Gk(t,n,a):!0:!1}}function Wk(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new Bx(a-1,o,a,o,new Q(Z.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new xb(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=Kx(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return oS(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function Gk(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+ +!s,u+1,o.content.append(c?Z.empty:Z.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new Bx(d-+!!s,f+ +!!c,d+1,f-1,new Q((s?Z.empty:Z.from(i.copy(Z.empty))).append(c?Z.empty:Z.from(i.copy(Z.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function Kk(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,c=s.child(o-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==s.type,i=Z.from(r?e.create():null),o=new Q(Z.from(e.create(null,Z.from(s.type.create(null,i)))),r?3:1,0),l=a.start,u=a.end;n(t.tr.step(new Bx(l-(r?3:1),u,l,u,o,1,!0)).scrollIntoView())}return!0}}var qk=class{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?Jk(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function Jk(e){return function(t,n,r,i){let a=e;if(n[1]){let e=n[0].lastIndexOf(n[1]);a+=n[0].slice(e+n[1].length),r+=e;let t=r-i;t>0&&(a=n[0].slice(e-t,e)+a,r=i)}return t.tr.insertText(a,r,i)}}var Yk=500;function Xk({rules:e}){let t=new eC({state:{init(){return null},apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return Zk(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&Zk(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function Zk(e,t,n,r,i,a){if(e.composing)return!1;let o=e.state,s=o.doc.resolve(t),c=s.parent.textBetween(Math.max(0,s.parentOffset-Yk),s.parentOffset,null,``)+r;for(let l=0;l<i.length;l++){let u=i[l];if(!u.inCodeMark&&s.marks().some(e=>e.type.spec.code))continue;if(s.parent.type.spec.code){if(!u.inCode)continue}else if(u.inCode===`only`)continue;let d=u.match.exec(c);if(!d||d[0].length<r.length)continue;let f=t-(d[0].length-r.length);if(!u.inCodeMark){let e=!1;if(o.doc.nodesBetween(f,s.pos,t=>{t.isInline&&t.marks.some(e=>e.type.spec.code)&&(e=!0)}),e)continue}let p=u.handler(o,d,f,n);if(p)return u.undoable&&p.setMeta(a,{transform:p,from:t,to:n,text:r}),e.dispatch(p),!0}return!1}var Qk=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let n=e.tr,r=a.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(a.text){let t=n.doc.resolve(a.from).marks();n.replaceWith(a.from,a.to,e.schema.text(a.text,t))}else n.delete(a.from,a.to);t(n)}return!0}}return!1},$k=new qk(/--$/,`—`,{inCodeMark:!1}),eA=new qk(/\.\.\.$/,`…`,{inCodeMark:!1}),tA=[new qk(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`,{inCodeMark:!1}),new qk(/"$/,`”`,{inCodeMark:!1}),new qk(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`,{inCodeMark:!1}),new qk(/'$/,`’`,{inCodeMark:!1})];function nA(e,t,n=null,r){return new qk(e,(e,i,a,o)=>{let s=n instanceof Function?n(i):n,c=e.tr.delete(a,o),l=c.doc.resolve(a).blockRange(),u=l&&Jx(l,t,s);if(!u)return null;c.wrap(l,u);let d=c.doc.resolve(a-1).nodeBefore;return d&&d.type==t&&oS(c.doc,a-1)&&(!r||r(i,d))&&c.join(a-1),c})}function rA(e,t,n=null){return new qk(e,(e,r,i,a)=>{let o=e.doc.resolve(i),s=n instanceof Function?n(r):n;return o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t)?e.tr.delete(i,a).setBlockType(i,i,t,s):null})}var iA=`ProseMirror-prompt`;function aA(e){let t=document.body.appendChild(document.createElement(`div`));t.className=iA;let n=e=>{t.contains(e.target)||r()};setTimeout(()=>window.addEventListener(`mousedown`,n),50);let r=()=>{window.removeEventListener(`mousedown`,n),t.parentNode&&t.parentNode.removeChild(t)},i=[];for(let t in e.fields)i.push(e.fields[t].render());let a=document.createElement(`button`);a.type=`submit`,a.className=`ProseMirror-prompt-submit`,a.textContent=`OK`;let o=document.createElement(`button`);o.type=`button`,o.className=`ProseMirror-prompt-cancel`,o.textContent=`Cancel`,o.addEventListener(`click`,r);let s=t.appendChild(document.createElement(`form`));e.title&&(s.appendChild(document.createElement(`h5`)).textContent=e.title),i.forEach(e=>{s.appendChild(document.createElement(`div`)).appendChild(e)});let c=s.appendChild(document.createElement(`div`));c.className=`ProseMirror-prompt-buttons`,c.appendChild(a),c.appendChild(document.createTextNode(` `)),c.appendChild(o);let l=t.getBoundingClientRect();t.style.top=(window.innerHeight-l.height)/2+`px`,t.style.left=(window.innerWidth-l.width)/2+`px`;let u=()=>{let t=oA(e.fields,i);t&&(r(),e.callback(t))};s.addEventListener(`submit`,e=>{e.preventDefault(),u()}),s.addEventListener(`keydown`,e=>{e.keyCode==27?(e.preventDefault(),r()):e.keyCode==13&&!(e.ctrlKey||e.metaKey||e.shiftKey)?(e.preventDefault(),u()):e.keyCode==9&&window.setTimeout(()=>{t.contains(document.activeElement)||r()},500)});let d=s.elements[0];d&&d.focus()}function oA(e,t){let n=Object.create(null),r=0;for(let i in e){let a=e[i],o=t[r++],s=a.read(o),c=a.validate(s);if(c)return sA(o,c),null;n[i]=a.clean(s)}return n}function sA(e,t){let n=e.parentNode,r=n.appendChild(document.createElement(`div`));r.style.left=e.offsetLeft+e.offsetWidth+2+`px`,r.style.top=e.offsetTop-5+`px`,r.className=`ProseMirror-invalid`,r.textContent=t,setTimeout(()=>n.removeChild(r),1500)}var cA=class{constructor(e){this.options=e}read(e){return e.value}validateType(e){return null}validate(e){return!e&&this.options.required?`Required field`:this.validateType(e)||(this.options.validate?this.options.validate(e):null)}clean(e){return this.options.clean?this.options.clean(e):e}},lA=class extends cA{render(){let e=document.createElement(`input`);return e.type=`text`,e.placeholder=this.options.label,e.value=this.options.value||``,e.autocomplete=`off`,e}};function uA(e,t){let n=e.selection.$from;for(let e=n.depth;e>=0;e--){let r=n.index(e);if(n.node(e).canReplaceWith(r,r,t))return!0}return!1}function dA(e){return new uk({title:`Insert image`,label:`Image`,enable(t){return uA(t,e)},run(t,n,r){let{from:i,to:a}=t.selection,o=null;t.selection instanceof $&&t.selection.node.type==e&&(o=t.selection.node.attrs),aA({title:`Insert image`,fields:{src:new lA({label:`Location`,required:!0,value:o&&o.src}),title:new lA({label:`Title`,value:o&&o.title}),alt:new lA({label:`Description`,value:o?o.alt:t.doc.textBetween(i,a,` `)})},callback(t){r.dispatch(r.state.tr.replaceSelectionWith(e.createAndFill(t))),r.focus()}})}})}function fA(e,t){let n={label:t.title,run:e};for(let e in t)n[e]=t[e];return!t.enable&&!t.select&&(n[t.enable?`enable`:`select`]=t=>e(t)),new uk(n)}function pA(e,t){let{from:n,$from:r,to:i,empty:a}=e.selection;return a?!!t.isInSet(e.storedMarks||r.marks()):e.doc.rangeHasMark(n,i,t)}function mA(e,t){let n={active(t){return pA(t,e)}};for(let e in t)n[e]=t[e];return fA(fw(e),n)}function hA(e){return new uk({title:`Add or remove link`,icon:Ck.link,active(t){return pA(t,e)},enable(e){return!e.selection.empty},run(t,n,r){if(pA(t,e))return fw(e)(t,n),!0;aA({title:`Create a link`,fields:{href:new lA({label:`Link target`,required:!0}),title:new lA({label:`Title`})},callback(t){fw(e,t)(r.state,r.dispatch),r.focus()}})}})}function gA(e,t){return fA(zk(e,t.attrs),t)}function _A(e){let t={},n;(n=e.marks.strong)&&(t.toggleStrong=mA(n,{title:`Toggle strong style`,icon:Ck.strong})),(n=e.marks.em)&&(t.toggleEm=mA(n,{title:`Toggle emphasis`,icon:Ck.em})),(n=e.marks.code)&&(t.toggleCode=mA(n,{title:`Toggle code font`,icon:Ck.code})),(n=e.marks.link)&&(t.toggleLink=hA(n));let r;if((r=e.nodes.image)&&(t.insertImage=dA(r)),(r=e.nodes.bullet_list)&&(t.wrapBulletList=gA(r,{title:`Wrap in bullet list`,icon:Ck.bulletList})),(r=e.nodes.ordered_list)&&(t.wrapOrderedList=gA(r,{title:`Wrap in ordered list`,icon:Ck.orderedList})),(r=e.nodes.blockquote)&&(t.wrapBlockQuote=kk(r,{title:`Wrap in block quote`,icon:Ck.blockquote})),(r=e.nodes.paragraph)&&(t.makeParagraph=Ak(r,{title:`Change to paragraph`,label:`Plain`})),(r=e.nodes.code_block)&&(t.makeCodeBlock=Ak(r,{title:`Change to code block`,label:`Code`})),r=e.nodes.heading)for(let e=1;e<=10;e++)t[`makeHead`+e]=Ak(r,{title:`Change to heading `+e,label:`Level `+e,attrs:{level:e}});if(r=e.nodes.horizontal_rule){let e=r;t.insertHorizontalRule=new uk({title:`Insert horizontal rule`,label:`Horizontal rule`,enable(t){return uA(t,e)},run(t,n){n(t.tr.replaceSelectionWith(e.create()))}})}let i=e=>e.filter(e=>e);return t.insertMenu=new hk(i([t.insertImage,t.insertHorizontalRule]),{label:`Insert`}),t.typeMenu=new hk(i([t.makeParagraph,t.makeCodeBlock,t.makeHead1&&new bk(i([t.makeHead1,t.makeHead2,t.makeHead3,t.makeHead4,t.makeHead5,t.makeHead6]),{label:`Heading`})]),{label:`Type...`}),t.inlineMenu=[i([t.toggleStrong,t.toggleEm,t.toggleCode,t.toggleLink])],t.blockMenu=[i([t.wrapBulletList,t.wrapOrderedList,t.wrapBlockQuote,wk,Tk,Ek])],t.fullMenu=t.inlineMenu.concat([[t.insertMenu,t.typeMenu]],[[Dk,Ok]],t.blockMenu),t}var vA=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function yA(e,t){let n={},r;function i(e,r){if(t){let n=t[e];if(n===!1)return;n&&(e=n)}n[e]=r}if(i(`Mod-z`,NC),i(`Shift-Mod-z`,PC),i(`Backspace`,Qk),vA||i(`Mod-y`,PC),i(`Alt-ArrowUp`,GC),i(`Alt-ArrowDown`,KC),i(`Mod-BracketLeft`,qC),i(`Escape`,tw),(r=e.marks.strong)&&(i(`Mod-b`,fw(r)),i(`Mod-B`,fw(r))),(r=e.marks.em)&&(i(`Mod-i`,fw(r)),i(`Mod-I`,fw(r))),(r=e.marks.code)&&i("Mod-`",fw(r)),(r=e.nodes.bullet_list)&&i(`Shift-Ctrl-8`,zk(r)),(r=e.nodes.ordered_list)&&i(`Shift-Ctrl-9`,zk(r)),(r=e.nodes.blockquote)&&i(`Ctrl->`,cw(r)),r=e.nodes.hard_break){let e=r,t=pw(XC,(t,n)=>(n&&n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0));i(`Mod-Enter`,t),i(`Shift-Enter`,t),vA&&i(`Ctrl-Enter`,t)}if((r=e.nodes.list_item)&&(i(`Enter`,Hk(r)),i(`Mod-[`,Uk(r)),i(`Mod-]`,Kk(r))),(r=e.nodes.paragraph)&&i(`Shift-Ctrl-0`,lw(r)),(r=e.nodes.code_block)&&i(`Shift-Ctrl-\\`,lw(r)),r=e.nodes.heading)for(let e=1;e<=6;e++)i(`Shift-Ctrl-`+e,lw(r,{level:e}));if(r=e.nodes.horizontal_rule){let e=r;i(`Mod-_`,(t,n)=>(n&&n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0))}return n}function bA(e){return nA(/^\s*>\s$/,e)}function xA(e){return nA(/^(\d+)\.\s$/,e,e=>({order:+e[1]}),(e,t)=>t.childCount+t.attrs.order==+e[1])}function SA(e){return nA(/^\s*([-+*])\s$/,e)}function CA(e){return rA(/^```$/,e)}function wA(e,t){return rA(RegExp(`^(#{1,`+t+`})\\s$`),e,e=>({level:e[1].length}))}function TA(e){let t=tA.concat(eA,$k),n;return(n=e.nodes.blockquote)&&t.push(bA(n)),(n=e.nodes.ordered_list)&&t.push(xA(n)),(n=e.nodes.bullet_list)&&t.push(SA(n)),(n=e.nodes.code_block)&&t.push(CA(n)),(n=e.nodes.heading)&&t.push(wA(n,6)),Xk({rules:t})}function EA(e){let t=[TA(e.schema),lC(yA(e.schema,e.mapKeys)),lC(vw),yw(),YO()];return e.menuBar!==!1&&t.push(Pk({floating:e.floatingMenu!==!1,content:e.menuContent||_A(e.schema).fullMenu})),e.history!==!1&&t.push(jC()),t.concat(new eC({props:{attributes:{class:`ProseMirror-example-setup-style`}}}))}var DA=new Jb({nodes:{doc:{content:`block+`},paragraph:{content:`inline*`,group:`block`,parseDOM:[{tag:`p`}],toDOM(){return[`p`,0]}},blockquote:{content:`block+`,group:`block`,parseDOM:[{tag:`blockquote`}],toDOM(){return[`blockquote`,0]}},horizontal_rule:{group:`block`,parseDOM:[{tag:`hr`}],toDOM(){return[`div`,[`hr`]]}},heading:{attrs:{level:{default:1}},content:`(text | image)*`,group:`block`,defining:!0,parseDOM:[{tag:`h1`,attrs:{level:1}},{tag:`h2`,attrs:{level:2}},{tag:`h3`,attrs:{level:3}},{tag:`h4`,attrs:{level:4}},{tag:`h5`,attrs:{level:5}},{tag:`h6`,attrs:{level:6}}],toDOM(e){return[`h`+e.attrs.level,0]}},code_block:{content:`text*`,group:`block`,code:!0,defining:!0,marks:``,attrs:{params:{default:``}},parseDOM:[{tag:`pre`,preserveWhitespace:`full`,getAttrs:e=>({params:e.getAttribute(`data-params`)||``})}],toDOM(e){return[`pre`,e.attrs.params?{"data-params":e.attrs.params}:{},[`code`,0]]}},ordered_list:{content:`list_item+`,group:`block`,attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:`ol`,getAttrs(e){return{order:e.hasAttribute(`start`)?+e.getAttribute(`start`):1,tight:e.hasAttribute(`data-tight`)}}}],toDOM(e){return[`ol`,{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?`true`:null},0]}},bullet_list:{content:`list_item+`,group:`block`,attrs:{tight:{default:!1}},parseDOM:[{tag:`ul`,getAttrs:e=>({tight:e.hasAttribute(`data-tight`)})}],toDOM(e){return[`ul`,{"data-tight":e.attrs.tight?`true`:null},0]}},list_item:{content:`block+`,defining:!0,parseDOM:[{tag:`li`}],toDOM(){return[`li`,0]}},text:{group:`inline`},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:`inline`,draggable:!0,parseDOM:[{tag:`img[src]`,getAttrs(e){return{src:e.getAttribute(`src`),title:e.getAttribute(`title`),alt:e.getAttribute(`alt`)}}}],toDOM(e){return[`img`,e.attrs]}},hard_break:{inline:!0,group:`inline`,selectable:!1,parseDOM:[{tag:`br`}],toDOM(){return[`br`]}}},marks:{em:{parseDOM:[{tag:`i`},{tag:`em`},{style:`font-style=italic`},{style:`font-style=normal`,clearMark:e=>e.type.name==`em`}],toDOM(){return[`em`]}},strong:{parseDOM:[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!=`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name==`strong`},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return[`strong`]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:`a[href]`,getAttrs(e){return{href:e.getAttribute(`href`),title:e.getAttribute(`title`)}}}],toDOM(e){return[`a`,e.attrs]}},code:{code:!0,parseDOM:[{tag:`code`}],toDOM(){return[`code`]}}}});function OA(e,t){if(e.isText&&t.isText&&rb.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var kA=class{constructor(e,t){this.schema=e,this.tokenHandlers=t,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:rb.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let t=this.top(),n=t.content,r=n[n.length-1],i=this.schema.text(e,t.marks),a;r&&(a=OA(r,i))?n[n.length-1]=a:n.push(i)}openMark(e){let t=this.top();t.marks=e.addToSet(t.marks)}closeMark(e){let t=this.top();t.marks=e.removeFromSet(t.marks)}parseTokens(e){for(let t=0;t<e.length;t++){let n=e[t],r=this.tokenHandlers[n.type];if(!r)throw Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,e,t)}}addNode(e,t,n){let r=this.top(),i=e.createAndFill(t,n,r?r.marks:[]);return i?(this.push(i),i):null}openNode(e,t){this.stack.push({type:e,attrs:t,content:[],marks:rb.none})}closeNode(){let e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}};function AA(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function jA(e,t){return e.noCloseToken||t==`code_inline`||t==`code_block`||t==`fence`}function MA(e){return e[e.length-1]==`
|
|
108
|
-
`?e.slice(0,e.length-1):e}function NA(){}function PA(e,t){let n=Object.create(null);for(let r in t){let i=t[r];if(i.block){let t=e.nodeType(i.block);jA(i,r)?n[r]=(e,n,r,a)=>{e.openNode(t,AA(i,n,r,a)),e.addText(MA(n.content)),e.closeNode()}:(n[r+`_open`]=(e,n,r,a)=>e.openNode(t,AA(i,n,r,a)),n[r+`_close`]=e=>e.closeNode())}else if(i.node){let t=e.nodeType(i.node);n[r]=(e,n,r,a)=>e.addNode(t,AA(i,n,r,a))}else if(i.mark){let t=e.marks[i.mark];jA(i,r)?n[r]=(e,n,r,a)=>{e.openMark(t.create(AA(i,n,r,a))),e.addText(MA(n.content)),e.closeMark(t)}:(n[r+`_open`]=(e,n,r,a)=>e.openMark(t.create(AA(i,n,r,a))),n[r+`_close`]=e=>e.closeMark(t))}else if(i.ignore)jA(i,r)?n[r]=NA:(n[r+`_open`]=NA,n[r+`_close`]=NA);else throw RangeError(`Unrecognized parsing spec `+JSON.stringify(i))}return n.text=(e,t)=>e.addText(t.content),n.inline=(e,t)=>e.parseTokens(t.children),n.softbreak=n.softbreak||(e=>e.addText(` `)),n}var FA=class{constructor(e,t,n){this.schema=e,this.tokenizer=t,this.tokens=n,this.tokenHandlers=PA(e,n)}parse(e,t={}){let n=new kA(this.schema,this.tokenHandlers),r;n.parseTokens(this.tokenizer.parse(e,t));do r=n.closeNode();while(n.stack.length);return r||this.schema.topNodeType.createAndFill()}};function IA(e,t){for(;++t<e.length;)if(e[t].type!=`list_item_open`)return e[t].hidden;return!1}var LA=new FA(DA,Vy(`commonmark`,{html:!1}),{blockquote:{block:`blockquote`},paragraph:{block:`paragraph`},list_item:{block:`list_item`},bullet_list:{block:`bullet_list`,getAttrs:(e,t,n)=>({tight:IA(t,n)})},ordered_list:{block:`ordered_list`,getAttrs:(e,t,n)=>({order:+e.attrGet(`start`)||1,tight:IA(t,n)})},heading:{block:`heading`,getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:`code_block`,noCloseToken:!0},fence:{block:`code_block`,getAttrs:e=>({params:e.info||``}),noCloseToken:!0},hr:{node:`horizontal_rule`},image:{node:`image`,getAttrs:e=>({src:e.attrGet(`src`),title:e.attrGet(`title`)||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:`hard_break`},em:{mark:`em`},strong:{mark:`strong`},link:{mark:`link`,getAttrs:e=>({href:e.attrGet(`href`),title:e.attrGet(`title`)||null})},code_inline:{mark:`code`,noCloseToken:!0}}),RA={open:``,close:``,mixable:!0},zA=class{constructor(e,t,n={}){this.nodes=e,this.marks=t,this.options=n}serialize(e,t={}){t=Object.assign({},this.options,t);let n=new UA(this.nodes,this.marks,t);return n.renderContent(e),n.out}},BA=new zA({blockquote(e,t){e.wrapBlock(`> `,null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||``)+`
|
|
109
|
-
`),e.text(t.textContent,!1),e.write(`
|
|
110
|
-
`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat(`#`,t.attrs.level)+` `),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||`---`),e.closeBlock(t)},bullet_list(e,t){e.renderList(t,` `,()=>(t.attrs.bullet||`*`)+` `)},ordered_list(e,t){let n=t.attrs.order??1,r=String(n+t.childCount-1).length,i=e.repeat(` `,r+2);e.renderList(t,i,t=>{let i=String(n+t);return e.repeat(` `,r-i.length)+i+`. `})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write(`]/g,`\\$&`)+(t.attrs.title?` "`+t.attrs.title.replace(/"/g,`\\"`)+`"`:``)+`)`)},hard_break(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type){e.write(`\\
|
|
111
|
-
`);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:`*`,close:`*`,mixable:!0,expelEnclosingWhitespace:!0},strong:{open:`**`,close:`**`,mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,r){return e.inAutolink=HA(t,n,r),e.inAutolink?`<`:`[`},close(e,t,n,r){let{inAutolink:i}=e;return e.inAutolink=void 0,i?`>`:`](`+t.attrs.href.replace(/[\(\)"]/g,`\\$&`)+(t.attrs.title?` "${t.attrs.title.replace(/"/g,`\\"`)}"`:``)+`)`},mixable:!0},code:{open(e,t,n,r){return VA(n.child(r),-1)},close(e,t,n,r){return VA(n.child(r-1),1)},escape:!1}});function VA(e,t){let n=/`+/g,r,i=0;if(e.isText)for(;r=n.exec(e.text);)i=Math.max(i,r[0].length);let a=i>0&&t>0?" `":"`";for(let e=0;e<i;e++)a+="`";return i>0&&t<0&&(a+=` `),a}function HA(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var UA=class{constructor(e,t,n){this.nodes=e,this.marks=t,this.options=n,this.delim=``,this.out=``,this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,this.options.tightLists===void 0&&(this.options.tightLists=!1),this.options.hardBreakNodeName===void 0&&(this.options.hardBreakNodeName=`hard_break`)}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+=`
|
|
112
|
-
`),e>1){let t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(let n=1;n<e;n++)this.out+=t+`
|
|
113
|
-
`}this.closed=null}}getMark(e){let t=this.marks[e];if(!t){if(this.options.strict!==!1)throw Error(`Mark type \`${e}\` not supported by Markdown renderer`);t=RA}return t}wrapBlock(e,t,n,r){let i=this.delim;this.write(t??e),this.delim+=e,r(),this.delim=i,this.closeBlock(n)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
|
|
114
|
-
`)}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,t=!0){let n=e.split(`
|
|
115
|
-
`);for(let e=0;e<n.length;e++)this.write(),!t&&n[e][0]==`[`&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+`\\!`),this.out+=t?this.esc(n[e],this.atBlockStart):n[e],e!=n.length-1&&(this.out+=`
|
|
116
|
-
`)}render(e,t,n){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,t,n);else if(this.options.strict!==!1)throw Error("Token type `"+e.type.name+"` not supported by Markdown renderer");else e.type.isLeaf||(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}renderContent(e){e.forEach((t,n,r)=>this.render(t,e,r))}renderInline(e,t=!0){this.atBlockStart=t;let n=[],r=``,i=(t,i,a)=>{let o=t?t.marks:[];t&&t.type.name===this.options.hardBreakNodeName&&(o=o.filter(t=>{if(a+1==e.childCount)return!1;let n=e.child(a+1);return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))}));let s=o.length?o[o.length-1]:null,c=s&&this.getMark(s.type.name).escape===!1,l=o.length-+!!c;outer:for(let e=0;e<l;e++){let t=o[e];if(!this.getMark(t.type.name).mixable)break;for(let r=0;r<n.length;r++){let i=n[r];if(!this.getMark(i.type.name).mixable)break;if(t.eq(i)){e>r?o=o.slice(0,r).concat(t).concat(o.slice(r,e)).concat(o.slice(e+1,l)):r>e&&(o=o.slice(0,e).concat(o.slice(e+1,r)).concat(t).concat(o.slice(r,l)));continue outer}}}let u=0;for(;u<Math.min(n.length,l)&&o[u].eq(n[u]);)++u;let d=r;if(r=``,t&&t.isText&&o.some(e=>{let t=this.getMark(e.type.name);return t&&t.expelEnclosingWhitespace&&!n.some((t,n)=>n<u&&t.eq(e))})){let[e,r,i]=/^(\s*)(.*)$/m.exec(t.text);r&&(d+=r,t=i?t.withText(i):null,t||(o=n))}if(t&&t.isText&&o.some(t=>{let n=this.getMark(t.type.name);return n&&n.expelEnclosingWhitespace&&!this.isMarkAhead(e,a+1,t)})){let[e,i,a]=/^(.*?)(\s*)$/m.exec(t.text);a&&(r=a,t=i?t.withText(i):null,t||(o=n))}if(t||a==e.childCount)for(;u<n.length;)this.text(this.markString(n.pop(),!1,e,a),!1);if(d&&this.text(d),t){for(;n.length<l;){let t=o[n.length];n.push(t),this.text(this.markString(t,!0,e,a),!1),this.atBlockStart=!1}c&&t.isText?this.text(this.markString(s,!0,e,a)+t.text+this.markString(s,!1,e,a+1),!1):this.render(t,e,a),this.atBlockStart=!1,t.isText&&t.nodeSize>0&&(this.atBlockStart=!1)}};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,t,n){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=e.attrs.tight===void 0?this.options.tightLists:e.attrs.tight,i=this.inTightList;this.inTightList=r,e.forEach((i,a,o)=>{o&&r&&this.flushClose(1),this.wrapBlock(t,n(o),e,()=>this.render(i,e,o))}),this.inTightList=i}esc(e,t=!1){return e=e.replace(/[`*\\~\[\]_]/g,(t,n)=>t==`_`&&n>0&&n+1<e.length&&e[n-1].match(/\w/)&&e[n+1].match(/\w/)?t:`\\`+t),t&&(e=e.replace(/^(\+[ ]|[\-*>])/,`\\$&`).replace(/^(\s*)(#{1,6})(\s|$)/,`$1\\$2$3`).replace(/^(\s*\d+)\.\s/,`$1\\. `)),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,`\\$&`)),e}quote(e){let t=e.indexOf(`"`)==-1?`""`:e.indexOf(`'`)==-1?`''`:`()`;return t[0]+e+t[1]}repeat(e,t){let n=``;for(let r=0;r<t;r++)n+=e;return n}markString(e,t,n,r){let i=this.getMark(e.type.name),a=t?i.open:i.close;return typeof a==`string`?a:a(this,e,n,r)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(e,t,n){for(;;t++){if(t>=e.childCount)return!1;let r=e.child(t);if(r.type.name!=this.options.hardBreakNodeName)return n.isInSet(r.marks);t++}}};function WA({anchor:e,anchorRect:t,getAnchorRect:n,groups:r,activeIndex:i,loading:a,error:o,emptyDiagnostics:s,onActiveIndexChange:c,onSelect:l,onClose:u}){let{text:f}=H(),p=(0,d.useRef)(null),[m,h]=(0,d.useState)({left:0,top:0}),g=e.closest(`dialog`)??document.body;(0,d.useLayoutEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{let t=n(),r=e.getBoundingClientRect(),i=window.visualViewport,a=i?.offsetLeft??0,o=i?.offsetTop??0,s=i?.width??window.innerWidth,c=i?.height??window.innerHeight,l=t.top-4-r.height>=o+8,u=Math.max(a+8,Math.min(t.left,a+s-r.width-8)),d=l?t.top-r.height-4:t.bottom+4,f=Math.max(o+8,Math.min(d,o+c-r.height-8));h({left:u,top:f})};return t(),window.addEventListener(`resize`,t),document.addEventListener(`scroll`,t,!0),window.visualViewport?.addEventListener(`resize`,t),window.visualViewport?.addEventListener(`scroll`,t),()=>{window.removeEventListener(`resize`,t),document.removeEventListener(`scroll`,t,!0),window.visualViewport?.removeEventListener(`resize`,t),window.visualViewport?.removeEventListener(`scroll`,t)}},[i,t,n,r]),(0,d.useLayoutEffect)(()=>{p.current?.querySelector(`[data-completion-index="${i}"]`)?.scrollIntoView({block:`nearest`})},[i]),(0,d.useEffect)(()=>{function t(t){let n=t.target;!e.contains(n)&&!p.current?.contains(n)&&u()}return document.addEventListener(`pointerdown`,t),()=>document.removeEventListener(`pointerdown`,t)},[e,u]);let _=r.some(e=>e.options.length>0);return(0,vr.createPortal)((0,B.jsxs)(`div`,{ref:p,className:`ai-chat-skill-menu issue-mention-menu composer-completion-menu`,role:`listbox`,"aria-label":f(`Composer 补全`,`Composer completions`),"aria-busy":a,style:{position:`fixed`,left:m.left,top:m.top},onPointerDown:e=>e.preventDefault(),children:[r.map(e=>e.options.length>0&&(0,B.jsxs)(`section`,{className:`composer-completion-group`,role:`group`,"aria-label":e.label,children:[(0,B.jsx)(`header`,{"aria-hidden":`true`,children:e.label}),e.options.map(e=>(0,B.jsxs)(`button`,{className:e.selectableIndex===i?`is-selected`:``,type:`button`,role:`option`,"aria-selected":e.selectableIndex===i,"data-completion-index":e.selectableIndex,onPointerEnter:()=>c(e.selectableIndex),onClick:()=>l(e.selectableIndex),children:[e.icon===`conversation`?(0,B.jsx)(Vc,{color:`currentColor`}):e.icon===`action`?(0,B.jsx)(Xc,{color:`currentColor`,size:16}):(0,B.jsx)(Bc,{color:`currentColor`}),(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`strong`,{children:e.label}),e.description&&(0,B.jsx)(`small`,{children:e.description})]})]},e.id))]},e.id)),a&&(0,B.jsx)(`p`,{className:`composer-completion-state`,role:`status`,children:f(`正在读取补全…`,`Loading completions…`)}),!a&&o&&(0,B.jsx)(`p`,{className:`composer-completion-state is-error`,role:`alert`,children:o}),!a&&!o&&!_&&(0,B.jsxs)(`div`,{className:`composer-completion-empty`,role:`status`,children:[(0,B.jsx)(`p`,{className:`composer-completion-state`,children:f(`没有匹配的可选项`,`No matching completions`)}),s.length>0&&(0,B.jsx)(`ul`,{className:`composer-completion-diagnostics`,"aria-label":f(`来源状态`,`Source status`),children:s.map(e=>(0,B.jsx)(`li`,{children:e},e))})]})]}),g)}var GA=25*1024*1024,KA=[];function qA(e){return`${e.name}:${e.size}:${e.lastModified}`}function JA(e){return e.type===`candidate`?`candidate:${e.candidate.kind}:${e.candidate.candidateRef}`:`issue:${e.task.id}`}function YA({segment:e,disabled:t,onRemove:n}){let[r,i]=(0,d.useState)(``),{text:a}=H();return(0,d.useLayoutEffect)(()=>{let t=URL.createObjectURL(e.file);return i(t),()=>URL.revokeObjectURL(t)},[e.file]),(0,B.jsxs)(`figure`,{className:`inline-media-image`,contentEditable:!1,"data-inline-media-segment":e.id,children:[r&&(0,B.jsx)(`img`,{src:r,alt:e.file.name,draggable:!1}),(0,B.jsx)(`button`,{type:`button`,disabled:t,"aria-label":a(`移除 ${e.file.name}`,`Remove ${e.file.name}`),onClick:n,children:(0,B.jsx)(J,{name:`close`})})]})}function XA({segment:e,disabled:t,onRemove:n}){let{text:r}=H();return(0,B.jsxs)(`figure`,{className:`inline-media-image`,contentEditable:!1,"data-inline-media-segment":e.id,children:[(0,B.jsx)(`img`,{src:Ie(e.url),alt:e.alt,draggable:!1}),(0,B.jsx)(`button`,{type:`button`,disabled:t,"aria-label":r(`移除 ${e.alt||`图片`}`,`Remove ${e.alt||`image`}`),onClick:n,children:(0,B.jsx)(J,{name:`close`})})]})}function ZA({segment:e,disabled:t,onRemove:n}){let[r,i]=(0,d.useState)(``),{text:a}=H();return(0,d.useLayoutEffect)(()=>{let t=URL.createObjectURL(e.file);return i(t),()=>URL.revokeObjectURL(t)},[e.file]),(0,B.jsxs)(`figure`,{className:`inline-media-image inline-media-video`,contentEditable:!1,"data-inline-media-segment":e.id,children:[r&&(0,B.jsx)(`video`,{src:r,"aria-label":e.file.name,controls:!0}),(0,B.jsx)(`button`,{type:`button`,disabled:t,"aria-label":a(`移除 ${e.file.name}`,`Remove ${e.file.name}`),onClick:n,children:(0,B.jsx)(J,{name:`close`})})]})}function QA({segment:e,disabled:t,onRemove:n}){let{text:r}=H();return(0,B.jsxs)(`figure`,{className:`inline-media-image inline-media-video`,contentEditable:!1,"data-inline-media-segment":e.id,children:[(0,B.jsx)(`video`,{src:Pe({id:e.attachmentId}),"aria-label":e.filename,controls:!0}),(0,B.jsx)(`button`,{type:`button`,disabled:t,"aria-label":r(`移除 ${e.filename}`,`Remove ${e.filename}`),onClick:n,children:(0,B.jsx)(J,{name:`close`})})]})}function $A({segment:e,disabled:t,onRemove:n}){let{text:r}=H(),i=e.type===`pending-attachment`?e.file.name:e.filename,a=e.type===`pending-attachment`?e.file.size:e.size;return(0,B.jsxs)(`span`,{className:`inline-media-attachment`,contentEditable:!1,"data-inline-media-segment":e.id,children:[(0,B.jsx)(`span`,{className:`attachment-file-icon`,"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`file`})}),(0,B.jsxs)(`span`,{className:`attachment-copy composer-attachment-copy`,children:[(0,B.jsx)(`strong`,{children:i}),a!==null&&(0,B.jsx)(`span`,{children:ej(a)})]}),(0,B.jsx)(`button`,{type:`button`,disabled:t,"aria-label":r(`移除 ${i}`,`Remove ${i}`),onClick:n,children:(0,B.jsx)(J,{name:`close`})})]})}function ej(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(+(e<10*1024))} KB`:`${(e/(1024*1024)).toFixed(+(e<10*1024*1024))} MB`}function tj({segment:e,task:t,disabled:n,onRemove:r}){let{text:i}=H(),a=t?.externalKey??e.identifier;return(0,B.jsxs)(`span`,{role:`button`,tabIndex:n?-1:0,className:`issue-reference-inline inline-media-issue-reference${t?` issue-reference-status-${t.status}`:``}`,contentEditable:!1,"data-inline-media-segment":e.id,"data-taskboard-inline-media-markdown":e.markdown,"aria-disabled":n,"aria-label":t?i(`${a} ${t.title},按退格键或删除键移除`,`${a} ${t.title}, press Backspace or Delete to remove`):i(`${a},按退格键或删除键移除`,`${a}, press Backspace or Delete to remove`),onKeyDown:e=>{n||e.defaultPrevented||e.key!==`Backspace`&&e.key!==`Delete`||(e.preventDefault(),r())},children:[(0,B.jsxs)(`span`,{className:`issue-reference-identity`,children:[t&&(0,B.jsx)(`span`,{className:`status-icon issue-reference-status status-icon-${wl[t.status].tone}`,children:(0,B.jsx)(Ac,{status:t.status,color:`var(--column-status-color)`,size:15})}),(0,B.jsx)(`span`,{className:`issue-reference-id`,children:a})]}),t&&(0,B.jsx)(`span`,{className:`issue-reference-title`,children:t.title})]})}function nj({segment:e,disabled:t,onRemove:n}){let{text:r}=H(),i=e.type===`skill-reference`?r(`Skill`,`Skill`):e.type===`agent-reference`?r(`Agent`,`Agent`):r(`不支持的引用`,`Unsupported reference`);return(0,B.jsxs)(`button`,{type:`button`,className:`inline-media-composer-reference is-${e.type}`,contentEditable:!1,"data-inline-media-segment":e.id,"data-taskboard-inline-media-markdown":e.markdown,disabled:t,"aria-label":r(`${i} ${e.label},按退格键或删除键移除`,`${i} ${e.label}, press Backspace or Delete to remove`),onKeyDown:e=>{e.defaultPrevented||e.key!==`Backspace`&&e.key!==`Delete`||(e.preventDefault(),n())},children:[e.type===`skill-reference`?(0,B.jsx)(Bc,{color:`currentColor`}):(0,B.jsx)(Vc,{color:`currentColor`}),(0,B.jsx)(`span`,{children:e.label})]})}var rj=`taskboard_inline_media`,ij=`taskboard_inline_reference`,aj=`https://taskboard.invalid/inline-media/`,oj=/^\[([ xX])\][\t ]+/;function sj(e){return/^\[[xX]\]/.test(e)}function cj(e){return e.replace(/^\[[ xX]\]/,sj(e)?`[ ]`:`[x]`)}var lj=LA.schema.spec.marks.append({strike:{parseDOM:[{tag:`s`},{tag:`del`},{style:`text-decoration=line-through`}],toDOM(){return[`s`,0]}}}),uj=[`strong`,`em`,`code`,`link`,`strike`].reduce((e,t)=>{let n=e.get(t);return n?e.update(t,{...n,inclusive:!1}):e},lj),dj=LA.schema.spec.nodes,fj=dj.get(`list_item`),pj=new Jb({nodes:dj.update(`list_item`,{...fj,attrs:{...fj.attrs??{},taskMarker:{default:null}},toDOM(e){let t=typeof e.attrs.taskMarker==`string`?e.attrs.taskMarker:null;if(!t)return[`li`,0];let n={type:`checkbox`,contenteditable:`false`,tabindex:`-1`,"data-inline-media-task-checkbox":`true`};return sj(t)&&(n.checked=`checked`),[`li`,{class:`task-list-item`},[`input`,n],[`div`,{class:`inline-media-task-content`},0]]}}).update(`heading`,{...dj.get(`heading`),content:`inline*`}).append({table:{group:`block`,content:`table_row+`,parseDOM:[{tag:`table`}],toDOM(){return[`table`,[`tbody`,0]]}},table_row:{content:`(table_header | table_cell)+`,parseDOM:[{tag:`tr`}],toDOM(){return[`tr`,0]}},table_header:{attrs:{align:{default:null}},content:`inline*`,parseDOM:[{tag:`th`,getAttrs(e){return{align:e instanceof HTMLElement&&e.style.textAlign||null}}}],toDOM(e){return[`th`,e.attrs.align?{style:`text-align:${e.attrs.align}`}:{},0]}},table_cell:{attrs:{align:{default:null}},content:`inline*`,parseDOM:[{tag:`td`,getAttrs(e){return{align:e instanceof HTMLElement&&e.style.textAlign||null}}}],toDOM(e){return[`td`,e.attrs.align?{style:`text-align:${e.attrs.align}`}:{},0]}},[rj]:{group:`block`,atom:!0,selectable:!0,draggable:!0,attrs:{segmentId:{}},toDOM(e){return[`div`,{"data-taskboard-editor-media":String(e.attrs.segmentId)}]},parseDOM:[{tag:`div[data-taskboard-editor-media]`,getAttrs(e){if(!(e instanceof HTMLElement))return!1;let t=e.dataset.taskboardEditorMedia;return t?{segmentId:t}:!1}}]},[ij]:{inline:!0,group:`inline`,atom:!0,selectable:!0,draggable:!0,attrs:{segmentId:{}},toDOM(e){return[`span`,{"data-taskboard-editor-reference":String(e.attrs.segmentId)}]},parseDOM:[{tag:`span[data-taskboard-editor-reference]`,getAttrs(e){if(!(e instanceof HTMLElement))return!1;let t=e.dataset.taskboardEditorReference;return t?{segmentId:t}:!1}}]}}),marks:uj});function mj(e){return`})`}function hj(e){if(typeof e!=`string`||!e.startsWith(aj))return null;let t=e.slice(39);if(!t||t.includes(`/`)||t.includes(`?`)||t.includes(`#`))return null;try{return decodeURIComponent(t)}catch{return null}}function gj(e){return e.type!==`text`}function _j(e){return e?.type===`pending-image`||e?.type===`persisted-image`||e?.type===`pending-attachment`||e?.type===`persisted-attachment`}function vj(e){return!e||e.type===`text`||Au(e)?`inline-media-atom`:e.type===`pending-attachment`||e.type===`persisted-attachment`?e.type===`pending-attachment`&&e.file.type.startsWith(`video/`)||e.type===`persisted-attachment`&&e.contentType?.startsWith(`video/`)?`inline-media-atom inline-media-attachment-atom inline-media-video-atom`:`inline-media-atom inline-media-attachment-atom`:`inline-media-atom inline-media-image-atom`}function yj(e,t,n=!1){n&&e.clear();for(let n of t)gj(n)&&e.set(n.id,n)}function bj(e,t){if(!e||!t)return`${e}${t}`;let n=e.match(/\n*$/)?.[0].length??0,r=t.match(/^\n*/)?.[0].length??0;return`${e}${`
|
|
117
|
-
`.repeat(Math.max(0,2-n-r))}${t}`}function xj(e){let t=``,n=!1;for(let r of e){let e=r.type===`text`?r.text:mj(r.id);if(e){if(_j(r)){t=bj(t,e),n=!0;continue}t=n?bj(t,e):t+e,n=!1}}return t}function Sj(e){return(_j(e)?pj.nodes[rj]:pj.nodes[ij]).create({segmentId:e.id})}function Cj(e,t){if(e.isTextblock){let n=[],r=[],i=()=>{r.length!==0&&(n.push(e.copy(Z.fromArray(r))),r=[])};return e.forEach(e=>{if(e.type.name===`image`){let a=hj(e.attrs.src),o=a?t.get(a):void 0;if(o){let e=Sj(o);_j(o)?(i(),n.push(e)):r.push(e);return}}r.push(e)}),i(),n.length>0?n:[e.copy(Z.empty)]}if(e.isLeaf)return[e];let n=[];if(e.forEach(e=>n.push(...Cj(e,t))),e.type.name===`list_item`&&(n[0]?.type.name!==`paragraph`&&n.unshift(pj.nodes.paragraph.create()),typeof e.attrs.taskMarker!=`string`)){let t=oj.exec(n[0].textContent)?.[0];if(t)return n[0]=n[0].cut(t.length),[e.type.create({...e.attrs,taskMarker:t},Z.fromArray(n),e.marks)]}return[e.copy(Z.fromArray(n))]}var wj=new Vy(`commonmark`,{html:!1}).enable([`table`,`strikethrough`]),Tj=-126;wj.inline.ruler.before(`strikethrough`,`single_tilde_strikethrough`,(e,t)=>{let n=e.src.charCodeAt(e.pos)===126?e.scanDelims(e.pos,!0):null;if(!n||n.length!==1||t)return!1;let r=e.push(`text`,``,0);return r.content=`~`,e.delimiters.push({marker:Tj,length:0,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close}),e.pos+=1,!0}),wj.inline.ruler2.before(`strikethrough`,`restore_single_tilde_marker`,e=>{for(let t of e.delimiters)t.marker===Tj&&(t.marker=126);for(let t of e.tokens_meta)for(let e of t?.delimiters??[])e.marker===Tj&&(e.marker=126);return!0});var Ej=new FA(pj,wj,{...LA.tokens,s:{mark:`strike`},table:{block:`table`},thead:{ignore:!0},tbody:{ignore:!0},tr:{block:`table_row`},th:{block:`table_header`,getAttrs(e){return{align:/^text-align:(left|center|right)$/.exec(e.attrGet(`style`)??``)?.[1]??null}}},td:{block:`table_cell`,getAttrs(e){return{align:/^text-align:(left|center|right)$/.exec(e.attrGet(`style`)??``)?.[1]??null}}},softbreak:{node:`hard_break`}});function Dj(e){let t=new Map;yj(t,e);let n=Cj(Ej.parse(xj(e)),t)[0];return n.lastChild?.type===pj.nodes.paragraph?n:n.copy(n.content.append(Z.from(pj.nodes.paragraph.create())))}function Oj(e,t,n){return new qk(e,(e,r,i,a)=>{let o=r[1];if(!o)return null;let s=n?.(r);return e.tr.replaceWith(i,a,e.schema.text(o,[t.create(s)])).setStoredMarks([])})}function kj(){return new qk(/^\[([ xX])\][\t ]$/,(e,t,n,r)=>{let{$from:i}=e.selection;if(i.parent.type!==pj.nodes.paragraph||i.depth<2)return null;let a=i.depth-1,o=i.node(a);return o.type!==pj.nodes.list_item||n!==i.start()?null:e.tr.delete(n,r).setNodeMarkup(i.before(a),void 0,{...o.attrs,taskMarker:t[0]})})}function Aj(){let e=[nA(/^\s*>\s$/,pj.nodes.blockquote),nA(/^(\d+)\.\s$/,pj.nodes.ordered_list,e=>({order:Number(e[1])}),(e,t)=>t.childCount+t.attrs.order===Number(e[1])),nA(/^\s*([-+*])\s$/,pj.nodes.bullet_list),kj(),rA(/^```$/,pj.nodes.code_block),rA(/^(#{1,6})\s$/,pj.nodes.heading,e=>({level:e[1].length})),Oj(/\*\*([^*\n]+)\*\*$/,pj.marks.strong),Oj(/__([^_\n]+)__$/,pj.marks.strong),Oj(/`([^`\n]+)`$/,pj.marks.code),Oj(/(?<!\*)\*([^*\n]+)\*$/,pj.marks.em),Oj(/(?<!_)_([^_\n]+)_$/,pj.marks.em),Oj(/~~([^~\n]+)~~$/,pj.marks.strike),Oj(/(?<!~)~([^~\n]+)~$/,pj.marks.strike),Oj(/\[([^\]\n]+)\]\(([^)\s]+)\)$/,pj.marks.link,e=>({href:e[2],title:null}))],[,...t]=EA({schema:pj,menuBar:!1});return[Xk({rules:e}),...t]}function jj(e,t){if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey)return!1;if(t.preventDefault(),(t.shiftKey?Uk(pj.nodes.list_item):Kk(pj.nodes.list_item))(e.state,t=>e.dispatch(t),e))return!0;let{$from:n}=e.state.selection;if(!n.parent.isTextblock)return!0;let r=n.start(),i=/^[\u00a0 ]{1,2}/.exec(n.parent.textContent)?.[0];return t.shiftKey?i&&e.dispatch(e.state.tr.delete(r,r+i.length)):e.dispatch(e.state.tr.insertText(`\xA0\xA0`,r)),!0}var Mj=new zA({...BA.nodes,hard_break(e){e.write(`
|
|
118
|
-
`)},paragraph(e,t,n,r){let i=n.type===pj.nodes.list_item&&r===0&&typeof n.attrs.taskMarker==`string`?n.attrs.taskMarker:null,a=n.type===pj.nodes.list_item&&r===0?oj.exec(t.textContent)?.[0]:null,o=i??a;o?(e.write(o),e.renderInline(i?t:t.cut(o.length),!1)):e.renderInline(t),e.closeBlock(t)},table(e,t){let n=e;t.forEach((t,r,i)=>{e.write(`|`),t.forEach(t=>{e.write(` `);let r=n.out.length;e.renderInline(t,!1),n.out=n.out.slice(0,r)+n.out.slice(r).replace(/\|/g,`\\|`),e.write(` |`)}),e.ensureNewLine(),i===0&&(e.write(`|`),t.forEach(t=>{let n=t.attrs.align===`left`?`:---`:t.attrs.align===`center`?`:---:`:t.attrs.align===`right`?`---:`:`---`;e.write(` ${n} |`)}),e.ensureNewLine())}),e.closeBlock(t)},[rj](e,t){e.write(mj(String(t.attrs.segmentId))),e.closeBlock(t)},[ij](e,t){e.write(mj(String(t.attrs.segmentId)))}},{...BA.marks,strike:{open:`~~`,close:`~~`,mixable:!0,expelEnclosingWhitespace:!0}});function Nj(e,t,n){let r=Su(Mj.serialize(e),t).map(e=>{if(e.type!==`persisted-image`)return e;let t=hj(e.url);return t?n.get(t)??e:e});return Nu(ku(r.map((e,t)=>{if(e.type!==`text`)return e;let n=e.text;return Eu(r[t-1])&&n.startsWith(`
|
|
119
|
-
`)&&(n=n.slice(1)),Eu(r[t+1])&&n.endsWith(`
|
|
120
|
-
`)&&(n=n.slice(0,-1)),n===e.text?e:{...e,text:n}})))}function Pj(e,t,n){let r=e.content;return r.firstChild?.isInline&&(r=Z.from(pj.nodes.paragraph.create(null,r))),Nj(pj.topNodeType.create(null,r),t,n)}function Fj(e){let t=e.flatMap(e=>{switch(e.type){case`text`:return[];case`pending-image`:case`pending-attachment`:return[`${e.type}:${e.id}:${qA(e.file)}`];case`persisted-image`:return[`${e.type}:${e.id}:${e.url}:${e.alt}`];case`persisted-attachment`:return[`${e.type}:${e.id}:${e.attachmentId}:${e.contentType??``}:${e.size??``}:${e.filename}:${e.url}`];case`issue-reference`:return[`${e.type}:${e.id}:${e.taskId??``}:${e.markdown}`];case`skill-reference`:case`agent-reference`:return[`${e.type}:${e.id}:${e.referenceKey}:${e.markdown}`];case`unsupported-reference`:return[`${e.type}:${e.id}:${e.referenceUri}:${e.markdown}`]}});return`${Ou([...e])}\u0000${t.join(``)}`}function Ij(e){let t=!1;return e.descendants(e=>((e.type.name===rj||e.type.name===ij)&&(t=!0),!t)),!t&&e.textContent.length===0}function Lj(e,t,n){let{selection:r}=e.state;if(!(r instanceof LS)||!r.empty||!r.$from.parent.isTextblock)return null;let i=r.$from.parent.textBetween(0,r.$from.parentOffset,`
|
|
121
|
-
`,``),a=/(?:^|\s)([@/])([^\s@/]*)$/.exec(i);if(!a)return null;let o=a[1];if(o===`/`&&!t||o===`@`&&!t&&n===0)return null;let s=a.index+a[0].lastIndexOf(o),c=r.$from.start()+s,l=e.coordsAtPos(c);return{from:c,to:r.from,query:a[2],trigger:o,anchor:e.dom,anchorRect:new DOMRect(l.left,l.top,0,Math.max(1,l.bottom-l.top))}}function Rj(e,t){let n=null;return e.descendants((e,r)=>n===null&&(e.type.name===rj||e.type.name===ij)&&e.attrs.segmentId===t?(n=r,!1):n===null),n}function zj(e,t){let n=e.$from;if(t&&n.parentOffset>0){let t=n.nodeBefore;return t?{node:t,position:e.from-t.nodeSize}:null}if(!t&&n.parentOffset<n.parent.content.size){let t=n.nodeAfter;return t?{node:t,position:e.from}:null}for(let e=n.depth;e>0;--e){let r=e-1,i=n.node(r),a=n.index(r);if(t&&a>0){let t=i.child(a-1);return{node:t,position:n.before(e)-t.nodeSize}}if(!t&&a+1<i.childCount)return{node:i.child(a+1),position:n.after(e)}}return null}var Bj=(0,d.forwardRef)(function({segments:e,mentionTasks:t=KA,referenceTasks:n,completionContext:r,placeholder:i,ariaLabel:a,disabled:o=!1,allowAttachments:s=!1,className:c=``,onChange:l,onError:u,onKeyDown:f},p){let{text:m}=H(),h=(0,d.useRef)(null),g=(0,d.useRef)(null),_=(0,d.useRef)(new Map),v=(0,d.useRef)(new Map),y=(0,d.useRef)(new Map),b=(0,d.useRef)(e),x=(0,d.useRef)(null),S=(0,d.useRef)(0),C=(0,d.useRef)(o),w=(0,d.useRef)(s),T=(0,d.useRef)(t),E=(0,d.useRef)(n),D=(0,d.useRef)(r),O=(0,d.useRef)(l),k=(0,d.useRef)(u),ee=(0,d.useRef)(f),[A,j]=(0,d.useState)(0),[M,N]=(0,d.useState)(0),[P,F]=(0,d.useState)(null),I=(0,d.useRef)(P),ne=(0,d.useRef)([]),re=(0,d.useRef)(-1),[ie,L]=(0,d.useState)(null),[R,ae]=(0,d.useState)(null),[oe,se]=(0,d.useState)(!1),[ce,le]=(0,d.useState)(null);C.current=o,w.current=s,T.current=t,E.current=n,D.current=r,O.current=l,k.current=u,ee.current=f;let ue=(0,d.useMemo)(()=>{if(!P||P.trigger!==`@`)return[];let e=P.query.toLocaleLowerCase();return t.filter(t=>!e||(t.externalKey??t.identifier).toLocaleLowerCase().includes(e)||t.title.toLocaleLowerCase().includes(e))},[P,t]),de=(0,d.useMemo)(()=>{let e=R?.candidates.filter(e=>!e.selectable||e.trigger!==P?.trigger?!1:e.kind===`slashAction`?e.selection?.type===`insertText`&&typeof e.selection.text==`string`:e.persistence?.format===`taskboard.composer-reference.v1`&&e.persistence.kind===e.kind&&!!e.persistence.referenceKey&&!!e.persistence.markdown)??[];return[...ue.map(e=>({type:`issue`,task:e})),...e.map(e=>({type:`candidate`,candidate:e}))]},[P?.trigger,R,ue]),fe=de.length===0?-1:Math.max(de.findIndex(e=>JA(e)===ie),0);ne.current=de,re.current=fe;let pe=(0,d.useMemo)(()=>{let e=[],t=new Map,n=0;for(let r of de){let i=r.type===`candidate`?r.candidate:null,a=i?`codex:${i.group}`:`taskboard:issues`,o=i?.group??m(`Taskboard 议题`,`Taskboard issues`),s=t.get(a);s||(s={id:a,label:o,options:[]},e.push(s),t.set(a,s));let c=r.type===`issue`?r.task:null;s.options.push({id:JA(r),label:i?.kind===`slashAction`?i.command:i?.label??c.externalKey??c.identifier,description:i?i.description:c.title,icon:i?.kind===`skill`?`project`:i?.kind===`agent`?`conversation`:i?.kind===`slashAction`?`action`:`project`,selectableIndex:n}),n+=1}return e},[de,m]),me=(0,d.useMemo)(()=>R?.sources.filter(e=>e.state!==`available`).map(e=>`${e.kind}: ${e.state}${e.reasonCode?` (${e.reasonCode})`:``}`)??[],[R]);function he(){return{class:`inline-media-composer ${c}`.trim(),role:`textbox`,"aria-label":a,"aria-multiline":`true`,"aria-disabled":String(o),"data-placeholder":i}}function ge(e){e.dom.dataset.empty=String(Ij(e.state.doc))}function _e(){I.current=null,F(null)}function ve(e){let t=Lj(e,D.current,T.current.length),n=I.current;n?.from===t?.from&&n?.to===t?.to&&n?.query===t?.query&&n?.trigger===t?.trigger||(ne.current=[],re.current=-1),I.current=t,F(t)}function ye(e,t,n){let r=String(e.attrs.segmentId),i=document.createElement(e.type.name===rj?`div`:`span`);return i.className=vj(_.current.get(r)),i.dataset.inlineMediaSegment=r,i.contentEditable=`false`,v.current.set(r,i),j(e=>e+1),{dom:i,update(t){return t.type!==e.type||String(t.attrs.segmentId)!==r?!1:(i.className=vj(_.current.get(r)),!0)},selectNode(){i.classList.add(`is-range-selected`)},deselectNode(){i.classList.remove(`is-range-selected`)},stopEvent(e){let t=e.target;return t instanceof Element&&!!t.closest(`button, a`)},ignoreMutation(){return!0},destroy(){v.current.get(r)===i&&(v.current.delete(r),g.current&&j(e=>e+1))}}}function be(e){let t=String(e.attrs.params??``);if(t.trim().split(/\s+/)[0]?.toLowerCase()!==`mermaid`){let e=document.createElement(`pre`),n=document.createElement(`code`);return t&&(e.dataset.params=t),e.append(n),{dom:e,contentDOM:n}}let n=fu(`mermaid`),r=document.createElement(`div`),i=document.createElement(`div`),a=document.createElement(`pre`),o=document.createElement(`code`);return r.className=`inline-media-mermaid-editor`,i.className=`inline-media-mermaid-preview`,i.contentEditable=`false`,a.className=`inline-media-mermaid-source`,a.dataset.params=t,a.append(o),r.append(i,a),y.current.set(n,{host:i,source:e.textContent}),N(e=>e+1),{dom:r,contentDOM:o,update(t){let r=String(t.attrs.params??``);if(t.type!==e.type||r.trim().split(/\s+/)[0]?.toLowerCase()!==`mermaid`)return!1;let i=y.current.get(n);return i&&i.source!==t.textContent&&(y.current.set(n,{...i,source:t.textContent}),N(e=>e+1)),!0},stopEvent(e){return e.target instanceof Node&&i.contains(e.target)},ignoreMutation(e){return e.type!==`selection`&&e.target instanceof Node&&i.contains(e.target)},destroy(){y.current.delete(n),g.current&&N(e=>e+1)}}}function xe(e){let t=g.current;if(!t||C.current)return;let n=Rj(t.state.doc,e);n!==null&&(x.current=null,t.dispatch(t.state.tr.delete(n,n+1).scrollIntoView()),t.focus())}function Se(e,t){let n=g.current;if(!n||C.current)return;let r=Array.from(e).filter(e=>e.type.startsWith(`image/`)||w.current);if(r.length===0)return;let i=r.find(e=>e.size>GA);if(i){k.current([`“${i.name}” 超过 25 MB,无法上传。`,`“${i.name}” is larger than 25 MB and cannot be uploaded.`]);return}let a=new Set(b.current.flatMap(e=>e.type===`pending-image`||e.type===`pending-attachment`?[qA(e.file)]:[])),o=r.filter(e=>{let t=qA(e);return a.has(t)?!1:(a.add(t),!0)});if(o.length===0)return;let s=o.map(e=>e.type.startsWith(`image/`)?mu(e):hu(e));yj(_.current,s);let c=s.map(Sj),l=n.state.tr;if(t!==void 0&&(l=l.setSelection(LS.near(l.doc.resolve(t)))),l=l.replaceSelection(new Q(Z.fromArray(c),0,0)),l.selection instanceof $){let e=l.selection.to;l=l.insert(e,pj.nodes.paragraph.create()).setSelection(LS.create(l.doc,e+1))}k.current(null),n.dispatch(l.scrollIntoView()),n.focus()}function Ce(e,t){let n=g.current;if(!n||C.current||e.length===0)return;yj(_.current,e);let r=Dj(e),i=n.state.tr;t!==void 0&&(i=i.setSelection(LS.near(i.doc.resolve(t)))),n.dispatch(i.replaceSelection(Q.maxOpen(r.content)).scrollIntoView()),n.focus()}function we(e,t){if(t.key!==`Backspace`&&t.key!==`Delete`)return!1;let{selection:n}=e.state;if(n instanceof $&&n.node.type.name===rj){let t=String(n.node.attrs.segmentId);return _j(_.current.get(t))?x.current===t?(x.current=null,e.dispatch(e.state.tr.deleteSelection().scrollIntoView()),!0):(x.current=t,!0):!1}if(!n.empty)return x.current=null,!1;let r=zj(n,t.key===`Backspace`);if(!r||r.node.type.name!==rj)return x.current=null,!1;let i=String(r.node.attrs.segmentId);return _j(_.current.get(i))?(x.current=i,e.dispatch(e.state.tr.setSelection($.create(e.state.doc,r.position))),!0):!1}function Te(e,t){let n=I.current,r=ne.current;if(!n||r.length===0)return!1;if(t.key===`ArrowDown`||t.key===`ArrowUp`){let e=t.key===`ArrowDown`?1:-1,n=(re.current+e+r.length)%r.length;return re.current=n,L(JA(r[n])),!0}if(t.key===`Enter`||t.key===`Tab`){let e=r[re.current];return e&&Ee(e),!!e}return t.key===`Escape`?(_e(),!0):!1}function Ee(e){let t=g.current,n=I.current;if(!t||!n||C.current)return;let r=Lj(t,D.current,T.current.length);if(!r||r.from!==n.from||r.to!==n.to||r.trigger!==n.trigger)return;if(e.type===`candidate`&&e.candidate.kind===`slashAction`){let n=e.candidate.selection?.type===`insertText`?e.candidate.selection.text:null;if(n===null)return;let i=Su(n,E.current);yj(_.current,i);let a=Dj(i),o=t.state.tr.setSelection(LS.create(t.state.doc,r.from,r.to)).replaceSelection(Q.maxOpen(a.content)).scrollIntoView();t.dispatch(o),_e(),t.focus();return}let i=null;if(e.type===`issue`){let t=e.task,n=t.externalKey??t.identifier,r=new URLSearchParams({project:t.projectId,issue:t.identifier});i={id:fu(`issue`),type:`issue-reference`,markdown:`[@${n}](?${r})`,identifier:n,projectId:t.projectId,taskId:t.id}}else{let t=e.candidate;if(t.kind===`slashAction`)return;let n=t.persistence;if(!n||n.kind!==t.kind)return;let r=Su(n.markdown).filter(gj),a=r.length===1&&(r[0].type===`skill-reference`||r[0].type===`agent-reference`)?r[0]:null;if(!a||a.type!==`${t.kind}-reference`||a.referenceKey!==n.referenceKey)return;i=a}_.current.set(i.id,i);let a=Sj(i),o=t.state.doc.textBetween(r.to,Math.min(r.to+1,t.state.doc.content.size)),s=o&&/^\s/.test(o)?Z.from(a):Z.fromArray([a,pj.text(` `)]);t.dispatch(t.state.tr.replaceWith(r.from,r.to,s).scrollIntoView()),_e(),t.focus()}(0,d.useLayoutEffect)(()=>{let t=h.current;if(!t)return;yj(_.current,e,!0),b.current=e;let n=new IO({mount:t},{state:QS.create({schema:pj,doc:Dj(e),plugins:Aj()}),attributes:he(),editable:()=>!C.current,nodeViews:{code_block:be,[rj]:ye,[ij]:ye},clipboardTextSerializer(e){return ju(Pj(e,E.current,_.current))},dispatchTransaction(e){let t=n.state.selection,r=n.state.apply(e);if(n.updateState(r),ge(n),e.docChanged){x.current=null;let e=Nj(r.doc,E.current,_.current);b.current=e,O.current(e),j(e=>e+1)}else t!==r.selection&&(!(r.selection instanceof $)||String(r.selection.node.attrs.segmentId)!==x.current)&&(x.current=null);ve(n)},handleKeyDown(e,t){return t.isComposing||t.keyCode===229?(ee.current?.(t),t.defaultPrevented):Te(e,t)||!C.current&&jj(e,t)||!C.current&&we(e,t)?!0:(ee.current?.(t),t.defaultPrevented)},handlePaste(e,t){if(C.current)return!1;let n=t.clipboardData?Array.from(t.clipboardData.files):[];if(n.length>0)return Se(n),!0;let r=t.clipboardData?.getData(`text/html`)??``,i=r?Fu(r,E.current):null,a=t.clipboardData?.getData(`text/plain`)??``,o=i??(a?Su(a,E.current):[]);return o.length===0?!1:(Ce(o),!0)},handleDrop(e,t,n,r){if(C.current||r)return!1;let i=t.dataTransfer?Array.from(t.dataTransfer.files):[];return i.length===0?!1:(Se(i,e.posAtCoords({left:t.clientX,top:t.clientY})?.pos),!0)},handleDOMEvents:{mousedown(e,t){let n=t.target;return!(n instanceof Element)||!n.closest(`[data-inline-media-task-checkbox]`)?!1:(t.preventDefault(),!0)},click(e,t){let n=t.target;if(!(n instanceof Element))return!1;let r=n.closest(`[data-inline-media-task-checkbox]`);if(!r)return!1;if(t.preventDefault(),C.current)return!0;let i=r.closest(`li.task-list-item`);if(!i)return!1;let a=e.posAtDOM(i,0)-1,o=e.state.doc.nodeAt(a);return o?.type!==pj.nodes.list_item||typeof o.attrs.taskMarker!=`string`?!1:(e.dispatch(e.state.tr.setNodeMarkup(a,void 0,{...o.attrs,taskMarker:cj(o.attrs.taskMarker)})),e.focus(),!0)},dragover(e,t){return C.current||!t.dataTransfer?.types.includes(`Files`)?!1:(t.preventDefault(),!0)},blur(){return x.current=null,_e(),!1}}});return g.current=n,ge(n),ve(n),()=>{g.current=null,v.current.clear(),y.current.clear(),n.destroy()}},[]),(0,d.useLayoutEffect)(()=>{yj(_.current,e);let t=g.current;if(!t)return;if(Fj(e)===Fj(b.current)){j(e=>e+1);return}yj(_.current,e,!0),b.current=e;let n=Dj(e),r=t.hasFocus();t.updateState(QS.create({schema:pj,doc:n,selection:LS.atEnd(n),plugins:Aj()})),ge(t),j(e=>e+1),r&&t.focus()},[e]),(0,d.useLayoutEffect)(()=>{let e=g.current;e&&(e.setProps({attributes:he(),editable:()=>!C.current}),ge(e))},[a,c,o,i]),(0,d.useEffect)(()=>{L(null)},[P?.query,P?.trigger]),(0,d.useEffect)(()=>{(o||!r&&t.length===0)&&_e()},[r,o,t.length]),(0,d.useEffect)(()=>{if(!P||!r){S.current+=1,ae(null),se(!1),le(null);return}let e=new AbortController,t=S.current+1;return S.current=t,ae(null),se(!0),le(null),te({projectId:r.projectId,threadId:r.threadId,surface:r.surface,trigger:P.trigger,query:P.query},e.signal).then(e=>{S.current===t&&(ae(e),se(!1))},n=>{e.signal.aborted||S.current!==t||(le(n instanceof Error?n.message:m(`补全来源暂时不可用`,`Completion sources are temporarily unavailable.`)),se(!1))}),()=>e.abort()},[r?.projectId,r?.surface,r?.threadId,P?.query,P?.trigger,m]),(0,d.useImperativeHandle)(p,()=>({focus(){let e=g.current;e&&(e.dispatch(e.state.tr.setSelection(LS.atEnd(e.state.doc))),e.focus())},focusAtText(e,t,n){let r=g.current;if(!r)return;let i=document.createTreeWalker(r.dom,NodeFilter.SHOW_TEXT),a=n;for(;i.nextNode();){let n=i.currentNode;if(n.textContent!==e)continue;if(a>0){--a;continue}let o=r.posAtDOM(n,Math.min(t,e.length));r.dispatch(r.state.tr.setSelection(LS.near(r.state.doc.resolve(o)))),r.focus();return}},addFiles(e){Se(e)}}));let De=Array.from(v.current.entries()).flatMap(([e,t])=>{let r=_.current.get(e);if(!r||r.type===`text`)return[];let i=()=>xe(r.id);return[(0,vr.createPortal)(r.type===`pending-image`?(0,B.jsx)(YA,{segment:r,disabled:o,onRemove:i}):r.type===`persisted-image`?(0,B.jsx)(XA,{segment:r,disabled:o,onRemove:i}):r.type===`pending-attachment`&&r.file.type.startsWith(`video/`)?(0,B.jsx)(ZA,{segment:r,disabled:o,onRemove:i}):r.type===`persisted-attachment`&&r.contentType?.startsWith(`video/`)?(0,B.jsx)(QA,{segment:r,disabled:o,onRemove:i}):r.type===`pending-attachment`||r.type===`persisted-attachment`?(0,B.jsx)($A,{segment:r,disabled:o,onRemove:i}):r.type===`issue-reference`?(0,B.jsx)(tj,{segment:r,task:n.find(e=>e.id===r.taskId)??null,disabled:o,onRemove:i}):(0,B.jsx)(nj,{segment:r,disabled:o,onRemove:i}),t,r.id)]}),Oe=Array.from(y.current.entries()).map(([e,{host:t,source:n}])=>(0,vr.createPortal)((0,B.jsx)(Ch,{source:n}),t,e));return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{ref:h}),De,Oe,P&&(oe||ce!==null||de.length>0)&&(0,B.jsx)(WA,{anchor:P.anchor,anchorRect:P.anchorRect,getAnchorRect:()=>{let e=g.current;if(!e)return P.anchorRect;let t=e.coordsAtPos(P.from);return new DOMRect(t.left,t.top,0,Math.max(1,t.bottom-t.top))},groups:pe,activeIndex:fe,loading:oe,error:ce,emptyDiagnostics:me,onActiveIndexChange:e=>{let t=de[e];t&&L(JA(t))},onSelect:e=>{let t=de[e];t&&Ee(t)},onClose:_e})]})});function Vj({project:e,tasks:t,referenceTasks:n,revision:r,onOpenTask:i,onError:a}){let{text:o}=H(),[s,c]=(0,d.useState)(null),[l,u]=(0,d.useState)(!0),[f,p]=(0,d.useState)(null),[m,h]=(0,d.useState)(0),[g,_]=(0,d.useState)(!1),[y,b]=(0,d.useState)(()=>Su(``,n)),[x,S]=(0,d.useState)(!1),[C,w]=(0,d.useState)(null),T=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(g)return;let t=!0;return w(null),p(null),se(e.id).then(e=>{t&&(c(e),b(Su(e.content,n)))}).catch(e=>{if(!t)return;let n=e instanceof Error?e.message:String(e);p(n)}).finally(()=>{t&&u(!1)}),()=>{t=!1}},[g,m,e.id,r]),(0,d.useEffect)(()=>{g&&requestAnimationFrame(()=>{T.current?.focus()})},[g]);function E(){s&&(b(Su(s.content,n)),_(!0),w(null))}function D(){b(Su(s?.content??``,n)),_(!1),w(null)}async function O(){if(x||!s)return;let t=Ou(y),r=Cu(y);if(t===s.content&&r.length===0){_(!1);return}S(!0),w(null),a?.(null);try{let i=Re(t,r,await Promise.all(r.map(t=>le(e.id,t.file)))),a=await ce(e.id,i,s.version);c(a),b(Su(a.content,n)),_(!1)}catch(e){if(e instanceof v&&e.code===`VERSION_CONFLICT`)w(o(`项目文档已被其他协作者或 Agent 更新,请刷新后重试。`,`Project Docs were modified elsewhere. Please refresh and try again.`));else{let t=e instanceof Error?e.message:String(e);w(t),a?.(t)}}finally{S(!1)}}if(l)return(0,B.jsxs)(`div`,{className:`project-readme-loading`,children:[(0,B.jsx)(`div`,{className:`project-readme-spinner`}),(0,B.jsx)(`p`,{children:o(`正在加载项目文档…`,`Loading Project Docs…`)})]});if(f&&!s)return(0,B.jsxs)(`div`,{className:`project-readme-loading`,role:`alert`,children:[(0,B.jsx)(`p`,{children:f}),(0,B.jsx)(`button`,{type:`button`,className:`button secondary`,onClick:()=>{u(!0),h(e=>e+1)},children:o(`重试`,`Try again`)})]});let k=s?.content??``;return(0,B.jsx)(`div`,{className:`project-readme-container`,children:(0,B.jsxs)(`div`,{className:`project-readme-content`,children:[C&&(0,B.jsxs)(`div`,{className:`project-readme-alert error`,role:`alert`,children:[(0,B.jsx)(J,{name:`alert`}),(0,B.jsx)(`span`,{children:C})]}),f&&!g&&(0,B.jsxs)(`div`,{className:`project-readme-alert error`,role:`alert`,children:[(0,B.jsx)(J,{name:`alert`}),(0,B.jsx)(`span`,{children:f}),(0,B.jsx)(`button`,{type:`button`,className:`button secondary`,onClick:()=>{u(!0),h(e=>e+1)},children:o(`重试`,`Try again`)})]}),g?(0,B.jsx)(`div`,{className:`issue-description-composer`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||O()},children:(0,B.jsx)(Bj,{ref:T,segments:y,mentionTasks:t,referenceTasks:n,completionContext:{projectId:e.id,surface:`issue-description`},placeholder:o(`添加说明...`,`Add notes...`),ariaLabel:o(`项目文档`,`Project Docs`),disabled:x,onChange:b,onError:e=>a?.(e),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),D())}})}):(0,B.jsx)(`div`,{className:`issue-description-read${k?``:` empty`}`,role:`button`,tabIndex:0,"aria-label":o(`编辑项目文档`,`Edit Project Docs`),onClick:()=>{window.getSelection()?.isCollapsed!==!1&&E()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),E())},children:k?(0,B.jsx)(Mh,{value:k,referenceTasks:n,onOpenTask:i}):o(`添加说明...`,`Add notes...`)})]})})}var Hj=new Set([`backlog`,`done`,`canceled`]);function Uj(e,t){return new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`}).format(new Date(e))}function Wj(e,t){return new Intl.DateTimeFormat(t,{month:`numeric`,day:`numeric`}).format(new Date(`${e}T12:00:00`))}function Gj({scrollRef:e,tasks:t,presentations:n,currentUser:r,hasActiveFilters:i,onOpenTask:a,onOpenConversation:o,onUpdate:s}){let{language:c,locale:l,text:u}=H(),[f,p]=(0,d.useState)(()=>new Set(Hj)),[m,h]=(0,d.useState)(null);function g(e){e.stopPropagation()}function _(e){p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return(0,B.jsx)(`div`,{className:`issue-list-view`,ref:e,children:(0,B.jsx)(`div`,{className:`issue-list-groups`,children:tc.map(e=>{let d=t.filter(t=>t.status===e),p=f.has(e),v=Qe(c,e);return(0,B.jsxs)(`section`,{className:`issue-list-group status-${e}`,children:[(0,B.jsxs)(`button`,{className:`issue-list-group-header`,type:`button`,onClick:()=>_(e),"aria-expanded":!p,children:[(0,B.jsx)(J,{name:p?`chevronRight`:`chevronDown`}),(0,B.jsx)(`span`,{className:`issue-list-status-icon`,children:(0,B.jsx)(Ac,{status:e,color:`currentColor`,size:14})}),(0,B.jsx)(`strong`,{children:v}),(0,B.jsx)(`span`,{children:d.length})]}),!p&&(0,B.jsx)(`div`,{className:`issue-list-rows`,children:d.length?d.map(e=>{let t=He(e.assignee,r)??`current-user`,i=e.externalKey??e.identifier;return(0,B.jsxs)(`div`,{className:`issue-list-row${n[e.id]?.unread?` is-unread`:``}`,role:`button`,tabIndex:0,onClick:()=>a(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&a(e)},children:[(0,B.jsxs)(`span`,{className:`issue-list-title-cell`,children:[(0,B.jsx)(`small`,{children:i}),(0,B.jsx)(`strong`,{children:e.title}),n[e.id]?.unread&&(0,B.jsx)(`span`,{className:`task-unread-dot`,"aria-label":u(`有未读更新`,`Unread updates`)})]}),(0,B.jsxs)(`span`,{className:`issue-list-metadata`,"aria-label":u(`议题属性`,`Issue properties`),children:[(0,B.jsx)(`span`,{className:`issue-list-priority-control`,onClick:g,onKeyDown:g,children:(0,B.jsx)(rl,{value:e.priority,options:nc.map(e=>({value:e,label:V(c,e),icon:(0,B.jsx)(Mc,{priority:e,size:14}),className:`priority-${e}`})),open:m===e.id,className:`issue-list-property-picker`,triggerClassName:`issue-list-priority priority-${e.priority}`,ariaLabel:u(`${i} 优先级`,`${i} priority`),onOpenChange:t=>h(t?e.id:null),onChange:t=>void s(e,{priority:t}).catch(()=>{})})}),(0,B.jsxs)(`span`,{className:`issue-list-labels`,children:[e.labels.slice(0,2).map(e=>{let t=cc(e,c);return(0,B.jsxs)(`i`,{className:t.tone?`tone-${t.tone}`:``,children:[t.tone&&(0,B.jsx)(`span`,{"aria-hidden":`true`}),(0,B.jsx)(`b`,{children:t.name})]},e)}),e.labels.length>2&&(0,B.jsxs)(`b`,{children:[`+`,e.labels.length-2]})]}),e.dueDate&&(0,B.jsxs)(`label`,{className:`issue-list-date`,onClick:g,children:[(0,B.jsx)(Kc,{color:`currentColor`,size:12}),(0,B.jsx)(`span`,{children:Wj(e.dueDate,l)}),(0,B.jsx)(`input`,{type:`date`,"aria-label":u(`${i} 截止日期`,`${i} due date`),value:e.dueDate,onChange:t=>void s(e,{dueDate:t.target.value||null,...t.target.value?{}:{recurrence:null}}).catch(()=>{})})]}),(0,B.jsx)(ol,{conversations:n[e.id]?.conversations??[],onOpenConversation:o}),(0,B.jsxs)(`label`,{className:`issue-list-assignee`,title:e.assignee.name,onClick:g,children:[(0,B.jsx)(lc,{actor:e.assignee}),(0,B.jsxs)(`select`,{"aria-label":u(`${i} 负责人`,`${i} assignee`),value:t,disabled:e.source===`jira`,onChange:t=>void s(e,{assigneeTarget:t.target.value}).catch(()=>{}),children:[(0,B.jsx)(`option`,{value:`current-user`,children:r.name}),(0,B.jsx)(`option`,{value:`codex-agent`,children:`Codex Agent`})]})]})]}),(0,B.jsx)(`time`,{dateTime:e.createdAt,title:u(`创建于 ${new Date(e.createdAt).toLocaleString(l)}`,`Created ${new Date(e.createdAt).toLocaleString(l)}`),children:Uj(e.createdAt,l)})]},e.id)}):(0,B.jsx)(`div`,{className:`issue-list-empty`,children:i?u(`当前筛选下没有匹配议题`,`No issues match the current filters`):u(`没有${v}议题`,`No ${v.toLowerCase()} issues`)})})]},e)})})})}function Kj({connection:e,saving:t,error:n,onClose:r,onSave:i}){let{text:a}=H(),[o,s]=(0,d.useState)(e?.baseUrl??`http://`),[c,l]=(0,d.useState)(e?.username??``),[u,f]=(0,d.useState)(``),[p,m]=(0,d.useState)(e?.projects.join(`, `)??``);(0,d.useEffect)(()=>{s(e?.baseUrl??`http://`),l(e?.username??``),f(``),m(e?.projects.join(`, `)??``)},[e]);async function h(e){e.preventDefault(),await i({baseUrl:o.trim(),username:c.trim(),password:u,projects:p.split(/[,,\n]+/).map(e=>e.trim()).filter(Boolean)})}return(0,B.jsx)(`div`,{className:`delete-backdrop`,onPointerDown:e=>{e.target===e.currentTarget&&!t&&r()},children:(0,B.jsxs)(`form`,{className:`delete-dialog project-create-dialog jira-connection-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`jira-connection-title`,onSubmit:e=>void h(e),onKeyDown:e=>{e.key===`Escape`&&!t&&r()},children:[(0,B.jsx)(`h2`,{id:`jira-connection-title`,children:e?.configured?a(`Jira 设置`,`Jira settings`):a(`连接 Jira`,`Connect Jira`)}),(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:a(`Jira 地址`,`Jira URL`)}),(0,B.jsx)(`input`,{autoFocus:!0,required:!0,inputMode:`url`,maxLength:2048,placeholder:`http://jira.internal`,value:o,onChange:e=>s(e.target.value)})]}),/^http:\/\//i.test(o.trim())&&(0,B.jsx)(`p`,{className:`jira-http-warning`,children:a(`HTTP 会在内网中以可读取形式传输账号密码。`,`HTTP sends the username and password in cleartext over the network.`)}),(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:a(`Jira 项目(名称或 Key,可多选)`,`Jira projects (name or key, multiple allowed)`)}),(0,B.jsx)(`input`,{maxLength:2600,placeholder:`DMARTECH, JP`,value:p,onChange:e=>m(e.target.value)})]}),(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:a(`用户名`,`Username`)}),(0,B.jsx)(`input`,{required:!e?.configured,autoComplete:`username`,maxLength:254,placeholder:e?.configured?a(`留空则保持不变`,`Leave blank to keep unchanged`):``,value:c,onChange:e=>l(e.target.value)})]}),(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:a(`密码`,`Password`)}),(0,B.jsx)(`input`,{required:!e?.configured,type:`password`,autoComplete:`current-password`,maxLength:4096,placeholder:e?.configured?a(`留空则保持不变`,`Leave blank to keep unchanged`):``,value:u,onChange:e=>f(e.target.value)})]}),e?.configured&&e.displayName&&(0,B.jsxs)(`p`,{children:[a(`当前账号:`,`Current account: `),e.displayName]}),n&&(0,B.jsx)(`p`,{className:`project-dialog-error`,role:`alert`,children:n}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,disabled:t,onClick:r,children:a(`取消`,`Cancel`)}),(0,B.jsx)(`button`,{className:`button primary`,type:`submit`,disabled:t||!o.trim()||!c.trim()&&!e?.configured||!u&&!e?.configured,children:t?a(`连接中…`,`Connecting…`):e?.configured?a(`保存并同步`,`Save and sync`):a(`连接并同步`,`Connect and sync`)})]})]})})}function qj(e,t,n){if(!e)return``;let r=new Intl.DateTimeFormat(t,{month:`numeric`,day:`numeric`}).format(new Date(e));return n(`${r}归档`,`Archived ${r}`)}function Jj({task:e,busy:t,restoring:n,onRestore:r,onDelete:i}){let{language:a,locale:o,text:s}=H(),c=e.externalKey??e.identifier;return(0,B.jsxs)(`article`,{className:`task-card task-card-sidebar archived-task-card status-${e.status}`,children:[(0,B.jsxs)(`div`,{className:`card-topline`,children:[(0,B.jsxs)(`span`,{className:`task-identifier`,children:[`ID: `,c]}),(0,B.jsx)(`span`,{className:`archived-task-date`,children:qj(e.archivedAt,o,s)})]}),(0,B.jsx)(`h3`,{children:e.title}),(0,B.jsxs)(`div`,{className:`archived-task-footer`,children:[(0,B.jsxs)(`span`,{className:`archived-task-status`,children:[(0,B.jsx)(Ac,{status:e.status,size:14}),Qe(a,e.status)]}),e.source!==`jira`&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{className:`archived-task-action archived-task-restore`,type:`button`,disabled:t,onClick:()=>r(e),children:[(0,B.jsx)(Jc,{color:`currentColor`}),n?s(`恢复中…`,`Restoring…`):s(`恢复`,`Restore`)]}),(0,B.jsx)(`button`,{className:`archived-task-action archived-task-delete`,type:`button`,"aria-label":s(`永久删除 ${c}`,`Permanently delete ${c}`),title:s(`永久删除`,`Delete permanently`),disabled:t,onClick:()=>i(e),children:(0,B.jsx)(zc,{color:`currentColor`})})]})]})]})}function Yj({tasks:e,hasActiveFilters:t,restoringTaskId:n,deletingTaskId:r,onRestore:i,onDelete:a}){let{text:o}=H();return(0,B.jsxs)(`section`,{className:`board-column status-archived`,"aria-labelledby":`column-archived`,children:[(0,B.jsx)(`header`,{className:`column-header`,children:(0,B.jsxs)(`div`,{className:`column-heading`,children:[(0,B.jsx)(`span`,{className:`column-status-icon`,children:(0,B.jsx)(zc,{color:`var(--column-status-color)`,size:14})}),(0,B.jsxs)(`h2`,{id:`column-archived`,children:[o(`已归档`,`Archived`),e.length>0?` ${e.length}`:``]})]})}),(0,B.jsxs)(`div`,{className:`column-list`,children:[e.map(e=>(0,B.jsx)(Jj,{task:e,busy:n!==null||r!==null,restoring:n===e.id,onRestore:i,onDelete:a},e.id)),e.length===0&&(0,B.jsx)(`div`,{className:`column-empty`,children:t?o(`当前筛选下无匹配议题`,`No issues match the current filters`):o(`没有已归档议题。`,`There are no archived issues.`)})]})]})}function Xj({open:e,activeTab:t,tabs:n,tasksByStatus:r,archivedTasks:i,presentations:a,hasActiveFilters:o,isDropTarget:s,draggedTaskId:c,draggedTaskHeight:l,movingTaskId:u,settlingTaskId:d,contextMenuTaskId:f,availableLabels:p,projectNames:m,currentUser:h,showCover:g,showBody:_,onCreateLabel:v,restoringTaskId:y,deletingTaskId:b,onTabChange:x,onCreate:S,onRestore:C,onDelete:w,onEdit:T,onUpdate:E,onContextMenu:D,onDragStart:O,onDragEnd:k,onDragEnter:ee,onDrop:A,onOpenConversation:te}){let{language:j,text:M}=H(),N=t===`archived`,P=N?M(`已归档`,`Archived`):Qe(j,t),F=N?i:r[t],{findDropBefore:I,clearDropPreview:ne,updateDropPreview:re,leaveDropPreview:ie,getTaskDragShift:L}=Ue({tasks:F,draggedTaskId:c,draggedTaskHeight:l,isDropTarget:s});function R(e){if(e.preventDefault(),N)return;let n=e.dataTransfer.getData(`application/x-taskboard-task`)||e.dataTransfer.getData(`text/plain`);n&&A(t,n,I(e.currentTarget,e.clientY)),ne()}return(0,B.jsxs)(`aside`,{className:`other-tasks-panel${e?` is-open`:``}`,id:`other-tasks-panel`,"aria-label":M(`其他任务`,`Other issues`),"aria-hidden":!e,children:[(0,B.jsx)(`div`,{className:`other-tasks-tabs`,role:`tablist`,"aria-label":M(`其他任务状态`,`Other issue statuses`),style:{"--other-task-tab-count":n.length},children:n.map(e=>{let n=e===`archived`?M(`已归档`,`Archived`):Qe(j,e),a=e===`archived`?i.length:r[e].length,o=e===t;return(0,B.jsxs)(`button`,{className:`other-tasks-tab${o?` is-active`:``}`,id:`other-tasks-tab-${e}`,type:`button`,role:`tab`,"aria-selected":o,"aria-controls":`other-tasks-list`,title:`${n} ${a}`,onClick:()=>x(e),children:[(0,B.jsx)(`span`,{className:`other-tasks-tab-label`,children:n}),(0,B.jsx)(`span`,{className:`other-tasks-tab-count`,"aria-label":M(`${a} 个议题`,`${a} issues`),children:a})]},e)})}),!N&&S&&(0,B.jsx)(`button`,{className:`other-tasks-add`,type:`button`,"aria-label":M(`在${P}中新建议题`,`Create issue in ${P}`),title:M(`添加到${P}`,`Add to ${P}`),onClick:()=>S(t),children:(0,B.jsx)(Rc,{color:`currentColor`,size:11})}),(0,B.jsxs)(`div`,{className:`other-tasks-list${N?` is-archived`:``}`,id:`other-tasks-list`,role:`tabpanel`,"aria-labelledby":`other-tasks-tab-${t}`,onDragEnter:()=>{N||ee(t)},onDragOver:e=>{N||(ee(t),re(e))},onDragLeave:ie,onDrop:R,children:[N?i.map(e=>(0,B.jsx)(Jj,{task:e,busy:y!==null||b!==null,restoring:y===e.id,onRestore:C,onDelete:w},e.id)):F.map(e=>{let t=L(e.id);return(0,B.jsx)(Cl,{task:e,variant:`sidebar`,presentation:a[e.id],isDragging:c===e.id,dragShift:t,isMoving:u===e.id,isSettling:d===e.id,isContextMenuOpen:f===e.id,availableLabels:p,projectName:m?.[e.projectId],currentUser:h,showCover:g,showBody:_,onCreateLabel:t=>v(t,e.projectId),onEdit:T,onUpdate:E,onContextMenu:D,onDragStart:O,onDragEnd:k,onOpenConversation:te},e.id)}),F.length===0&&(0,B.jsxs)(`div`,{className:`other-tasks-empty`,children:[o?(0,B.jsx)(J,{name:`search`}):N?(0,B.jsx)(zc,{color:`currentColor`}):(0,B.jsx)(J,{name:`panel`}),(0,B.jsx)(`strong`,{children:o?M(`当前筛选下无匹配议题`,`No issues match the current filters`):M(`暂无议题`,`No issues`)}),(0,B.jsx)(`span`,{children:o?M(`搜索和筛选会同步作用于所有状态。`,`Search and filters apply to every status.`):N?M(`没有已归档议题。`,`There are no archived issues.`):M(`没有${P}。`,`There are no issues in ${P}.`)})]})]})]})}var Zj={aiLauncher:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M13.4887%204.59112L13.3526%204.4775C12.2389%203.57525%2010.6717%203.09375%209%203.09375C7.09425%203.09375%205.55187%203.58875%204.51687%204.45838C3.52687%205.29088%202.8125%206.61613%202.8125%208.71875C2.8125%209.96075%203.09938%2010.9237%203.53363%2011.6685C4.14225%2012.5797%203.78562%2013.5247%203.6675%2013.8127C3.58537%2014.0119%203.4875%2014.1997%203.42112%2014.3246L3.38737%2014.3887C3.32775%2014.5012%203.28613%2014.5823%203.2445%2014.6678L3.23325%2014.6902C3.50663%2014.8927%203.86775%2014.9344%204.47187%2014.778C4.734%2014.7105%204.98488%2014.6171%205.23688%2014.5159C5.58248%2015.017%206.00418%2015.4611%206.48675%2015.8321C6.38625%2015.8696%206.26663%2015.9172%206.12788%2015.975C5.1435%2016.3811%203.28837%2017.1473%201.9215%2015.7804C1.15087%2015.0098%201.5615%2014.2313%201.899%2013.5956C2.11612%2013.1839%202.30175%2012.8318%202.11275%2012.582C1.49175%2011.5448%201.125%2010.2622%201.125%208.71875C1.125%203.66188%204.65075%201.40625%209%201.40625C12.3176%201.40625%2015.633%203.006%2016.596%206.53175C16.3847%206.27932%2016.1517%206.04593%2015.8996%205.83425C15.1938%205.2527%2014.3718%204.82885%2013.4887%204.59112Z'%20fill='%231B1B1B'/%3e%3cpath%20id='Vector_2'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.15063%2013.563C7.47563%2013.0162%206.96488%2012.159%206.96488%2010.7854C6.96488%209.41175%207.47563%208.55562%208.15063%208.00775C8.87513%207.42162%209.92363%207.08863%2011.0756%207.08863C12.4088%207.08863%2013.4314%207.43512%2014.0918%207.98862C14.706%208.50612%2015.1875%209.34987%2015.1875%2010.7854C15.1875%2011.25%2015.1448%2011.5042%2015.093%2011.682C15.0435%2011.853%2014.9625%2012.0341%2014.7848%2012.3345C14.5274%2012.7315%2014.4234%2013.2086%2014.4923%2013.6766C14.5418%2014.0299%2014.6756%2014.3111%2014.7454%2014.4495C14.8118%2014.5781%2014.8823%2014.7046%2014.9569%2014.8286L14.9884%2014.8849C14.8219%2015.003%2014.6295%2015.0221%2014.2774%2014.931C14.0222%2014.8604%2013.7737%2014.7674%2013.5349%2014.6531C13.4127%2014.5973%2013.2889%2014.5452%2013.1636%2014.4967C13.0446%2014.4512%2012.9219%2014.4158%2012.7969%2014.391H12.7946C12.7069%2014.3741%2012.3829%2014.31%2011.9891%2014.4101C11.6707%2014.4832%2011.5796%2014.4832%2011.0756%2014.4832C9.92363%2014.4832%208.87513%2014.1502%208.15063%2013.563ZM12.4009%2016.047C11.8699%2016.1707%2011.6336%2016.1707%2011.0846%2016.1707H11.0756C8.17538%2016.1707%205.27738%2014.5091%205.27738%2010.7854C5.27738%207.06162%208.17538%205.40113%2011.0756%205.40113C14.2785%205.4%2016.875%207.06162%2016.875%2010.7854C16.875%2011.9216%2016.6657%2012.4785%2016.2079%2013.2413C16.0819%2013.41%2016.2191%2013.6451%2016.3901%2013.9365C16.6961%2014.4607%2017.1079%2015.1661%2016.2889%2015.9851C15.093%2017.181%2013.6013%2016.5251%2012.852%2016.1955C12.6214%2016.0942%2012.4605%2016.0234%2012.4009%2016.047Z'%20fill='%231B1B1B'/%3e%3c/g%3e%3c/svg%3e`,automationPause:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Union'%20d='M5.5%203C6.05228%203%206.5%203.44772%206.5%204V12C6.5%2012.5523%206.05228%2013%205.5%2013C4.94772%2013%204.5%2012.5523%204.5%2012V4C4.5%203.44772%204.94772%203%205.5%203ZM10.5%203C11.0523%203%2011.5%203.44772%2011.5%204V12C11.5%2012.5523%2011.0523%2013%2010.5%2013C9.94772%2013%209.5%2012.5523%209.5%2012V4C9.5%203.44772%209.94772%203%2010.5%203Z'%20fill='%2300A558'/%3e%3c/g%3e%3c/svg%3e`,automationPlay:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Iconly/Curved/Outline/Play'%3e%3cpath%20id='Stroke%20341'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.5%207.99272C12.5%206.77602%205.8476%202.88368%205.09297%203.58354C4.33978%204.28341%204.26577%2011.6361%205.09297%2012.4019C5.92161%2013.1704%2012.5%209.20941%2012.5%207.99272Z'%20stroke='%235D5D5F'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,breadcrumb:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M5.12782%2010.7528C4.85323%2011.0274%204.85323%2011.4726%205.12782%2011.7472C5.4024%2012.0217%205.8476%2012.0217%206.12218%2011.7472L9.87216%207.99718C10.1444%207.72499%2010.1471%207.28451%209.87825%207.00897L6.21955%203.25897C5.94836%202.98102%205.50321%202.97554%205.22526%203.24673C4.94731%203.51791%204.94183%203.96307%205.21301%204.24102L8.38672%207.49391L5.12782%2010.7528Z'%20fill='%239E9EA1'/%3e%3c/g%3e%3c/svg%3e`,dropdown:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20d='M3.3975%204.1025C3.29087%204.00314%203.14983%203.94905%203.00411%203.95162C2.85838%203.95419%202.71934%204.01322%202.61628%204.11628C2.51322%204.21934%202.45419%204.35838%202.45162%204.50411C2.44905%204.64983%202.50314%204.79087%202.6025%204.8975L5.6025%207.8975C5.70709%208.00217%205.84871%208.06142%205.99667%208.0624C6.14464%208.06338%206.28703%208.00602%206.393%207.90275L9.393%204.9755C9.49751%204.87079%209.55655%204.72912%209.55735%204.58118C9.55815%204.43324%209.50064%204.29095%209.39727%204.18511C9.2939%204.07928%209.153%204.01843%209.00508%204.01574C8.85717%204.01305%208.71415%204.06874%208.607%204.17075L6.0045%206.7095L3.3975%204.1025Z'%20fill='%235D5D5F'/%3e%3c/g%3e%3c/svg%3e`,filter:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.4688%202.625C12.6428%202.625%2012.8097%202.69414%2012.9328%202.81721C13.0559%202.94028%2013.125%203.1072%2013.125%203.28125C13.125%203.4553%2013.0559%203.62222%2012.9328%203.74529C12.8097%203.86836%2012.6428%203.9375%2012.4688%203.9375H1.53125C1.3572%203.9375%201.19028%203.86836%201.06721%203.74529C0.94414%203.62222%200.875%203.4553%200.875%203.28125C0.875%203.1072%200.94414%202.94028%201.06721%202.81721C1.19028%202.69414%201.3572%202.625%201.53125%202.625H12.4688ZM3.5%207C3.5%206.82595%203.56914%206.65903%203.69221%206.53596C3.81528%206.41289%203.9822%206.34375%204.15625%206.34375H9.84375C10.0178%206.34375%2010.1847%206.41289%2010.3078%206.53596C10.4309%206.65903%2010.5%206.82595%2010.5%207C10.5%207.17405%2010.4309%207.34097%2010.3078%207.46404C10.1847%207.58711%2010.0178%207.65625%209.84375%207.65625H4.15625C3.9822%207.65625%203.81528%207.58711%203.69221%207.46404C3.56914%207.34097%203.5%207.17405%203.5%207ZM5.90625%2010.0625C5.7322%2010.0625%205.56528%2010.1316%205.44221%2010.2547C5.31914%2010.3778%205.25%2010.5447%205.25%2010.7188C5.25%2010.8928%205.31914%2011.0597%205.44221%2011.1828C5.56528%2011.3059%205.7322%2011.375%205.90625%2011.375H8.09375C8.2678%2011.375%208.43472%2011.3059%208.55779%2011.1828C8.68086%2011.0597%208.75%2010.8928%208.75%2010.7188C8.75%2010.5447%208.68086%2010.3778%208.55779%2010.2547C8.43472%2010.1316%208.2678%2010.0625%208.09375%2010.0625H5.90625Z'%20fill='%231B1B1B'/%3e%3c/g%3e%3c/svg%3e`,home:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.17781%205.32573C2.08247%205.41343%202.00634%205.51994%201.95422%205.63854C1.9021%205.75714%201.87513%205.88525%201.875%206.0148V13.5926C1.875%2013.7169%201.92439%2013.8362%202.01229%2013.9241C2.1002%2014.012%202.21943%2014.0614%202.34375%2014.0614H5.15625C5.28057%2014.0614%205.3998%2014.012%205.48771%2013.9241C5.57561%2013.8362%205.625%2013.7169%205.625%2013.5926V10.2973C5.625%209.80002%205.82254%209.3231%206.17417%208.97147C6.5258%208.61984%207.00272%208.4223%207.5%208.4223C7.99728%208.4223%208.47419%208.61984%208.82582%208.97147C9.17746%209.3231%209.375%209.80002%209.375%2010.2973V13.5926C9.375%2013.7169%209.42439%2013.8362%209.51229%2013.9241C9.6002%2014.012%209.71943%2014.0614%209.84375%2014.0614H12.6562C12.7806%2014.0614%2012.8998%2014.012%2012.9877%2013.9241C13.0756%2013.8362%2013.125%2013.7169%2013.125%2013.5926V6.01573C13.1251%205.88587%2013.0983%205.7574%2013.0462%205.63846C12.994%205.51952%2012.9178%205.41271%2012.8222%205.3248L8.45156%201.30948C8.19206%201.07099%207.85245%200.938641%207.5%200.938641C7.14755%200.938641%206.80794%201.07099%206.54844%201.30948L2.17781%205.32573Z'%20fill='%235D5D5F'/%3e%3c/g%3e%3c/svg%3e`,panel:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%202C2.45508%202%201%203.45508%201%205.25V10.75C1%2012.5449%202.45508%2014%204.25%2014H11.75C13.5449%2014%2015%2012.5449%2015%2010.75V5.25C15%203.45508%2013.5449%202%2011.75%202H4.25ZM2.5%205.5C2.5%204.39543%203.39543%203.5%204.5%203.5H11.5C12.6046%203.5%2013.5%204.39543%2013.5%205.5V10.5C13.5%2011.6046%2012.6046%2012.5%2011.5%2012.5H4.5C3.39543%2012.5%202.5%2011.6046%202.5%2010.5V5.5Z'%20fill='%231B1B1B'/%3e%3cpath%20id='Vector_2'%20d='M11.5%205.75C11.5%205.33579%2011.1642%205%2010.75%205C10.3358%205%2010%205.33579%2010%205.75V10.25C10%2010.6642%2010.3358%2011%2010.75%2011C11.1642%2011%2011.5%2010.6642%2011.5%2010.25V5.75Z'%20fill='%231B1B1B'/%3e%3c/g%3e%3c/svg%3e`,projectFolder:`data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%208V11.5C2%2012.6046%202.89543%2013.5%204%2013.5H12C13.1046%2013.5%2014%2012.6046%2014%2011.5V8M2%208V4.5C2%203.39543%202.89543%202.5%204%202.5H6C6.62951%202.5%207.22229%202.79639%207.6%203.3L7.9%203.7C8.27771%204.20361%208.87049%204.5%209.5%204.5H12C13.1046%204.5%2014%205.39543%2014%206.5V8M2%208H14'%20stroke='%233C3E40'/%3e%3c/svg%3e`,search:`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.125%201.75C8.54124%201.75%2010.5%203.70876%2010.5%206.125C10.5%207.09636%2010.1828%207.99329%209.64723%208.71923L12.0578%2011.1297L12.103%2011.1793C12.3133%2011.437%2012.298%2011.8175%2012.0578%2012.0578C11.8175%2012.298%2011.437%2012.3133%2011.1793%2012.103L11.1297%2012.0578L8.71923%209.64723C7.99329%2010.1828%207.09636%2010.5%206.125%2010.5C3.70876%2010.5%201.75%208.54124%201.75%206.125C1.75%203.70876%203.70876%201.75%206.125%201.75ZM6.125%203.0625C4.43363%203.0625%203.0625%204.43363%203.0625%206.125C3.0625%207.81637%204.43363%209.1875%206.125%209.1875C7.81637%209.1875%209.1875%207.81637%209.1875%206.125C9.1875%204.43363%207.81637%203.0625%206.125%203.0625Z'%20fill='%231B1B1B'/%3e%3c/g%3e%3c/svg%3e`},Qj=new Set([`aiLauncher`,`automationPlay`,`breadcrumb`,`dropdown`,`filter`,`home`,`panel`,`projectFolder`,`search`]);function $j(e){return Zj[e]}function eM({name:e,className:t,...n}){let r=[`taskboard-icon`,Qj.has(e)?`taskboard-icon-monochrome`:``,t??``].filter(Boolean).join(` `);return(0,B.jsx)(`img`,{...n,className:r,src:Zj[e],alt:``,"aria-hidden":`true`,draggable:!1})}var tM={low:[`轻度`,`Low`],medium:[`中`,`Medium`],high:[`高`,`High`],xhigh:[`极高 (xhigh)`,`Extra high (xhigh)`],max:[`最高`,`Maximum`],ultra:[`极高 (ultra)`,`Ultra`]};function nM(e,t){let n=e.find(e=>e.slug===t?.model)??e[0],r=n?.supportedReasoningEfforts.includes(t?.reasoningEffort??``)?t?.reasoningEffort:n?.defaultReasoningEffort;return{enabledByUser:t?.enabledByUser??!1,quotaAware:t?.quotaAware??!1,intervalMinutes:t?.intervalMinutes??5,model:n?.slug??``,reasoningEffort:r??``}}function rM({automation:e,models:t,pending:n,error:r,unavailableReason:i,onOpen:a,onChange:o}){let{locale:s,text:c}=H(),l=(0,d.useRef)(null),u=(0,d.useRef)(null),f=(0,d.useRef)(n),[p,m]=(0,d.useState)(!1),[h,g]=(0,d.useState)(null),[_,v]=(0,d.useState)({left:0,top:0,ready:!1}),[y,b]=(0,d.useState)(()=>nM(t,e)),x=e?.status??`PAUSED`,S=e?.quota,C=e?.enabledByUser?e.quotaAware&&S?.state===`blocked`?c(`额度暂停`,`Paused by quota`):e.quotaAware&&S?.state===`unavailable`?c(`额度不可用`,`Quota unavailable`):e.quotaAware&&(!S||S.state===`unknown`)?c(`额度未知`,`Quota unknown`):x===`ACTIVE`?c(`运行中`,`Running`):c(`已暂停`,`Paused`):c(`已暂停`,`Paused`),w=t.find(e=>e.slug===y.model)??t[0],T=n||!w||!!i;(0,d.useEffect)(()=>{p&&b(nM(t,e))},[e,t,p]),(0,d.useEffect)(()=>{p||g(null)},[p]),(0,d.useEffect)(()=>{f.current&&!n&&b(nM(t,e)),f.current=n},[e,n]),(0,d.useLayoutEffect)(()=>{if(!p||!l.current||!u.current)return;let e=l.current.getBoundingClientRect(),t=u.current.getBoundingClientRect(),n=Math.max(8,Math.min(e.right-t.width,window.innerWidth-t.width-8)),r=e.bottom+8+t.height<=window.innerHeight?e.bottom+8:Math.max(8,e.top-t.height-8);v({left:n,top:r,ready:!0})},[p]),(0,d.useEffect)(()=>{if(!p)return;let e=()=>m(!1),t=$c([l,u],e),n=el(u,e);function r(e){e.key===`Escape`&&!h&&(m(!1),l.current?.focus())}return document.addEventListener(`keydown`,r),()=>{t(),n(),document.removeEventListener(`keydown`,r)}},[p,h]);let E=e=>{T||(b(e),o(e))},D=p?(0,vr.createPortal)((0,B.jsxs)(`div`,{ref:u,className:`project-automation-menu no-drag`,role:`dialog`,"aria-label":c(`自动认领待办设置`,`Auto-claim settings`),style:{left:_.left,top:_.top,visibility:_.ready?`visible`:`hidden`},children:[(0,B.jsxs)(`div`,{className:`project-automation-menu-heading`,children:[(0,B.jsx)(`strong`,{children:c(`自动认领待办`,`Auto-claim tasks`)}),(0,B.jsx)(`span`,{className:x===`ACTIVE`?`is-active`:`is-paused`,children:C})]}),(0,B.jsxs)(`div`,{className:`project-automation-switch`,children:[(0,B.jsx)(`span`,{children:c(`自动认领开关`,`Auto-claim`)}),(0,B.jsx)(`button`,{type:`button`,className:`board-setting-switch${y.enabledByUser?` is-on`:``}`,role:`switch`,"aria-checked":y.enabledByUser,disabled:T,onClick:()=>E({...y,enabledByUser:!y.enabledByUser}),children:(0,B.jsx)(`span`,{"aria-hidden":`true`})})]}),(0,B.jsxs)(`div`,{className:`project-automation-switch`,children:[(0,B.jsx)(`span`,{children:c(`根据额度启用/关闭`,`Use quota limits`)}),(0,B.jsx)(`button`,{type:`button`,className:`board-setting-switch${y.quotaAware?` is-on`:``}`,role:`switch`,"aria-checked":y.quotaAware,disabled:T,onClick:()=>E({...y,quotaAware:!y.quotaAware}),children:(0,B.jsx)(`span`,{"aria-hidden":`true`})})]}),y.quotaAware&&(0,B.jsxs)(`div`,{className:`project-automation-quota is-${S?.state??`unknown`}`,children:[S?.state===`available`&&c(`当前额度可用`,`Quota is available`),S?.state===`blocked`&&(S.resetsAt?c(`额度已用尽,预计 ${iM(S.resetsAt,s)} 恢复`,`Quota is exhausted. Expected reset: ${iM(S.resetsAt,s)}.`):c(`额度已用尽,自动认领已暂停`,`Quota is exhausted. Auto-claim is paused.`)),S?.state===`unavailable`&&(S.reason===`api-key`?c(`API Key 模式不支持读取 Codex App 额度`,`API key mode cannot read the Codex app quota.`):c(`当前账户无法读取额度`,`This account cannot read quota information.`)),(!S||S.state===`unknown`)&&c(`额度状态未知,自动认领已暂停`,`Quota status is unknown. Auto-claim is paused.`)]}),(0,B.jsxs)(`div`,{className:`project-automation-field`,children:[(0,B.jsx)(`span`,{children:c(`间隔`,`Interval`)}),(0,B.jsx)(rl,{value:String(y.intervalMinutes),options:[5,10,15,30,60].map(e=>({value:String(e),label:c(`${e} 分钟`,`${e} min`),icon:(0,B.jsx)(qc,{color:`currentColor`,size:14})})),open:h===`interval`,disabled:T,className:`project-automation-picker`,triggerClassName:`project-automation-picker-trigger`,ariaLabel:c(`间隔`,`Interval`),onOpenChange:e=>g(e?`interval`:null),onChange:e=>E({...y,intervalMinutes:Number(e)})})]}),w&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`project-automation-field`,children:[(0,B.jsx)(`span`,{children:c(`模型`,`Model`)}),(0,B.jsx)(rl,{value:y.model,options:t.map(e=>({value:e.slug,label:e.displayName,icon:(0,B.jsx)(Bc,{color:`currentColor`,size:14})})),open:h===`model`,disabled:T,className:`project-automation-picker`,triggerClassName:`project-automation-picker-trigger`,ariaLabel:c(`模型`,`Model`),onOpenChange:e=>g(e?`model`:null),onChange:e=>{let n=t.find(t=>t.slug===e);n&&E({...y,model:e,reasoningEffort:n.supportedReasoningEfforts.includes(y.reasoningEffort)?y.reasoningEffort:n.defaultReasoningEffort})}})]}),(0,B.jsxs)(`div`,{className:`project-automation-field`,children:[(0,B.jsx)(`span`,{children:c(`推理强度`,`Reasoning effort`)}),(0,B.jsx)(rl,{value:y.reasoningEffort,options:w.supportedReasoningEfforts.map(e=>({value:e,label:tM[e]?c(...tM[e]):e,icon:(0,B.jsx)(J,{name:`displayOptions`})})),open:h===`reasoning`,disabled:T,className:`project-automation-picker`,triggerClassName:`project-automation-picker-trigger`,ariaLabel:c(`推理强度`,`Reasoning effort`),onOpenChange:e=>g(e?`reasoning`:null),onChange:e=>E({...y,reasoningEffort:e})})]})]}),i&&(0,B.jsx)(`p`,{className:`project-automation-note`,children:i}),r&&r!==i&&(0,B.jsx)(`p`,{className:`project-automation-error`,role:`alert`,children:r})]}),document.body):null;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{ref:l,type:`button`,className:`project-automation-trigger no-drag ${x===`ACTIVE`?`is-active`:`is-paused`}`,"aria-label":x===`ACTIVE`?c(`自动认领中`,`Auto-claiming`):c(`自动化`,`Automation`),"aria-busy":n,"aria-haspopup":`dialog`,"aria-expanded":p,title:x===`ACTIVE`?c(`自动认领中`,`Auto-claiming`):c(`自动化`,`Automation`),onClick:()=>{p||(v(e=>({...e,ready:!1})),a()),m(e=>!e)},children:[(0,B.jsx)(eM,{name:x===`ACTIVE`?`automationPause`:`automationPlay`}),(0,B.jsx)(`span`,{children:x===`ACTIVE`?c(`自动认领中`,`Auto-claiming`):c(`自动化`,`Automation`)})]}),D]})}function iM(e,t){return new Intl.DateTimeFormat(t,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}).format(new Date(e*1e3))}function aM({label:e,icon:t,shortcut:n,checked:r,danger:i,disabled:a,submenu:o,submenuOpen:s,rootShortcut:c,onPointerEnter:l,onClick:u,children:d}){return(0,B.jsxs)(`div`,{className:`context-menu-item-anchor`,children:[(0,B.jsxs)(`button`,{type:`button`,role:r===void 0?`menuitem`:`menuitemradio`,"aria-checked":r,"aria-haspopup":o?`menu`:void 0,"aria-expanded":o?s:void 0,className:`context-menu-item${i?` is-danger`:``}`,disabled:a,"data-submenu":o,"data-root-shortcut":c,"data-open":s?`true`:void 0,onPointerEnter:l,onClick:u,children:[(0,B.jsx)(`span`,{className:`context-menu-icon`,children:t}),(0,B.jsx)(`span`,{className:`context-menu-label`,children:e}),n&&(0,B.jsx)(`span`,{className:`context-menu-shortcut`,children:n}),r&&(0,B.jsx)(`span`,{className:`context-menu-check`,children:(0,B.jsx)(J,{name:`check`})}),o&&(0,B.jsx)(`span`,{className:`context-menu-chevron`,children:(0,B.jsx)(J,{name:`chevronRight`})})]}),d]})}function oM({task:e,position:t,labels:n,onClose:r,onEdit:i,onStatusChange:a,onPriorityChange:o,onLabelsChange:s,onDuplicate:c,onCopy:l,openInThreadDisabled:u=!1,onOpenInThread:f,onArchive:p}){let{language:m,text:h}=H(),g=e.externalKey??e.identifier,_=(0,d.useRef)(null),v=(0,d.useRef)(null),[y,b]=(0,d.useState)(null),[x,S]=(0,d.useState)(t),[C,w]=(0,d.useState)(`right`),[T,E]=(0,d.useState)(0);function D(e){r(),e()}function O(e,t=!1){v.current!==null&&window.clearTimeout(v.current),b(e),t&&requestAnimationFrame(()=>{_.current?.querySelector(`[data-submenu-panel="${e}"] .context-menu-item:not(:disabled)`)?.focus()})}function k(e){v.current!==null&&window.clearTimeout(v.current),v.current=window.setTimeout(()=>O(e),300)}function ee(){v.current!==null&&window.clearTimeout(v.current),b(null)}(0,d.useLayoutEffect)(()=>{let e=_.current;if(!e)return;let n=e.getBoundingClientRect(),r=Math.max(8,Math.min(t.x,window.innerWidth-n.width-8)),i=Math.max(8,Math.min(t.y,window.innerHeight-n.height-8));S(e=>e.x===r&&e.y===i?e:{x:r,y:i}),w(r+n.width+196>window.innerWidth-8?`left`:`right`)},[t.x,t.y]),(0,d.useLayoutEffect)(()=>{if(!y){E(0);return}let e=_.current?.querySelector(`[data-submenu-panel="${y}"]`);if(!e)return;let t=e.getBoundingClientRect(),n=t.bottom>window.innerHeight-8?window.innerHeight-8-t.bottom:t.top<8?8-t.top:0;E(n)},[y,x]),(0,d.useEffect)(()=>{let e=document.activeElement;requestAnimationFrame(()=>_.current?.querySelector(`.context-menu-item:not(:disabled)`)?.focus());let t=$c([_],r),n=el(_,r);return()=>{v.current!==null&&window.clearTimeout(v.current),t(),n(),e?.focus?.({preventScroll:!0})}},[r]);function A(e){return Array.from(e.querySelectorAll(`:scope > .context-menu-group > .context-menu-item-anchor > .context-menu-item:not(:disabled), :scope > .context-menu-item-anchor > .context-menu-item:not(:disabled)`))}function te(e){let t=e.target,n=t.closest(`[role="menu"]`);if(n){if(e.key===`Escape`){e.preventDefault(),r();return}if(e.key===`ArrowLeft`&&n.classList.contains(`context-submenu`)){e.preventDefault();let t=y;b(null),requestAnimationFrame(()=>_.current?.querySelector(`[data-submenu="${t}"]`)?.focus());return}if(e.key===`ArrowRight`&&t.dataset.submenu){e.preventDefault(),O(t.dataset.submenu,!0);return}if([`ArrowDown`,`ArrowUp`,`Home`,`End`,`Tab`].includes(e.key)){e.preventDefault();let r=A(n);if(!r.length)return;if(e.key===`Home`)r[0].focus();else if(e.key===`End`)r.at(-1)?.focus();else{let n=e.key===`ArrowUp`||e.key===`Tab`&&e.shiftKey?-1:1;r[(Math.max(0,r.indexOf(t))+n+r.length)%r.length].focus()}return}if(!e.metaKey&&!e.ctrlKey&&!e.altKey&&e.key.length===1){let t=_.current?.querySelector(`[data-root-shortcut="${e.key.toLowerCase()}"]`);t?.dataset.submenu&&(e.preventDefault(),t.focus(),O(t.dataset.submenu,!0))}}}return(0,vr.createPortal)((0,B.jsxs)(`div`,{ref:_,className:`task-context-menu`,role:`menu`,"aria-label":h(`${g} 操作`,`${g} actions`),"data-submenu-side":C,style:{left:x.x,top:x.y},onKeyDown:te,onContextMenu:e=>e.preventDefault(),children:[(0,B.jsxs)(`div`,{className:`context-menu-group`,children:[(0,B.jsx)(aM,{label:h(`状态`,`Status`),icon:(0,B.jsx)(Ac,{status:e.status,color:`currentColor`}),shortcut:`S`,submenu:`status`,submenuOpen:y===`status`,rootShortcut:`s`,onPointerEnter:()=>k(`status`),onClick:()=>O(`status`,!0),children:y===`status`&&(0,B.jsx)(`div`,{className:`context-submenu`,role:`menu`,"data-submenu-panel":`status`,style:{"--submenu-shift":`${T}px`},children:tc.map((t,n)=>(0,B.jsx)(aM,{label:Qe(m,t),icon:(0,B.jsx)(Ac,{status:t,color:`currentColor`}),shortcut:String(n+1),checked:e.status===t,onClick:()=>D(()=>a(e,t))},t))})}),(0,B.jsx)(aM,{label:h(`优先级`,`Priority`),icon:(0,B.jsx)(Mc,{priority:e.priority}),shortcut:`P`,submenu:`priority`,submenuOpen:y===`priority`,rootShortcut:`p`,onPointerEnter:()=>k(`priority`),onClick:()=>O(`priority`,!0),children:y===`priority`&&(0,B.jsx)(`div`,{className:`context-submenu`,role:`menu`,"data-submenu-panel":`priority`,style:{"--submenu-shift":`${T}px`},children:nc.map((t,n)=>(0,B.jsx)(aM,{label:V(m,t),icon:(0,B.jsx)(Mc,{priority:t}),shortcut:String(n),checked:e.priority===t,onClick:()=>D(()=>o(e,t))},t))})}),(0,B.jsx)(aM,{label:h(`标签`,`Labels`),icon:(0,B.jsx)(Pc,{color:`currentColor`}),shortcut:`L`,submenu:`labels`,submenuOpen:y===`labels`,rootShortcut:`l`,onPointerEnter:()=>k(`labels`),onClick:()=>O(`labels`,!0),children:y===`labels`&&(0,B.jsxs)(`div`,{className:`context-submenu labels-submenu`,role:`menu`,"data-submenu-panel":`labels`,style:{"--submenu-shift":`${T}px`},children:[n.length?n.map(t=>{let n=e.labels.includes(t),r=cc(t,m);return(0,B.jsx)(aM,{label:r.name,icon:r.tone?(0,B.jsx)(`span`,{className:`context-label-glyph`,style:{"--label-color":r.color},"aria-hidden":`true`}):null,checked:n,onClick:()=>D(()=>s(e,n?e.labels.filter(e=>e!==t):[...e.labels,t]))},t)}):(0,B.jsx)(aM,{label:h(`暂无可用标签`,`No labels available`),disabled:!0}),(0,B.jsx)(`div`,{className:`context-menu-divider`,role:`separator`}),(0,B.jsx)(aM,{label:h(`在编辑器中管理…`,`Manage in editor…`),icon:(0,B.jsx)(Nc,{color:`currentColor`}),onClick:()=>D(()=>i(e))})]})})]}),(0,B.jsx)(`div`,{className:`context-menu-divider`,role:`separator`}),(0,B.jsxs)(`div`,{className:`context-menu-group`,children:[(0,B.jsx)(aM,{label:h(`编辑议题`,`Edit issue`),icon:(0,B.jsx)(Nc,{color:`currentColor`}),shortcut:`↵`,onPointerEnter:ee,onClick:()=>D(()=>i(e))}),e.source!==`jira`&&(0,B.jsx)(aM,{label:h(`创建副本`,`Create copy`),icon:(0,B.jsx)(J,{name:`copy`}),onPointerEnter:ee,onClick:()=>D(()=>c(e))}),(0,B.jsx)(aM,{label:h(`复制`,`Copy`),icon:(0,B.jsx)(J,{name:`copy`}),submenu:`copy`,submenuOpen:y===`copy`,onPointerEnter:()=>k(`copy`),onClick:()=>O(`copy`,!0),children:y===`copy`&&(0,B.jsxs)(`div`,{className:`context-submenu`,role:`menu`,"data-submenu-panel":`copy`,style:{"--submenu-shift":`${T}px`},children:[(0,B.jsx)(aM,{label:h(`复制议题 ID`,`Copy issue ID`),onClick:()=>D(()=>l(g,h(`${g} 已复制。`,`${g} copied.`)))}),(0,B.jsx)(aM,{label:h(`复制标题`,`Copy title`),onClick:()=>D(()=>l(e.title,h(`议题标题已复制。`,`Issue title copied.`)))}),(0,B.jsx)(aM,{label:h(`复制 Markdown`,`Copy Markdown`),onClick:()=>D(()=>l(`**${g}** ${e.title}`,h(`Markdown 已复制。`,`Markdown copied.`)))})]})}),(0,B.jsx)(aM,{label:h(`在新对话打开`,`Open in new conversation`),icon:(0,B.jsx)(Hc,{color:`currentColor`,size:16}),disabled:u,onPointerEnter:ee,onClick:()=>D(()=>f(e))})]}),e.source!==`jira`&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`context-menu-divider`,role:`separator`}),(0,B.jsx)(`div`,{className:`context-menu-group`,children:(0,B.jsx)(aM,{label:h(`归档议题`,`Archive issue`),icon:(0,B.jsx)(zc,{color:`currentColor`}),shortcut:`⌘⌫`,danger:!0,onPointerEnter:ee,onClick:()=>D(()=>p(e))})})]})]}),document.body)}var sM=new Map,cM=`taskboard.project-board-display-settings.v3.`,lM=250,uM=5e3,dM=null,fM=!1,pM=Promise.resolve(),mM=Promise.resolve();function hM(e){return e.startsWith(cM)}async function gM(){let e=await fetch(new URL(`api/client-storage`,document.baseURI));if(!e.ok)throw Error(`Taskboard storage returned ${e.status}`);let t=await e.json();if(dM){for(let e of sM.keys())hM(e)&&sM.delete(e);for(let[e,n]of Object.entries(t.entries))hM(e)&&sM.set(e,n);return}sM.clear();for(let[e,n]of Object.entries(t.entries))sM.set(e,n);fM=!0}async function _M(){mM=mM.catch(()=>{}).then(gM),await mM}function vM(e,t){pM=pM.then(async()=>{let n=JSON.stringify({key:e,value:t}),r=new TextEncoder().encode(n).byteLength<=64*1024,i=lM;for(;;)try{let e=await fetch(new URL(`api/client-storage`,document.baseURI),{method:`PATCH`,headers:{"content-type":`application/json`},body:n,keepalive:r});if(e.ok)return;let t=Error(`Taskboard storage returned ${e.status}`);if(e.status>=400&&e.status<500){console.error(t);return}throw t}catch(e){console.error(e),await new Promise(e=>window.setTimeout(e,i)),i=Math.min(i*2,uM)}})}async function yM(){try{dM=window.localStorage}catch{dM=null}await _M()}async function bM(){await pM,await _M()}function xM(){return[...sM.entries()].filter(([e])=>hM(e))}var SM={getItem(e){return hM(e)?sM.get(e)??null:dM?.getItem(e)??sM.get(e)??null},setItem(e,t){if(hM(e)){sM.set(e,t),vM(e,t);return}if(dM){dM.setItem(e,t);return}sM.set(e,t),fM&&vM(e,t)},removeItem(e){if(hM(e)){sM.delete(e),vM(e,null);return}if(dM){dM.removeItem(e);return}sM.delete(e),fM&&vM(e,null)}};function CM({candidates:e,selectedIds:t,disabled:n,onSelect:r,onEscape:i}){let{text:a}=H(),[o,s]=(0,d.useState)(``),[c,l]=(0,d.useState)(0),[u,f]=(0,d.useState)(null),p=(0,d.useRef)(null),m=(0,d.useRef)([]),h=(0,d.useMemo)(()=>{let t=o.trim().toLocaleLowerCase();return t?e.filter(e=>(e.externalKey??e.identifier).toLocaleLowerCase().includes(t)||e.title.toLocaleLowerCase().includes(t)):e},[e,o]);(0,d.useEffect)(()=>{requestAnimationFrame(()=>p.current?.focus())},[]),(0,d.useEffect)(()=>{m.current[c]?.scrollIntoView({block:`nearest`})},[c]);async function g(e){f(e.id);try{await r(e)}catch{}finally{f(null)}}return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`issue-relation-search`,children:[(0,B.jsx)(J,{name:`search`}),(0,B.jsx)(`input`,{ref:p,value:o,role:`combobox`,"aria-expanded":`true`,"aria-controls":`issue-relation-results`,"aria-activedescendant":h[c]?`relation-option-${h[c].id}`:void 0,placeholder:a(`搜索议题…`,`Search issues…`),onChange:e=>{s(e.target.value),l(0)},onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.keyCode===229))if(e.key===`Enter`){if(e.metaKey||e.ctrlKey)return;e.preventDefault();let t=h[c];t&&g(t)}else e.key===`Escape`?(e.preventDefault(),i()):e.key===`ArrowDown`&&h.length>0?(e.preventDefault(),l(e=>(e+1)%h.length)):e.key===`ArrowUp`&&h.length>0&&(e.preventDefault(),l(e=>(e-1+h.length)%h.length))}})]}),(0,B.jsx)(`div`,{className:`issue-relation-results${t?` has-selections`:``}`,id:`issue-relation-results`,role:`listbox`,children:h.length>0?h.map((e,r)=>{let i=t?.has(e.id)??!1,a=[r===c?`is-active`:``,i?`is-selected`:``].filter(Boolean).join(` `);return(0,B.jsxs)(`button`,{ref:e=>{m.current[r]=e},id:`relation-option-${e.id}`,className:a,type:`button`,role:`option`,"aria-selected":t?i:r===c,disabled:n||u!==null,onMouseEnter:()=>l(r),onClick:()=>void g(e),children:[(0,B.jsx)(Ac,{status:e.status,size:14}),(0,B.jsx)(`span`,{className:`issue-relation-option-id`,children:e.externalKey??e.identifier}),(0,B.jsx)(`span`,{className:`issue-relation-option-title`,children:e.title}),t&&(0,B.jsx)(`span`,{className:`issue-relation-option-check`,children:i&&(0,B.jsx)(J,{name:`check`})})]},e.id)}):(0,B.jsx)(`p`,{className:`issue-relation-empty`,children:a(`没有匹配的议题`,`No matching issues`)})})]})}function wM({label:e,candidates:t,disabled:n,onSelect:r}){let[i,a]=(0,d.useState)(!1),o=(0,d.useRef)(null);return(0,d.useEffect)(()=>{if(!i)return;let e=e=>{o.current?.contains(e.target)||a(!1)};return window.addEventListener(`pointerdown`,e),()=>window.removeEventListener(`pointerdown`,e)},[i]),(0,B.jsxs)(`div`,{className:`issue-relation-picker`,ref:o,children:[(0,B.jsxs)(`button`,{className:`issue-relation-add`,type:`button`,disabled:n,"aria-label":e,"aria-expanded":i,onClick:()=>a(e=>!e),children:[(0,B.jsx)(Rc,{color:`currentColor`,size:13}),(0,B.jsx)(`span`,{children:e})]}),i&&(0,B.jsx)(`div`,{className:`issue-relation-popover`,children:(0,B.jsx)(CM,{candidates:t,disabled:n,onEscape:()=>a(!1),onSelect:async e=>{await r(e),a(!1)}})})]})}function TM(e,t){let n=new Set,r=[...e.relations.subIssues.map(e=>e.id)],i=new Map(t.map(e=>[e.id,e]));for(;r.length>0;){let e=r.shift();if(n.has(e))continue;n.add(e);let t=i.get(e);t&&r.push(...t.relations.subIssues.map(e=>e.id))}return n}function EM({issue:e,onOpen:t,onRemove:n,removing:r,showAssignee:i=!1}){let{text:a}=H();return(0,B.jsxs)(`div`,{className:`issue-relation-row`,children:[(0,B.jsxs)(`button`,{className:`issue-relation-target`,type:`button`,onClick:t,children:[(0,B.jsx)(Ac,{status:e.status,size:14}),(0,B.jsx)(`span`,{className:`issue-relation-id`,children:e.externalKey??e.identifier}),(0,B.jsx)(`span`,{className:`issue-relation-title`,children:e.title}),i&&(0,B.jsx)(lc,{actor:e.assignee,className:`issue-relation-assignee`})]}),(0,B.jsx)(`button`,{className:`issue-relation-remove`,type:`button`,"aria-label":a(`移除 ${e.externalKey??e.identifier}`,`Remove ${e.externalKey??e.identifier}`),disabled:r,onClick:n,children:(0,B.jsx)(J,{name:`close`})})]})}function DM({task:e,tasks:t,onOpenTask:n,onAddRelation:r,onRemoveRelation:i}){let{text:a}=H(),[o,s]=(0,d.useState)(!1),c=e.relations.parent,l=TM(e,t);l.add(e.id);let u=t.filter(e=>e.archivedAt===null&&!l.has(e.id)&&e.id!==c?.id);return(0,B.jsxs)(`div`,{className:`issue-parent-link${c?` has-parent`:``}`,children:[c&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`issue-parent-prefix`,children:a(`子议题属于`,`Sub-issue of`)}),(0,B.jsx)(EM,{issue:c,removing:o,onOpen:()=>n(c),onRemove:()=>{s(!0),i(e,`parent`,c.id).catch(()=>void 0).finally(()=>s(!1))}})]}),(0,B.jsx)(wM,{label:c?a(`更换父议题`,`Change parent issue`):a(`设置父议题`,`Set parent issue`),candidates:u,disabled:o,onSelect:async t=>{s(!0);try{await r(e,`parent`,t.id)}finally{s(!1)}}})]})}function OM({task:e,tasks:t,onOpenTask:n,onAddRelation:r,onRemoveRelation:i}){let{text:a}=H(),[o,s]=(0,d.useState)(null),c=e.relations.subIssues,l=c.filter(e=>e.status===`done`).length,u=new Set(c.map(e=>e.id)),f=new Set([e.id]),p=e.relations.parent,m=new Map(t.map(e=>[e.id,e]));for(;p&&!f.has(p.id);)f.add(p.id),p=m.get(p.id)?.relations.parent??null;let h=t.filter(e=>e.archivedAt===null&&!f.has(e.id)&&!u.has(e.id)),g=c.length>0?Math.round(l/c.length*100):0;return(0,B.jsxs)(`section`,{className:`issue-sub-issues`,"aria-labelledby":`sub-issues-heading`,children:[(0,B.jsxs)(`header`,{children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h2`,{id:`sub-issues-heading`,children:a(`子议题`,`Sub-issues`)}),c.length>0&&(0,B.jsxs)(`span`,{className:`sub-issue-summary`,children:[(0,B.jsx)(`span`,{className:`sub-issue-progress`,style:{"--sub-issue-progress":`${g}%`},"aria-hidden":`true`}),l,`/`,c.length]})]}),(0,B.jsx)(wM,{label:a(`添加子议题`,`Add sub-issue`),candidates:h,disabled:o!==null,onSelect:async t=>{s(t.id);try{await r(t,`parent`,e.id)}finally{s(null)}}})]}),c.length>0&&(0,B.jsx)(`div`,{className:`issue-sub-issue-list`,children:c.map(t=>{let r=m.get(t.id);return(0,B.jsx)(EM,{issue:t,showAssignee:!0,removing:o===t.id,onOpen:()=>n(t),onRemove:()=>{r&&(s(t.id),i(r,`parent`,e.id).catch(()=>void 0).finally(()=>s(null)))}},t.id)})})]})}var kM=[{type:`blocked_by`,field:`blockedBy`,chineseLabel:`阻塞于`,englishLabel:`Blocked by`,chineseAddLabel:`添加阻塞议题`,englishAddLabel:`Add blocker`,tone:`blocked-by`},{type:`blocks`,field:`blocks`,chineseLabel:`阻塞`,englishLabel:`Blocks`,chineseAddLabel:`添加被阻塞议题`,englishAddLabel:`Add blocked issue`,tone:`blocks`},{type:`related`,field:`related`,chineseLabel:`相关议题`,englishLabel:`Related issues`,chineseAddLabel:`添加相关议题`,englishAddLabel:`Add related issue`,tone:`related`}];function AM({task:e,tasks:t,onOpenTask:n,onAddRelation:r,onRemoveRelation:i}){let{text:a}=H(),[o,s]=(0,d.useState)(null);return(0,B.jsxs)(`section`,{className:`issue-relation-sidebar`,"aria-labelledby":`relations-heading`,children:[(0,B.jsx)(`h2`,{id:`relations-heading`,children:a(`关系`,`Relations`)}),kM.map(c=>{let l=a(c.chineseLabel,c.englishLabel),u=e.relations[c.field],d=new Set(u.map(e=>e.id)),f=t.filter(t=>t.archivedAt===null&&t.id!==e.id&&!d.has(t.id));return(0,B.jsxs)(`div`,{className:`issue-relation-group is-${c.tone}`,children:[(0,B.jsxs)(`header`,{children:[(0,B.jsxs)(`span`,{children:[c.type===`related`?(0,B.jsx)(Wc,{color:`currentColor`,size:14}):(0,B.jsx)(Gc,{type:c.type,color:`currentColor`}),l]}),(0,B.jsx)(wM,{label:a(c.chineseAddLabel,c.englishAddLabel),candidates:f,disabled:o!==null,onSelect:async t=>{let n=`${c.type}:${t.id}`;s(n);try{await r(e,c.type,t.id)}finally{s(null)}}})]}),u.map(t=>(0,B.jsx)(EM,{issue:t,removing:o===`${c.type}:${t.id}`,onOpen:()=>n(t),onRemove:()=>{let n=`${c.type}:${t.id}`;s(n),i(e,c.type,t.id).catch(()=>void 0).finally(()=>s(null))}},t.id))]},c.type)})]})}function jM(){return typeof globalThis.__CODEX_TASKBOARD_FRAME_CAPABILITY__==`string`?globalThis.__CODEX_TASKBOARD_FRAME_CAPABILITY__:``}var MM=``;function NM(e){MM=typeof e==`string`?e:``}function PM(e){window.parent.postMessage({...e,capability:jM(),challenge:MM},`*`)}function FM(){let e=e=>{let t=e.target instanceof Element?e.target.closest(`a[target="_blank"]`):null;if(!t)return;let n=t.getAttribute(`href`);if(!n)return;let r;try{r=new URL(n)}catch{return}r.protocol!==`http:`&&r.protocol!==`https:`||(e.preventDefault(),PM({type:`taskboard:open-external`,payload:{url:r.href}}))};return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)}var IM=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='11.5'%20height='13.5'%20viewBox='0%200%2011.5%2013.5'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Location'%3e%3cpath%20id='Stroke%201'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.42347%205.89034C7.42347%204.96949%206.67732%204.22333%205.75647%204.22333C4.8363%204.22333%204.09014%204.96949%204.09014%205.89034C4.09014%206.81051%204.8363%207.55667%205.75647%207.55667C6.67732%207.55667%207.42347%206.81051%207.42347%205.89034Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.74967%2012.75C3.81766%2012.75%200.75%209.3891%200.75%205.81576C0.75%203.01831%202.98807%200.75%205.74967%200.75C8.51128%200.75%2010.75%203.01831%2010.75%205.81576C10.75%209.3891%207.68234%2012.75%205.74967%2012.75Z'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`,LM=`data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='13.4997'%20height='13.5'%20viewBox='0%200%2013.4997%2013.5'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='link-chain--create-hyperlink-link-make-unlink-connection-chain'%3e%3cpath%20id='Vector%202513'%20d='M5.8267%203.05769L7.17842%201.70587C8.45292%200.431375%2010.5193%200.431375%2011.7938%201.70587C13.0683%202.98039%2013.0683%205.04676%2011.7938%206.32127L10.4421%207.67308'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector%202514'%20d='M7.67297%2010.4423L6.32127%2011.7942C5.04675%2013.0686%202.98038%2013.0686%201.70588%2011.7942C0.431373%2010.5197%200.431374%208.45324%201.70588%207.17873L3.05759%205.82692'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector%202515'%20d='M8.59593%204.90385L4.90362%208.59616'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e`;function RM(e){return e instanceof v||e instanceof Error?e.message:[`操作未完成,请重试。`,`The action could not be completed. Try again.`]}function zM(e){return e instanceof v&&e.code===`VERSION_CONFLICT`?[`该议题已在其他位置更新,请刷新后重试。`,`This issue changed elsewhere. Refresh and try again.`]:RM(e)}function BM(e,t){return new Intl.DateTimeFormat(t,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e))}function VM(e,t){let n=Math.round((new Date(e).getTime()-Date.now())/1e3),r=new Intl.RelativeTimeFormat(t,{numeric:`auto`});if(Math.abs(n)<60)return r.format(n,`second`);let i=Math.round(n/60);if(Math.abs(i)<60)return r.format(i,`minute`);let a=Math.round(i/60);if(Math.abs(a)<24)return r.format(a,`hour`);let o=Math.round(a/24);return Math.abs(o)<30?r.format(o,`day`):new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`}).format(new Date(e))}function HM(e){e&&(e.style.height=`0px`,e.style.height=`${e.scrollHeight}px`)}async function UM(e){if(new URL(document.baseURI).searchParams.get(`host`)===`codex`&&window.parent!==window){PM({type:`taskboard:open-attachment`,payload:{attachmentId:e.id,filename:e.filename}});return}let t=await fetch(y(Fe(e)));if(!t.ok)throw new v(t.status,await t.json().catch(()=>({})));let n=URL.createObjectURL(await t.blob()),r=document.createElement(`a`);r.href=n,r.download=e.filename,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}function WM(e){return e?JSON.stringify(e):``}function GM(e,t){if(e.type===`branch`)return e.branch;let n=e.path.split(/[\\/]/).filter(Boolean).at(-1)??e.path;return`${e.branch??t(`分离 HEAD`,`detached`)} · ${n}`}var KM={projectId:[`项目`,`project`],title:[`标题`,`title`],description:[`描述`,`description`],status:[`状态`,`status`],priority:[`优先级`,`priority`],labels:[`标签`,`labels`],assignee:[`负责人`,`assignee`],developmentContext:[`开发上下文`,`development context`],startDate:[`开始日期`,`start date`],dueDate:[`截止日期`,`due date`],recurrence:[`重复`,`recurrence`],archivedAt:[`归档状态`,`archive status`],relation:[`关系`,`relation`]},qM={parent:[`父议题`,`Parent issue`],blocks:[`阻塞`,`Blocks`],blocked_by:[`阻塞于`,`Blocked by`],related:[`相关议题`,`Related issue`]};function JM(e,t,n,r,i){if(e===`archivedAt`)return typeof t==`string`?i(`已归档(${BM(t,r)})`,`Archived (${BM(t,r)})`):i(`未归档`,`Not archived`);if(t===null||t===``)return i(`未设置`,`Not set`);if(e===`status`&&typeof t==`string`&&t in wl)return Qe(n,t);if(e===`priority`&&typeof t==`string`&&nc.includes(t))return V(n,t);if(e===`labels`&&Array.isArray(t))return t.length>0?t.join(n===`zh`?`、`:`, `):i(`无标签`,`No labels`);if(e===`assignee`&&typeof t==`object`){let e=t;return`${e.name} @${e.id}`}if(e===`developmentContext`&&typeof t==`object`){let e=t;if(e.type===`branch`)return e.branch??i(`未设置`,`Not set`);let n=e.path?.split(/[\\/]/).filter(Boolean).at(-1);return`${e.branch??i(`分离 HEAD`,`detached`)}${n?` · ${n}`:``}`}if(e===`recurrence`&&typeof t==`object`){let e=t,[n,r]={day:[`天`,`day`],week:[`周`,`week`],month:[`月`,`month`],year:[`年`,`year`]}[e.unit];return i(e.interval===1?`每${n}`:`每 ${e.interval} ${n}`,`Every ${e.interval===1?``:`${e.interval} `}${r}${e.interval===1?``:`s`}`)}if(e===`relation`&&typeof t==`object`){let e=t,[n,r]=qM[e.type];return`${i(n,r)} ${e.externalKey??e.identifier} · ${e.title}`}return Array.isArray(t)?t.join(n===`zh`?`、`:`, `):typeof t==`object`?JSON.stringify(t):String(t)}function YM({field:e,before:t,after:n}){let r=n??t;if(e===`status`&&typeof r==`string`&&r in wl)return(0,B.jsx)(Ac,{status:r,color:`currentColor`,size:14});if(e===`priority`&&typeof r==`string`&&nc.includes(r))return(0,B.jsx)(Mc,{priority:r,color:`currentColor`,size:14});if(e===`relation`&&typeof r==`object`){let e=r;return e.type===`blocked_by`||e.type===`blocks`?(0,B.jsx)(Gc,{type:e.type,color:`currentColor`,size:14}):(0,B.jsx)(Wc,{color:`currentColor`,size:14})}return e===`projectId`?(0,B.jsx)(Bc,{color:`currentColor`,size:14}):e===`labels`?(0,B.jsx)(Pc,{color:`currentColor`,size:14}):e===`assignee`?(0,B.jsx)(J,{name:`myIssues`}):e===`developmentContext`?(0,B.jsx)(Fc,{color:`currentColor`,size:14}):e===`startDate`||e===`dueDate`?(0,B.jsx)(Kc,{color:`currentColor`,size:14}):e===`recurrence`?(0,B.jsx)(qc,{color:`currentColor`,size:14}):e===`archivedAt`?(0,B.jsx)(zc,{color:`currentColor`,size:14}):(0,B.jsx)(Nc,{color:`currentColor`,size:14})}function XM({threadId:e,onOpen:t,onCopy:n}){let{text:r}=H();return(0,B.jsxs)(`div`,{className:`issue-conversation-actions`,children:[(0,B.jsxs)(`button`,{className:`issue-conversation-link`,type:`button`,title:r(`查看对话`,`View conversation`),onClick:t,children:[(0,B.jsx)(Vc,{color:`currentColor`,size:16}),(0,B.jsx)(`strong`,{children:r(`查看对话`,`View conversation`)})]}),(0,B.jsxs)(`button`,{className:`issue-conversation-copy`,type:`button`,title:r(`复制终端命令`,`Copy terminal command`),onClick:()=>n(`codex resume ${e}`,r(`Codex 恢复命令已复制。`,`Codex resume command copied.`)),children:[(0,B.jsx)(Uc,{}),(0,B.jsx)(`span`,{children:r(`复制终端命令`,`Copy terminal command`)})]})]})}function ZM({task:e,tasks:t,referenceTasks:n,currentUser:r,availableLabels:i,developmentScan:a,developmentScanLoading:o,commentsRevision:s,attachmentsRevision:c,onCreateLabel:l,onDeleteLabel:u,onUpdate:f,onOpenTask:p,onAddRelation:m,onRemoveRelation:h,onOpenThread:g,onOpenLegacyLocalThread:_,onOpenInThread:v,onCopy:y,openingThread:b,onError:x}){let{language:S,locale:C,text:w}=H(),[T,E]=(0,d.useState)(e),[D,O]=(0,d.useState)(e.title),[k,ee]=(0,d.useState)(e.description),[A,te]=(0,d.useState)(()=>Su(e.description,n)),[j,M]=(0,d.useState)(!1),[N,P]=(0,d.useState)(null),[F,I]=(0,d.useState)(null),[ne,re]=(0,d.useState)([]),[ie,L]=(0,d.useState)(null),[R,ae]=(0,d.useState)([]),[oe,se]=(0,d.useState)([]),[ce,le]=(0,d.useState)(!0),[ue,de]=(0,d.useState)(null),[fe,pe]=(0,d.useState)(()=>Su(SM.getItem(`taskboard.comment-draft.${e.id}`)??``,n)),[me,he]=(0,d.useState)(!1),[ge,ve]=(0,d.useState)(!1),[ye,be]=(0,d.useState)(null),[xe,Se]=(0,d.useState)(null),[Ce,we]=(0,d.useState)(()=>Su()),[Te,Ee]=(0,d.useState)(null),[Pe,Fe]=(0,d.useState)(null),[Ie,Ve]=(0,d.useState)(!1),Ue=(0,d.useRef)(null),We=(0,d.useRef)(null),Ge=(0,d.useRef)(null),Ke=(0,d.useRef)(null),qe=(0,d.useRef)(null),Je=(0,d.useRef)(null),Ye=(0,d.useRef)(null),Xe=(0,d.useRef)(null),Ze=(0,d.useRef)(!1),$e=(0,d.useRef)(null),et=(0,d.useRef)(null),tt=(0,d.useRef)(null),U=(0,d.useRef)(new Map),nt=Ou(fe),rt=Cu(fe),it=wu(fe),at=Ou(Ce),ot=T.externalKey??T.identifier,W=Cu(Ce),st=wu(Ce);(0,d.useEffect)(()=>{let t=T.id!==e.id;E(e),document.activeElement!==Ue.current&&O(e.title),(t||!j)&&(ee(e.description),te(Su(e.description,n))),t&&(M(!1),he(!1))},[e]),(0,d.useEffect)(()=>{HM(Ue.current)},[D]),(0,d.useLayoutEffect)(()=>{if(!j)return;let e=Ge.current;Ge.current=null;let t=Ke.current;Ke.current=null,t?We.current?.focusAtText(t.text,t.offset,t.occurrence):We.current?.focus(),e&&(e.element.scrollTop=e.top,requestAnimationFrame(()=>{e.element.scrollTop=e.top}))},[j]),(0,d.useLayoutEffect)(()=>{if(!xe)return;let e=Ye.current;Ye.current=null,Je.current?.focus(),e&&(e.element.scrollTop=e.top,requestAnimationFrame(()=>{e.element.scrollTop=e.top}))},[xe]),(0,d.useEffect)(()=>{let t=new AbortController;return de(null),Promise.all([De(e.id,t.signal),Oe(e.id,t.signal)]).then(([e,t])=>{ae(e),se(t),le(!1)},e=>{e.name!==`AbortError`&&(de(RM(e)),le(!1))}),()=>t.abort()},[s,e.activityKey,e.id]),(0,d.useEffect)(()=>{let t=new AbortController;return L(null),je(e.id,t.signal).then(e=>{re(e.filter(e=>!e.commentId))},e=>{e.name!==`AbortError`&&L(RM(e))}),()=>t.abort()},[c,e.id]),(0,d.useEffect)(()=>{function e(e){e.source!==window.parent||!e.data||typeof e.data!=`object`||e.data.type===`taskboard:attachment-open-error`&&L(typeof e.data.payload?.error==`string`?e.data.payload.error:[`无法打开附件,请重试。`,`Could not open the attachment. Try again.`])}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]),(0,d.useEffect)(()=>{let t=`taskboard.comment-draft.${e.id}`,n=Tu(fe);n?SM.setItem(t,n):SM.removeItem(t)},[fe,e.id]),(0,d.useEffect)(()=>{function e(e){e.key.toLowerCase()!==`r`||e.metaKey||e.ctrlKey||e.altKey||e.target?.matches(`input, textarea, select, [contenteditable='true']`)||(e.preventDefault(),qe.current?.focus())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,d.useEffect)(()=>{if(!ye)return;function e(e){e.target.closest(`[data-comment-menu-root="${ye}"]`)||be(null)}function t(e){e.key===`Escape`&&be(null)}return document.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[ye]);async function G(e,t){I(t),x(null);try{let t=await f(T,e);return E(t),O(t.title),ee(t.description),t}catch(e){return x(zM(e)),O(T.title),ee(T.description),null}finally{I(null)}}function ct(e,t){let n=t.currentTarget.querySelector(`input`);if(!n||n.disabled)return;if(t.preventDefault(),new URL(document.baseURI).searchParams.get(`host`)!==`codex`||window.parent===window){n.showPicker();return}let r=crypto.randomUUID(),i=n.getBoundingClientRect();function a(t){if(t.source!==window.parent||t.data?.type!==`taskboard:date-picker-response`)return;let n=t.data.payload;if(n?.requestId!==r||typeof n.value!=`string`)return;window.removeEventListener(`message`,a);let i=n.value||null;G(e===`startDate`?{startDate:i}:{dueDate:i,...i?{}:{recurrence:null}},e)}window.addEventListener(`message`,a),PM({type:`taskboard:date-picker-request`,payload:{requestId:r,value:n.value,rect:{x:i.x,y:i.y,width:i.width,height:i.height}}})}async function lt(e){x(null);try{let t=await e(),n=t.task.id===T.id?t.task:t.relatedTask.id===T.id?t.relatedTask:null;return n&&E(n),t}catch(e){throw x(zM(e)),e}}async function ut(e,t){let n=e,r=new Set(n.relations.related.map(e=>e.id));for(let e of t){if(e.type!==`issue-reference`||!e.taskId)continue;let t=e.taskId;t===n.id||e.projectId!==n.projectId||r.has(t)||(n=(await lt(()=>m(n,`related`,t,`mention`))).task,r.add(t))}return n}function dt(e){return new Set(e.flatMap(e=>e.type===`issue-reference`&&e.taskId?[e.taskId]:[]))}function ft(e,t){let n=dt(t);return new Set([...dt(e)].filter(e=>!n.has(e)))}async function pt(e,t){if(t.size===0)return e;let r=await De(e.id),i=dt(Su(e.description,n));for(let e of r)for(let t of dt(Su(e.body,n)))i.add(t);let a=e;for(let r of t)i.has(r)||!a.relations.related.some(e=>e.id===r)||dt(Su((await _e(r)).description,n)).has(e.id)||(await De(r)).some(t=>dt(Su(t.body,n)).has(e.id))||(a=(await lt(()=>h(a,`related`,r,`mention`))).task);return a}function mt(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),e.currentTarget.blur()),e.key===`Escape`&&(O(T.title),e.currentTarget.blur())}async function ht(){let e=D.trim();if(!e){O(T.title),x([`议题标题不能为空。`,`Issue title cannot be empty.`]);return}if(e===T.title){O(e);return}await G({title:e},`title`)}async function gt(){if(F===`description`)return;let e=Ou(A).trim(),t=Cu(A),r=wu(A);if(e===T.description&&t.length===0&&r.length===0){M(!1);return}let i=ft(Su(T.description,n),A);I(`description`),x(null);try{let a=(e,t)=>Me(T.id,e,t),o=await Le(t,a),s=await Le(r,a),c=Re(e,[...t,...r],[...o,...s]).trim(),l=await f(T,{description:c}).catch(e=>(x(zM(e)),null));if(!l)return;let u=await pt(await ut(l,A),i);E(u),ee(u.description);let d=[...ne,...[...o,...s].filter(e=>!ne.some(t=>t.id===e.id))];te(Su(u.description,n,d)),re(d),M(!1)}catch(e){x(RM(e))}finally{I(null)}}async function _t(){let t=nt.trim();if(!(!t&&rt.length===0&&it.length===0||ge)){ve(!0),de(null);try{tt.current||={comment:await ke(e.id,t),uploadedAttachments:new Map};let{comment:n,uploadedAttachments:r}=tt.current,i=[...rt,...it],a=[];for(let e of i){let t=r.get(e.id);t||(t=await Ne(n.id,e.file,e.type===`pending-image`?`inline`:`attachment`),r.set(e.id,t)),a.push(t)}let o=Re(t,i,a),s=o===n.body?n:await Ae(n,o);tt.current=null,ae(e=>e.some(e=>e.id===s.id)?e.map(e=>e.id===s.id?s:e):[...e,s]),pe(Su()),$e.current&&($e.current.value=``);let c=await _e(T.id);if(me){let e=await f(c,{status:`todo`});E(e),c=e,he(!1)}let l=await ut(c,fe);E(l),requestAnimationFrame(()=>qe.current?.focus())}catch(e){de(RM(e))}finally{ve(!1)}}}function vt(e){e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_t())}function yt(e,t){if(Te!==null)return;let r=t.closest(`.issue-detail-scroll`);Ye.current=r?{element:r,top:r.scrollTop}:null,U.current.clear(),Se(e.id),we(Su(e.body,n,e.attachments)),be(null)}function bt(){Se(null),U.current.clear()}async function xt(e){let t=at.trim();if(!t||t===e.body&&W.length===0&&st.length===0){t===e.body&&bt();return}let r=ft(Su(e.body,n),Ce);Ee(e.id),de(null);try{let n=[...W,...st],i=[];for(let t of n){let n=U.current.get(t.id);n||(n=await Ne(e.id,t.file,t.type===`pending-image`?`inline`:`attachment`),U.current.set(t.id,n)),i.push(n)}let a=await Ae(e,Re(t,n,i).trim());ae(e=>e.map(e=>e.id===a.id?a:e));let o=await pt(await ut(await _e(T.id),Ce),r);E(o),bt()}catch(e){de(RM(e))}finally{Ee(null)}}async function St(){if(!Pe||Ie)return;let e=dt(Su(Pe.body,n));Ve(!0),de(null);try{await z(Pe),ae(e=>e.filter(e=>e.id!==Pe.id)),Fe(null);let t=await pt(T,e);E(t)}catch(e){de(RM(e))}finally{Ve(!1)}}let Ct=(0,d.useCallback)((e,t)=>{e.preventDefault(),e.stopPropagation(),L(null),UM(t).catch(e=>{L(RM(e))})},[]),wt=[...a.contexts];T.developmentContext&&!wt.some(e=>WM(e)===WM(T.developmentContext))&&wt.unshift(T.developmentContext);let Tt=T.assignee.type===r.type&&T.assignee.id===r.id?r:T.assignee,Et=[Tt,r,ze].filter((e,t,n)=>n.findIndex(t=>Be(t)===Be(e))===t),Dt=[...oe.flatMap(e=>e.changes.map((t,n)=>({kind:`change`,id:`${e.id}-${n}`,createdAt:e.createdAt,activity:e,change:t}))),...R.map(e=>({kind:`comment`,id:e.id,createdAt:e.createdAt,comment:e}))].sort((e,t)=>e.createdAt.localeCompare(t.createdAt)||e.id.localeCompare(t.id));return(0,B.jsxs)(`section`,{className:`issue-detail`,"aria-label":w(`${ot} 议题详情`,`${ot} issue details`),children:[(0,B.jsx)(`div`,{className:`issue-detail-scroll`,children:(0,B.jsxs)(`div`,{className:`issue-detail-layout`,children:[(0,B.jsxs)(`div`,{className:`issue-detail-main`,children:[(0,B.jsxs)(`article`,{className:`issue-editor`,"aria-label":w(`议题内容`,`Issue content`),children:[(0,B.jsxs)(`div`,{className:`issue-editor-content`,children:[(0,B.jsx)(`textarea`,{ref:Ue,className:`issue-title-input`,rows:1,value:D,"aria-label":w(`议题标题`,`Issue title`),disabled:F===`title`,onChange:e=>{O(e.target.value.replace(/\n/g,``)),HM(e.currentTarget)},onKeyDown:mt,onBlur:()=>void ht()}),(0,B.jsx)(DM,{task:T,tasks:t,onOpenTask:p,onAddRelation:(e,t,n)=>lt(()=>m(e,t,n)),onRemoveRelation:(e,t,n)=>lt(()=>h(e,t,n))}),j?(0,B.jsxs)(`div`,{className:`issue-description-composer`,onMouseDownCapture:e=>{e.target instanceof Element&&e.target.closest(`.inline-media-image > button, .inline-media-attachment > button, .issue-description-attach-button`)&&e.preventDefault()},onBlur:e=>{Ze.current||e.currentTarget.contains(e.relatedTarget)||gt()},children:[(0,B.jsx)(Bj,{ref:We,segments:A,mentionTasks:t,referenceTasks:n,completionContext:{projectId:T.projectId,surface:`issue-description`},placeholder:w(`添加描述…`,`Add description…`),ariaLabel:w(`议题描述`,`Issue description`),disabled:F===`description`,allowAttachments:!0,onChange:te,onError:x,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),te(Su(T.description,n,ne)),M(!1))}}),(0,B.jsx)(`button`,{className:`comment-attach-button issue-description-attach-button`,type:`button`,disabled:F===`description`,"aria-label":w(`添加描述附件`,`Add description attachments`),title:w(`添加附件`,`Add attachments`),onClick:()=>{let e=Xe.current;e&&(Ze.current=!0,e.click())},children:(0,B.jsx)(Ic,{color:`currentColor`})}),(0,B.jsx)(`input`,{ref:e=>{Xe.current=e,e&&(e.oncancel=()=>{Ze.current=!1,requestAnimationFrame(()=>We.current?.focus())})},type:`file`,multiple:!0,hidden:!0,onChange:e=>{Ze.current=!1,e.currentTarget.files&&We.current?.addFiles(e.currentTarget.files),e.currentTarget.value=``,requestAnimationFrame(()=>We.current?.focus())}})]}):(0,B.jsx)(`div`,{className:`issue-description-read${k?``:` empty`}`,role:`button`,tabIndex:0,"aria-label":w(`编辑议题描述`,`Edit issue description`),onClick:e=>{if(e.target instanceof Element&&e.target.closest(`video`)||window.getSelection()?.isCollapsed===!1)return;Ke.current=null;let t=e.currentTarget.ownerDocument.caretRangeFromPoint(e.clientX,e.clientY),r=t?.startContainer;if(t&&r?.nodeType===Node.TEXT_NODE&&e.currentTarget.contains(r)){let n=r.textContent??``,i=e.currentTarget.ownerDocument.createTreeWalker(e.currentTarget,NodeFilter.SHOW_TEXT),a=0;for(;i.nextNode()&&i.currentNode!==r;)i.currentNode.textContent===n&&(a+=1);Ke.current={text:n,offset:t.startOffset,occurrence:a}}let i=e.currentTarget.closest(`.issue-detail-scroll`);Ge.current=i?{element:i,top:i.scrollTop}:null,te(Su(k,n,ne)),M(!0)},onKeyDown:e=>{if(e.key===`Enter`||e.key===` `){e.preventDefault(),Ke.current=null;let t=e.currentTarget.closest(`.issue-detail-scroll`);Ge.current=t?{element:t,top:t.scrollTop}:null,te(Su(k,n,ne)),M(!0)}},children:k?(0,B.jsx)(Mh,{value:k,referenceTasks:n,onOpenTask:p,attachments:ne,enableImagePreview:!0,onOpenAttachment:Ct}):w(`添加描述…`,`Add description…`)}),(T.threadBinding||T.legacyLocalThreadId)&&(0,B.jsx)(`div`,{className:`issue-conversation-list`,"aria-label":w(`处理此议题的对话`,`Conversations for this issue`),children:(0,B.jsx)(XM,{threadId:T.threadBinding?.threadId??T.legacyLocalThreadId,onOpen:()=>T.threadBinding?g(T.threadBinding):_(T.legacyLocalThreadId),onCopy:y})})]}),ie&&(0,B.jsx)(`div`,{className:`attachments-error`,role:`alert`,children:typeof ie==`string`?ie:w(ie[0],ie[1])})]}),(0,B.jsx)(OM,{task:T,tasks:t,onOpenTask:p,onAddRelation:(e,t,n)=>lt(()=>m(e,t,n)),onRemoveRelation:(e,t,n)=>lt(()=>h(e,t,n))}),(0,B.jsxs)(`section`,{className:`activity-section`,"aria-labelledby":`activity-heading`,children:[(0,B.jsxs)(`header`,{className:`activity-heading`,children:[(0,B.jsx)(`h2`,{id:`activity-heading`,children:w(`活动`,`Activity`)}),(0,B.jsx)(`span`,{children:Dt.length})]}),(0,B.jsxs)(`div`,{className:`activity-stream`,children:[(0,B.jsxs)(`div`,{className:`activity-entry activity-created is-${T.creatorType}`,children:[(0,B.jsx)(`span`,{className:`activity-rail-icon activity-creator-icon`,"aria-hidden":`true`,children:(0,B.jsx)(lc,{className:`comment-avatar`,actor:{type:T.creatorType,id:T.creatorId,name:T.creatorName,avatarUrl:T.creatorAvatarUrl}})}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`strong`,{children:T.creatorName}),w(` 创建了此议题`,` created this issue`),(0,B.jsx)(`time`,{title:BM(T.createdAt,C),children:VM(T.createdAt,C)})]})]}),ce?(0,B.jsxs)(`div`,{className:`comments-loading`,"aria-label":w(`正在加载活动`,`Loading activity`),"aria-busy":`true`,children:[(0,B.jsx)(`i`,{}),(0,B.jsx)(`i`,{})]}):Dt.map(e=>{if(e.kind===`change`){let{activity:t,change:n}=e,r=KM[n.field],i=r?w(r[0],r[1]):n.field,a=JM(n.field,n.before,S,C,w),o=JM(n.field,n.after,S,C,w);return(0,B.jsxs)(`article`,{className:`activity-entry activity-change is-${t.actorType}`,children:[(0,B.jsx)(`span`,{className:`activity-rail-icon`,"aria-hidden":`true`,children:(0,B.jsx)(YM,{field:n.field,before:n.before,after:n.after})}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`strong`,{children:t.actorName}),` `,n.field===`description`?(0,B.jsx)(B.Fragment,{children:w(`更新了描述`,`updated the description`)}):n.field===`relation`&&n.before===null?(0,B.jsxs)(B.Fragment,{children:[w(`添加了 `,`added `),(0,B.jsx)(`span`,{className:`activity-change-value`,children:o})]}):n.field===`relation`&&n.after===null?(0,B.jsxs)(B.Fragment,{children:[w(`移除了 `,`removed `),(0,B.jsx)(`span`,{className:`activity-change-value`,children:a})]}):S===`zh`?(0,B.jsxs)(B.Fragment,{children:[`将`,i,`从`,(0,B.jsx)(`span`,{className:`activity-change-value`,children:a}),`改为`,(0,B.jsx)(`span`,{className:`activity-change-value`,children:o})]}):(0,B.jsxs)(B.Fragment,{children:[`changed ${i} from `,(0,B.jsx)(`span`,{className:`activity-change-value`,children:a}),` to `,(0,B.jsx)(`span`,{className:`activity-change-value`,children:o})]}),(0,B.jsx)(`time`,{title:BM(t.createdAt,C),children:VM(t.createdAt,C)})]})]},e.id)}let i=e.comment,a=i.authorType===r.type&&i.authorId===r.id?r:{type:i.authorType,id:i.authorId,name:i.authorName,avatarUrl:i.authorAvatarUrl};return(0,B.jsx)(`article`,{className:`comment-entry is-${i.authorType}`,id:`comment-${i.id}`,children:(0,B.jsxs)(`div`,{className:`comment-card`,children:[(0,B.jsxs)(`header`,{className:`comment-header`,children:[(0,B.jsx)(lc,{className:`comment-avatar`,actor:a}),(0,B.jsx)(`strong`,{children:a.name}),(0,B.jsx)(`time`,{title:BM(i.createdAt,C),children:VM(i.createdAt,C)}),i.version>1&&(0,B.jsx)(`span`,{className:`comment-edited`,title:w(`编辑于 ${BM(i.updatedAt,C)}`,`Edited ${BM(i.updatedAt,C)}`),children:w(`已编辑`,`Edited`)}),xe!==i.id&&(0,B.jsxs)(`div`,{className:`comment-actions`,"data-comment-menu-root":i.id,children:[(0,B.jsx)(`button`,{type:`button`,className:`comment-menu-trigger`,"aria-label":w(`评论操作`,`Comment actions`),"aria-haspopup":`menu`,"aria-expanded":ye===i.id,onClick:()=>be(e=>e===i.id?null:i.id),children:(0,B.jsx)(Lc,{color:`currentColor`})}),ye===i.id&&(0,B.jsxs)(`div`,{className:`comment-action-menu`,role:`menu`,children:[(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:Te!==null,onClick:e=>yt(i,e.currentTarget),children:[(0,B.jsx)(Nc,{color:`currentColor`}),w(`编辑评论`,`Edit comment`)]}),(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`danger`,onClick:()=>{Fe(i),be(null)},children:[(0,B.jsx)(zc,{color:`currentColor`}),w(`删除评论`,`Delete comment`)]})]})]})]}),xe===i.id?(0,B.jsxs)(`div`,{className:`comment-edit-form`,children:[(0,B.jsx)(Bj,{ref:Je,className:`comment-inline-media`,segments:Ce,mentionTasks:t,referenceTasks:n,completionContext:{projectId:T.projectId,surface:`comment`},placeholder:w(`编辑评论`,`Edit comment`),ariaLabel:w(`编辑评论`,`Edit comment`),disabled:Te===i.id,allowAttachments:!0,onChange:we,onError:de,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),bt();return}e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),xt(i))}}),(0,B.jsxs)(`div`,{className:`comment-edit-actions`,children:[(0,B.jsxs)(`div`,{className:`composer-footer-leading`,children:[(0,B.jsx)(`button`,{className:`comment-attach-button`,type:`button`,disabled:Te===i.id,"aria-label":w(`添加评论附件`,`Add comment attachments`),title:w(`添加附件`,`Add attachments`),onClick:()=>et.current?.click(),children:(0,B.jsx)(Ic,{color:`currentColor`})}),(0,B.jsx)(`input`,{ref:et,type:`file`,multiple:!0,hidden:!0,onChange:e=>{e.currentTarget.files&&Je.current?.addFiles(e.currentTarget.files),e.currentTarget.value=``}})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,disabled:Te===i.id,onClick:bt,children:w(`取消`,`Cancel`)}),(0,B.jsx)(`button`,{className:`button primary`,type:`button`,disabled:!at.trim()||Te===i.id,onClick:()=>void xt(i),children:Te===i.id?w(`保存中…`,`Saving…`):w(`保存`,`Save`)})]})]})]}):i.body&&(0,B.jsx)(`div`,{className:`comment-body`,children:(0,B.jsx)(Mh,{value:i.body,referenceTasks:n,onOpenTask:p,attachments:i.attachments,enableImagePreview:!0,onOpenAttachment:Ct})}),(i.threadBinding||i.legacyLocalThreadId)&&(0,B.jsx)(`div`,{className:`comment-conversation-link`,children:(0,B.jsx)(XM,{threadId:i.threadBinding?.threadId??i.legacyLocalThreadId,onOpen:()=>i.threadBinding?g(i.threadBinding):_(i.legacyLocalThreadId),onCopy:y})})]})},i.id)})]}),ue&&(0,B.jsx)(`div`,{className:`comments-error`,role:`alert`,children:typeof ue==`string`?ue:w(ue[0],ue[1])}),(0,B.jsxs)(`form`,{className:`comment-composer`,onSubmit:e=>{e.preventDefault(),_t()},children:[(0,B.jsxs)(`div`,{className:`composer-author`,children:[(0,B.jsx)(lc,{className:`comment-avatar`,actor:r}),(0,B.jsx)(`strong`,{children:r.name})]}),(0,B.jsx)(Bj,{ref:qe,className:`comment-inline-media`,disabled:ge,segments:fe,mentionTasks:t,referenceTasks:n,completionContext:{projectId:T.projectId,surface:`comment`},placeholder:w(`留下评论…`,`Leave a comment…`),ariaLabel:w(`留下评论`,`Leave a comment`),allowAttachments:!0,onChange:pe,onError:de,onKeyDown:vt}),(0,B.jsxs)(`footer`,{className:`composer-footer`,children:[(0,B.jsxs)(`div`,{className:`composer-footer-leading`,children:[(0,B.jsx)(`button`,{className:`comment-attach-button`,type:`button`,disabled:ge,"aria-label":w(`添加评论附件`,`Add comment attachments`),title:w(`添加附件`,`Add attachments`),onClick:()=>$e.current?.click(),children:(0,B.jsx)(Ic,{color:`currentColor`})}),(0,B.jsx)(`input`,{ref:$e,type:`file`,multiple:!0,hidden:!0,onChange:e=>{e.currentTarget.files&&qe.current?.addFiles(e.currentTarget.files),e.currentTarget.value=``}})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`div`,{className:`comment-status-action`,children:[(0,B.jsx)(`span`,{children:w(`改变状态为-等待认领`,`Change status to Todo`)}),(0,B.jsx)(`button`,{type:`button`,className:`board-setting-switch${me?` is-on`:``}`,role:`switch`,"aria-checked":me,disabled:ge,onClick:()=>he(e=>!e),children:(0,B.jsx)(`span`,{"aria-hidden":`true`})})]}),(0,B.jsx)(`button`,{className:`button primary`,type:`submit`,disabled:!nt.trim()&&rt.length===0&&it.length===0||ge,children:ge?w(`发布中…`,`Posting…`):w(`评论`,`Comment`)})]})]})]})]})]}),(0,B.jsxs)(`aside`,{className:`issue-properties`,"aria-label":w(`议题属性`,`Issue properties`),children:[(0,B.jsxs)(`div`,{className:`detail-primary-actions`,children:[(0,B.jsxs)(`button`,{className:`detail-open-thread-action`,type:`button`,disabled:b,onClick:()=>v(T),children:[(0,B.jsx)(Hc,{color:`currentColor`}),(0,B.jsx)(`span`,{children:b?w(`正在打开…`,`Opening…`):w(`在新对话打开`,`Open in new conversation`)})]}),T.externalUrl&&(0,B.jsxs)(`a`,{className:`detail-copy-action detail-external-action`,href:T.externalUrl,target:`_blank`,rel:`noreferrer`,children:[(0,B.jsx)(`span`,{className:`detail-copy-action-icon`,"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`openExternal`})}),(0,B.jsx)(`span`,{className:`detail-copy-action-label`,children:w(`打开 Jira`,`Open Jira`)})]}),(0,B.jsxs)(`button`,{className:`detail-copy-action`,type:`button`,title:w(`复制议题 ID ${ot}`,`Copy issue ID ${ot}`),onClick:()=>y(ot,w(`${ot} 已复制。`,`${ot} copied.`)),children:[(0,B.jsx)(`span`,{className:`detail-copy-action-icon`,"aria-hidden":`true`,children:(0,B.jsx)(`img`,{src:IM,alt:``})}),(0,B.jsx)(`span`,{className:`detail-copy-action-label`,children:w(`复制 ID`,`Copy ID`)}),(0,B.jsx)(`span`,{className:`detail-copy-identifier`,children:ot})]}),(0,B.jsxs)(`button`,{className:`detail-copy-action`,type:`button`,onClick:()=>y(ou(document.baseURI,T.projectId,T.identifier).href,w(`议题链接已复制。`,`Issue link copied.`)),children:[(0,B.jsx)(`span`,{className:`detail-copy-action-icon`,"aria-hidden":`true`,children:(0,B.jsx)(`img`,{src:LM,alt:``})}),(0,B.jsx)(`span`,{className:`detail-copy-action-label`,children:w(`复制链接`,`Copy link`)})]})]}),(0,B.jsx)(`h2`,{children:w(`属性`,`Properties`)}),(0,B.jsxs)(`div`,{className:`detail-property-row`,children:[(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`状态`,`Status`)}),(0,B.jsx)(rl,{value:T.status,options:tc.map(e=>({value:e,label:Qe(S,e),icon:(0,B.jsx)(Ac,{status:e,color:`currentColor`,size:14})})),open:N===`status`,disabled:F===`status`,className:`detail-property-picker`,triggerClassName:`detail-property-trigger`,triggerContent:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`task-property-trigger-icon`,children:(0,B.jsx)(Ac,{status:T.status,color:`currentColor`,size:14})}),(0,B.jsx)(`span`,{className:`task-property-trigger-label`,children:Qe(S,T.status)})]}),ariaLabel:w(`状态`,`Status`),onOpenChange:e=>P(e?`status`:null),onChange:e=>void G({status:e},`status`)})]}),(0,B.jsxs)(`div`,{className:`detail-property-row`,children:[(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`优先级`,`Priority`)}),(0,B.jsx)(rl,{value:T.priority,options:nc.map(e=>({value:e,label:V(S,e),icon:(0,B.jsx)(Mc,{priority:e,size:14}),className:`priority-${e}`})),open:N===`priority`,disabled:F===`priority`,className:`detail-property-picker`,triggerClassName:`detail-property-trigger`,ariaLabel:w(`优先级`,`Priority`),onOpenChange:e=>P(e?`priority`:null),onChange:e=>void G({priority:e},`priority`)})]}),(0,B.jsxs)(`div`,{className:`detail-property-row assignee-property`,children:[(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`负责人`,`Assignee`)}),(0,B.jsx)(rl,{value:Be(Tt),options:Et.map(e=>({value:Be(e),label:Be(e)===Be(r)?`${e.name}${w(`(我)`,` (me)`)}`:e.name,icon:(0,B.jsx)(lc,{actor:e,className:`task-property-assignee-avatar`})})),open:N===`assignee`,disabled:T.source===`jira`||F===`assignee`,className:`detail-property-picker`,triggerClassName:`detail-property-trigger`,ariaLabel:w(`负责人`,`Assignee`),onOpenChange:e=>P(e?`assignee`:null),onChange:e=>{let t=Et.find(t=>Be(t)===e),n=t?He(t,r):void 0;n&&G({assigneeTarget:n},`assignee`)}})]}),(0,B.jsxs)(`div`,{className:`detail-property-row labels-property`,children:[(0,B.jsx)(`span`,{className:`detail-property-icon`,"aria-hidden":`true`,children:(0,B.jsx)(Pc,{color:`currentColor`,size:14})}),(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`标签`,`Labels`)}),(0,B.jsx)(nl,{availableLabels:i,selectedLabels:T.labels,open:N===`labels`,disabled:F===`labels`,className:`detail-label-picker`,triggerClassName:`detail-label-trigger`,showSelectedAsChips:!0,placeholder:w(`添加标签…`,`Add labels…`),onOpenChange:e=>P(e?`labels`:null),onChange:e=>void G({labels:e},`labels`),onCreateLabel:l,onDeleteLabel:T.source===`jira`?void 0:u})]}),(0,B.jsxs)(`div`,{className:`detail-property-row development-property`,children:[(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`开发上下文`,`Development context`)}),(0,B.jsx)(rl,{value:WM(T.developmentContext),options:[{value:``,label:o?w(`正在扫描 Git…`,`Scanning Git…`):w(`未绑定`,`Not linked`),icon:(0,B.jsx)(Fc,{color:`currentColor`,size:14})},...wt.map(e=>({value:WM(e),label:GM(e,w),icon:e.type===`branch`?(0,B.jsx)(Fc,{color:`currentColor`,size:14}):(0,B.jsx)(J,{name:`folder`})}))],open:N===`development`,disabled:o||F===`developmentContext`,className:`detail-property-picker`,popoverClassName:`development-context-popover`,triggerClassName:`detail-property-trigger`,ariaLabel:w(`开发上下文`,`Development context`),title:T.developmentContext?.type===`worktree`?T.developmentContext.path:void 0,onOpenChange:e=>P(e?`development`:null),onChange:e=>void G({developmentContext:e?JSON.parse(e):null},`developmentContext`)})]}),(0,B.jsxs)(`label`,{className:`detail-property-row detail-date-property-row`,onClick:e=>ct(`startDate`,e),children:[(0,B.jsx)(`span`,{className:`detail-property-icon`,"aria-hidden":`true`,children:(0,B.jsx)(Kc,{color:`currentColor`,size:14})}),(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`开始日期`,`Start date`)}),(0,B.jsx)(`input`,{type:`date`,value:T.startDate??``,disabled:F===`startDate`,onChange:e=>void G({startDate:e.target.value||null},`startDate`)})]}),(0,B.jsxs)(`label`,{className:`detail-property-row detail-date-property-row`,onClick:e=>ct(`dueDate`,e),children:[(0,B.jsx)(`span`,{className:`detail-property-icon`,"aria-hidden":`true`,children:(0,B.jsx)(Kc,{color:`currentColor`,size:14})}),(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`截止日期`,`Due date`)}),(0,B.jsx)(`input`,{type:`date`,value:T.dueDate??``,disabled:F===`dueDate`,onChange:e=>void G({dueDate:e.target.value||null,...e.target.value?{}:{recurrence:null}},`dueDate`)})]}),(0,B.jsxs)(`div`,{className:`detail-property-row`,children:[(0,B.jsx)(`span`,{className:`detail-property-label`,children:w(`重复`,`Recurrence`)}),(0,B.jsx)(rl,{value:T.recurrence?.unit??``,options:[{value:``,label:w(`不重复`,`Does not repeat`),icon:(0,B.jsx)(qc,{color:`currentColor`,size:14})},{value:`day`,label:w(`每天`,`Daily`),icon:(0,B.jsx)(qc,{color:`currentColor`,size:14})},{value:`week`,label:w(`每周`,`Weekly`),icon:(0,B.jsx)(qc,{color:`currentColor`,size:14})},{value:`month`,label:w(`每月`,`Monthly`),icon:(0,B.jsx)(qc,{color:`currentColor`,size:14})},{value:`year`,label:w(`每年`,`Yearly`),icon:(0,B.jsx)(qc,{color:`currentColor`,size:14})}],open:N===`recurrence`,disabled:F===`recurrence`,className:`detail-property-picker`,triggerClassName:`detail-property-trigger`,ariaLabel:w(`重复`,`Recurrence`),onOpenChange:e=>P(e?`recurrence`:null),onChange:e=>{let t=e,n={recurrence:t?{interval:1,unit:t}:null};if(t&&!T.dueDate){let e=new Date;e.setDate(e.getDate()+7),n.dueDate=new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,10)}G(n,`recurrence`)}})]}),(0,B.jsx)(AM,{task:T,tasks:t,onOpenTask:p,onAddRelation:(e,t,n)=>lt(()=>m(e,t,n)),onRemoveRelation:(e,t,n)=>lt(()=>h(e,t,n))}),(0,B.jsxs)(`div`,{className:`detail-timestamps`,children:[(0,B.jsx)(`span`,{children:w(`创建于 ${BM(T.createdAt,C)}`,`Created ${BM(T.createdAt,C)}`)}),T.updatedAt!==T.createdAt&&(0,B.jsx)(`span`,{children:w(`更新于 ${BM(T.updatedAt,C)}`,`Updated ${BM(T.updatedAt,C)}`)})]})]})]})}),Pe&&(0,B.jsx)(`div`,{className:`delete-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&!Ie&&Fe(null)},children:(0,B.jsxs)(`div`,{className:`delete-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`delete-comment-title`,children:[(0,B.jsx)(`h2`,{id:`delete-comment-title`,children:w(`删除这条评论?`,`Delete this comment?`)}),(0,B.jsx)(`p`,{children:w(`此操作无法撤销。`,`This action cannot be undone.`)}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,disabled:Ie,onClick:()=>Fe(null),children:w(`取消`,`Cancel`)}),(0,B.jsx)(`button`,{className:`button danger`,type:`button`,disabled:Ie,onClick:()=>void St(),children:Ie?w(`删除中…`,`Deleting…`):w(`删除评论`,`Delete comment`)})]})]})})]})}var QM={zh:{day:`天`,week:`周`,month:`月`,year:`年`},en:{day:`day`,week:`week`,month:`month`,year:`year`}};function $M(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,10)}function eN(e){let t=new Date;return t.setDate(t.getDate()+e),$M(t)}function tN(){let e=new Date,t=(5-e.getDay()+7)%7;return e.setDate(e.getDate()+t),$M(e)}function nN(e,t){return new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`}).format(new Date(`${e}T12:00:00`))}function rN(e){return e?JSON.stringify(e):``}function iN(e,t){if(e.type===`branch`)return e.branch;let n=e.path.split(/[\\/]/).filter(Boolean).at(-1)??e.path;return`${e.branch??t(`分离 HEAD`,`detached`)} · ${n}`}function aN({projectId:e,projectOptions:t,onProjectChange:n,tasks:r,referenceTasks:i,initialStatus:a,initialDraft:o,labels:s,currentUser:c,developmentScan:l,developmentScanLoading:u,onCreateLabel:f,onCancel:p,onSave:m}){let{language:h,locale:g,text:_}=H(),v=(0,d.useRef)(null),y=(0,d.useRef)(null),b=(0,d.useRef)({down:!1,up:!1}),x=(0,d.useRef)(null),S=(0,d.useRef)(null),C=(0,d.useRef)(!1),w=(0,d.useRef)(null),[T,E]=(0,d.useState)(o?.title??``),[D,O]=(0,d.useState)(()=>o?.descriptionSegments??Su()),[k,ee]=(0,d.useState)(a),[A,te]=(0,d.useState)(o?.priority??`none`),[j,M]=(0,d.useState)(o?.assignee??c),[N,P]=(0,d.useState)(o?.selectedLabels??[]),[F,I]=(0,d.useState)(o?.developmentContext??null),[ne]=(0,d.useState)(o?.startDate??``),[re,ie]=(0,d.useState)(o?.dueDate??``),[L,R]=(0,d.useState)(o?.recurrence??null),[ae,oe]=(0,d.useState)(o?.relations.parentId??null),[se,ce]=(0,d.useState)(o?.relations.relatedIds??[]),[le,ue]=(0,d.useState)(o?.relations.subIssueIds??[]),[de,fe]=(0,d.useState)(!1),[pe,me]=(0,d.useState)(null),[he,ge]=(0,d.useState)(null),[_e,ve]=(0,d.useState)(null),[ye,be]=(0,d.useState)(!1),[xe,Se]=(0,d.useState)(!1),[Ce,we]=(0,d.useState)(null),[Te,Ee]=(0,d.useState)(null),De=(0,d.useMemo)(()=>{let e=[...l.contexts];return F&&!e.some(e=>rN(e)===rN(F))&&e.unshift(F),e},[F,l.contexts]),Oe=(0,d.useMemo)(()=>new Map(r.map(e=>[e.id,e])),[r]),ke=r.filter(e=>e.archivedAt===null),Ae=ae?Oe.get(ae)??null:null,z=se.map(e=>Oe.get(e)).filter(e=>e!==void 0),je=le.map(e=>Oe.get(e)).filter(e=>e!==void 0),Me=[...je.map(e=>({type:`subIssue`,issue:e})),...Ae?[{type:`parent`,issue:Ae}]:[],...z.map(e=>({type:`related`,issue:e}))],Ne=(0,d.useMemo)(()=>{let e=new Set,t=ae;for(;t&&!e.has(t);)e.add(t),t=Oe.get(t)?.relations.parent?.id??null;return e},[ae,Oe]),Pe=(0,d.useMemo)(()=>{let e=new Set,t=[...le];for(;t.length>0;){let n=t.shift();e.has(n)||(e.add(n),t.push(...Oe.get(n)?.relations.subIssues.map(e=>e.id)??[]))}return e},[le,Oe]),Fe=ke.filter(e=>!Pe.has(e.id)),Ie=ke,Le=ke.filter(e=>!Ne.has(e.id)),Re=he===`parent`?Fe:he===`related`?Ie:Le,Ve=new Set(he===`parent`?ae?[ae]:[]:he===`related`?se:le),Ue=[c,ze].filter((e,t,n)=>n.findIndex(t=>Be(t)===Be(e))===t);(0,d.useEffect)(()=>(v.current?.showModal(),x.current?.focus(),()=>{v.current?.open&&v.current.close()}),[]),(0,d.useEffect)(()=>{if(pe!==`more`&&pe!==`due`&&pe!==`recurrence`)return;let e=e=>{y.current?.contains(e.target)||me(null)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[pe]),(0,d.useEffect)(()=>{pe!==`more`&&(ge(null),ve(null))},[pe]);function We(e){he===`parent`?oe(t=>t===e.id?null:e.id):he===`related`?ce(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id]):he===`subIssue`&&ue(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id])}function Ge(){if(ge(null),pe===`more`){me(null);return}let e=y.current?.getBoundingClientRect();ve(e?{right:window.innerWidth-e.right,bottom:window.innerHeight-e.top+8}:null),me(`more`)}(0,d.useEffect)(()=>{let e=x.current;if(!e)return;let t=()=>{e.style.height=`0px`,e.style.height=`${e.scrollHeight}px`};t();let n=e.clientWidth,r=0,i=new ResizeObserver(()=>{let i=e.clientWidth;i!==n&&(n=i,cancelAnimationFrame(r),r=requestAnimationFrame(t))});return i.observe(e),()=>{i.disconnect(),cancelAnimationFrame(r)}},[T]);async function Ke(n){if(n.preventDefault(),!C.current)return;if(C.current=!1,t&&!e){we([`请选择项目。`,`Select a project.`]);return}let r=T.trim();if(!r){we([`请为议题填写一个简短、明确的标题。`,`Enter a short, clear issue title.`]),x.current?.focus();return}if(L&&!re){we([`重复议题需要先设置最早截止日期。`,`A recurring issue needs an initial due date.`]);return}Se(!0),we(null);try{let e=He(j,c);await m({title:r,description:Ou(D).trim(),status:k,priority:A,labels:N,...e?{assigneeTarget:e}:{},developmentContext:F,startDate:ne||null,dueDate:re||null,recurrence:L},wu(D),Cu(D),{keepOpen:de,relations:{parentId:ae,relatedIds:se,subIssueIds:le}}),de&&(E(``),O(Su()),ue([]),ge(null),Ee(null),w.current&&(w.current.value=``),requestAnimationFrame(()=>x.current?.focus()))}catch(e){we(e instanceof Error?e.message:[`无法保存这个议题。`,`Could not save this issue.`])}finally{Se(!1)}}function qe(e){if(!e.defaultPrevented&&!(e.nativeEvent.isComposing||e.keyCode===229)&&e.key===`Enter`){if(e.metaKey||e.ctrlKey){e.preventDefault(),C.current=!0,e.currentTarget.requestSubmit();return}e.target===x.current&&e.preventDefault()}}function Je(e){ie(e),me(null)}function Ye(){p({title:T,descriptionSegments:D,status:k,priority:A,assignee:j,selectedLabels:N,developmentContext:F,startDate:ne,dueDate:re,recurrence:L,relations:{parentId:ae,relatedIds:se,subIssueIds:le}})}return(0,B.jsx)(`dialog`,{ref:v,className:`task-dialog${ye?` is-expanded`:``}`,"aria-labelledby":`task-dialog-title`,onCancel:e=>{e.preventDefault(),xe||Ye()},onPointerDown:e=>{b.current={down:e.target===e.currentTarget,up:!1}},onPointerUp:e=>{b.current.up=e.target===e.currentTarget},onPointerCancel:()=>{b.current={down:!1,up:!1}},onClick:e=>{let t=b.current.down&&b.current.up&&e.target===e.currentTarget;b.current={down:!1,up:!1},t&&!xe&&Ye()},children:(0,B.jsxs)(`form`,{className:`task-form is-creating`,onSubmit:Ke,onKeyDown:qe,children:[(0,B.jsxs)(`header`,{className:`dialog-header`,children:[(0,B.jsx)(`div`,{className:`dialog-context`,children:(0,B.jsx)(`strong`,{id:`task-dialog-title`,children:_(`新建议题`,`New issue`)})}),(0,B.jsxs)(`div`,{className:`dialog-header-actions`,children:[(0,B.jsx)(`button`,{type:`button`,className:`icon-button dialog-expand`,"aria-label":ye?_(`收起编辑器`,`Collapse editor`):_(`展开编辑器`,`Expand editor`),onClick:()=>be(e=>!e),children:(0,B.jsx)(J,{name:`expand`})}),(0,B.jsx)(`button`,{type:`button`,className:`icon-button dialog-close`,onClick:Ye,disabled:xe,"aria-label":_(`关闭编辑器`,`Close editor`),children:(0,B.jsx)(J,{name:`close`})})]})]}),(0,B.jsxs)(`div`,{className:`form-body`,children:[(0,B.jsxs)(`label`,{className:`composer-title`,children:[(0,B.jsx)(`span`,{className:`sr-only`,children:_(`标题`,`Title`)}),(0,B.jsx)(`textarea`,{ref:x,rows:1,value:T,onChange:e=>E(e.target.value.replace(/\n/g,``)),placeholder:_(`议题标题`,`Issue title`),maxLength:240,autoComplete:`off`})]}),(0,B.jsx)(Bj,{ref:S,className:`composer-description inline-media-description`,segments:D,mentionTasks:r,referenceTasks:i,completionContext:e?{projectId:e,surface:`issue-description`}:void 0,placeholder:_(`添加描述…`,`Add description…`),ariaLabel:_(`描述`,`Description`),disabled:xe,allowAttachments:!0,onChange:O,onError:Ee})]}),(0,B.jsxs)(`div`,{className:`task-form-dock`,children:[(0,B.jsxs)(`div`,{className:`property-row`,children:[t&&(0,B.jsx)(rl,{value:e??``,options:[{value:``,label:_(`项目`,`Project`),icon:(0,B.jsx)(eM,{name:`projectFolder`})},...t.map(e=>({value:e.id,label:e.name,icon:(0,B.jsx)(eM,{name:`projectFolder`})}))],open:pe===`project`,triggerClassName:`property-control property-project`,ariaLabel:_(`项目`,`Project`),onOpenChange:e=>me(e?`project`:null),onChange:t=>{let r=t||null;r!==e&&I(null),n?.(r)}}),(0,B.jsx)(rl,{value:k,options:tc.map(e=>({value:e,label:Qe(h,e),icon:(0,B.jsx)(Ac,{status:e,color:`currentColor`,size:14})})),open:pe===`status`,triggerClassName:`property-control property-status`,ariaLabel:_(`状态`,`Status`),onOpenChange:e=>me(e?`status`:null),onChange:ee}),(0,B.jsx)(rl,{value:A,options:nc.map(e=>({value:e,label:V(h,e),icon:(0,B.jsx)(Mc,{priority:e,size:14}),className:`priority-${e}`})),open:pe===`priority`,triggerClassName:`property-control property-priority priority-${A}`,ariaLabel:_(`优先级`,`Priority`),onOpenChange:e=>me(e?`priority`:null),onChange:te}),(0,B.jsx)(rl,{value:Be(j),options:Ue.map(e=>({value:Be(e),label:e.id===c.id?`${e.name}${_(`(我)`,` (me)`)}`:e.name,icon:(0,B.jsx)(lc,{actor:e,className:`task-property-assignee-avatar`})})),open:pe===`assignee`,triggerClassName:`property-control property-assignee`,ariaLabel:_(`负责人`,`Assignee`),onOpenChange:e=>me(e?`assignee`:null),onChange:e=>{let t=Ue.find(t=>Be(t)===e);t&&M(t)}}),(0,B.jsx)(nl,{availableLabels:s,selectedLabels:N,open:pe===`labels`,triggerClassName:`property-control`,showIcon:!0,onOpenChange:e=>me(e?`labels`:null),onChange:P,onCreateLabel:f}),(0,B.jsx)(rl,{value:rN(F),options:[{value:``,label:u?_(`正在扫描 Git…`,`Scanning Git…`):_(`分支 / Worktree`,`Branch / worktree`),icon:(0,B.jsx)(Fc,{color:`currentColor`,size:14})},...De.map(e=>({value:rN(e),label:iN(e,_),icon:e.type===`branch`?(0,B.jsx)(Fc,{color:`currentColor`,size:14}):(0,B.jsx)(J,{name:`folder`})}))],open:pe===`development`,disabled:u,popoverClassName:`development-context-popover`,triggerClassName:`property-control property-development`,ariaLabel:_(`代码分支或 Worktree`,`Code branch or worktree`),title:l.workspacePath??void 0,onOpenChange:e=>me(e?`development`:null),onChange:e=>I(e?JSON.parse(e):null)}),re&&(0,B.jsx)(`button`,{className:`property-control`,type:`button`,onClick:()=>me(`due`),children:(0,B.jsx)(`span`,{children:_(`截止 ${nN(re,g)}`,`Due ${nN(re,g)}`)})}),L&&(0,B.jsx)(`button`,{className:`property-control`,type:`button`,onClick:()=>me(`recurrence`),children:(0,B.jsx)(`span`,{children:_(`每 ${L.interval} ${QM.zh[L.unit]}`,`Every ${L.interval} ${QM.en[L.unit]}${L.interval===1?``:`s`}`)})}),Me.map(({type:e,issue:t})=>{let n=t.externalKey??t.identifier;return(0,B.jsxs)(`span`,{className:`property-control property-relation-chip`,children:[(0,B.jsx)(`span`,{className:`property-relation-kind`,children:e===`subIssue`?_(`子`,`Sub`):e===`parent`?_(`父`,`Parent`):_(`关联`,`Related`)}),(0,B.jsx)(`span`,{children:n}),(0,B.jsx)(`span`,{className:`property-relation-tooltip`,role:`tooltip`,children:t.title}),(0,B.jsx)(`button`,{className:`property-relation-remove`,type:`button`,"aria-label":_(`移除 ${n}`,`Remove ${n}`),onClick:()=>{e===`parent`?oe(null):e===`related`?ce(e=>e.filter(e=>e!==t.id)):ue(e=>e.filter(e=>e!==t.id))},children:(0,B.jsx)(J,{name:`close`})})]},`${e}:${t.id}`)}),(0,B.jsxs)(`div`,{className:`composer-menu-anchor`,ref:y,children:[(0,B.jsx)(`button`,{className:`property-control property-more`,type:`button`,"aria-label":_(`更多属性`,`More properties`),onClick:Ge,children:(0,B.jsx)(Lc,{color:`currentColor`})}),pe===`more`&&(0,B.jsxs)(`div`,{className:`composer-popover more-popover`,role:`menu`,style:_e?{position:`fixed`,top:`auto`,right:_e.right,bottom:_e.bottom,left:`auto`}:void 0,children:[(0,B.jsxs)(`button`,{type:`button`,onClick:()=>me(`due`),children:[(0,B.jsx)(`span`,{children:(0,B.jsx)(Kc,{color:`currentColor`})}),(0,B.jsx)(`strong`,{children:_(`设置截止日期`,`Set due date`)}),(0,B.jsx)(`kbd`,{children:`⇧ D`}),(0,B.jsx)(`b`,{children:(0,B.jsx)(J,{name:`chevronRight`})})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>me(`recurrence`),children:[(0,B.jsx)(`span`,{children:(0,B.jsx)(qc,{color:`currentColor`})}),(0,B.jsx)(`strong`,{children:_(`设置重复…`,`Set recurrence…`)}),(0,B.jsx)(`b`,{children:(0,B.jsx)(J,{name:`chevronRight`})})]}),(0,B.jsx)(`div`,{className:`more-popover-divider`}),(0,B.jsxs)(`button`,{className:he===`subIssue`?`is-open`:void 0,type:`button`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":he===`subIssue`,onClick:()=>ge(`subIssue`),children:[(0,B.jsx)(`span`,{children:(0,B.jsx)(Rc,{color:`currentColor`,size:16})}),(0,B.jsx)(`strong`,{children:_(`添加子议题`,`Add sub-issue`)}),je.length>0&&(0,B.jsx)(`small`,{children:_(`${je.length} 个已选`,`${je.length} selected`)}),(0,B.jsx)(`b`,{children:(0,B.jsx)(J,{name:`chevronRight`})})]}),(0,B.jsxs)(`button`,{className:he===`parent`?`is-open`:void 0,type:`button`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":he===`parent`,onClick:()=>ge(`parent`),children:[(0,B.jsx)(`span`,{children:(0,B.jsx)(Rc,{color:`currentColor`,size:16})}),(0,B.jsx)(`strong`,{children:_(`添加父议题`,`Add parent issue`)}),Ae&&(0,B.jsx)(`small`,{children:Ae.externalKey??Ae.identifier}),(0,B.jsx)(`b`,{children:(0,B.jsx)(J,{name:`chevronRight`})})]}),(0,B.jsxs)(`button`,{className:he===`related`?`is-open`:void 0,type:`button`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":he===`related`,onClick:()=>ge(`related`),children:[(0,B.jsx)(`span`,{children:(0,B.jsx)(Wc,{color:`currentColor`,size:16})}),(0,B.jsx)(`strong`,{children:_(`添加关联议题`,`Add related issue`)}),z.length>0&&(0,B.jsx)(`small`,{children:_(`${z.length} 个已选`,`${z.length} selected`)}),(0,B.jsx)(`b`,{children:(0,B.jsx)(J,{name:`chevronRight`})})]}),he&&(0,B.jsx)(`div`,{className:`issue-relation-popover task-create-relation-submenu`,"aria-label":_(`选择关系议题`,`Select relation issue`),children:(0,B.jsx)(CM,{candidates:Re,selectedIds:Ve,onEscape:()=>ge(null),onSelect:We},he)})]}),pe===`due`&&(0,B.jsxs)(`div`,{className:`composer-popover due-popover`,children:[(0,B.jsxs)(`label`,{className:`custom-date-row`,children:[(0,B.jsx)(`span`,{children:_(`自定义…`,`Custom…`)}),(0,B.jsx)(`input`,{type:`date`,value:re,onChange:e=>Je(e.target.value)})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>Je(eN(1)),children:[(0,B.jsx)(`strong`,{children:_(`明天`,`Tomorrow`)}),(0,B.jsx)(`span`,{children:nN(eN(1),g)})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>Je(tN()),children:[(0,B.jsx)(`strong`,{children:_(`本周结束`,`End of this week`)}),(0,B.jsx)(`span`,{children:nN(tN(),g)})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>Je(eN(7)),children:[(0,B.jsx)(`strong`,{children:_(`一周后`,`In one week`)}),(0,B.jsx)(`span`,{children:nN(eN(7),g)})]}),re&&(0,B.jsx)(`button`,{className:`destructive-menu-row`,type:`button`,onClick:()=>{ie(``),R(null),me(null)},children:_(`清除截止日期`,`Clear due date`)})]}),pe===`recurrence`&&(0,B.jsxs)(`div`,{className:`composer-popover recurrence-popover`,children:[(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:_(`最早截止日期`,`Initial due date`)}),(0,B.jsx)(`input`,{type:`date`,value:re||eN(7),onChange:e=>ie(e.target.value)})]}),(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:_(`重复频率`,`Repeat frequency`)}),(0,B.jsxs)(`span`,{className:`recurrence-controls`,children:[(0,B.jsx)(`input`,{type:`number`,min:`1`,max:`365`,value:L?.interval??1,onChange:e=>R({interval:Number(e.target.value),unit:L?.unit??`week`})}),(0,B.jsx)(`select`,{value:L?.unit??`week`,onChange:e=>R({interval:L?.interval??1,unit:e.target.value}),children:Object.entries(QM[h]).map(([e,t])=>(0,B.jsx)(`option`,{value:e,children:t},e))})]})]}),(0,B.jsx)(`button`,{className:`recurrence-save`,type:`button`,onClick:()=>{re||ie(eN(7)),L||R({interval:1,unit:`week`}),me(null)},children:_(`设置重复`,`Set recurrence`)}),L&&(0,B.jsx)(`button`,{className:`destructive-menu-row`,type:`button`,onClick:()=>{R(null),me(null)},children:_(`清除重复`,`Clear recurrence`)})]})]})]}),Te&&(0,B.jsx)(`div`,{className:`form-error`,role:`alert`,children:typeof Te==`string`?Te:_(Te[0],Te[1])}),Ce&&(0,B.jsx)(`div`,{className:`form-error`,role:`alert`,children:typeof Ce==`string`?Ce:_(Ce[0],Ce[1])}),(0,B.jsxs)(`footer`,{className:`dialog-footer`,children:[(0,B.jsx)(`button`,{className:`composer-attach-icon`,type:`button`,disabled:xe,onClick:()=>w.current?.click(),"aria-label":_(`上传附件`,`Upload attachments`),children:(0,B.jsx)(Ic,{color:`currentColor`})}),(0,B.jsx)(`input`,{ref:w,type:`file`,multiple:!0,hidden:!0,onChange:e=>{e.currentTarget.files&&S.current?.addFiles(e.currentTarget.files),e.currentTarget.value=``}}),(0,B.jsxs)(`div`,{className:`dialog-actions`,children:[(0,B.jsxs)(`div`,{className:`create-more-control`,children:[(0,B.jsx)(`span`,{children:_(`创建更多`,`Create more`)}),(0,B.jsx)(`button`,{type:`button`,className:`board-setting-switch${de?` is-on`:``}`,role:`switch`,"aria-checked":de,disabled:xe,onClick:()=>fe(e=>!e),children:(0,B.jsx)(`span`,{"aria-hidden":`true`})})]}),(0,B.jsx)(`button`,{className:`button primary`,type:`submit`,disabled:xe,onClick:()=>{C.current=!0},children:xe?_(`正在保存…`,`Saving…`):_(`创建议题`,`Create issue`)})]})]})]})]})})}var oN={statuses:[],priorities:[],labels:[],link:`all`,content:``};function sN(e){return tc.includes(e)}function cN(e){return nc.includes(e)}function lN(){let e=new URLSearchParams(window.location.search),t=(e.get(`status`)??``).split(`,`).filter(sN),n=(e.get(`priority`)??``).split(`,`).filter(cN),r=e.get(`linked`);return{statuses:t,priorities:n,labels:e.getAll(`label`).filter(Boolean),link:r===`yes`?`linked`:r===`no`?`unlinked`:`all`,content:e.get(`content`)??``}}function uN(e){let t=new URL(window.location.href);e.statuses.length?t.searchParams.set(`status`,e.statuses.join(`,`)):t.searchParams.delete(`status`),e.priorities.length?t.searchParams.set(`priority`,e.priorities.join(`,`)):t.searchParams.delete(`priority`),t.searchParams.delete(`label`),e.labels.forEach(e=>t.searchParams.append(`label`,e)),e.link===`linked`?t.searchParams.set(`linked`,`yes`):e.link===`unlinked`?t.searchParams.set(`linked`,`no`):t.searchParams.delete(`linked`),e.content.trim()?t.searchParams.set(`content`,e.content.trim()):t.searchParams.delete(`content`),window.history.replaceState(null,``,t)}function dN(e){return Number(e.statuses.length>0)+Number(e.priorities.length>0)+Number(e.labels.length>0)+Number(e.link!==`all`)+Number(!!e.content.trim())}function fN(e,t,n){let r=t.trim().toLowerCase();return!r||[e.identifier,e.externalKey,e.title,e.description,...e.labels,...e.labels.map(e=>oc(e,n))].join(` `).toLowerCase().includes(r)}function pN(e,t,n){if(n!==`statuses`&&t.statuses.length&&!t.statuses.includes(e.status)||n!==`priorities`&&t.priorities.length&&!t.priorities.includes(e.priority)||n!==`labels`&&t.labels.length&&!t.labels.some(t=>e.labels.includes(t)))return!1;let r=e.conversationRefs.length>0;if(n!==`link`&&t.link===`linked`&&!r||n!==`link`&&t.link===`unlinked`&&r)return!1;if(n!==`content`){let n=t.content.trim().toLowerCase();if(n&&![e.title,e.description].join(` `).toLowerCase().includes(n))return!1}return!0}function mN({label:e}){let{language:t}=H(),n=cc(e,t);return n.tone?(0,B.jsx)(`span`,{className:`filter-label-glyph`,style:{"--label-color":n.color},"aria-hidden":`true`}):null}function hN(e,t,n){return e.length?e.length<=2?e.join(n===`zh`?`、`:`, `):n===`zh`?`${e.length} 个${t}`:`${e.length} ${t}`:null}function gN({tasks:e,search:t,labels:n,filters:r,onChange:i}){let{language:a,text:o}=H(),s=(0,d.useRef)(null),c=(0,d.useRef)(null),l=(0,d.useRef)(null),u=(0,d.useRef)(null),[f,p]=(0,d.useState)(!1),[m,h]=(0,d.useState)(null),[g,_]=(0,d.useState)(``),[v,y]=(0,d.useState)(``),[b,x]=(0,d.useState)({left:0,top:0,ready:!1}),[S,C]=(0,d.useState)(`left`),[w,T]=(0,d.useState)(0),E=dN(r);function D(){u.current!==null&&window.clearTimeout(u.current),p(!1),h(null),_(``),y(``)}function O(){_(``),h(null),x(e=>({...e,ready:!1})),p(!0)}function k(e,t=!1){u.current!==null&&window.clearTimeout(u.current),h(e),y(``),t&&requestAnimationFrame(()=>l.current?.querySelector(`input`)?.focus())}function ee(e){u.current!==null&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>k(e),160)}let A=(0,d.useMemo)(()=>{if(!f)return[];let n={...oN,content:r.content};return e.filter(e=>fN(e,t,a)&&pN(e,n))},[r.content,a,f,t,e]),te=(0,d.useMemo)(()=>{let e=new Map,t=new Map,n=new Map,i={...r,content:``};for(let r of A)if(pN(r,i,`statuses`)&&e.set(r.status,(e.get(r.status)??0)+1),pN(r,i,`priorities`)&&t.set(r.priority,(t.get(r.priority)??0)+1),pN(r,i,`labels`))for(let e of r.labels)n.set(e,(n.get(e)??0)+1);return{statuses:e,priorities:t,labels:n}},[r,A]);function j(e){let t=new Set(r.statuses);t.has(e)?t.delete(e):t.add(e),i({...r,statuses:tc.filter(e=>t.has(e))})}function M(e){let t=new Set(r.priorities);t.has(e)?t.delete(e):t.add(e),i({...r,priorities:nc.filter(e=>t.has(e))})}function N(e){let t=new Set(r.labels);t.has(e)?t.delete(e):t.add(e),i({...r,labels:n.filter(e=>t.has(e))})}let P=(0,d.useMemo)(()=>tc.map(e=>({id:`status-${e}`,label:Qe(a,e),category:o(`状态`,`Status`),keywords:e,count:te.statuses.get(e)??0,selected:r.statuses.includes(e),icon:(0,B.jsx)(`span`,{className:`filter-status-icon`,children:(0,B.jsx)(Ac,{status:e,color:`currentColor`})}),toggle:()=>j(e)})),[te,r,a,o]),F=(0,d.useMemo)(()=>nc.map(e=>({id:`priority-${e}`,label:V(a,e),category:o(`优先级`,`Priority`),keywords:e,count:te.priorities.get(e)??0,selected:r.priorities.includes(e),icon:(0,B.jsx)(Mc,{priority:e}),toggle:()=>M(e)})),[te,r,a,o]),I=(0,d.useMemo)(()=>n.map(e=>({id:`label-${e}`,label:oc(e,a),category:o(`标签`,`Label`),count:te.labels.get(e)??0,selected:r.labels.includes(e),icon:(0,B.jsx)(mN,{label:e}),toggle:()=>N(e)})),[te,r,n,a,o]),ne={statuses:P,priorities:F,labels:I},re=[{id:`statuses`,label:o(`状态`,`Status`),keywords:`status state`,icon:(0,B.jsx)(Ac,{status:`todo`,color:`currentColor`}),summary:hN(r.statuses.map(e=>Qe(a,e)),o(`状态`,`statuses`),a)},{id:`priorities`,label:o(`优先级`,`Priority`),keywords:`priority urgent high medium low`,icon:(0,B.jsx)(Mc,{color:`currentColor`}),summary:hN(r.priorities.map(e=>V(a,e)),o(`优先级`,`priorities`),a)},{id:`labels`,label:o(`标签`,`Labels`),keywords:`label tag`,icon:(0,B.jsx)(Pc,{color:`currentColor`}),summary:hN(r.labels.map(e=>oc(e,a)),o(`标签`,`labels`),a)}],ie=g.trim().toLowerCase(),L=re.filter(e=>!ie||`${e.label} ${e.keywords}`.toLowerCase().includes(ie)),R=ie?[...P,...F,...I].filter(e=>`${e.label} ${e.keywords??``}`.toLowerCase().includes(ie)):[];(0,d.useEffect)(()=>{function e(e){e.target?.matches(`input, textarea, select, [contenteditable='true']`)||e.key.toLowerCase()===`f`&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&(e.preventDefault(),f?D():O())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[f]),(0,d.useLayoutEffect)(()=>{if(!f||!s.current||!c.current)return;let e=s.current.getBoundingClientRect(),t=c.current.getBoundingClientRect(),n=Math.max(8,Math.min(e.right-t.width,window.innerWidth-t.width-8)),r=e.bottom+6,i=r+t.height<=window.innerHeight-8?r:Math.max(8,e.top-t.height-6),a=window.innerWidth-(n+t.width);x({left:n,top:i,ready:!0}),C(a>=t.width+4?`right`:n>=t.width+12?`left`:`overlay`)},[E,f,ie]),(0,d.useLayoutEffect)(()=>{if(!m||!l.current){T(0);return}let e=l.current.getBoundingClientRect(),t=e.bottom>window.innerHeight-8?window.innerHeight-8-e.bottom:e.top<8?8-e.top:0;T(t)},[r,m,v]),(0,d.useEffect)(()=>{if(!f)return;requestAnimationFrame(()=>c.current?.querySelector(`.task-filter-search input`)?.focus());let e=$c([c,s],D),t=el(c,D);return()=>{e(),t()}},[f]),(0,d.useEffect)(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]);function ae(e,t){let n=e.dataset.filterLevel,r=Array.from(c.current?.querySelectorAll(`button[data-filter-level="${n}"]:not(:disabled)`)??[]),i=r.indexOf(e);r[(Math.max(0,i)+t+r.length)%r.length]?.focus()}function oe(e){let t=e.target;if(e.key===`Escape`){if(e.preventDefault(),m){let e=m;h(null),requestAnimationFrame(()=>c.current?.querySelector(`[data-submenu-name="${e}"]`)?.focus())}else D(),s.current?.focus();return}if(e.key===`Tab`){let n=Array.from(c.current?.querySelectorAll(`input:not(:disabled), button:not(:disabled)`)??[]).filter(e=>e.getClientRects().length>0),r=n.indexOf(t),i=e.shiftKey?-1:1;n.length&&(e.preventDefault(),n[(Math.max(0,r)+i+n.length)%n.length]?.focus());return}if(t instanceof HTMLInputElement&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){let n=t.dataset.filterLevel,r=Array.from(c.current?.querySelectorAll(`button[data-filter-level="${n}"]:not(:disabled)`)??[]);r.length&&(e.preventDefault(),(e.key===`ArrowDown`?r[0]:r.at(-1))?.focus());return}let n=t.closest(`button[data-filter-level]`);if(n){if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),ae(n,e.key===`ArrowDown`?1:-1);else if(e.key===`ArrowRight`&&n.dataset.submenuName)e.preventDefault(),k(n.dataset.submenuName,!0);else if(e.key===`ArrowLeft`&&n.dataset.filterLevel===`submenu`){e.preventDefault();let t=m;h(null),requestAnimationFrame(()=>c.current?.querySelector(`[data-submenu-name="${t}"]`)?.focus())}}}function se(e,t){return(0,B.jsxs)(`button`,{type:`button`,role:`menuitemcheckbox`,"aria-checked":e.selected,className:`task-filter-item filter-value-item${e.selected?` is-selected`:``}`,"data-filter-level":t,onPointerEnter:()=>{t===`root`&&h(null)},onClick:e.toggle,children:[(0,B.jsx)(`span`,{className:`task-filter-item-icon`,children:e.icon}),(0,B.jsx)(`span`,{className:`task-filter-item-label`,children:e.label}),t===`root`&&(0,B.jsx)(`span`,{className:`task-filter-item-category`,children:e.category}),(0,B.jsx)(`span`,{className:`task-filter-item-count`,children:e.count}),(0,B.jsx)(`span`,{className:`task-filter-item-check`,children:e.selected&&(0,B.jsx)(J,{name:`check`})})]},e.id)}function ce(e){let t=ne[e]??[],n=v.trim().toLowerCase(),r=t.filter(e=>`${e.label} ${e.keywords??``}`.toLowerCase().includes(n)),i=r.filter(e=>e.count>0||e.selected),a=r.filter(e=>e.count===0&&!e.selected);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`label`,{className:`task-filter-search submenu-filter-search`,children:[(0,B.jsx)(`span`,{className:`sr-only`,children:o(`筛选值`,`Filter values`)}),(0,B.jsx)(`input`,{"data-filter-level":`submenu`,value:v,onChange:e=>y(e.target.value),placeholder:o(`筛选…`,`Filter…`)})]}),(0,B.jsxs)(`div`,{className:`task-filter-scroll`,role:`menu`,children:[i.map(e=>se(e,`submenu`)),a.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`task-filter-section-label`,children:o(`当前视图中无匹配`,`No matches in this view`)}),(0,B.jsx)(`div`,{className:`task-filter-unmatched`,children:a.map(e=>se(e,`submenu`))})]}),r.length===0&&(0,B.jsx)(`div`,{className:`task-filter-no-results`,children:o(`没有匹配的筛选值`,`No matching filter values`)})]})]})}let le=f?(0,vr.createPortal)((0,B.jsxs)(`div`,{ref:c,className:`task-filter-menu`,"data-has-submenu":m?`true`:void 0,"data-submenu-side":S,style:{left:b.left,top:b.top,visibility:b.ready?`visible`:`hidden`},onKeyDown:oe,children:[(0,B.jsxs)(`label`,{className:`task-filter-search root-filter-search`,children:[(0,B.jsx)(`span`,{className:`sr-only`,children:o(`添加筛选`,`Add filter`)}),(0,B.jsx)(`input`,{"data-filter-level":`root`,value:g,onChange:e=>{_(e.target.value),h(null)},placeholder:o(`添加筛选…`,`Add filter…`)}),(0,B.jsx)(`kbd`,{children:`F`})]}),(0,B.jsxs)(`div`,{className:`task-filter-root-list`,role:`menu`,children:[L.map(e=>(0,B.jsxs)(`div`,{className:`task-filter-anchor`,children:[(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":m===e.id,className:`task-filter-item task-filter-category${m===e.id?` is-open`:``}${e.summary?` is-active`:``}`,"data-filter-level":`root`,"data-submenu-name":e.id,onPointerEnter:()=>ee(e.id),onClick:()=>m===e.id?h(null):k(e.id,!0),children:[(0,B.jsx)(`span`,{className:`task-filter-item-icon`,children:e.icon}),(0,B.jsx)(`span`,{className:`task-filter-item-label`,children:e.label}),e.summary&&(0,B.jsx)(`span`,{className:`task-filter-item-summary`,children:e.summary}),(0,B.jsx)(`span`,{className:`task-filter-chevron`,children:(0,B.jsx)(J,{name:`chevronRight`})})]}),m===e.id&&(0,B.jsx)(`div`,{ref:l,className:`task-filter-submenu`,role:`presentation`,style:{"--submenu-shift":`${w}px`},children:ce(e.id)})]},e.id)),R.length>0&&(0,B.jsxs)(B.Fragment,{children:[L.length>0&&(0,B.jsx)(`div`,{className:`task-filter-section-label`,children:o(`筛选值`,`Filter values`)}),R.map(e=>se(e,`root`))]}),L.length===0&&R.length===0&&(0,B.jsx)(`div`,{className:`task-filter-no-results`,children:o(`没有匹配的筛选项`,`No matching filters`)})]}),E>0&&(0,B.jsx)(`div`,{className:`task-filter-footer`,children:(0,B.jsxs)(`button`,{type:`button`,className:`task-filter-clear-all`,"data-filter-level":`root`,onClick:()=>i(oN),children:[o(`清除所有筛选`,`Clear all filters`),(0,B.jsx)(`span`,{children:E})]})})]}),document.body):null;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{ref:s,type:`button`,className:`task-filter-trigger${E?` is-active`:``}${f?` is-open`:``}`,"aria-label":E?o(`筛选议题,已启用 ${E} 个条件`,`Filter issues, ${E} active`):o(`筛选议题`,`Filter issues`),"aria-haspopup":`menu`,"aria-expanded":f,title:E?o(`已启用 ${E} 个筛选条件 (F)`,`${E} active filters (F)`):o(`筛选议题 (F)`,`Filter issues (F)`),onClick:()=>f?D():O(),children:[(0,B.jsx)(eM,{name:`filter`,className:`filter-icon`}),E>0&&(0,B.jsx)(`span`,{className:`task-filter-active-dot`,"aria-hidden":`true`})]}),le]})}function _N(e){return(e?.trim()??``).replace(/^(?:local|cloud):/i,``).trim()}function vN(e,t){return e>t?e:t}function yN(e){let t=new Map;for(let n of e){let e=n.origin.issueId;if(!e)continue;let r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function bN(e,t){let n=new Map;for(let t of e.conversationRefs??[]){let r=_N(t.threadId);if(!r)continue;let i=`codex:${r}`,a=n.get(i),o={key:i,projectId:e.projectId,kind:`native`,title:t.title||e.title,source:t.source,nativeThreadId:t.threadId,threadBinding:t.legacyLocal?null:{threadId:t.threadId,codexProjectId:t.codexProjectId,codexProjectKind:t.codexProjectKind,codexHostId:t.codexHostId,workspacePath:t.workspacePath},legacyLocalThreadId:t.legacyLocal?t.threadId:null,aiThreadId:null,updatedAt:t.updatedAt,currentRun:null,latestTodo:null};(!a||o.updatedAt>=a.updatedAt)&&n.set(i,o)}for(let r of t){if(r.origin.projectId!==e.projectId||r.origin.issueId!==e.id)continue;let t=_N(r.codexThreadId),i=t?`codex:${t}`:`ai:${r.id}`,a=n.get(i),o=[r.updatedAt,r.currentRun?.startedAt??``,r.latestTodo?.updatedAt??``].reduce(vN),s={key:i,projectId:e.projectId,kind:`local-ai`,title:r.title||r.origin.issueIdentifier||e.title,source:`local-ai`,nativeThreadId:a?.nativeThreadId??r.codexThreadId,threadBinding:a?.threadBinding??null,legacyLocalThreadId:a?.legacyLocalThreadId??null,aiThreadId:r.id,updatedAt:a?.kind===`native`?vN(a.updatedAt,o):o,currentRun:r.currentRun??null,latestTodo:r.latestTodo??null};if(a?.kind===`local-ai`){let e=a.currentRun?.status===`running`,t=s.currentRun?.status===`running`;if(e&&!t||e===t&&a.updatedAt>o)continue}n.set(i,s)}return[...n.values()].sort((e,t)=>{let n=+(e.currentRun?.status===`running`),r=+(t.currentRun?.status===`running`);return n===r?e.updatedAt===t.updatedAt?e.key.localeCompare(t.key):t.updatedAt.localeCompare(e.updatedAt):r-n})}function xN(e,t,n,r=null,i=null,a=void 0){let o=bN(e,t),s;for(let e of o)e.currentRun?.status===`running`&&(!s||(e.currentRun.startedAt??``).localeCompare(s.currentRun?.startedAt??``)>0)&&(s=e);let c=_N(r),l=e.status===`in_progress`&&c?o.find(e=>_N(e.nativeThreadId)===c):void 0,u=s??l,d=a&&a.completed!==null&&a.total!==null?{completed:a.completed,total:a.total}:null,f=s?s.latestTodo:l?d??i??null:a===void 0?o.find(e=>e.latestTodo)?.latestTodo??null:d;return{conversations:o,unread:n,processing:{running:e.status===`in_progress`&&(!!u||a?.running===!0),completed:f?.completed??null,total:f?.total??null,startedAt:s?.currentRun?.startedAt??null}}}function SN(e){return e?.mode!==`cloud`||e.realtime?.transport!==`poll`?null:e.realtime.intervalMs}function CN(e){return e?.mode!==`cloud`||e.realtime?.transport!==`websocket`?null:{endpoint:e.realtime.endpoint}}function wN({fetchRevision:e,onInvalidate:t,intervalMs:n=2e3,setInterval:r=globalThis.setInterval,clearInterval:i=globalThis.clearInterval}){let a=0,o,s=!1,c=!1;async function l(){if(!(!s||c)){c=!0;try{let n=await e(a);if(!s)return;let r=n.revision>a;a=Math.max(a,n.revision),n.changed&&r&&t()}catch{}finally{c=!1}}}return{start(){s||(s=!0,o=r(l,n),l())},stop(){s&&(s=!1,i(o),o=void 0)}}}function TN({url:e,fetchRevision:t,onInvalidate:n,onConnectionChange:r=()=>{},reconnectDelays:i=[1e3,2e3,5e3,1e4,3e4],createWebSocket:a=e=>new WebSocket(e),setTimeout:o=globalThis.setTimeout,clearTimeout:s=globalThis.clearTimeout}){let c=0,l,u,d=!1,f=!1,p=0;async function m(){if(!d||f)return!1;f=!0;try{let e=await t(c);if(!d)return!1;let r=e.revision>c;return c=Math.max(c,e.revision),e.changed&&r&&n(),!0}catch{return!1}finally{f=!1}}function h(){if(!d||u!==void 0)return;let e=i[Math.min(p,i.length-1)];p+=1,u=o(()=>{u=void 0,g()},e)}function g(){if(!d||l)return;r(p===0?`connecting`:`reconnecting`);try{l=a(e)}catch{l=void 0,r(`reconnecting`),h();return}let t=l;t.onopen=()=>{!d||l!==t||m().then(e=>{if(!(!d||l!==t)){if(!e){t.close(4e3,`Revision check failed`);return}p=0,r(`live`)}})},t.onmessage=e=>{if(!(!d||l!==t))try{let t=JSON.parse(e.data);if(t?.type!==`revision`||!Number.isSafeInteger(t.revision)||t.revision<=c)return;c=t.revision,n()}catch{}},t.onerror=()=>{d&&l===t&&r(`reconnecting`)},t.onclose=()=>{l===t&&(l=void 0,d&&(r(`reconnecting`),h()))}}return{start(){d||(d=!0,g())},stop(){if(!d)return;d=!1,u!==void 0&&s(u),u=void 0;let e=l;l=void 0,e?.close(1e3,`Client stopped`)}}}var EN=[`day`,`week`,`month`],DN=(0,d.lazy)(()=>ch(()=>import(`./AiChat-BNn4VJ5a.js`).then(e=>({default:e.AiChat})),[],import.meta.url)),ON=(0,d.lazy)(()=>ch(()=>import(`./GanttView-rGWhuEX9.js`).then(e=>({default:e.GanttView})),__vite__mapDeps([22,23]),import.meta.url)),kN={type:`user`,id:`local-user`,name:`本地用户`,avatarUrl:null},AN=`local`,jN=`__all_projects__`,MN={...Ol,mainStatuses:[`backlog`,...Ol.mainStatuses],sidebarStatuses:Ol.sidebarStatuses.filter(e=>e!==`backlog`)},NN=`taskboard.recentProjectIds.v1`,PN=`taskboard.project-view.v1.`,FN=`taskboard.deviceWorkspacePaths.v1`,IN=`taskboard.projectCodexIdentities.v1`,LN=`taskboard.projectAutomations.v1`,RN=`taskboard.issue-read.v1`,zN=`taskboard.first-use-complete.v1`;function BN(e,t){return`${RN}:${e}:${t.projectId}:${t.id}`}function VN(e){let t=SM.getItem(`${PN}${e}`);return t===`readme`||t===`dashboard`||t===`list`||t===`gantt`||t===`issues`?t:`issues`}function HN(){let e={};for(let[t,n]of xM()){let r=t.slice(cM.length);if(r)try{let t=JSON.parse(n);t&&typeof t==`object`&&!Array.isArray(t)&&(e[r]=t)}catch{}}return e}function UN(){try{let e=JSON.parse(SM.getItem(NN)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.length>0):[]}catch{return[]}}var WN=[`task.created`,`task.updated`,`task.moved`,`task.archived`,`task.restored`,`task.deleted`,`task.relation.updated`,`comment.created`,`comment.updated`,`comment.deleted`,`attachment.created`,`attachment.deleted`,`project.created`,`project.labels.updated`,`project.readme.updated`,`client-storage.updated`];function GN(e){return e===`light`||e===`dark`}function KN(){let e=new URL(document.baseURI).searchParams,t=e.get(`host`);if(window.parent!==window&&(t===`codex`||t===`deepseek-harness`)){let t=e.get(`theme`);if(GN(t))return t;let n=SM.getItem(`taskboard.theme`);if(GN(n))return n}return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function qN(){try{let e=JSON.parse(SM.getItem(FN)??`{}`);return!e||typeof e!=`object`||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`&&e[1].trim().length>0))}catch{return{}}}function JN(){try{let e=JSON.parse(SM.getItem(IN)??`{}`);return!e||typeof e!=`object`||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>{let t=e[1];return!!(t&&typeof t.codexProjectId==`string`&&(t.codexProjectKind===`local`||t.codexProjectKind===`remote`)&&typeof t.codexHostId==`string`&&typeof t.workspacePath==`string`)}))}catch{return{}}}function YN(){try{let e=JSON.parse(SM.getItem(LN)??`{}`);if(!e||typeof e!=`object`||Array.isArray(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(!r||typeof r!=`object`||Array.isArray(r))continue;let e=r,i=e.model,a=e.reasoningEffort,o=e.enabledByUser??e.status===`ACTIVE`,s=e.quotaAware??!1;if(e.automationId!==void 0&&typeof e.automationId!=`string`||typeof e.codexProjectId!=`string`||e.codexProjectKind!==`local`&&e.codexProjectKind!==`remote`||typeof e.codexHostId!=`string`||typeof e.workspacePath!=`string`||e.status!==`ACTIVE`&&e.status!==`PAUSED`||!QN(e.intervalMinutes??5)||typeof i!=`string`||!i.trim()||typeof a!=`string`||!a.trim()||e.status===`ACTIVE`&&!e.automationId||typeof o!=`boolean`||typeof s!=`boolean`)continue;let c=XN(e.quota)?e.quota:void 0;t[n]={automationId:e.automationId,codexProjectId:e.codexProjectId,codexProjectKind:e.codexProjectKind,codexHostId:e.codexHostId,workspacePath:e.workspacePath,status:e.status,enabledByUser:o,quotaAware:s,...c?{quota:c}:{},intervalMinutes:e.intervalMinutes??5,model:i,reasoningEffort:a}}return t}catch{return{}}}function XN(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return(t.state===`available`||t.state===`blocked`||t.state===`unknown`||t.state===`unavailable`)&&Number.isFinite(t.checkedAt)&&(t.resetsAt===void 0||Number.isFinite(t.resetsAt))&&(t.reason===void 0||t.reason===`api-key`)}function ZN(e){return!!(e&&(e.automationId===void 0||typeof e.automationId==`string`)&&typeof e.codexProjectId==`string`&&(e.codexProjectKind===`local`||e.codexProjectKind===`remote`)&&typeof e.codexHostId==`string`&&typeof e.workspacePath==`string`&&typeof e.enabledByUser==`boolean`&&typeof e.quotaAware==`boolean`&&QN(e.intervalMinutes)&&typeof e.model==`string`&&e.model.trim()&&typeof e.reasoningEffort==`string`&&e.reasoningEffort.trim())}function QN(e){return e===5||e===10||e===15||e===30||e===60}function $N(e){let t=/^RRULE:FREQ=MINUTELY;INTERVAL=(5|10|15|30|60)$/.exec(e);return t?Number(t[1]):null}function eP(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return typeof t.id==`string`&&(t.status===`ACTIVE`||t.status===`PAUSED`)&&typeof t.model==`string`&&!!t.model.trim()&&typeof t.reasoningEffort==`string`&&!!t.reasoningEffort.trim()&&typeof t.rrule==`string`&&$N(t.rrule)!==null}function tP(e){try{let{protocol:t,hostname:n}=new URL(e);return(t===`http:`||t===`https:`)&&(n===`127.0.0.1`||n===`localhost`)}catch{return!1}}function nP(e){return[...e].sort((e,t)=>e.sortOrder-t.sortOrder||e.createdAt.localeCompare(t.createdAt))}function rP(e){return{title:e.title,description:e.description,status:e.status,priority:e.priority,labels:e.labels,developmentContext:e.developmentContext,startDate:e.startDate,dueDate:e.dueDate,recurrence:e.recurrence}}function iP({selectedProjectId:e,detailTaskId:t,refreshProjectList:n,refreshTasks:r,refreshProjectBoardDisplaySettings:i,setConnection:a,setCommentsRevision:o,setAttachmentsRevision:s,setReadmeRevision:c}){let l=(0,d.useRef)({selectedProjectId:e,detailTaskId:t}),u=y(`/api/events`);return(0,d.useLayoutEffect)(()=>{l.current={selectedProjectId:e,detailTaskId:t}},[e,t]),(0,d.useEffect)(()=>{let e=new EventSource(u),t,d=!1,f=new Set,p=e=>{d||=e.projects===!0,e.tasks&&f.add(e.projectId),window.clearTimeout(t),t=window.setTimeout(()=>{let{selectedProjectId:e}=l.current;d&&n(),e&&f.size>0&&(e===jN||f.has(void 0)||f.has(e))&&r(e,{quiet:!0}),d=!1,f.clear()},120)},m=e=>{let t=e,n={};try{n=JSON.parse(t.data)}catch{}if(e.type===`client-storage.updated`&&n.key?.startsWith(`taskboard.project-board-display-settings.v3.`)){i();return}let{selectedProjectId:r,detailTaskId:a}=l.current,u=n.projectId??n.project?.id,d=!!r&&(r===jN||!u||u===r);if(e.type===`project.created`){p({projects:!0});return}if(e.type===`project.labels.updated`){p({projects:!0,tasks:d,projectId:u});return}if(e.type.startsWith(`task.`)){p({projects:e.type!==`task.relation.updated`,tasks:d,projectId:u});return}if(d){if(e.type===`project.readme.updated`){c(e=>e+1);return}if(e.type.startsWith(`comment.`)){(!a||!n.taskId||n.taskId===a)&&o(e=>e+1),p({tasks:!0,projectId:u});return}e.type.startsWith(`attachment.`)&&(!a||!n.taskId||n.taskId===a)&&(s(e=>e+1),o(e=>e+1))}};return WN.forEach(t=>e.addEventListener(t,m)),e.onopen=()=>{a(`live`);let{selectedProjectId:e,detailTaskId:t}=l.current;i(),p({projects:!0,tasks:!!e}),e&&e!==jN&&c(e=>e+1),t&&(o(e=>e+1),s(e=>e+1))},e.onerror=()=>{a(`reconnecting`)},()=>{window.clearTimeout(t),WN.forEach(t=>e.removeEventListener(t,m)),e.close()}},[u,i,n,r,s,o,a,c]),null}function aP(){let e=(0,d.useMemo)(()=>new URL(document.baseURI).searchParams,[]),t=e.get(`host`),n=t===`codex`||t===`deepseek-harness`,r=navigator.userAgent.includes(`Macintosh`)?`⌘Z`:`Ctrl+Z`,[i,a]=(0,d.useState)(KN),[o,s]=(0,d.useState)(null),c=Xe(o?.language??e.get(`lang`)??navigator.language),{locale:l,text:u}=Ze(c),[f,p]=(0,d.useState)(``),[m,h]=(0,d.useState)({workspacePath:null,contexts:[]}),[y,x]=(0,d.useState)(!1),[E,te]=(0,d.useState)(``),[j,M]=(0,d.useState)(null),[N,P]=(0,d.useState)(!1),[F,I]=(0,d.useState)(null),[ne,re]=(0,d.useState)([]),[ie,L]=(0,d.useState)(null),R=(0,d.useRef)(0),ae=(0,d.useCallback)(e=>{L(t=>t?.requestId===e?null:t)},[]),[se,ce]=(0,d.useState)({}),[le,he]=(0,d.useState)({}),[_e,De]=(0,d.useState)(UN),Oe=e.get(`project`)??_e[0]??jN,[ke,Ae]=(0,d.useState)([]),[z,je]=(0,d.useState)(Oe),[Ne,Pe]=(0,d.useState)([]),[Fe,Ie]=(0,d.useState)([]),[Le,ze]=(0,d.useState)(!1),[Ue,We]=(0,d.useState)(!1),[Ge,Ke]=(0,d.useState)(null),[qe,Je]=(0,d.useState)(null),Ye=Ge??qe,[Qe,V]=(0,d.useState)(null),H=Qe===null?null:typeof Qe==`string`?Qe:u(Qe[0],Qe[1]),[et,tt]=(0,d.useState)(`connecting`),[U,nt]=(0,d.useState)(``),[rt,it]=(0,d.useState)(lN),[at,ot]=(0,d.useState)(()=>VN(Oe)),[W,st]=(0,d.useState)(HN),G=(0,d.useCallback)(async()=>{try{await bM(),st(HN())}catch(e){console.error(e)}},[]),[ct,lt]=(0,d.useState)(null),[ut,dt]=(0,d.useState)(`week`),[ft,pt]=(0,d.useState)(!1),[mt,ht]=(0,d.useState)(0),[gt,_t]=(0,d.useState)(!1),[vt,yt]=(0,d.useState)(!1),[bt,xt]=(0,d.useState)(!1),[St,Ct]=(0,d.useState)(!1),[wt,Tt]=(0,d.useState)(`backlog`),[Et,Dt]=(0,d.useState)(null),[Ot,kt]=(0,d.useState)(null),[At,jt]=(0,d.useState)(null),[Mt,Nt]=(0,d.useState)(null),[Pt,Ft]=(0,d.useState)(null),[It,Lt]=(0,d.useState)(()=>au(window.location.search)),[Rt,zt]=(0,d.useState)(0),[Bt,Vt]=(0,d.useState)(0),[Ht,Ut]=(0,d.useState)(0),[Wt,Gt]=(0,d.useState)(null),[Kt,qt]=(0,d.useState)(null),[Jt,Yt]=(0,d.useState)(0),[Xt,Zt]=(0,d.useState)(null),[Qt,$t]=(0,d.useState)(null),[en,tn]=(0,d.useState)(null),[nn,rn]=(0,d.useState)(null),[an,on]=(0,d.useState)(null),[sn,cn]=(0,d.useState)(()=>SM.getItem(zN)===null),[ln,un]=(0,d.useState)(``),[dn,fn]=(0,d.useState)(null),[pn,mn]=(0,d.useState)(!1),[hn,gn]=(0,d.useState)(``),[_n,vn]=(0,d.useState)(!1),[yn,bn]=(0,d.useState)(null),[xn,Sn]=(0,d.useState)(!1),[Cn,wn]=(0,d.useState)(!1),[Tn,En]=(0,d.useState)(null),[Dn,On]=(0,d.useState)(null),[kn,An]=(0,d.useState)(null),[jn,Mn]=(0,d.useState)(null),[Nn,Pn]=(0,d.useState)(qN),[Fn,In]=(0,d.useState)(JN),[Ln,Rn]=(0,d.useState)(YN),[zn,Bn]=(0,d.useState)(!1),[Vn,Hn]=(0,d.useState)(null),[Un,Wn]=(0,d.useState)(null),[Gn,Kn]=(0,d.useState)(!1),[qn,Jn]=(0,d.useState)(null),[Yn,Xn]=(0,d.useState)(``),[Zn,Qn]=(0,d.useState)(null),$n=(0,d.useRef)(0),er=(0,d.useRef)(0),tr=(0,d.useRef)([]),nr=(0,d.useRef)(0),rr=(0,d.useRef)([]),ir=(0,d.useRef)(!1),ar=(0,d.useRef)(null),or=(0,d.useRef)(null),sr=(0,d.useRef)(null),cr=(0,d.useRef)({}),lr=(0,d.useRef)(null),ur=(0,d.useRef)(null),dr=lr.current??z,fr=(0,d.useRef)(dr);fr.current=dr;let pr=SN(j),mr=CN(j)?.endpoint??null,hr=(0,d.useRef)(u);hr.current=u,_(u);function gr(e){return e instanceof v||e instanceof Error?e.message:hr.current(`加载议题时出现问题。`,`Something went wrong while loading your issues.`)}let _r=(0,d.useRef)(new Map),vr=(0,d.useRef)(null),yr=(0,d.useRef)(new Set),br=(0,d.useRef)(new Map),xr=(0,d.useRef)(Ln);(0,d.useEffect)(()=>{document.documentElement.lang=l},[l]);let Sr=(0,d.useCallback)(e=>{Qn(null),Xn(e)},[]),Cr=(0,d.useCallback)(e=>{lt(e)},[]),wr=(0,d.useCallback)((e,t)=>{if(e===AN)return;let n=t.trim();Pn(t=>{if(t[e]===n||!n&&!(e in t))return t;let r={...t};return n?r[e]=n:delete r[e],SM.setItem(FN,JSON.stringify(r)),r})},[]),Tr=(0,d.useCallback)(e=>{De(t=>{if(t[0]===e)return t;let n=[e,...t.filter(t=>t!==e)];return SM.setItem(NN,JSON.stringify(n)),n})},[]),K=ke.find(e=>e.id===z)??null,Er=(0,d.useMemo)(()=>K?Qi(K.id):null,[Nn,o,Fn,ke,K?.id]),Dr=z===jN,Or=K?.source===`jira`,kr=W[z]??(Dr?MN:Ol),Ar=Dr&&kr.sidebarStatuses.includes(`backlog`)&&!kr.mainStatuses.includes(`backlog`)?{...kr,mainStatuses:[`backlog`,...kr.mainStatuses],sidebarStatuses:kr.sidebarStatuses.filter(e=>e!==`backlog`)}:kr,jr=Un&&Un.projectId===K?.id?Un.models:[];(0,d.useEffect)(()=>{if(Wn(null),Jn(null),!K||!N){Kn(!1);return}let e=new AbortController;return Kn(!0),A(K.id,e.signal,Er).then(t=>{e.signal.aborted||(Wn({projectId:K.id,models:t.models}),Kn(!1))},t=>{e.signal.aborted||(Jn(t instanceof Error?t.message:u(`无法读取 Codex 模型目录`,`Could not load the Codex model catalog.`)),Kn(!1))}),()=>e.abort()},[N,Er?.codexHostId,Er?.codexProjectId,Er?.codexProjectKind,Er?.workspacePath,K?.id,u]);let Mr=Ue&&Ne.length===0&&K&&K.id!==AN&&!Or&&N?K.id:null;(0,d.useEffect)(()=>{if(I(null),!Mr)return;let e=new AbortController;return A(Mr,e.signal,Er).then(()=>{e.signal.aborted||I(Mr)}).catch(()=>{}),()=>e.abort()},[Mr,Er?.codexHostId,Er?.codexProjectId,Er?.codexProjectKind,Er?.workspacePath]),(0,d.useLayoutEffect)(()=>{K&&Tr(K.id)},[Tr,K]);let Nr=o?.user??{...kN,name:u(`本地用户`,`Local user`)},Pr=z===AN||Dr?void 0:Nn[z],Fr=Ln[z],Ir=(0,d.useMemo)(()=>{if(!n||window.parent===window)return{unavailableReason:u(`仅可在 Codex App 中使用`,`Available only in the Codex app`)};if(!tP(new URL(document.baseURI).origin))return{unavailableReason:u(`仅本地任务面板可用`,`Available only on the local taskboard`)};if(!K)return{unavailableReason:u(`请先选择项目`,`Select a project first`)};let e=Fn[K.id];if(e?.codexProjectKind===`remote`){let t=o?.projects?.find(t=>t.id===e.codexProjectId);return t?.projectKind!==`remote`||t.hostId!==e.codexHostId||t.workspacePath!==e.workspacePath?{unavailableReason:u(`已保存的 SSH 远程项目或主机当前不可用`,`The saved SSH remote project or host is not available`)}:E?{...e,unavailableReason:null}:{unavailableReason:u(`任务面板还没有读取到 Skill 路径`,`Taskboard has not received the Skill path`)}}let t=K.id===AN?o?.projectId:K.id,r=o?.projects?.find(e=>e.id===t),i=(r?.projectKind===`remote`?r.workspacePath:void 0)??Nn[K.id]??K.workspacePath??r?.workspacePath??(r&&o?.projectId===t?o?.workspacePath:void 0),a=r?r.id:o?.projects?.find(e=>(Nn[e.id]??e.workspacePath)===i)?.id;if(!i||!a)return{unavailableReason:u(`请先在 Codex 中添加并映射该项目目录`,`Add and map this project directory in Codex first`)};if(!E)return{unavailableReason:u(`任务面板还没有读取到 Skill 路径`,`Taskboard has not received the Skill path`)};let s=o?.projects?.find(e=>e.id===a);return{workspacePath:i,codexProjectId:a,codexProjectKind:s?.projectKind??`local`,codexHostId:s?.hostId??`local`,unavailableReason:null}},[Nn,n,o,E,Fn,K,u]),Lr=(0,d.useMemo)(()=>!K||!Ir.codexProjectId||!Ir.codexProjectKind||!Ir.codexHostId||!Ir.workspacePath||!E?null:{taskboardProjectId:K.id,codexProjectId:Ir.codexProjectId,codexProjectKind:Ir.codexProjectKind,codexHostId:Ir.codexHostId,projectName:K.name,workspacePath:Ir.workspacePath,remoteProjects:Ir.codexProjectKind===`remote`?(o?.projects??[]).filter(e=>e.projectKind===`remote`&&e.hostId===Ir.codexHostId&&typeof e.workspacePath==`string`).map(e=>({codexProjectId:e.id,codexProjectKind:`remote`,codexHostId:e.hostId,workspacePath:e.workspacePath})).sort((e,t)=>e.workspacePath.localeCompare(t.workspacePath)||e.codexProjectId.localeCompare(t.codexProjectId)):[],skillPath:E},[Ir,o,E,K]),Rr=(0,d.useMemo)(()=>[...Ne,...Fe],[Fe,Ne]),zr=It?Rr.find(e=>e.identifier===It)??null:null,Br=zr?.id??null,Vr=Wt?Ne.find(e=>e.id===Wt.taskId)??null:null,Hr=Vr?Nn[Vr.projectId]:void 0,Ur=Dr?[...new Set(ke.flatMap(e=>e.labels))]:K?.labels??[],Wr=(0,d.useMemo)(()=>Object.fromEntries(ke.map(e=>[e.id,e.id===AN?u(`临时任务`,`Temporary tasks`):e.name])),[ke,u]),Gr=(0,d.useMemo)(()=>{let e=new Map(ke.map(e=>[e.id,e])),t=new Set,n=[];for(let r of o?.projects??[])!r.id||!r.name||t.has(r.id)||(t.add(r.id),n.push({id:r.id,name:r.id===AN?u(`临时任务`,`Temporary tasks`):e.get(r.id)?.name??r.name,issueCount:e.get(r.id)?.issueCount??0,inCodex:!0,persisted:e.has(r.id),codexIdentity:r.workspacePath&&r.projectKind&&r.hostId?{codexProjectId:r.id,codexProjectKind:r.projectKind,codexHostId:r.hostId,workspacePath:r.workspacePath}:null}));for(let e of ke)t.has(e.id)||n.push({id:e.id,name:e.id===AN?u(`临时任务`,`Temporary tasks`):e.name,issueCount:e.issueCount,inCodex:!1,persisted:!0,codexIdentity:Fn[e.id]??null});let r=new Map(_e.map((e,t)=>[e,t])),i=n.sort((e,t)=>(r.get(e.id)??_e.length)-(r.get(t.id)??_e.length));return[...i.filter(e=>e.issueCount>0),...i.filter(e=>e.issueCount===0)]},[o?.projects,Fn,ke,_e,u]),Kr=Gr.filter(e=>e.id!==AN||e.issueCount>0),qr=ln.trim().toLocaleLowerCase(),Jr=qr?Kr.filter(e=>e.name.toLocaleLowerCase().includes(qr)):Kr,Yr=Jr.find(e=>e.issueCount===0)?.id??null,Xr=Jr.some(e=>e.issueCount>0),Zr=Mt?.projectId??(Pt?.projectId===z?Pt.targetProjectId:void 0)??(Dr?AN:z),Qr=Dr&&Mt?Zr:null,$r=Gr.flatMap(e=>{let t=ke.find(t=>t.id===e.id);return t&&t.source!==`jira`?[{id:e.id,name:e.name}]:[]}),ei=(0,d.useCallback)(()=>Gt(null),[]);function ti(e,t){Dr&&(!n||window.parent===window)&&e.developmentContext?.type===`worktree`&&x(!0),Gt({taskId:e.id,...t})}let ni=j?.mode??`local`;(0,d.useEffect)(()=>{let e=0,t=0,n=0;return vt?(xt(!0),e=window.requestAnimationFrame(()=>{t=window.requestAnimationFrame(()=>Ct(!0))})):(Ct(!1),n=window.setTimeout(()=>xt(!1),320)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(t),window.clearTimeout(n)}},[vt]);let ri=(0,d.useCallback)(e=>{if(!e.activityKey)return;let t=BN(ni,e);ce(n=>{if(n[t]===e.activityKey)return n;let r={...n,[t]:e.activityKey};try{SM.setItem(t,e.activityKey)}catch{}return r})},[ni]);(0,d.useEffect)(()=>{zr&&ri(zr)},[zr?.activityKey,zr?.id,ri]);let ii=(0,d.useCallback)((e,t)=>{Rn(n=>{if(t&&n[e]?.automationId===t.automationId&&n[e]?.codexProjectId===t.codexProjectId&&n[e]?.codexProjectKind===t.codexProjectKind&&n[e]?.codexHostId===t.codexHostId&&n[e]?.workspacePath===t.workspacePath&&n[e]?.status===t.status&&n[e]?.enabledByUser===t.enabledByUser&&n[e]?.quotaAware===t.quotaAware&&JSON.stringify(n[e]?.quota)===JSON.stringify(t.quota)&&n[e]?.intervalMinutes===t.intervalMinutes&&n[e]?.model===t.model&&n[e]?.reasoningEffort===t.reasoningEffort)return n;let r={...n};return t?r[e]=t:delete r[e],xr.current=r,SM.setItem(LN,JSON.stringify(r)),r})},[]),ai=(0,d.useCallback)((e,t,n,r)=>{let i=window.crypto.randomUUID(),a=new Promise((e,t)=>{let n=window.setTimeout(()=>{_r.current.delete(i),t(Error(hr.current(`Codex 自动化没有响应,请稍后重试`,`Codex automation did not respond. Try again later.`)))},1e4);_r.current.set(i,{resolve:e,reject:t,timeoutId:n})});return PM({type:`taskboard:automation-request`,payload:{requestId:i,operation:e,taskboardProjectId:n.taskboardProjectId,codexProjectId:n.codexProjectId,codexProjectKind:n.codexProjectKind,codexHostId:n.codexHostId,projectName:n.projectName,workspacePath:n.workspacePath,remoteProjects:n.remoteProjects,skillPath:n.skillPath,...r?{automationId:r}:{},enabledByUser:t.enabledByUser,quotaAware:t.quotaAware,intervalMinutes:t.intervalMinutes,model:t.model,reasoningEffort:t.reasoningEffort}}),a},[]),oi=(0,d.useCallback)(async e=>{if(vr.current)return;let t=e;for(;br.current.size>0;){let e=(t?br.current.get(t):void 0)??br.current.values().next().value;if(t=void 0,!e)return;br.current.delete(e.projectId);let n=xr.current[e.projectId];vr.current=`save`,Bn(!0),Hn(null);try{let t=await ai(`apply-policy`,e.options,e.context,n?.automationId),r=eP(t.item)?t.item:void 0,i=ZN(t.policy)?t.policy:null;if(!i)throw Error(hr.current(`Codex 没有返回实际生效的自动化策略`,`Codex did not return the effective automation policy.`));ii(e.projectId,{automationId:r?.id??i.automationId,codexProjectId:i.codexProjectId,codexProjectKind:i.codexProjectKind,codexHostId:i.codexHostId,workspacePath:i.workspacePath,status:r?.status??`PAUSED`,enabledByUser:i.enabledByUser,quotaAware:i.quotaAware,...t.quota?{quota:t.quota}:{},intervalMinutes:i.intervalMinutes,model:i.model,reasoningEffort:i.reasoningEffort})}catch(t){ii(e.projectId,n),Hn(t instanceof Error?t.message:hr.current(`无法更新自动化`,`Could not update automation.`))}finally{vr.current=null,Bn(!1)}}},[ai,ii]),si=(0,d.useCallback)(async()=>{if(!Lr){Hn(null);return}let e=Un?.projectId===Lr.taskboardProjectId?Un.models:null;if(!e||vr.current)return;let t=Lr.taskboardProjectId,n=xr.current[t],r=!yr.current.has(t);vr.current=`list`,r&&Bn(!0),Hn(null);try{let r=e[0],i=n;if(!i){if(!r)return;i={enabledByUser:!1,quotaAware:!1,intervalMinutes:5,model:r.slug,reasoningEffort:r.defaultReasoningEffort}}let a=await ai(`list`,i,Lr,n?.automationId),o=Array.isArray(a.items)?a.items.filter(eP):[],s=ZN(a.policy)?a.policy:null,c=s??Lr;if(!n){if(!s)return;let e=(eP(a.item)?a.item:void 0)??o.find(e=>e.id===s.automationId)??(o.length===1?o[0]:void 0);ii(t,{automationId:e?.id??s.automationId,codexProjectId:s.codexProjectId,codexProjectKind:s.codexProjectKind,codexHostId:s.codexHostId,workspacePath:s.workspacePath,status:e?.status??`PAUSED`,enabledByUser:s.enabledByUser,quotaAware:s.quotaAware,...a.quota?{quota:a.quota}:{},intervalMinutes:s.intervalMinutes,model:s.model,reasoningEffort:s.reasoningEffort});return}let l=(eP(a.item)?a.item:void 0)??o.find(e=>e.id===n?.automationId)??(o.length===1?o[0]:void 0);if(!l){n&&ii(t,{...n,automationId:void 0,codexProjectId:c.codexProjectId,codexProjectKind:c.codexProjectKind,codexHostId:c.codexHostId,workspacePath:c.workspacePath,status:`PAUSED`,enabledByUser:s?.enabledByUser??n.enabledByUser,quotaAware:s?.quotaAware??n.quotaAware,...a.quota?{quota:a.quota}:{},intervalMinutes:s?.intervalMinutes??n.intervalMinutes,model:s?.model??n.model,reasoningEffort:s?.reasoningEffort??n.reasoningEffort});return}let u=s?.intervalMinutes??$N(l.rrule);if(!u)return;ii(t,{automationId:l.id,codexProjectId:c.codexProjectId,codexProjectKind:c.codexProjectKind,codexHostId:c.codexHostId,workspacePath:c.workspacePath,status:l.status,enabledByUser:s?.enabledByUser??n.enabledByUser,quotaAware:s?.quotaAware??n.quotaAware,...a.quota?{quota:a.quota}:n.quota?{quota:n.quota}:{},intervalMinutes:u,model:s?.model??l.model,reasoningEffort:s?.reasoningEffort??l.reasoningEffort})}catch(e){Hn(e instanceof Error?e.message:u(`无法读取自动化状态`,`Could not read the automation status.`))}finally{yr.current.add(t),vr.current=null,r&&Bn(!1),oi(t)}},[Un,Lr,oi,ai,u,ii]),ci=(0,d.useCallback)(e=>{if(!Lr)return;let t={projectId:Lr.taskboardProjectId,context:Lr,options:e};br.current.set(t.projectId,t),vr.current||oi(t.projectId)},[Lr,oi]);function li(e){let t=tr.current.find(t=>t.identifier===e.identifier);t&&ri(t);let n=au(window.location.search);if(n||(lr.current=z),Dr&&je(e.projectId),at===`list`&&or.current)ur.current={projectId:z,view:`list`,scrollTop:or.current.scrollTop};else if(at===`issues`&&t){let e=cr.current[t.status];e&&(ur.current={projectId:z,view:`issues`,status:t.status,scrollTop:e.scrollTop,scrollLeft:sr.current?.scrollLeft??0})}ei(),cn(!1),Lt(e.identifier);let r=ou(window.location.href,z,null);n||window.history.replaceState(window.history.state,``,r);let i=ou(n?window.location.href:r.href,e.projectId,e.identifier);window.history.pushState(window.history.state,``,i)}function ui(){let e=lr.current??z;lr.current=null,Lt(null),e!==z&&(je(e),ot(e===jN?`issues`:VN(e)));let t=ou(window.location.href,e,null);window.history.replaceState(window.history.state,``,t)}(0,d.useLayoutEffect)(()=>{if(It)return;let e=ur.current;if(!e)return;if(e.view!==at||e.projectId!==z){ur.current=null;return}if(ur.current=null,e.view===`list`){or.current&&(or.current.scrollTop=e.scrollTop);return}let t=cr.current[e.status];t&&(t.scrollTop=e.scrollTop),sr.current&&(sr.current.scrollLeft=e.scrollLeft)},[at,It,z]),(0,d.useEffect)(()=>{function e(){let e=new URL(window.location.href),t=e.searchParams.get(`project`)??AN,n=au(e.search);if(n&&at===`list`&&or.current)ur.current={projectId:z,view:`list`,scrollTop:or.current.scrollTop};else if(n&&at===`issues`){let e=tr.current.find(e=>e.identifier===n),t=e?cr.current[e.status]:null;e&&t&&(ur.current={projectId:z,view:`issues`,status:e.status,scrollTop:t.scrollTop,scrollLeft:sr.current?.scrollLeft??0})}n||(lr.current=null),Lt(n),t!==z&&(ot(t===jN?`issues`:VN(t)),je(t))}return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[at,z]),(0,d.useEffect)(()=>{document.documentElement.dataset.theme=i,document.documentElement.dataset.embedded=String(n),document.documentElement.style.colorScheme=i},[n,i]),(0,d.useEffect)(()=>{if(n&&window.parent!==window)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>a(e.matches?`dark`:`light`);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[n]),(0,d.useEffect)(()=>{z&&ot(z===jN?`issues`:VN(z))},[z]),(0,d.useEffect)(()=>{z?at!==`dashboard`&<(z):lt(null)},[at,z]),(0,d.useEffect)(()=>{uN(rt)},[rt]),(0,d.useEffect)(()=>{tr.current=Ne},[Ne]),(0,d.useEffect)(()=>{SM.getItem(zN)===null&&SM.setItem(zN,`true`)},[]),(0,d.useEffect)(()=>{if(!sn)return;function e(e){e.target.closest(`[data-project-switcher]`)||cn(!1)}function t(e){e.key===`Escape`&&cn(!1)}return document.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[sn]),(0,d.useEffect)(()=>{if(!dn)return;function e(e){e.target.closest(`[data-project-context-menu]`)||fn(null)}function t(e){e.key===`Escape`&&fn(null)}return document.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[dn]),(0,d.useEffect)(()=>{Hn(null),si()},[z,si]),(0,d.useEffect)(()=>{if(!n||window.parent===window)return;let e=``;function r(n){if(n.source!==window.parent||!n.data||typeof n.data!=`object`)return;let r=n.data;if(r.type===`taskboard:frame-challenge`){let t=typeof r.payload==`object`&&r.payload&&`challenge`in r.payload&&typeof r.payload.challenge==`string`?r.payload.challenge:``;if(!t||t===e)return;e=t,NM(t),p(t),PM({type:`taskboard:ready`});return}if(r.type===`taskboard:automation-response`&&r.payload){let e=r.payload;if(typeof e.requestId!=`string`)return;let t=_r.current.get(e.requestId);if(!t)return;window.clearTimeout(t.timeoutId),_r.current.delete(e.requestId),e.ok?t.resolve(e):t.reject(Error(typeof e.error==`string`?e.error:hr.current(`Codex 无法更新自动化`,`Codex could not update automation`)));return}if(r.type===`taskboard:theme`&&GN(r.theme)){a(r.theme);return}if(r.type===`taskboard:thread-prepared`&&r.payload){on(null);return}if(r.type===`taskboard:thread-create-error`&&r.payload){let e=r.payload;on(null),V(typeof e.error==`string`?e.error:hr.current(`无法在 Codex 中打开新对话。`,`Could not open a new conversation in Codex.`));return}if(r.type===`taskboard:thread-open-error`&&r.payload){let e=r.payload;V(typeof e.error==`string`?e.error:hr.current(`无法打开 Codex 对话。`,`Could not open the Codex conversation.`));return}if(r.type!==`taskboard:host-context`||!r.payload)return;let i=r.payload;s(i),g(i.user),GN(i.theme)&&a(i.theme),t===`codex`&&ee(i)}let i=FM();return window.addEventListener(`message`,r),PM({type:`taskboard:frame-awaiting-challenge`}),()=>{window.removeEventListener(`message`,r),NM(``),i();for(let e of _r.current.values())window.clearTimeout(e.timeoutId),e.reject(Error(hr.current(`Taskboard 消息桥已关闭`,`The Taskboard host bridge was closed`)));_r.current.clear()}},[n,t]),(0,d.useLayoutEffect)(()=>{if(!n||window.parent===window||!ar.current)return;let e=ar.current,t=()=>{let t=e.getBoundingClientRect();PM({type:`taskboard:drag-region`,payload:{x:t.x,y:t.y,width:t.width,height:t.height}})},r=new ResizeObserver(t);return r.observe(e),window.addEventListener(`resize`,t),t(),()=>{r.disconnect(),window.removeEventListener(`resize`,t),PM({type:`taskboard:drag-region`,payload:null})}},[Br,n,f,z]);let di=(0,d.useCallback)(async e=>{let t=++$n.current;Ke(e=>e?.operation===`initial`?{...e,requestId:t}:e);try{let[n,r,i]=await Promise.all([S(e),D(e),oe(e)]);if(t!==$n.current)return;let[a,o]=await Promise.all([C(e),ge(AN,e)]);if(t!==$n.current)return;M(e=>e&&e.mode===r.mode&&JSON.stringify(e.realtime)===JSON.stringify(r.realtime)&&e.manageTaskboardSkillPath===r.manageTaskboardSkillPath&&e.localCapabilities?.available===r.localCapabilities?.available?e:r),te(r.manageTaskboardSkillPath??``),P(r.capabilities?.localAiChat===!0),Pn(e=>{let t={...e,...i};return delete t[AN],JSON.stringify(t)===JSON.stringify(e)?e:(SM.setItem(FN,JSON.stringify(t)),t)}),Ae(n.map(e=>e.id===AN?{...e,issueCount:o.filter(e=>El.some(t=>t===e.status)).length}:e)),bn(a),je(e=>{let t=new URLSearchParams(window.location.search).get(`project`);return t===jN||t&&n.some(e=>e.id===t)?t:e===jN||e&&n.some(t=>t.id===e)?e:n.find(e=>e.id===AN)?.id??n[0]?.id??AN}),Ke(e=>e?.operation===`initial`&&e.requestId===t?null:e)}catch(e){e.name!==`AbortError`&&t===$n.current&&Ke({source:`projects`,operation:`initial`,requestId:t,message:gr(e)})}},[]);(0,d.useEffect)(()=>{let e=new AbortController;return di(e.signal),()=>e.abort()},[di]);let fi=(0,d.useCallback)(async()=>{let e=++$n.current;Ke(t=>t?.operation===`refresh`?{...t,requestId:e}:t);try{let[t,n]=await Promise.all([S(),ge(AN)]);if(e!==$n.current)return;Ae(t.map(e=>e.id===AN?{...e,issueCount:n.filter(e=>El.some(t=>t===e.status)).length}:e)),Ke(t=>t?.operation===`refresh`&&t.requestId===e?null:t)}catch(t){e===$n.current&&Ke({source:`projects`,operation:`refresh`,requestId:e,message:gr(t)})}},[]),pi=(0,d.useCallback)(async(e,t={})=>{let n=++er.current;t.quiet||ze(!0),Je(e=>e&&{...e,requestId:n});try{let r=e===jN?void 0:e,[i,a]=await Promise.all([ge(r,t.signal),ve(r,t.signal)]);if(n!==er.current)return;Pe(nP(i)),Ie(nP(a)),Ae(t=>t.map(t=>{if(t.id!==e||t.source!==`jira`)return t;let n=[...new Set(i.flatMap(e=>e.labels))];return JSON.stringify(n)===JSON.stringify(t.labels)?t:{...t,labels:n}})),We(!0),Je(e=>e?.requestId===n?null:e)}catch(e){e.name!==`AbortError`&&n===er.current&&Je({source:`tasks`,requestId:n,message:gr(e)})}finally{!t.quiet&&n===er.current&&ze(!1)}},[]);(0,d.useEffect)(()=>{if(!dr){Pe([]),Ie([]),We(!1);return}We(!1);let e=new AbortController;return pi(dr,{signal:e.signal}),()=>e.abort()},[pi,dr]),(0,d.useEffect)(()=>{if(!Or&&!(dr===jN&&yn?.configured)||!dr)return;let e=window.setInterval(()=>{pi(dr,{quiet:!0})},6e4);return()=>window.clearInterval(e)},[Or,yn?.configured,pi,dr]),(0,d.useEffect)(()=>{let e=!n||window.parent===window,t=Dr?Qr??(e?Vr?.projectId:null):z;if(!t){h({workspacePath:null,contexts:[]}),x(!1);return}let r=new AbortController,i=t===AN?o?.projectId:t,a=o?.threadId??(Dr?Vr?.threadId:zr?.threadId)??void 0,s=Dr?Qr?Nn[Qr]:Hr:Pr;return h({workspacePath:s??null,contexts:[]}),x(!0),me(t,i,a,r.signal,s).then(e=>{h(e),e.workspacePath&&wr(t,e.workspacePath)}).catch(e=>{e.name!==`AbortError`&&h({workspacePath:s??null,contexts:[]})}).finally(()=>{r.signal.aborted||x(!1)}),()=>r.abort()},[Vr?.projectId,Vr?.threadId,Hr,zr?.threadId,Nn,Qr,n,o?.projectId,o?.threadId,Dr,wr,z,Pr]);let mi=(0,d.useCallback)(()=>{fi(),G();let e=fr.current;e&&pi(e,{quiet:!0}),Ut(e=>e+1),zt(e=>e+1),Vt(e=>e+1)},[fi,G,pi]);(0,d.useEffect)(()=>{if(pr===null)return;let e=new AbortController;tt(`connecting`);let t=wN({intervalMs:pr,fetchRevision:async t=>{try{let n=await O(t,e.signal);return tt(`live`),n}catch(t){throw e.signal.aborted||tt(`reconnecting`),t}},onInvalidate:mi});return t.start(),()=>{e.abort(),t.stop()}},[pr,mi]),(0,d.useEffect)(()=>{if(mr===null)return;let e=new AbortController,t=TN({url:b(mr),fetchRevision:t=>O(t,e.signal),onInvalidate:mi,onConnectionChange:tt});return t.start(),()=>{e.abort(),t.stop()}},[mi,mr]);function hi(e,t){let n={id:++nr.current,undo:t};rr.current=[...rr.current.slice(-19),n],e&&(Xn(``),Qn({id:n.id,message:e}))}async function gi(){if(ir.current)return;let e=rr.current.at(-1);if(e){rr.current=rr.current.slice(0,-1),ir.current=!0,Qn(null),cn(!1),ei(),V(null);try{await e.undo()}catch(e){V(u(`无法撤回这次操作:${gr(e)}`,`Could not undo this action: ${gr(e)}`)),dr&&pi(dr,{quiet:!0})}finally{ir.current=!1}}}async function _i(e,t,n=He(e.assignee,Nr)){let r=tr.current.find(e=>e.id===t.id),i=await be(r&&r.version>=t.version?r:t,{...rP(e),...n?{assigneeTarget:n}:{}});Pe(e=>nP(e.map(e=>e.id===i.id?i:e)))}(0,d.useEffect)(()=>{function e(e){let t=e.target?.matches(`input, textarea, select, [contenteditable='true']`);if(e.key.toLowerCase()===`z`&&(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!t&&!Mt){e.preventDefault(),gi();return}t||Wt||sn||(e.key.toLowerCase()===`c`&&!e.metaKey&&!e.ctrlKey&&z&&!Or&&(e.preventDefault(),Nt({status:`todo`})),e.key===`/`&&!Br&&z&&(at===`issues`||at===`list`||at===`gantt`)&&(e.preventDefault(),document.getElementById(`task-search`)?.focus()),e.key===`Escape`&&Br&&ui())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[at,Wt,Br,Mt,Or,sn,z]);let vi=(0,d.useMemo)(()=>Ne.filter(e=>fN(e,U,c)&&pN(e,rt)),[rt,c,U,Ne]),yi=(0,d.useMemo)(()=>Fe.filter(e=>fN(e,U,c)&&pN(e,rt)),[Fe,rt,c,U]),bi=dN(rt),xi=!!U.trim()||bi>0,Si=(0,d.useMemo)(()=>[...new Set(Ne.filter(e=>e.status===`in_progress`&&e.threadId).map(e=>_N(e.threadId)).filter(Boolean))].sort(),[Ne]);(0,d.useEffect)(()=>{if(Si.length===0){he({});return}let e=!1,t=async()=>{try{let t=await k(Si);e||he(e=>JSON.stringify(e)===JSON.stringify(t)?e:t)}catch{}};t();let n=window.setInterval(t,2e3);return()=>{e=!0,window.clearInterval(n)}},[Si.join(`,`)]);let Ci=(0,d.useMemo)(()=>Object.fromEntries(tc.map(e=>[e,vi.filter(t=>t.status===e)])),[vi]),wi=Ar.mainStatuses.filter(e=>e!==`blocked`||!Ue||Ne.some(e=>e.status===`blocked`)),Ti=Math.max(wi.length,1),Ei=Ti*300+(Ti-1)*24,Di=Ti*400+(Ti-1)*24,Oi=Ti+1,ki=`clamp(300px, calc(${100/Oi}% - ${(36+Ti*24)/Oi}px), 400px)`,Ai=Ar.sidebarStatuses,ji=Ai.join(`,`),Mi=Ai.length>0;(0,d.useEffect)(()=>{if(!Mi){yt(!1);return}Ai.includes(wt)||Tt(Ai[0])},[ji,Mi,wt]);let Ni=(0,d.useMemo)(()=>yN(ne),[ne]),Pi=(0,d.useMemo)(()=>Object.fromEntries(Ne.map(e=>{let t=BN(ni,e),n=se[t]??SM.getItem(t),r=(e.status===`in_review`||e.status===`blocked`)&&n!==e.activityKey,i=o?.threadRunning?o.threadId??null:null,a=_N(e.threadId);return[e.id,xN(e,Ni.get(e.id)??[],r,i,o?.threadTodoProgress??null,a?le[a]??null:void 0)]})),[Ni,le,o?.threadId,o?.threadRunning,o?.threadTodoProgress,ni,se,Ne]);function Fi(e){ei(),_t(!1),ot(e),z&&SM.setItem(`${PN}${z}`,e)}function Ii(e){st(t=>{let n={...t,[z]:e};return SM.setItem(`${cM}${z}`,JSON.stringify(e)),n})}function Li(){st(e=>{let t={...e};return delete t[z],SM.removeItem(`${cM}${z}`),t})}async function Ri(e,t,n,r){if(!z||!Mt)return;let i=Zr??z;V(null);let a=await ye(i,e);Ae(e=>e.map(e=>e.id===i?{...e,issueCount:e.issueCount+1}:e));let o=!1;if(t.length>0||n.length>0){let[r,i]=await Promise.all([Promise.allSettled(t.map(e=>Me(a.id,e.file,`attachment`))),Promise.allSettled(n.map(e=>Me(a.id,e.file,`inline`)))]),s=r.flatMap(e=>e.status===`fulfilled`?[e.value]:[]),c=i.flatMap(e=>e.status===`fulfilled`?[e.value]:[]);if(s.length!==t.length||c.length!==n.length)o=!0;else if(t.length>0||n.length>0)try{let r=Re(e.description,[...n,...t],[...c,...s]);a=await be(a,{...e,description:r})}catch{o=!0}}let s=new Map,c=[],l=null,d=[],f=!1;if(r){let{parentId:e,relatedIds:t,subIssueIds:n}=r.relations;try{if(e){let t=await Te(a,`parent`,e);a=t.task,l=e,s.set(t.relatedTask.id,t.relatedTask)}for(let e of t){let t=await Te(a,`related`,e);a=t.task,d.push(e),s.set(t.relatedTask.id,t.relatedTask)}for(let e of n){let t=s.get(e)??tr.current.find(t=>t.id===e),n=t.relations.parent?.id??null,r=await Te(t,`parent`,a.id);c.push({task:r.task,previousParentId:n}),s.set(r.task.id,r.task),a=r.relatedTask}}catch{f=!0}}s.set(a.id,a),Pe(e=>nP([...e.filter(e=>!s.has(e.id)),...s.values()])),Ft(null);let p=[...f?[{zh:`关系`,en:`relations`}]:[],...o?[{zh:`正文或媒体`,en:`description or media`}]:[]];(!r?.keepOpen||p.length>0)&&Nt(null),p.length>0&&V(u(`${a.identifier} 已创建,但以下内容写入失败:${p.map(e=>e.zh).join(`、`)}。`,`${a.identifier} was created, but these follow-up writes failed: ${p.map(e=>e.en).join(`, `)}.`)),hi(null,async()=>{let e=new Map,t=tr.current.find(e=>e.id===a.id),n=t&&t.version>=a.version?t:a;if(l){let t=await Ee(n,`parent`,l);n=t.task,e.set(t.relatedTask.id,t.relatedTask)}for(let t of[...d].reverse()){let r=await Ee(n,`related`,t);n=r.task,e.set(r.relatedTask.id,r.relatedTask)}for(let t of[...c].reverse()){let r=tr.current.find(e=>e.id===t.task.id),i=await Ee(r&&r.version>=t.task.version?r:t.task,`parent`,a.id);if(e.set(i.task.id,i.task),n=i.relatedTask,t.previousParentId){let n=await Te(i.task,`parent`,t.previousParentId);e.set(n.task.id,n.task),e.set(n.relatedTask.id,n.relatedTask)}}await Se(n),Pe(t=>nP([...t.filter(t=>t.id!==a.id&&!e.has(t.id)),...[...e.values()].filter(e=>e.id!==a.id)]))})}async function zi(e,t,n=null,r=!1){if(Qt){Zt(null),qt(null),Yt(0);return}let i=Ne.filter(n=>n.projectId===e.projectId&&n.status===t&&n.id!==e.id),a=e.status!==t&&!r?0:n?i.findIndex(e=>e.id===n):i.length,o=a<0?i.length:a,s=[...i];s.splice(o,0,e);let c=Ne.filter(n=>n.projectId===e.projectId&&n.status===t);if(e.status===t&&c.length===s.length&&c.every((e,t)=>e.id===s[t].id)){Zt(null),qt(null),Yt(0);return}let l=i[o-1]??null,u=i[o]??null,d=l&&u?(l.sortOrder+u.sortOrder)/2:l?l.sortOrder+1024:u?u.sortOrder-1024:1024,f=e;V(null),$t(e.id),Pe(n=>nP(n.map(n=>n.id===e.id?{...n,status:t,sortOrder:d}:n)));try{let n=await xe(e,t,d);Pe(e=>nP(e.map(e=>e.id===n.id?n:e))),hi(null,async()=>{let e=tr.current.find(e=>e.id===n.id),t=await xe(e&&e.version>=n.version?e:n,f.status,f.sortOrder);Pe(e=>nP(e.map(e=>e.id===t.id?t:e)))})}catch(e){Pe(e=>nP(e.map(e=>e.id===f.id?f:e))),V(e instanceof v&&e.code===`VERSION_CONFLICT`?hr.current(`该议题已在其他位置更新,看板已重新同步。`,`This issue changed elsewhere. The board has been synced.`):gr(e)),dr&&pi(dr,{quiet:!0})}finally{$t(null),Zt(null),qt(null),Yt(0)}}function Bi(e,t){qt(e.id),Yt(t),Zt(e.status)}function Vi(){qt(null),Yt(0),Zt(null)}function Hi(e,t,n=null){let r=Ne.find(e=>e.id===t);qt(null),Yt(0),Zt(null),r&&(tn(r.id),window.setTimeout(()=>{tn(e=>e===r.id?null:e)},220),zi(r,e,n,!0))}async function Ui(e,t){let n=e,{assigneeTarget:r,...i}=t,a=r?Ve(r,Nr):e.assignee,o=r&&!e.participants.some(e=>Be(e)===Be(a))?[...e.participants,a]:e.participants;V(null),Pe(t=>t.map(t=>t.id===e.id?{...t,...i,assignee:a,participants:o}:t));try{let i=await be(e,{...rP(e),...t});Pe(e=>nP(e.map(e=>e.id===i.id?i:e)));let a=He(n.assignee,Nr);return(!r||a)&&hi(null,()=>_i(n,i,a)),i}catch(e){throw Pe(e=>nP(e.map(e=>e.id===n.id?n:e))),V(e instanceof v&&e.code===`VERSION_CONFLICT`?u(`该议题已在其他位置更新,看板已重新同步。`,`This issue changed elsewhere. The board has been synced.`):gr(e)),dr&&pi(dr,{quiet:!0}),e}}async function Wi(e,t=z){V(null);try{let n=await de(t,e);Ae(e=>e.map(e=>e.id===n.id?n:e))}catch(e){throw V(gr(e)),e}}async function Gi(e){V(null);try{let t=await fe(z,e);Ae(e=>e.map(e=>e.id===t.id?t:e)),await pi(dr,{quiet:!0})}catch(e){throw V(gr(e)),e}}async function Ki(e,t,n,r,i){V(null);try{let a=e===`add`?await Te(t,n,r,void 0,i):await Ee(t,n,r,void 0,i);return Pe(e=>nP(e.map(e=>e.id===a.task.id?a.task:e.id===a.relatedTask.id?a.relatedTask:e))),dr&&pi(dr,{quiet:!0}),a}catch(e){throw V(e instanceof v&&e.code===`VERSION_CONFLICT`?u(`该议题已在其他位置更新,看板已重新同步。`,`This issue changed elsewhere. The board has been synced.`):gr(e)),dr&&pi(dr,{quiet:!0}),e}}async function qi(e){V(null);try{let t=await ye(e.projectId,{...rP(e),assigneeTarget:He(e.assignee,Nr),developmentContext:null});Pe(e=>nP([...e,t])),hi(u(`${t.identifier} 副本已创建。`,`${t.identifier} copy was created.`),async()=>{let e=tr.current.find(e=>e.id===t.id);await Se(e&&e.version>=t.version?e:t),Pe(e=>e.filter(e=>e.id!==t.id))})}catch(e){V(gr(e))}}async function Ji(e){V(null);try{let t=await Se(e);Pe(t=>t.filter(t=>t.id!==e.id)),Ie(e=>nP([...e.filter(e=>e.id!==t.id),t])),hi(u(`${e.identifier} 已归档。`,`${e.identifier} was archived.`),async()=>{let e=await Ce(t);Ie(t=>t.filter(t=>t.id!==e.id)),Pe(t=>nP([...t.filter(t=>t.id!==e.id),e]))})}catch(e){V(e instanceof v&&e.code===`VERSION_CONFLICT`?u(`该议题已在其他位置更新,看板已重新同步。`,`This issue changed elsewhere. The board has been synced.`):gr(e)),dr&&pi(dr,{quiet:!0})}}async function Yi(e){V(null),Dt(e.id);try{let t=await Ce(e);Ie(e=>e.filter(e=>e.id!==t.id)),Pe(e=>nP([...e.filter(e=>e.id!==t.id),t])),Sr(u(`${t.identifier} 已恢复。`,`${t.identifier} was restored.`))}catch(e){V(e instanceof v&&e.code===`VERSION_CONFLICT`?u(`该议题已在其他位置更新,看板已重新同步。`,`This issue changed elsewhere. The board has been synced.`):gr(e)),dr&&pi(dr,{quiet:!0})}finally{Dt(null)}}async function Xi(){if(!Ot||At)return;let e=Ot;V(null),jt(e.id);try{await we(e),Ie(t=>t.filter(t=>t.id!==e.id)),kt(null),Sr(u(`${e.identifier} 已永久删除。`,`${e.identifier} was permanently deleted.`))}catch(e){V(e instanceof v&&e.code===`VERSION_CONFLICT`?u(`该议题已在其他位置更新,看板已重新同步。`,`This issue changed elsewhere. The board has been synced.`):gr(e)),dr&&pi(dr,{quiet:!0})}finally{jt(null)}}async function Zi(e,t){try{await navigator.clipboard.writeText(e),Sr(t)}catch{V(u(`无法写入剪贴板。`,`Could not write to the clipboard.`))}}function Qi(e){if(e===AN)return null;let t=ke.find(t=>t.id===e),n=Fn[e];if(n?.codexProjectKind===`remote`){let e=o?.projects?.find(e=>e.id===n.codexProjectId);return e?.projectKind===`remote`&&e.hostId===n.codexHostId&&e.workspacePath===n.workspacePath?n:null}let r=o?.projects?.find(t=>t.id===e),i=Nn[e]??t?.workspacePath??r?.workspacePath,a=r??o?.projects?.find(e=>e.workspacePath===i);return a?{codexProjectId:a.id,codexProjectKind:a.projectKind??`local`,codexHostId:a.hostId??`local`,workspacePath:i??a.workspacePath}:null}function $i(e){let t=e.codexProjectKind===`remote`?o?.projects?.find(t=>t.id===e.codexProjectId&&t.projectKind===`remote`&&t.hostId===e.codexHostId&&t.workspacePath===e.workspacePath):null;if(e.codexProjectKind===`remote`&&!t){V(u(`该对话绑定的 SSH 远程项目或主机当前不可用。`,`The SSH remote project or host bound to this conversation is not available.`));return}if(n&&window.parent!==window){PM({type:`taskboard:open-thread`,payload:e});return}if(e.codexProjectKind===`remote`){V(u(`请在 Codex App 中打开该 SSH 远程对话。`,`Open this SSH remote conversation in the Codex app.`));return}window.location.assign(`codex://threads/${encodeURIComponent(e.threadId.trim())}`)}function ea(e){if(n&&window.parent!==window){PM({type:`taskboard:open-thread`,payload:{threadId:e,legacyLocal:!0}});return}window.location.assign(`codex://threads/${encodeURIComponent(e.trim())}`)}function ta(e){if(e.kind===`local-ai`&&e.aiThreadId){R.current+=1,L({threadId:e.aiThreadId,requestId:R.current});return}e.threadBinding?$i(e.threadBinding):e.legacyLocalThreadId&&ea(e.legacyLocalThreadId)}function na(){!n||window.parent===window||PM({type:`taskboard:expand-sidebar`})}function ra(e,t){if(e.developmentContext?.type===`worktree`){let n=e.developmentContext.path,r=(o?.projects??[]).filter(e=>e.projectKind===`remote`&&e.hostId===t.codexHostId&&e.workspacePath===n);return r.length===1?{codexProjectId:r[0].id,codexProjectKind:`remote`,codexHostId:r[0].hostId,workspacePath:r[0].workspacePath}:null}return o?.projects?.find(e=>e.id===t.codexProjectId&&e.projectKind===`remote`&&e.hostId===t.codexHostId&&e.workspacePath===t.workspacePath)?t:null}async function ia(e){let t=!n||window.parent===window,r=e.projectId===AN,i=ke.find(t=>t.id===e.projectId),a=(Fn[e.projectId]?.codexProjectKind===`remote`?Fn[e.projectId]:null)??Qi(e.projectId);if(Fn[e.projectId]?.codexProjectKind===`remote`&&!a){V(u(`已保存的 SSH 远程项目或主机当前不可用。`,`The saved SSH remote project or host is not available.`));return}if(!t&&a?.codexProjectKind===`remote`){let t=ra(e,a);if(!t){V(e.developmentContext?.type===`worktree`?u(`目标 SSH worktree 未在保存的主机中添加或映射。`,`The target SSH worktree is not added or mapped on the saved host.`):u(`已保存的 SSH 远程项目或主机当前不可用。`,`The saved SSH remote project or host is not available.`));return}a=t}let s=r?void 0:e.developmentContext?.type===`worktree`?e.developmentContext.path:a?.workspacePath??Nn[e.projectId]??i?.workspacePath,c=u(`[$manage-taskboard](${E}) 议题 ID:${e.identifier}`,`[$manage-taskboard](${E}) Issue ID: ${e.identifier}`);if(!r&&e.developmentContext?.type===`worktree`&&a?.codexProjectKind!==`remote`){let n=e.developmentContext.path,r=a?.workspacePath??Nn[e.projectId]??i?.workspacePath;if(t)m.contexts.some(e=>e.type===`worktree`&&e.path===n)||(s=m.workspacePath??r);else try{let t=await me(e.projectId,a?.codexProjectId,o?.threadId??void 0,void 0,r);t.contexts.some(e=>e.type===`worktree`&&e.path===n)||(s=t.workspacePath??r)}catch(e){V(gr(e));return}}if(a?.codexProjectKind===`remote`&&!a.workspacePath){V(u(`SSH 远程项目缺少精确工作目录映射。`,`The SSH remote project is missing its exact workspace mapping.`));return}if(!an){if(t){if(a?.codexProjectKind===`remote`){V(u(`请在 Codex App 中打开该 SSH 远程项目的新对话。`,`Open the new SSH remote project conversation in the Codex app.`));return}let e=new URL(`codex://threads/new`);s&&e.searchParams.set(`path`,s),e.searchParams.set(`prompt`,c),window.location.assign(e.toString());return}on(e.id),V(null),PM({type:`taskboard:create-thread`,payload:{taskId:e.id,identifier:e.identifier,title:e.title,instruction:c,projectless:r,codexProjectId:a?.codexProjectId,codexProjectKind:a?.codexProjectKind??`local`,codexHostId:a?.codexHostId??`local`,codexProjectWorkspacePath:a?.workspacePath,workspacePath:s}})}}function aa(e){ei(),fn(null),cn(!1),lr.current=null,Lt(null),ot(e===jN?`issues`:VN(e)),e!==jN&&Tr(e),je(e),nt(``),it(oN),V(null),rr.current=[],Qn(null);let t=ou(window.location.href,e,null);window.history.replaceState(null,``,t)}async function oa(e){if(!nn){rn(e.id),V(null);try{let t=ke.find(t=>t.id===e.id)??null;if(!t)try{t=await ue({id:e.id,name:e.name,workspacePath:null}),Ae(e=>[...e,t])}catch(n){if(!(n instanceof v)||n.code!==`PROJECT_EXISTS`)throw n;let r=await S();if(Ae(r),t=r.find(t=>t.id===e.id)??null,!t)throw n}e.codexIdentity&&(In(n=>{let r={...n,[t.id]:e.codexIdentity};return SM.setItem(IN,JSON.stringify(r)),r}),wr(t.id,e.codexIdentity.workspacePath)),aa(t.id)}catch(e){V(gr(e))}finally{rn(null)}}}function sa(){cn(!1),fn(null),En(null),vn(!0)}async function ca(e){if(!xn){Sn(!0),En(null);try{let t=await w(e),n=await S();bn(t),Ae(n),vn(!1),aa(t.projectId),await pi(t.projectId),Sr(u(`已同步 ${t.displayName??t.username} 的 Jira 任务`,`Synced Jira issues for ${t.displayName??t.username}`))}catch(e){En(gr(e))}finally{Sn(!1)}}}async function la(){if(!(Cn||!z)){wn(!0),V(null);try{let e=await T();bn(e),await Promise.all([pi(dr,{quiet:!0}),fi()]),Sr(u(`Jira 任务已同步`,`Jira issues synced`))}catch(e){V(gr(e))}finally{wn(!1)}}}function ua(){cn(!1),fn(null),gn(``),V(null),mn(!0)}function da(){nn||(mn(!1),V(null))}async function fa(){if(nn)return;let e=hn.trim();if(!e)return;let t=`temp-${window.crypto.randomUUID()}`;rn(t),V(null);try{let n=await ue({id:t,name:e,workspacePath:null});Ae(e=>[...e,n]),mn(!1),aa(n.id)}catch(e){V(gr(e))}finally{rn(null)}}function pa(e){cn(!1),fn(null),An(null),On(e)}function ma(){jn||(On(null),An(null))}async function ha(){if(!Dn||jn)return;let e=Dn;Mn(e.id),V(null);try{await pe(e.id),Ae(t=>t.filter(t=>t.id!==e.id)),De(t=>{let n=t.filter(t=>t!==e.id);return SM.setItem(NN,JSON.stringify(n)),n}),In(t=>{let n={...t};return delete n[e.id],SM.setItem(IN,JSON.stringify(n)),n}),On(null),An(null),z===e.id&&aa(AN),Sr(u(`已删除项目“${e.name}”`,`Deleted project “${e.name}”`))}catch(e){if(e instanceof v&&e.code===`PROJECT_NOT_EMPTY`){let t=e.details;An(t.issueCount)}else On(null),V(gr(e))}finally{Mn(null)}}let ga=Dr?u(`所有项目`,`All projects`):K?.id===AN?u(`临时任务`,`Temporary tasks`):K?.name??u(`任务面板`,`Taskboard`),_a=n?{"--codex-titlebar-left-inset":`${o?.titlebarLeftInset??0}px`}:void 0;return(0,B.jsx)($e,{language:c,children:(0,B.jsxs)(`div`,{className:`app-shell${n?` embedded`:``}`,style:_a,children:[j&&j.mode!==`cloud`&&(0,B.jsx)(iP,{selectedProjectId:dr,detailTaskId:Br,refreshProjectList:fi,refreshTasks:pi,refreshProjectBoardDisplaySettings:G,setConnection:tt,setCommentsRevision:zt,setAttachmentsRevision:Vt,setReadmeRevision:Ut}),(0,B.jsxs)(`main`,{className:`workspace`,children:[(0,B.jsxs)(`header`,{className:`workspace-header`,children:[(0,B.jsx)(`div`,{className:`workspace-title`,children:(0,B.jsxs)(`div`,{className:`workspace-kicker`,children:[zr&&(0,B.jsx)(`button`,{className:`detail-back-button`,type:`button`,"aria-label":u(`返回议题看板`,`Back to issue board`),title:u(`返回议题看板 (Esc)`,`Back to issue board (Esc)`),onClick:ui,children:(0,B.jsx)(J,{name:`chevronLeft`})}),n&&o?.sidebarCollapsed&&(0,B.jsx)(`button`,{className:`detail-back-button codex-sidebar-expand-button`,type:`button`,"aria-label":u(`展开 Codex 侧边栏`,`Expand Codex sidebar`),title:u(`展开侧边栏`,`Expand sidebar`),onClick:na,children:(0,B.jsx)(J,{name:`codexSidebarExpand`})}),(0,B.jsxs)(`div`,{className:`header-project-switcher`,"data-project-switcher":!0,children:[(0,B.jsxs)(`button`,{className:`header-project-button`,type:`button`,"aria-label":u(`切换项目`,`Switch project`),"aria-haspopup":`menu`,"aria-expanded":sn,onClick:()=>{fn(null),un(``),cn(e=>!e)},children:[(0,B.jsx)(`span`,{className:`project-name`,children:ga}),(0,B.jsx)(eM,{className:`project-switcher-chevron`,name:`dropdown`})]}),sn&&(0,B.jsxs)(`div`,{className:`header-project-menu`,role:`menu`,"aria-label":u(`项目`,`Projects`),children:[(0,B.jsx)(`span`,{children:u(`切换项目`,`Switch project`)}),(0,B.jsxs)(`div`,{className:`project-menu-search`,children:[(0,B.jsx)(`label`,{className:`sr-only`,htmlFor:`project-menu-search-input`,children:u(`按名称筛选项目`,`Filter projects by name`)}),(0,B.jsx)(eM,{name:`search`}),(0,B.jsx)(`input`,{id:`project-menu-search-input`,autoFocus:!0,type:`search`,value:ln,onChange:e=>un(e.target.value),placeholder:u(`筛选项目…`,`Filter projects…`)}),ln&&(0,B.jsx)(`button`,{className:`search-clear`,type:`button`,"aria-label":u(`清除项目筛选`,`Clear project filter`),onClick:()=>un(``),children:(0,B.jsx)(J,{name:`close`})})]}),(0,B.jsxs)(`div`,{className:`project-menu-list`,children:[!qr&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":Dr,disabled:nn!==null,onClick:()=>{Dr?cn(!1):aa(jN)},children:[(0,B.jsx)(eM,{className:`project-avatar`,name:`projectFolder`}),(0,B.jsx)(`span`,{children:u(`所有项目`,`All projects`)}),Dr&&(0,B.jsx)(`span`,{className:`project-menu-check`,"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`check`})})]}),(0,B.jsx)(`div`,{className:`project-menu-divider`,role:`separator`})]}),Jr.map(e=>(0,B.jsxs)(d.Fragment,{children:[Xr&&e.id===Yr&&(0,B.jsx)(`div`,{className:`project-menu-divider`,role:`separator`}),(0,B.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e.id===z,disabled:nn!==null,onContextMenu:e.id.startsWith(`temp-`)?t=>{t.preventDefault(),fn({project:e,x:t.clientX,y:t.clientY})}:void 0,onClick:()=>{e.id===z?cn(!1):oa(e)},children:[(0,B.jsx)(eM,{className:`project-avatar`,name:`projectFolder`}),(0,B.jsx)(`span`,{children:e.name}),e.id===z&&(0,B.jsx)(`span`,{className:`project-menu-check`,"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`check`})})]})]},e.id)),qr&&Jr.length===0&&(0,B.jsx)(`div`,{className:`project-menu-empty`,children:u(`没有匹配项目`,`No matching projects`)})]}),(0,B.jsxs)(`div`,{className:`project-menu-actions`,children:[(0,B.jsx)(`div`,{className:`project-menu-divider`,role:`separator`}),(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:nn!==null,onClick:sa,children:[(0,B.jsx)(Wc,{className:`project-avatar`,color:`currentColor`,size:16}),(0,B.jsx)(`span`,{children:yn?.configured?u(`Jira 设置`,`Jira settings`):u(`连接 Jira`,`Connect Jira`)})]}),(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:nn!==null,onClick:ua,children:[(0,B.jsx)(Rc,{className:`project-avatar`,color:`currentColor`,size:16}),(0,B.jsx)(`span`,{children:u(`创建项目`,`Create project`)})]})]})]})]})]})}),(0,B.jsx)(`div`,{ref:ar,className:`workspace-drag-region`,"aria-hidden":`true`}),(0,B.jsxs)(`div`,{className:`header-actions`,children:[K&&(0,B.jsx)(rM,{automation:Fr,models:jr,pending:zn||Gn,error:qn??Vn,unavailableReason:Ir.unavailableReason,onOpen:()=>void si(),onChange:e=>void ci(e)}),Or&&(0,B.jsx)(`button`,{className:`icon-button`,type:`button`,disabled:Cn,onClick:()=>void la(),"aria-label":u(`同步 Jira`,`Sync Jira`),title:u(`同步 Jira`,`Sync Jira`),children:(0,B.jsx)(Jc,{color:`currentColor`})}),z&&!Or&&(0,B.jsx)(`button`,{className:`icon-button header-create-button`,type:`button`,onClick:()=>Nt({status:`todo`}),"aria-label":u(`新建议题`,`Create issue`),title:u(`新建议题 (C)`,`Create issue (C)`),children:(0,B.jsx)(Rc,{color:`currentColor`,size:14})})]})]}),z&&!zr&&(0,B.jsxs)(`div`,{className:`board-toolbar`,children:[(0,B.jsxs)(`div`,{className:`view-tabs`,"aria-label":u(`看板视图`,`Board views`),children:[(0,B.jsx)(`button`,{className:`view-tab${at===`dashboard`?` active`:``}`,type:`button`,"aria-pressed":at===`dashboard`,onClick:()=>Fi(`dashboard`),children:u(`仪表盘`,`Dashboard`)}),(0,B.jsx)(`button`,{className:`view-tab${at===`issues`?` active`:``}`,type:`button`,"aria-pressed":at===`issues`,onClick:()=>Fi(`issues`),children:u(`议题看板`,`Issue board`)}),(0,B.jsx)(`button`,{className:`view-tab${at===`list`?` active`:``}`,type:`button`,"aria-pressed":at===`list`,onClick:()=>Fi(`list`),children:u(`列表视图`,`List`)}),(0,B.jsx)(`button`,{className:`view-tab${at===`gantt`?` active`:``}`,type:`button`,"aria-pressed":at===`gantt`,onClick:()=>Fi(`gantt`),children:u(`甘特图`,`Gantt`)}),!Dr&&(0,B.jsx)(`button`,{className:`view-tab${at===`readme`?` active`:``}`,type:`button`,"aria-pressed":at===`readme`,onClick:()=>Fi(`readme`),children:u(`项目文档`,`Project Docs`)})]}),(at===`issues`||at===`list`||at===`gantt`)&&(0,B.jsxs)(`div`,{className:`toolbar-tools`,children:[(0,B.jsxs)(`div`,{className:`search-field${U?` has-value`:``}`,title:u(`搜索议题 (/)`,`Search issues (/)`),children:[(0,B.jsx)(eM,{className:`search-icon`,name:`search`}),(0,B.jsx)(`input`,{id:`task-search`,type:`search`,"aria-label":u(`搜索议题`,`Search issues`),value:U,onChange:e=>nt(e.target.value),placeholder:u(`搜索议题…`,`Search issues…`)}),!U&&(0,B.jsx)(`kbd`,{children:`/`}),U&&(0,B.jsx)(`button`,{className:`search-clear`,type:`button`,"aria-label":u(`清除搜索`,`Clear search`),onClick:()=>{nt(``),document.getElementById(`task-search`)?.focus()},children:(0,B.jsx)(J,{name:`close`})})]}),at===`gantt`&&(0,B.jsxs)(`div`,{className:`gantt-toolbar-controls`,children:[(0,B.jsxs)(`label`,{className:`gantt-hide-completed`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:ft,onChange:e=>pt(e.target.checked)}),(0,B.jsx)(`i`,{children:(0,B.jsx)(J,{name:`check`})}),(0,B.jsx)(`span`,{children:u(`隐藏已完成`,`Hide completed`)})]}),(0,B.jsx)(`button`,{type:`button`,className:`gantt-today-button`,onClick:()=>ht(e=>e+1),children:u(`今天`,`Today`)}),(0,B.jsxs)(`div`,{className:`gantt-view-menu-wrap`,children:[(0,B.jsx)(`button`,{type:`button`,className:`gantt-view-menu-trigger`,"aria-label":u(`时间轴视图选项`,`Timeline view options`),"aria-expanded":gt,onClick:()=>_t(e=>!e),children:(0,B.jsx)(Lc,{color:`currentColor`})}),gt&&(0,B.jsx)(`div`,{className:`gantt-view-menu`,role:`menu`,children:EN.map(e=>(0,B.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":ut===e,className:ut===e?`active`:``,onClick:()=>{dt(e),_t(!1)},children:[(0,B.jsx)(`span`,{children:c===`zh`?{day:`日视图`,week:`周视图`,month:`月视图`}[e]:{day:`Day`,week:`Week`,month:`Month`}[e]}),ut===e&&(0,B.jsx)(J,{name:`check`})]},e))})]})]}),(0,B.jsx)(gN,{tasks:Ne,search:U,labels:Ur,filters:rt,onChange:it}),at===`issues`&&(Dr||K)&&(0,B.jsx)(kl,{settings:Ar,onChange:Ii,onReset:Li}),at===`issues`&&Mi&&(0,B.jsx)(`button`,{className:`other-tasks-trigger${vt?` is-open`:``}`,type:`button`,"aria-controls":`other-tasks-panel`,"aria-expanded":vt,"aria-label":vt?u(`关闭其他任务`,`Close other issues`):u(`打开其他任务`,`Open other issues`),title:u(`其他任务`,`Other issues`),onClick:()=>yt(e=>!e),children:(0,B.jsx)(eM,{name:`panel`})})]})]}),(Ye||H)&&(0,B.jsxs)(`div`,{className:`error-banner`,role:`alert`,children:[(0,B.jsx)(`span`,{className:`error-mark`,"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`alert`})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:u(`任务面板需要处理`,`Taskboard needs attention`)}),(0,B.jsx)(`p`,{children:H??Ye?.message})]}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>{V(null),Ye?.source===`projects`?Ye.operation===`initial`?di():fi():dr?pi(dr):di()},children:u(`重试`,`Try again`)})]}),zr&&K?(0,B.jsx)(ZM,{task:zr,tasks:Ne.filter(e=>e.projectId===zr.projectId),referenceTasks:Rr.filter(e=>e.projectId===zr.projectId),currentUser:Nr,availableLabels:Ur,developmentScan:m,developmentScanLoading:y,commentsRevision:Rt,attachmentsRevision:Bt,onCreateLabel:Wi,onDeleteLabel:Gi,onUpdate:(e,t)=>Ui(e,t),onOpenTask:li,onAddRelation:(e,t,n,r)=>Ki(`add`,e,t,n,r),onRemoveRelation:(e,t,n,r)=>Ki(`remove`,e,t,n,r),onOpenThread:$i,onOpenLegacyLocalThread:ea,onOpenInThread:ia,onCopy:(e,t)=>void Zi(e,t),openingThread:an===zr.id,onError:V},zr.id):at!==`readme`&&Ue&&Ne.length===0&&K&&F===K.id?(0,B.jsxs)(`div`,{className:`page-empty`,children:[(0,B.jsx)(`h2`,{children:u(`当前项目还没有任务`,`This project has no issues yet`)}),(0,B.jsx)(`p`,{children:u(`让 Codex 检查当前项目目录对应的对话,并整理任务状态。`,`Ask Codex to inspect conversations for this project directory and organize their task status.`)}),(0,B.jsxs)(`div`,{className:`page-empty-actions`,children:[(0,B.jsx)(`button`,{className:`button primary`,type:`button`,onClick:()=>{R.current+=1,L({projectId:K.id,issueId:null,composerText:u(`只检查当前项目目录对应的 Codex 对话。请将其中已完成、处理中和待执行的任务整理并导入当前项目的 Taskboard。`,`Only inspect Codex conversations associated with this project directory. Organize completed, in-progress, and pending tasks, then import them into this project's Taskboard.`),requestId:R.current})},children:u(`导入当前项目任务状态`,`Import current project task status`)}),(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,onClick:()=>Nt({status:`todo`}),children:u(`添加议题`,`Add issue`)})]})]}):at===`readme`&&K?(0,B.jsx)(Vj,{project:K,tasks:Ne.filter(e=>e.projectId===K.id),referenceTasks:Rr.filter(e=>e.projectId===K.id),revision:Ht,onOpenTask:li,onError:V},z):at===`dashboard`&&(K||Dr)?(0,B.jsx)(Gl,{projectId:z,projectCreatedAt:K?.createdAt??null,isAllProjects:Dr,tasks:Ne,presentations:Pi,currentUser:Nr,animateSummary:ct!==z,onSummaryAnimationStart:Cr,onOpenTask:li,onOpenConversation:ta},z):at===`list`?(0,B.jsx)(Gj,{scrollRef:or,tasks:vi,presentations:Pi,currentUser:Nr,hasActiveFilters:xi,onOpenTask:li,onOpenConversation:ta,onUpdate:Ui}):at===`gantt`?(0,B.jsx)(d.Suspense,{fallback:(0,B.jsx)(`div`,{className:`board-view-loading`,children:u(`正在打开甘特图…`,`Opening Gantt…`)}),children:(0,B.jsx)(ON,{tasks:vi,presentations:Pi,hasActiveFilters:xi,zoom:ut,hideCompleted:ft,todayRequest:mt,onOpenTask:li,onUpdate:Ui})}):(0,B.jsx)(`div`,{className:`issue-board-layout${Mi&&St?` has-other-tasks`:``}`,"data-main-columns":wi.length,style:{"--main-column-count":Ti,"--main-board-min-width":`${Ei}px`,"--main-board-max-width":`${Di}px`,"--other-tasks-width":ki},children:Le&&!Ue?(0,B.jsx)(`div`,{className:`loading-board`,"aria-label":u(`正在加载议题`,`Loading issues`),"aria-busy":`true`,children:wi.map(e=>(0,B.jsxs)(`div`,{className:`loading-column`,children:[(0,B.jsx)(`span`,{}),(0,B.jsx)(`div`,{}),(0,B.jsx)(`div`,{})]},e))}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{ref:sr,className:`board-scroll`,"aria-label":u(`议题看板`,`Issue board`),children:(0,B.jsx)(`div`,{className:`board`,children:wi.map(e=>e===`archived`?(0,B.jsx)(Yj,{tasks:yi,hasActiveFilters:xi,restoringTaskId:Et,deletingTaskId:At,onRestore:e=>void Yi(e),onDelete:kt},e):(0,B.jsx)(Tl,{scrollRef:t=>{cr.current[e]=t},status:e,tasks:Ci[e],presentations:Pi,emptyMessage:xi?u(`当前筛选下无匹配议题`,`No issues match the current filters`):u(`暂无议题`,`No issues`),isDropTarget:Xt===e,draggedTaskId:Kt,draggedTaskHeight:Jt,movingTaskId:Qt,settlingTaskId:en,contextMenuTaskId:Wt?.taskId??null,availableLabels:Ur,projectNames:Dr?Wr:void 0,currentUser:Nr,showCover:Ar.cover,showBody:Ar.body,createEnabled:!Or,onCreateLabel:Wi,onCreate:e=>Nt({status:e}),onEdit:li,onUpdate:Ui,onComplete:e=>zi(e,`done`),onContextMenu:ti,onDragStart:Bi,onDragEnd:Vi,onDragEnter:Zt,onDrop:Hi,onOpenConversation:ta},e))})}),Mi&&bt&&(0,B.jsx)(Xj,{open:St,activeTab:wt,tabs:Ai,tasksByStatus:Ci,archivedTasks:yi,presentations:Pi,hasActiveFilters:xi,isDropTarget:wt!==`archived`&&Xt===wt,draggedTaskId:Kt,draggedTaskHeight:Jt,movingTaskId:Qt,settlingTaskId:en,contextMenuTaskId:Wt?.taskId??null,availableLabels:Ur,projectNames:Dr?Wr:void 0,currentUser:Nr,showCover:Ar.cover,showBody:Ar.body,onCreateLabel:Wi,restoringTaskId:Et,deletingTaskId:At,onTabChange:Tt,onCreate:Or?void 0:e=>Nt({status:e}),onRestore:e=>void Yi(e),onDelete:kt,onEdit:li,onUpdate:Ui,onContextMenu:ti,onDragStart:Bi,onDragEnd:Vi,onDragEnter:Zt,onDrop:Hi,onOpenConversation:ta})]})})]}),dn&&(0,B.jsx)(`div`,{className:`task-context-menu project-context-menu`,"data-project-context-menu":!0,role:`menu`,"aria-label":u(`项目“${dn.project.name}”`,`Project “${dn.project.name}”`),style:{left:dn.x,top:dn.y},children:(0,B.jsxs)(`button`,{className:`context-menu-item is-danger`,type:`button`,role:`menuitem`,onClick:()=>pa(dn.project),children:[(0,B.jsx)(`span`,{className:`context-menu-icon`,"aria-hidden":`true`,children:(0,B.jsx)(zc,{color:`currentColor`})}),(0,B.jsx)(`span`,{className:`context-menu-label`,children:u(`删除项目`,`Delete project`)})]})}),_n&&(0,B.jsx)(Kj,{connection:yn,saving:xn,error:Tn,onClose:()=>{xn||vn(!1)},onSave:ca}),pn&&(0,B.jsx)(`div`,{className:`delete-backdrop`,onPointerDown:e=>{e.target===e.currentTarget&&da()},children:(0,B.jsxs)(`form`,{className:`delete-dialog project-create-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`project-create-title`,onSubmit:e=>{e.preventDefault(),fa()},onKeyDown:e=>{e.key===`Escape`&&da()},children:[(0,B.jsx)(`h2`,{id:`project-create-title`,children:u(`创建项目`,`Create project`)}),(0,B.jsxs)(`label`,{children:[(0,B.jsx)(`span`,{children:u(`项目名称`,`Project name`)}),(0,B.jsx)(`input`,{autoFocus:!0,maxLength:120,required:!0,value:hn,onChange:e=>gn(e.target.value)})]}),H&&(0,B.jsx)(`p`,{className:`project-dialog-error`,children:H}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,disabled:nn!==null,onClick:da,children:u(`取消`,`Cancel`)}),(0,B.jsx)(`button`,{className:`button primary`,type:`submit`,disabled:!hn.trim()||nn!==null,children:nn?u(`创建中…`,`Creating…`):u(`创建`,`Create`)})]})]})}),Dn&&(0,B.jsx)(`div`,{className:`delete-backdrop`,onPointerDown:e=>{e.target===e.currentTarget&&ma()},children:(0,B.jsx)(`div`,{className:`delete-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`project-delete-title`,onKeyDown:e=>{e.key===`Escape`&&ma()},children:kn===null?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`h2`,{id:`project-delete-title`,children:u(`删除项目“${Dn.name}”?`,`Delete project “${Dn.name}”?`)}),(0,B.jsx)(`p`,{children:u(`仅空项目可以删除。删除后无法恢复。`,`Only empty projects can be deleted. This cannot be undone.`)}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,disabled:jn!==null,onClick:ma,children:u(`取消`,`Cancel`)}),(0,B.jsx)(`button`,{className:`button danger`,type:`button`,disabled:jn!==null,onClick:()=>void ha(),children:jn?u(`删除中…`,`Deleting…`):u(`删除项目`,`Delete project`)})]})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`h2`,{id:`project-delete-title`,children:u(`无法删除项目“${Dn.name}”`,`Cannot delete project “${Dn.name}”`)}),(0,B.jsx)(`p`,{children:u(`该项目还有 ${kn} 个议题(包含已归档议题)。请先移动或删除这些议题。`,`This project still has ${kn} issues, including archived issues. Move or delete them first.`)}),(0,B.jsx)(`div`,{children:(0,B.jsx)(`button`,{className:`button primary`,type:`button`,onClick:ma,children:u(`知道了`,`Got it`)})})]})})}),Ot&&(0,B.jsx)(`div`,{className:`delete-backdrop`,onPointerDown:e=>{e.target===e.currentTarget&&!At&&kt(null)},children:(0,B.jsxs)(`div`,{className:`delete-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`archived-task-delete-title`,onKeyDown:e=>{e.key===`Escape`&&!At&&kt(null)},children:[(0,B.jsx)(`h2`,{id:`archived-task-delete-title`,children:u(`永久删除 ${Ot.identifier}?`,`Permanently delete ${Ot.identifier}?`)}),(0,B.jsx)(`p`,{children:u(`“${Ot.title}”及其评论和附件将被永久删除,此操作无法撤销。`,`“${Ot.title}” and its comments and attachments will be permanently deleted. This cannot be undone.`)}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`button`,{className:`button secondary`,type:`button`,disabled:At!==null,onClick:()=>kt(null),children:u(`取消`,`Cancel`)}),(0,B.jsx)(`button`,{className:`button danger`,type:`button`,disabled:At!==null,onClick:()=>void Xi(),children:At?u(`删除中…`,`Deleting…`):u(`永久删除`,`Delete permanently`)})]})]})}),Mt&&(0,B.jsx)(aN,{projectId:Zr,projectOptions:Dr?$r:void 0,onProjectChange:e=>Nt(t=>t&&{...t,projectId:e}),tasks:Ne.filter(e=>e.projectId===Zr),referenceTasks:Rr.filter(e=>e.projectId===Zr),initialStatus:Mt.status,initialDraft:Pt?.projectId===z?Pt.draft:null,labels:ke.find(e=>e.id===Zr)?.labels??[],currentUser:Nr,developmentScan:m,developmentScanLoading:y,onCreateLabel:e=>Wi(e,Zr??z),onCancel:e=>{Ft(e?{projectId:z,targetProjectId:Zr,draft:e}:null),Nt(null)},onSave:Ri},`new-${z}-${Mt.status}`),Wt&&Vr&&(0,B.jsx)(oM,{task:Vr,position:{x:Wt.x,y:Wt.y},labels:Ur,onClose:ei,onEdit:li,onStatusChange:(e,t)=>void zi(e,t),onPriorityChange:(e,t)=>void Ui(e,{priority:t}).catch(()=>{}),onLabelsChange:(e,t)=>void Ui(e,{labels:t}).catch(()=>{}),onDuplicate:e=>void qi(e),onCopy:(e,t)=>void Zi(e,t),openInThreadDisabled:y,onOpenInThread:ia,onArchive:e=>void Ji(e)}),N&&!Dr&&(0,B.jsx)(d.Suspense,{fallback:null,children:(0,B.jsx)(DN,{available:!0,projectId:z||null,issueId:Br,codexProjectIdentity:Er,onThreadsChange:re,openThreadRequest:ie,onOpenThreadRequestHandled:ae})}),(0,B.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:Yn}),Zn&&(0,B.jsxs)(`div`,{className:`toast undo-toast`,role:`status`,onAnimationEnd:()=>Qn(e=>e?.id===Zn.id?null:e),children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`check`})}),(0,B.jsx)(`span`,{className:`undo-toast-message`,children:Zn.message}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>void gi(),children:[u(`撤回`,`Undo`),` `,(0,B.jsx)(`kbd`,{children:r})]})]}),Yn&&(0,B.jsxs)(`div`,{className:`toast`,role:`status`,onAnimationEnd:()=>Xn(``),children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,children:(0,B.jsx)(J,{name:`check`})}),Yn]})]})})}async function oP(){await yM(),(0,f.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(d.StrictMode,{children:(0,B.jsx)(aP,{})}))}oP();export{A,I as B,rc as C,R as D,Ge as E,M as F,i as H,j as I,ie as L,F as M,P as N,N as O,L as P,re as R,Xc as S,H as T,c as V,Yc as _,Zm as a,Qc as b,J as c,zc as d,Kc as f,Bc as g,Rc as h,ch as i,te as j,ne as k,Ic as l,Zc as m,eM as n,tu as o,Nc as p,$j as r,Ql as s,SM as t,Vc as u,Jc as v,Eo as w,Ac as x,Wc as y,ae as z};
|