@juki-team/base-ui 1.5.19 → 1.5.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/esm/{BarChart-BvTDut5Q.js → BarChart-rnKCGMQd.js} +1 -1
  2. package/dist/esm/{CartesianChart-DXJUzdHO.js → CartesianChart-Dvjpj90J.js} +1 -1
  3. package/dist/esm/{ChangePasswordModal-CWpZcVtX.js → ChangePasswordModal-Bh9Sghzd.js} +1 -1
  4. package/dist/esm/{CodeEditor-Y_Y_KGwk.js → CodeEditor-Duw5SfUT.js} +1 -1
  5. package/dist/esm/{CodeViewer-0wZyL6Bq.js → CodeViewer-3L1yBCiq.js} +1 -1
  6. package/dist/esm/{Collapse-B1DPGlnv.js → Collapse--_LykD9C.js} +1 -1
  7. package/dist/esm/{DataViewer-BfSurhEG.js → DataViewer-D1dHtA0t.js} +1 -1
  8. package/dist/esm/{DrawerView-DSBtwsMA.js → DrawerView-CwWfnWLi.js} +1 -1
  9. package/dist/esm/{ExcalidrawButton-yv6E00bG.js → ExcalidrawButton-C_0b7G1W.js} +1 -1
  10. package/dist/esm/{GraphvizViewer-DakATts5.js → GraphvizViewer-BfMacqRe.js} +1 -1
  11. package/dist/esm/{ImageLoaderCropper-C8OKbFOn.js → ImageLoaderCropper-DTUW7gfc.js} +1 -1
  12. package/dist/esm/{InputCellPhoneNumber-BEXEJTBK.js → InputCellPhoneNumber-Clg8uE_f.js} +1 -1
  13. package/dist/esm/{InputColor-CbPh2iDK.js → InputColor-R-WCu1j6.js} +1 -1
  14. package/dist/esm/{LineChart-COzz604R.js → LineChart-Cis4BCPT.js} +1 -1
  15. package/dist/esm/{MdMath-DtFnLyF6.js → MdMath-DLeak1_N.js} +1 -1
  16. package/dist/esm/{MdMathEditor-MfrmiBkf.js → MdMathEditor-BG6rI0DT.js} +1 -1
  17. package/dist/esm/{Popover-rAcowqkt.js → Popover-CpOKnJkx.js} +1 -1
  18. package/dist/esm/{SlideDeck-BNzpTHHg.js → SlideDeck-uAy3WDbv.js} +1 -1
  19. package/dist/esm/{TableOfContents-BReKKYKJ.js → TableOfContents-C6yZSaSD.js} +1 -1
  20. package/dist/esm/{Tooltip-RM4-Vd-G.js → Tooltip-8kM3mqHL.js} +1 -1
  21. package/dist/esm/{UserCodeEditor-BCEc8t_t.js → UserCodeEditor-BhYAs-Az.js} +2 -2
  22. package/dist/esm/{VirtualizedRowsFixed-CJ-W5Lx9.js → VirtualizedRowsFixed-DTqKnPfn.js} +1 -1
  23. package/dist/esm/{WorksheetAsSlides-B11okTdK.js → WorksheetAsSlides-Cf2VDzyg.js} +1 -1
  24. package/dist/esm/{WorksheetBodies-d_OdcX-s.js → WorksheetBodies-CwL6I1LR.js} +1 -1
  25. package/dist/esm/{WorksheetContents-BTVure1H.js → WorksheetContents-AqcyoA6-.js} +1 -1
  26. package/dist/esm/{WorksheetEditor-EvB90uEy.js → WorksheetEditor-BF8EQVw5.js} +1 -1
  27. package/dist/esm/{WorksheetNode-Bi_SPWLG.js → WorksheetNode-vLI23gI5.js} +1 -1
  28. package/dist/esm/{WorksheetViewer-bf0RET7d.js → WorksheetViewer-Dj7ffrAT.js} +1 -1
  29. package/dist/esm/{abnfDiagram-WEYOIA3C-DUulIW8V.js → abnfDiagram-WEYOIA3C-ZoMqWR68.js} +1 -1
  30. package/dist/esm/{arc-DFzzPj4i.js → arc-D1qQo7Rq.js} +1 -1
  31. package/dist/esm/{architectureDiagram-ZHVYKT53-CgOYCH5f.js → architectureDiagram-ZHVYKT53-DyQfRK7X.js} +1 -1
  32. package/dist/esm/{blockDiagram-RJAE7QA3-Dx--ga4x.js → blockDiagram-RJAE7QA3-25yUZ_JH.js} +1 -1
  33. package/dist/esm/{c4Diagram-XDPPPE54-COXzepKB.js → c4Diagram-XDPPPE54-Tds8Ecy5.js} +1 -1
  34. package/dist/esm/channel-DYeSxlgx.js +1 -0
  35. package/dist/esm/{chunk-2E7WHVMD-DVZL7NAY.js → chunk-2E7WHVMD-CrEKxARX.js} +1 -1
  36. package/dist/esm/{chunk-2Q5K7J3B-eykHmSYq.js → chunk-2Q5K7J3B-xxqB63pM.js} +1 -1
  37. package/dist/esm/{chunk-4EMNKR2T-BiH2YqCm.js → chunk-4EMNKR2T-DpATbGaG.js} +1 -1
  38. package/dist/esm/{chunk-55XCU76K-DkZ5SylO.js → chunk-55XCU76K-B8gXqG-k.js} +1 -1
  39. package/dist/esm/{chunk-5VM5RSS4-od-ppdXO.js → chunk-5VM5RSS4-ChaTLA5E.js} +1 -1
  40. package/dist/esm/{chunk-JWPE2WC7-Ban7escN.js → chunk-JWPE2WC7-D8efNL_z.js} +1 -1
  41. package/dist/esm/{chunk-NQOKRVIF-DFUjH0uz.js → chunk-NQOKRVIF-gVbLpTMV.js} +1 -1
  42. package/dist/esm/{chunk-VQ5W62QI-8RFxNRa_.js → chunk-VQ5W62QI-YnIRgGsh.js} +1 -1
  43. package/dist/esm/{chunk-XXDRQBXY-BLNKkmc0.js → chunk-XXDRQBXY-DyBSx2uJ.js} +1 -1
  44. package/dist/esm/{chunk-ZCHMQSOR-BhhsuCkN.js → chunk-ZCHMQSOR-UYQbyi-v.js} +1 -1
  45. package/dist/esm/{classDiagram-v2-4MYWR3UA-CeKl1zzm.js → classDiagram-v2-4MYWR3UA-PaDxy7Bb.js} +1 -1
  46. package/dist/esm/{cose-bilkent-JH36ORCC-DM7-KVzj.js → cose-bilkent-JH36ORCC-BCLUFgmF.js} +1 -1
  47. package/dist/esm/{cynefinDiagram-WF24UDRP-Cbf70uGf.js → cynefinDiagram-WF24UDRP-Dw54Invm.js} +1 -1
  48. package/dist/esm/{dagre-NK4GIZVX-WvANG2YF.js → dagre-NK4GIZVX-DszaMPSv.js} +1 -1
  49. package/dist/esm/{diagram-CBK3MWTC-czBpYiMW.js → diagram-CBK3MWTC-D3i6P0ln.js} +1 -1
  50. package/dist/esm/{diagram-I5XIIV2D-D0K29cS6.js → diagram-I5XIIV2D-DEUcJjIJ.js} +1 -1
  51. package/dist/esm/{diagram-ODIL2UCW-DJOtGvRy.js → diagram-ODIL2UCW-DxLnEJOT.js} +1 -1
  52. package/dist/esm/{diagram-PFBEJUXE-Bb7d4gy5.js → diagram-PFBEJUXE-ByMV092C.js} +1 -1
  53. package/dist/esm/{diagram-RJA3I4VV-766WDxVQ.js → diagram-RJA3I4VV-C84l8Azx.js} +1 -1
  54. package/dist/esm/{diagram-TYUNFSNR-jxQ7Yf7F.js → diagram-TYUNFSNR-BtCvPXJ2.js} +1 -1
  55. package/dist/esm/{ebnfDiagram-V4P3TTPT-CmQb2zv4.js → ebnfDiagram-V4P3TTPT-C2vtqr71.js} +1 -1
  56. package/dist/esm/{elk-QONTBCTQ-ed5QeBRk.js → elk-QONTBCTQ-CJiLNhJN.js} +1 -1
  57. package/dist/esm/{erDiagram-KYQIGQAA-DeToaAJo.js → erDiagram-KYQIGQAA-COiQX-A9.js} +1 -1
  58. package/dist/esm/flowDiagram-IUGLLWBU-Bboof2sT.js +1 -0
  59. package/dist/esm/{ganttDiagram-R7GPNTJY-DFWpMgXx.js → ganttDiagram-R7GPNTJY-DplmDkby.js} +1 -1
  60. package/dist/esm/{gitGraphDiagram-PDYL7XHY-CoobcIfr.js → gitGraphDiagram-PDYL7XHY-DTPYXyjC.js} +1 -1
  61. package/dist/esm/helpers.js +1 -1
  62. package/dist/esm/{index-CJ0mP3Zm.js → index-BdXh2wq-.js} +1 -1
  63. package/dist/esm/{index-D1LsGPMS.js → index-DjHFXv3v.js} +1 -1
  64. package/dist/esm/{infoDiagram-MVDRKAX5-BrsWRbGW.js → infoDiagram-MVDRKAX5-B4R01JSI.js} +1 -1
  65. package/dist/esm/{ishikawaDiagram-HPEHV2GE-BAmx-YEw.js → ishikawaDiagram-HPEHV2GE-Dv9Qg5NY.js} +1 -1
  66. package/dist/esm/{journeyDiagram-BOSHW7O7-CnBSpLoa.js → journeyDiagram-BOSHW7O7-Co3cxhxL.js} +1 -1
  67. package/dist/esm/{kanban-definition-FNSA4HC5-4yCo11oy.js → kanban-definition-FNSA4HC5-q3pjKpqB.js} +1 -1
  68. package/dist/esm/main.js +1 -1
  69. package/dist/esm/{mermaid.core-Dj1WAzSy.js → mermaid.core-DErPnTKR.js} +2 -2
  70. package/dist/esm/{mindmap-definition-6OY57UG3-Bd4Y4GbF.js → mindmap-definition-6OY57UG3-B_LUFop9.js} +1 -1
  71. package/dist/esm/{pegDiagram-ECIUJNBX-CK56FMnc.js → pegDiagram-ECIUJNBX-DlVeoxxt.js} +1 -1
  72. package/dist/esm/{pieDiagram-GNMPY74T-BJ1Np7Iw.js → pieDiagram-GNMPY74T-BOP-ezbh.js} +1 -1
  73. package/dist/esm/{quadrantDiagram-D57K4MC3-tOVWqHZx.js → quadrantDiagram-D57K4MC3-DMyyReF0.js} +1 -1
  74. package/dist/esm/{railroadDiagram-Y72NRBL7-BvwPAju5.js → railroadDiagram-Y72NRBL7-Dtk4Z37c.js} +1 -1
  75. package/dist/esm/{requirementDiagram-EQYSW5RA-D7P8RO2c.js → requirementDiagram-EQYSW5RA-CiUa5IeO.js} +1 -1
  76. package/dist/esm/{sankeyDiagram-SY24JHO5-Hasf32Sf.js → sankeyDiagram-SY24JHO5-CuTPSkWV.js} +1 -1
  77. package/dist/esm/{sequenceDiagram-BLEHNHQU-CVjBG1oF.js → sequenceDiagram-BLEHNHQU-Do3-nvhd.js} +1 -1
  78. package/dist/esm/{sizeCapture-INFHLROL-CiSMSiOI.js → sizeCapture-INFHLROL-C423dcz5.js} +1 -1
  79. package/dist/esm/{stateDiagram-v2-A6IESKWZ-z0hJGPOR.js → stateDiagram-v2-A6IESKWZ-c4ZBvhhc.js} +1 -1
  80. package/dist/esm/{swimlanes-B3ENRKFQ-CBNFNgNt.js → swimlanes-B3ENRKFQ-zszd6wqm.js} +1 -1
  81. package/dist/esm/{swimlanesDiagram-AYQRV4AK-Bf9aZNHn.js → swimlanesDiagram-AYQRV4AK-BlMvbjy2.js} +1 -1
  82. package/dist/esm/{timeline-definition-JXYKGLGB-Cug_uWko.js → timeline-definition-JXYKGLGB-C0ru0xk2.js} +1 -1
  83. package/dist/esm/{types-DIz4kTf7.js → types-Cb2rrWcY.js} +1 -1
  84. package/dist/esm/{usecaseDiagram-WPOLBNNX-DvMBgn3t.js → usecaseDiagram-WPOLBNNX-BgdkDQLR.js} +1 -1
  85. package/dist/esm/{vennDiagram-Q3Y3IDCW-BkU3qp5r.js → vennDiagram-Q3Y3IDCW-BqrOHtxN.js} +1 -1
  86. package/dist/esm/{wardleyDiagram-IVAIDKWA-BgQww2R8.js → wardleyDiagram-IVAIDKWA-Ci0p6FBo.js} +1 -1
  87. package/dist/esm/websocket-KESFarc3.js +1 -0
  88. package/dist/esm/{xychartDiagram-4URNHDU4-Dk_dIDtn.js → xychartDiagram-4URNHDU4-zz1Z-rVz.js} +1 -1
  89. package/dist/module-types/src/components/helpers/websocket.d.ts +0 -8
  90. package/package.json +2 -2
  91. package/dist/esm/channel-_i3jSBTX.js +0 -1
  92. package/dist/esm/flowDiagram-IUGLLWBU-XbuBBhyN.js +0 -1
  93. package/dist/esm/websocket-Cz_aqdkJ.js +0 -1
@@ -1 +1 @@
1
- import{I as t}from"./chunk-2Q5K7J3B-eykHmSYq.js";import{p as r}from"./chunk-JWPE2WC7-Ban7escN.js";import{x as e,v as o,s as n,g as a,a as s,b as i,_ as c,O as d,l as h,k as m,c as $,u as l,P as g,C as p,m as y,Q as f,R as x,S as u}from"./mermaid.core-Dj1WAzSy.js";import{p as b}from"./cynefin-EF2NZ3EQ-CaJSaYBh.js";import"./index-D1LsGPMS.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-C-9EFvh4.js";import"./settings-DzQM72QE.js";import"./index-Zvckkvpn.js";import"./LoaderLayer-CWElgcGs.js";import"./websocket-Cz_aqdkJ.js";import"./index-DpobNvg5.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},k=x.gitGraph,B=c(()=>f({...k,...d().gitGraph}),"getConfig"),E=new t(()=>{const t=B(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function C(){return u({length:7})}function L(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}c(C,"getID"),c(L,"uniqBy");var T=c(function(t){E.records.direction=t},"setDirection"),M=c(function(t){h.debug("options str",t),t=t?.trim(),t=t||"{}";try{E.records.options=JSON.parse(t)}catch(t){h.error("error while parsing gitGraph options",t.message)}},"setOptions"),v=c(function(){return E.records.options},"getOptions"),I=c(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;h.info("commit",r,e,o,n),h.debug("Entering commit:",r,e,o,n);const a=B();e=y.sanitizeText(e,a),r=y.sanitizeText(r,a),n=n?.map(t=>y.sanitizeText(t,a));const s={id:e||E.records.seq+"-"+C(),message:r,seq:E.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==E.records.head?[]:[E.records.head.id],branch:E.records.currBranch};E.records.head=s,h.info("main branch",a.mainBranchName),E.records.commits.has(s.id)&&h.warn(`Commit ID ${s.id} already exists`),E.records.commits.set(s.id,s),E.records.branches.set(E.records.currBranch,s.id),h.debug("in pushCommit "+s.id)},"commit"),R=c(function(t){let r=t.name;const e=t.order;if(r=y.sanitizeText(r,B()),E.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);E.records.branches.set(r,null!=E.records.head?E.records.head.id:null),E.records.branchConfig.set(r,{name:r,order:e}),A(r),h.debug("in createBranch")},"branch"),P=c(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=B();r=y.sanitizeText(r,a),e&&(e=y.sanitizeText(e,a));const s=E.records.branches.get(E.records.currBranch),i=E.records.branches.get(r),c=s?E.records.commits.get(s):void 0,d=i?E.records.commits.get(i):void 0;if(c&&d&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(E.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!E.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===d||!d){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===d){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&E.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const m=i||"",$={id:e||`${E.records.seq}-${C()}`,message:`merged branch ${r} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,m],branch:E.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};E.records.head=$,E.records.commits.set($.id,$),E.records.branches.set(E.records.currBranch,$.id),h.debug(E.records.branches),h.debug("in mergeBranch")},"merge"),O=c(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;h.debug("Entering cherryPick:",r,e,o);const a=B();if(r=y.sanitizeText(r,a),e=y.sanitizeText(e,a),o=o?.map(t=>y.sanitizeText(t,a)),n=y.sanitizeText(n,a),!r||!E.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=E.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===w.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!E.records.commits.has(e)){if(i===E.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=E.records.branches.get(E.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=E.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:E.records.seq+"-"+C(),message:`cherry-picked ${s?.message} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,s.id],branch:E.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};E.records.head=c,E.records.commits.set(c.id,c),E.records.branches.set(E.records.currBranch,c.id),h.debug(E.records.branches),h.debug("in cherryPick")}},"cherryPick"),A=c(function(t){if(t=y.sanitizeText(t,B()),!E.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{E.records.currBranch=t;const r=E.records.branches.get(E.records.currBranch);E.records.head=void 0!==r&&r?E.records.commits.get(r)??null:null}},"checkout");function G(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function S(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const t in E.records.branches)E.records.branches.get(t)===r.id&&o.push(t);if(h.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=E.records.commits.get(r.parents[0]);G(t,r,e),r.parents[1]&&t.push(E.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=E.records.commits.get(r.parents[0]);G(t,r,e)}}S(t=L(t,t=>t.id))}c(G,"upsert"),c(S,"prettyPrintCommitHistory");var W=c(function(){h.debug(E.records.commits);S([z()[0]])},"prettyPrint"),j=c(function(){E.reset(),p()},"clear"),H=c(function(){return[...E.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),q=c(function(){return E.records.branches},"getBranches"),_=c(function(){return E.records.commits},"getCommits"),z=c(function(){const t=[...E.records.commits.values()];return t.forEach(function(t){h.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),D={commitType:w,getConfig:B,setDirection:T,setOptions:M,getOptions:v,commit:I,branch:R,merge:P,cherryPick:O,checkout:A,prettyPrint:W,clear:j,getBranchesAsObjArray:H,getBranches:q,getCommits:_,getCommitsArray:z,getCurrentBranch:c(function(){return E.records.currBranch},"getCurrentBranch"),getDirection:c(function(){return E.records.direction},"getDirection"),getHead:c(function(){return E.records.head},"getHead"),setAccTitle:i,getAccTitle:s,getAccDescription:a,setAccDescription:n,setDiagramTitle:o,getDiagramTitle:e},F=c((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)N(r,e)},"populate"),N=c((t,r)=>{const e={Commit:c(t=>r.commit(K(t)),"Commit"),Branch:c(t=>r.branch(V(t)),"Branch"),Merge:c(t=>r.merge(Y(t)),"Merge"),Checkout:c(t=>r.checkout(Q(t)),"Checkout"),CherryPicking:c(t=>r.cherryPick(U(t)),"CherryPicking")}[t.$type];e?e(t):h.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),K=c(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0}),"parseCommit"),V=c(t=>({name:t.name,order:t.order??0}),"parseBranch"),Y=c(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Q=c(t=>t.branch,"parseCheckout"),U=c(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),J={parse:c(async t=>{const r=await b("gitGraph",t);h.debug(r),F(r,D)},"parse")},X=10,Z=40,tt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),rt=new Set(["redux-color","redux-dark-color"]),et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),ot=c((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),nt=new Map,at=new Map,st=new Map,it=[],ct=0,dt="LR",ht=c(()=>{nt.clear(),at.clear(),st.clear(),ct=0,it=[],dt="LR"},"clear"),mt=c(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),$t=c(t=>{let r,e,o;return"BT"===dt?(e=c((t,r)=>t<=r,"comparisonFunc"),o=1/0):(e=c((t,r)=>t>=r,"comparisonFunc"),o=0),t.forEach(t=>{const n="TB"===dt||"BT"==dt?at.get(t)?.y:at.get(t)?.x;void 0!==n&&e(n,o)&&(r=t,o=n)}),r},"findClosestParent"),lt=c(t=>{let r="",e=1/0;return t.forEach(t=>{const o=at.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),gt=c((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=yt(e),n=Math.max(o,n)):a.push(e),ft(e,o)}),o=n,a.forEach(t=>{xt(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=lt(e.parents);o=at.get(t).y-Z,o<=n&&(n=o);const r=nt.get(e.branch).pos,a=o-X;at.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),pt=c(t=>{const r=$t(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=at.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),yt=c(t=>pt(t)+Z,"calculateCommitPosition"),ft=c((t,r)=>{const e=nt.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+X;return at.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),xt=c((t,r,e)=>{const o=nt.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;at.set(t.id,{x:a,y:n})},"setRootPosition"),ut=c((t,r,e,o,n,a)=>{const{theme:s}=$(),i=tt.has(s??""),c=rt.has(s??""),d=et.has(s??"");if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(i?3:0)).attr("y",e.y-10+(i?3:0)).attr("width",i?14:20).attr("height",i?14:20).attr("class",`commit ${r.id} commit-highlight${ot(n,8,c)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(i?2:0)).attr("y",e.y-6+(i?2:0)).attr("width",i?8:12).attr("height",i?8:12).attr("class",`commit ${r.id} commit${ot(n,8,c)} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",i?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",i?7:10),s.attr("class",`commit ${r.id} commit${ot(n,8,c)}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",i?5:6),a.attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}if(a===w.REVERSE){const a=i?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}}},"drawCommitBullet"),bt=c((t,r,e,o,n)=>{if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&n.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=i.node()?.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===dt||"BT"===dt?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===dt||"BT"===dt)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),wt=c((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,s=0;const i=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),d.attr("x",e.posWithOffset-h.width/2),i.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:n,yOffset:c}of i){const i=s/2,d=e.y-19.2-c;if(n.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${d+2} \n ${o-a/2-2},${d-2}\n ${e.posWithOffset-a/2-4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d+i+2}\n ${e.posWithOffset-a/2-4},${d+i+2}`),r.attr("cy",d).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===dt||"BT"===dt){const s=o+c;n.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${s+2}\n ${e.x},${s-2}\n ${e.x+X},${s-i-2}\n ${e.x+X+a+4},${s-i-2}\n ${e.x+X+a+4},${s+i+2}\n ${e.x+X},${s+i+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),kt=c(t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bt=c((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-Z}return 0}{const e=$t(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+Z;if("BT"===r){return(o.get(t.id)??n).y-Z}return a.x+Z}}return 0},"calculatePosition"),Et=c((t,r,e)=>{const o="BT"===dt&&e?r:r+X,n=nt.get(t.branch)?.pos,a="TB"===dt||"BT"===dt?nt.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=tt.has($().theme??"");return{x:a,y:"TB"===dt||"BT"===dt?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),Ct=c((t,r,e,o)=>{const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===dt||"BT"===dt?30:0;const i=[...r.keys()],d=o.parallelCommits??!1,h=c((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let m=i.sort(h);"BT"===dt&&(d&&gt(m,r,s),m=m.reverse()),m.forEach(t=>{const i=r.get(t);if(!i)throw new Error(`Commit not found for key ${t}`);d&&(s=Bt(i,dt,s,at));const c=Et(i,s,d);if(e){const t=kt(i),r=i.customType??i.type,e=nt.get(i.branch)?.index??0;ut(n,i,c,t,e,r),bt(a,i,c,s,o),wt(a,i,c,s)}"TB"===dt||"BT"===dt?at.set(i.id,{x:c.x,y:c.posWithOffset}):at.set(i.id,{x:c.posWithOffset,y:c.y}),s="BT"===dt&&d?s+Z:s+Z+X,s>ct&&(ct=s)})},"drawCommits"),Lt=c((t,r,e,o,n)=>{const a=("TB"===dt||"BT"===dt?e.x<o.x:e.y<o.y)?r.branch:t.branch,s=c(t=>t.branch===a,"isOnBranchToGetCurve"),i=c(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...n.values()].some(t=>i(t)&&s(t))},"shouldRerouteArrow"),Tt=c((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(it.every(t=>Math.abs(t-o)>=10))return it.push(o),o;const n=Math.abs(t-r);return Tt(t,r-n/5,e+1)},"findLane"),Mt=c((t,r,e,o)=>{const{theme:n}=$(),a=rt.has(n??""),s=at.get(r.id),i=at.get(e.id);if(void 0===s||void 0===i)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=Lt(r,e,s,i,o);let d,h="",m="",l=0,g=0,p=nt.get(e.branch)?.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(p=nt.get(r.branch)?.index),c){h="A 10 10, 0, 0, 0,",m="A 10 10, 0, 0, 1,",l=10,g=10;const t=s.y<i.y?Tt(s.y,i.y):Tt(i.y,s.y),e=s.x<i.x?Tt(s.x,i.x):Tt(i.x,s.x);"TB"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${m} ${e} ${s.y+g} L ${e} ${i.y-l} ${h} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${h} ${e} ${s.y+g} L ${e} ${i.y-l} ${m} ${e-g} ${i.y} L ${i.x} ${i.y}`):"BT"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${h} ${e} ${s.y-g} L ${e} ${i.y+l} ${m} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${m} ${e} ${s.y-g} L ${e} ${i.y+l} ${h} ${e-g} ${i.y} L ${i.x} ${i.y}`):s.y<i.y?d=`M ${s.x} ${s.y} L ${s.x} ${t-l} ${h} ${s.x+g} ${t} L ${i.x-l} ${t} ${m} ${i.x} ${t+g} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${s.x} ${t+l} ${m} ${s.x+g} ${t} L ${i.x-l} ${t} ${h} ${i.x} ${t-g} L ${i.x} ${i.y}`)}else h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,"TB"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${m} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${h} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):"BT"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${h} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${m} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):(s.y<i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y>i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y===i.y&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`));if(void 0===d)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+ot(p,8,a))},"drawArrow"),vt=c((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{Mt(e,r.get(t),o,r)})})},"drawArrows"),It=c((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=$(),{dropShadow:i,THEME_COLOR_LIMIT:c}=s,d=tt.has(a??""),h=rt.has(a??""),m=t.append("g");r.forEach((t,r)=>{const a=ot(r,d?c:8,h),s=nt.get(t.name)?.pos;if(void 0===s)throw new Error(`Position not found for branch ${t.name}`);const $="TB"===dt||"BT"===dt?s:d?s+6+1:s-2,l=m.append("line");l.attr("x1",0),l.attr("y1",$),l.attr("x2",ct),l.attr("y2",$),l.attr("class","branch branch"+a),"TB"===dt?(l.attr("y1",30),l.attr("x1",s),l.attr("y2",ct),l.attr("x2",s)):"BT"===dt&&(l.attr("y1",ct),l.attr("x1",s),l.attr("y2",30),l.attr("x2",s)),it.push($);const g=t.name,p=mt(g),y=m.insert("rect"),f=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=d?0:4,b=d?16:0,w=d?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${d?`url(#${o}-drop-shadow)`:i}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+($-x.height/2-2)+")"),"TB"===dt?(y.attr("x",s-x.width/2-10).attr("y",0),f.attr("transform","translate("+(s-x.width/2-5)+", 0)"),d&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===dt?(y.attr("x",s-x.width/2-10).attr("y",ct),f.attr("transform","translate("+(s-x.width/2-5)+", "+ct+")"),d&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(ct+2*w+4)+")"))):y.attr("transform","translate(-19, "+($-12-w/2)+")")})},"drawBranches"),Rt=c(function(t,r,e,o,n){return nt.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===dt||"BT"===dt?o.width/2:0)},"setBranchPosition"),Pt={draw:c(function(t,r,e,o){ht(),h.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void h.error("getConfig method is not available on db");const a=n.getConfig(),s=a.rotateCommitLabel??!1;st=n.getCommits();const i=n.getBranchesAsObjArray();dt=n.getDirection();const c=m(`[id="${r}"]`),{look:d,theme:p,themeVariables:y}=$(),{useGradient:f,gradientStart:x,gradientStop:u,filterColor:b}=y;if(f){const t=c.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}"neo"===d&&tt.has(p??"")&&c.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let w=0;i.forEach((t,r)=>{const e=mt(t.name),o=c.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();w=Rt(t.name,w,r,i,s),a.remove(),n.remove(),o.remove()}),Ct(c,st,!1,a),a.showBranches&&It(c,i,a,r),vt(c,st),Ct(c,st,!0,a),l.insertTitle(c,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),g(void 0,c,a.diagramPadding,a.useMaxWidth)},"draw")},Ot=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),At=new Set(["redux-color","redux-dark-color"]),Gt=new Set(["neo","neo-dark"]),St=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Wt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),jt=c(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o<t.THEME_COLOR_LIMIT;o++)e+=`\n .label${o} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}\n `;return e},"genGitGraphGradient"),Ht=c(t=>{const r=d(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Ot.has(e);if(Gt.has(e)){let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)r+=`\n .branch-label${e} { fill: ${t.nodeBorder};}\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n ${jt(t)}`;else{const o=e%8;r+=`\n .branch-label${e} { fill: ${t["gitBranchLabel"+o]}; }\n .commit${e} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }\n .arrow${e} { stroke: ${t["git"+o]}; }\n `}return r}if(At.has(e)){let r="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(0===o)r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${t.nodeBorder}; }\n .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${o} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const s=o%n.length;r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .commit-highlight${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .label${o} { fill: ${St.has(e)?t.mainBkg:n[s]}; stroke: ${n[s]}; stroke-width: ${t.strokeWidth}; }\n .arrow${o} { stroke: ${n[s]}; }\n `}return r}{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)r+=`\n .branch-label${e} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${e} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n `;return r}},"genColor"),qt=c(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),_t={parser:J,db:D,renderer:Pt,styles:c(t=>{const r=d(),{theme:e}=r,o=Wt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Ht(t):qt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Ot.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")};export{_t as diagram};
1
+ import{I as t}from"./chunk-2Q5K7J3B-xxqB63pM.js";import{p as r}from"./chunk-JWPE2WC7-D8efNL_z.js";import{x as e,v as o,s as n,g as a,a as s,b as i,_ as c,O as d,l as h,k as m,c as $,u as l,P as g,C as p,m as y,Q as f,R as x,S as u}from"./mermaid.core-DErPnTKR.js";import{p as b}from"./cynefin-EF2NZ3EQ-CaJSaYBh.js";import"./index-DjHFXv3v.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-C-9EFvh4.js";import"./settings-DzQM72QE.js";import"./index-Zvckkvpn.js";import"./LoaderLayer-CWElgcGs.js";import"./websocket-KESFarc3.js";import"./index-DpobNvg5.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},k=x.gitGraph,B=c(()=>f({...k,...d().gitGraph}),"getConfig"),E=new t(()=>{const t=B(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function C(){return u({length:7})}function L(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}c(C,"getID"),c(L,"uniqBy");var T=c(function(t){E.records.direction=t},"setDirection"),M=c(function(t){h.debug("options str",t),t=t?.trim(),t=t||"{}";try{E.records.options=JSON.parse(t)}catch(t){h.error("error while parsing gitGraph options",t.message)}},"setOptions"),v=c(function(){return E.records.options},"getOptions"),I=c(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;h.info("commit",r,e,o,n),h.debug("Entering commit:",r,e,o,n);const a=B();e=y.sanitizeText(e,a),r=y.sanitizeText(r,a),n=n?.map(t=>y.sanitizeText(t,a));const s={id:e||E.records.seq+"-"+C(),message:r,seq:E.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==E.records.head?[]:[E.records.head.id],branch:E.records.currBranch};E.records.head=s,h.info("main branch",a.mainBranchName),E.records.commits.has(s.id)&&h.warn(`Commit ID ${s.id} already exists`),E.records.commits.set(s.id,s),E.records.branches.set(E.records.currBranch,s.id),h.debug("in pushCommit "+s.id)},"commit"),R=c(function(t){let r=t.name;const e=t.order;if(r=y.sanitizeText(r,B()),E.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);E.records.branches.set(r,null!=E.records.head?E.records.head.id:null),E.records.branchConfig.set(r,{name:r,order:e}),A(r),h.debug("in createBranch")},"branch"),P=c(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=B();r=y.sanitizeText(r,a),e&&(e=y.sanitizeText(e,a));const s=E.records.branches.get(E.records.currBranch),i=E.records.branches.get(r),c=s?E.records.commits.get(s):void 0,d=i?E.records.commits.get(i):void 0;if(c&&d&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(E.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!E.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===d||!d){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===d){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&E.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const m=i||"",$={id:e||`${E.records.seq}-${C()}`,message:`merged branch ${r} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,m],branch:E.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};E.records.head=$,E.records.commits.set($.id,$),E.records.branches.set(E.records.currBranch,$.id),h.debug(E.records.branches),h.debug("in mergeBranch")},"merge"),O=c(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;h.debug("Entering cherryPick:",r,e,o);const a=B();if(r=y.sanitizeText(r,a),e=y.sanitizeText(e,a),o=o?.map(t=>y.sanitizeText(t,a)),n=y.sanitizeText(n,a),!r||!E.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=E.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===w.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!E.records.commits.has(e)){if(i===E.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=E.records.branches.get(E.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=E.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:E.records.seq+"-"+C(),message:`cherry-picked ${s?.message} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,s.id],branch:E.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};E.records.head=c,E.records.commits.set(c.id,c),E.records.branches.set(E.records.currBranch,c.id),h.debug(E.records.branches),h.debug("in cherryPick")}},"cherryPick"),A=c(function(t){if(t=y.sanitizeText(t,B()),!E.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{E.records.currBranch=t;const r=E.records.branches.get(E.records.currBranch);E.records.head=void 0!==r&&r?E.records.commits.get(r)??null:null}},"checkout");function G(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function S(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const t in E.records.branches)E.records.branches.get(t)===r.id&&o.push(t);if(h.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=E.records.commits.get(r.parents[0]);G(t,r,e),r.parents[1]&&t.push(E.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=E.records.commits.get(r.parents[0]);G(t,r,e)}}S(t=L(t,t=>t.id))}c(G,"upsert"),c(S,"prettyPrintCommitHistory");var W=c(function(){h.debug(E.records.commits);S([z()[0]])},"prettyPrint"),j=c(function(){E.reset(),p()},"clear"),H=c(function(){return[...E.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),q=c(function(){return E.records.branches},"getBranches"),_=c(function(){return E.records.commits},"getCommits"),z=c(function(){const t=[...E.records.commits.values()];return t.forEach(function(t){h.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),D={commitType:w,getConfig:B,setDirection:T,setOptions:M,getOptions:v,commit:I,branch:R,merge:P,cherryPick:O,checkout:A,prettyPrint:W,clear:j,getBranchesAsObjArray:H,getBranches:q,getCommits:_,getCommitsArray:z,getCurrentBranch:c(function(){return E.records.currBranch},"getCurrentBranch"),getDirection:c(function(){return E.records.direction},"getDirection"),getHead:c(function(){return E.records.head},"getHead"),setAccTitle:i,getAccTitle:s,getAccDescription:a,setAccDescription:n,setDiagramTitle:o,getDiagramTitle:e},F=c((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)N(r,e)},"populate"),N=c((t,r)=>{const e={Commit:c(t=>r.commit(K(t)),"Commit"),Branch:c(t=>r.branch(V(t)),"Branch"),Merge:c(t=>r.merge(Y(t)),"Merge"),Checkout:c(t=>r.checkout(Q(t)),"Checkout"),CherryPicking:c(t=>r.cherryPick(U(t)),"CherryPicking")}[t.$type];e?e(t):h.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),K=c(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0}),"parseCommit"),V=c(t=>({name:t.name,order:t.order??0}),"parseBranch"),Y=c(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Q=c(t=>t.branch,"parseCheckout"),U=c(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),J={parse:c(async t=>{const r=await b("gitGraph",t);h.debug(r),F(r,D)},"parse")},X=10,Z=40,tt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),rt=new Set(["redux-color","redux-dark-color"]),et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),ot=c((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),nt=new Map,at=new Map,st=new Map,it=[],ct=0,dt="LR",ht=c(()=>{nt.clear(),at.clear(),st.clear(),ct=0,it=[],dt="LR"},"clear"),mt=c(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),$t=c(t=>{let r,e,o;return"BT"===dt?(e=c((t,r)=>t<=r,"comparisonFunc"),o=1/0):(e=c((t,r)=>t>=r,"comparisonFunc"),o=0),t.forEach(t=>{const n="TB"===dt||"BT"==dt?at.get(t)?.y:at.get(t)?.x;void 0!==n&&e(n,o)&&(r=t,o=n)}),r},"findClosestParent"),lt=c(t=>{let r="",e=1/0;return t.forEach(t=>{const o=at.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),gt=c((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=yt(e),n=Math.max(o,n)):a.push(e),ft(e,o)}),o=n,a.forEach(t=>{xt(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=lt(e.parents);o=at.get(t).y-Z,o<=n&&(n=o);const r=nt.get(e.branch).pos,a=o-X;at.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),pt=c(t=>{const r=$t(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=at.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),yt=c(t=>pt(t)+Z,"calculateCommitPosition"),ft=c((t,r)=>{const e=nt.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+X;return at.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),xt=c((t,r,e)=>{const o=nt.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;at.set(t.id,{x:a,y:n})},"setRootPosition"),ut=c((t,r,e,o,n,a)=>{const{theme:s}=$(),i=tt.has(s??""),c=rt.has(s??""),d=et.has(s??"");if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(i?3:0)).attr("y",e.y-10+(i?3:0)).attr("width",i?14:20).attr("height",i?14:20).attr("class",`commit ${r.id} commit-highlight${ot(n,8,c)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(i?2:0)).attr("y",e.y-6+(i?2:0)).attr("width",i?8:12).attr("height",i?8:12).attr("class",`commit ${r.id} commit${ot(n,8,c)} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",i?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",i?7:10),s.attr("class",`commit ${r.id} commit${ot(n,8,c)}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",i?5:6),a.attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}if(a===w.REVERSE){const a=i?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}}},"drawCommitBullet"),bt=c((t,r,e,o,n)=>{if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&n.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=i.node()?.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===dt||"BT"===dt?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===dt||"BT"===dt)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),wt=c((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,s=0;const i=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),d.attr("x",e.posWithOffset-h.width/2),i.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:n,yOffset:c}of i){const i=s/2,d=e.y-19.2-c;if(n.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${d+2} \n ${o-a/2-2},${d-2}\n ${e.posWithOffset-a/2-4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d+i+2}\n ${e.posWithOffset-a/2-4},${d+i+2}`),r.attr("cy",d).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===dt||"BT"===dt){const s=o+c;n.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${s+2}\n ${e.x},${s-2}\n ${e.x+X},${s-i-2}\n ${e.x+X+a+4},${s-i-2}\n ${e.x+X+a+4},${s+i+2}\n ${e.x+X},${s+i+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),kt=c(t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bt=c((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-Z}return 0}{const e=$t(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+Z;if("BT"===r){return(o.get(t.id)??n).y-Z}return a.x+Z}}return 0},"calculatePosition"),Et=c((t,r,e)=>{const o="BT"===dt&&e?r:r+X,n=nt.get(t.branch)?.pos,a="TB"===dt||"BT"===dt?nt.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=tt.has($().theme??"");return{x:a,y:"TB"===dt||"BT"===dt?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),Ct=c((t,r,e,o)=>{const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===dt||"BT"===dt?30:0;const i=[...r.keys()],d=o.parallelCommits??!1,h=c((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let m=i.sort(h);"BT"===dt&&(d&&gt(m,r,s),m=m.reverse()),m.forEach(t=>{const i=r.get(t);if(!i)throw new Error(`Commit not found for key ${t}`);d&&(s=Bt(i,dt,s,at));const c=Et(i,s,d);if(e){const t=kt(i),r=i.customType??i.type,e=nt.get(i.branch)?.index??0;ut(n,i,c,t,e,r),bt(a,i,c,s,o),wt(a,i,c,s)}"TB"===dt||"BT"===dt?at.set(i.id,{x:c.x,y:c.posWithOffset}):at.set(i.id,{x:c.posWithOffset,y:c.y}),s="BT"===dt&&d?s+Z:s+Z+X,s>ct&&(ct=s)})},"drawCommits"),Lt=c((t,r,e,o,n)=>{const a=("TB"===dt||"BT"===dt?e.x<o.x:e.y<o.y)?r.branch:t.branch,s=c(t=>t.branch===a,"isOnBranchToGetCurve"),i=c(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...n.values()].some(t=>i(t)&&s(t))},"shouldRerouteArrow"),Tt=c((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(it.every(t=>Math.abs(t-o)>=10))return it.push(o),o;const n=Math.abs(t-r);return Tt(t,r-n/5,e+1)},"findLane"),Mt=c((t,r,e,o)=>{const{theme:n}=$(),a=rt.has(n??""),s=at.get(r.id),i=at.get(e.id);if(void 0===s||void 0===i)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=Lt(r,e,s,i,o);let d,h="",m="",l=0,g=0,p=nt.get(e.branch)?.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(p=nt.get(r.branch)?.index),c){h="A 10 10, 0, 0, 0,",m="A 10 10, 0, 0, 1,",l=10,g=10;const t=s.y<i.y?Tt(s.y,i.y):Tt(i.y,s.y),e=s.x<i.x?Tt(s.x,i.x):Tt(i.x,s.x);"TB"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${m} ${e} ${s.y+g} L ${e} ${i.y-l} ${h} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${h} ${e} ${s.y+g} L ${e} ${i.y-l} ${m} ${e-g} ${i.y} L ${i.x} ${i.y}`):"BT"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${h} ${e} ${s.y-g} L ${e} ${i.y+l} ${m} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${m} ${e} ${s.y-g} L ${e} ${i.y+l} ${h} ${e-g} ${i.y} L ${i.x} ${i.y}`):s.y<i.y?d=`M ${s.x} ${s.y} L ${s.x} ${t-l} ${h} ${s.x+g} ${t} L ${i.x-l} ${t} ${m} ${i.x} ${t+g} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${s.x} ${t+l} ${m} ${s.x+g} ${t} L ${i.x-l} ${t} ${h} ${i.x} ${t-g} L ${i.x} ${i.y}`)}else h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,"TB"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${m} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${h} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):"BT"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${h} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${m} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):(s.y<i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y>i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y===i.y&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`));if(void 0===d)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+ot(p,8,a))},"drawArrow"),vt=c((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{Mt(e,r.get(t),o,r)})})},"drawArrows"),It=c((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=$(),{dropShadow:i,THEME_COLOR_LIMIT:c}=s,d=tt.has(a??""),h=rt.has(a??""),m=t.append("g");r.forEach((t,r)=>{const a=ot(r,d?c:8,h),s=nt.get(t.name)?.pos;if(void 0===s)throw new Error(`Position not found for branch ${t.name}`);const $="TB"===dt||"BT"===dt?s:d?s+6+1:s-2,l=m.append("line");l.attr("x1",0),l.attr("y1",$),l.attr("x2",ct),l.attr("y2",$),l.attr("class","branch branch"+a),"TB"===dt?(l.attr("y1",30),l.attr("x1",s),l.attr("y2",ct),l.attr("x2",s)):"BT"===dt&&(l.attr("y1",ct),l.attr("x1",s),l.attr("y2",30),l.attr("x2",s)),it.push($);const g=t.name,p=mt(g),y=m.insert("rect"),f=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=d?0:4,b=d?16:0,w=d?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${d?`url(#${o}-drop-shadow)`:i}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+($-x.height/2-2)+")"),"TB"===dt?(y.attr("x",s-x.width/2-10).attr("y",0),f.attr("transform","translate("+(s-x.width/2-5)+", 0)"),d&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===dt?(y.attr("x",s-x.width/2-10).attr("y",ct),f.attr("transform","translate("+(s-x.width/2-5)+", "+ct+")"),d&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(ct+2*w+4)+")"))):y.attr("transform","translate(-19, "+($-12-w/2)+")")})},"drawBranches"),Rt=c(function(t,r,e,o,n){return nt.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===dt||"BT"===dt?o.width/2:0)},"setBranchPosition"),Pt={draw:c(function(t,r,e,o){ht(),h.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void h.error("getConfig method is not available on db");const a=n.getConfig(),s=a.rotateCommitLabel??!1;st=n.getCommits();const i=n.getBranchesAsObjArray();dt=n.getDirection();const c=m(`[id="${r}"]`),{look:d,theme:p,themeVariables:y}=$(),{useGradient:f,gradientStart:x,gradientStop:u,filterColor:b}=y;if(f){const t=c.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}"neo"===d&&tt.has(p??"")&&c.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let w=0;i.forEach((t,r)=>{const e=mt(t.name),o=c.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();w=Rt(t.name,w,r,i,s),a.remove(),n.remove(),o.remove()}),Ct(c,st,!1,a),a.showBranches&&It(c,i,a,r),vt(c,st),Ct(c,st,!0,a),l.insertTitle(c,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),g(void 0,c,a.diagramPadding,a.useMaxWidth)},"draw")},Ot=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),At=new Set(["redux-color","redux-dark-color"]),Gt=new Set(["neo","neo-dark"]),St=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Wt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),jt=c(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o<t.THEME_COLOR_LIMIT;o++)e+=`\n .label${o} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}\n `;return e},"genGitGraphGradient"),Ht=c(t=>{const r=d(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Ot.has(e);if(Gt.has(e)){let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)r+=`\n .branch-label${e} { fill: ${t.nodeBorder};}\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n ${jt(t)}`;else{const o=e%8;r+=`\n .branch-label${e} { fill: ${t["gitBranchLabel"+o]}; }\n .commit${e} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }\n .arrow${e} { stroke: ${t["git"+o]}; }\n `}return r}if(At.has(e)){let r="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(0===o)r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${t.nodeBorder}; }\n .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${o} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const s=o%n.length;r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .commit-highlight${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .label${o} { fill: ${St.has(e)?t.mainBkg:n[s]}; stroke: ${n[s]}; stroke-width: ${t.strokeWidth}; }\n .arrow${o} { stroke: ${n[s]}; }\n `}return r}{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)r+=`\n .branch-label${e} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${e} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n `;return r}},"genColor"),qt=c(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),_t={parser:J,db:D,renderer:Pt,styles:c(t=>{const r=d(),{theme:e}=r,o=Wt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Ht(t):qt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Ot.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")};export{_t as diagram};
@@ -1 +1 @@
1
- export{c as classNames,d as downloadBlobAsFile,a as downloadDataTableAsCsvFile,b as downloadLink,e as downloadSheetDataAsXlsxFile,f as downloadUrlAsFile,g as getTextContent,h as getXLSX,i as isBrowser,j as isDev,k as isOverflowed,l as isTrigger,n as normalizeFolderPath,o as openNewTab,r as renderChildrenWithProps,s as sheetDataToWorkBook,t as toBlob}from"./commons-C-9EFvh4.js";import{g as S}from"./websocket-Cz_aqdkJ.js";export{a as authorizedRequest,c as copy,b as cutTimeSplit,d as downloadJukiMarkdownAsPdf,e as downloadWebsiteAsPdf,f as getAuthorizedRequest,h as getContestState,i as getDateLiteral,j as getEditorSettingsStorageKey,k as getHeaders,l as getHref,m as getJudgeOrigin,n as getKeyWebSocketEventDto,o as getMetaHeaders,p as getProblemsStoreKey,q as getSettingsStoreKey,s as getSourcesStoreKey,t as getStatementData,u as getTestCasesStoreKey,v as getUnsubscribeEvent,w as getVisitorSessionId,x as handleUploadFile,y as handleUploadImage,z as isJudgeWindowLocation,A as publishNote,B as renderReactNodeOrFunction,r as renderReactNodeOrFunctionP1,C as safeReportError,D as showOfDateDisplayType,E as showOfTimeDisplayType,F as toFilterUrl,G as toSortUrl,H as upperFirst}from"./websocket-Cz_aqdkJ.js";export{g as getHeight}from"./worksheet-Tio8jHyw.js";export{c as cloneURLSearchParams,p as persistGlobalURLSearchParams}from"./index-DpobNvg5.js";import"react";import"./settings-DzQM72QE.js";import"./enums.js";import"./index-Zvckkvpn.js";import"react/jsx-runtime";const R=e=>({"*":{key:"*",header:"",body:e}}),T=e=>null!==e&&"IFRAME"===e.tagName,U={setItem:(e,s)=>{if(S()||"undefined"==typeof document)return;localStorage.setItem(e,s);const t=document.getElementsByClassName("juki-iframe-cross-domain");for(const a of t)if(T(a)&&a.contentWindow){const t=a.contentWindow;t?.postMessage({action:"localStorage.setItem",key:e,value:s},new URL(a.src).origin)}},removeItem:e=>{if(S()||"undefined"==typeof document)return;localStorage.removeItem(e);const s=document.getElementsByClassName("juki-iframe-cross-domain");for(const t of s)if(T(t)&&t.contentWindow){const s=t.contentWindow;s?.postMessage({action:"localStorage.removeItem",key:e},new URL(t.src).origin)}}};export{S as getQuerySessionId,T as isIFrame,U as localStorageCrossDomains,R as oneTab};
1
+ export{c as classNames,d as downloadBlobAsFile,a as downloadDataTableAsCsvFile,b as downloadLink,e as downloadSheetDataAsXlsxFile,f as downloadUrlAsFile,g as getTextContent,h as getXLSX,i as isBrowser,j as isDev,k as isOverflowed,l as isTrigger,n as normalizeFolderPath,o as openNewTab,r as renderChildrenWithProps,s as sheetDataToWorkBook,t as toBlob}from"./commons-C-9EFvh4.js";import{g as S}from"./websocket-KESFarc3.js";export{a as authorizedRequest,c as copy,b as cutTimeSplit,d as downloadJukiMarkdownAsPdf,e as downloadWebsiteAsPdf,f as getAuthorizedRequest,h as getContestState,i as getDateLiteral,j as getEditorSettingsStorageKey,k as getHeaders,l as getHref,m as getJudgeOrigin,n as getKeyWebSocketEventDto,o as getMetaHeaders,p as getProblemsStoreKey,q as getSettingsStoreKey,s as getSourcesStoreKey,t as getStatementData,u as getTestCasesStoreKey,v as getUnsubscribeEvent,w as getVisitorSessionId,x as handleUploadFile,y as handleUploadImage,z as isJudgeWindowLocation,A as publishNote,B as renderReactNodeOrFunction,r as renderReactNodeOrFunctionP1,C as safeReportError,D as showOfDateDisplayType,E as showOfTimeDisplayType,F as toFilterUrl,G as toSortUrl,H as upperFirst}from"./websocket-KESFarc3.js";export{g as getHeight}from"./worksheet-Tio8jHyw.js";export{c as cloneURLSearchParams,p as persistGlobalURLSearchParams}from"./index-DpobNvg5.js";import"react";import"./settings-DzQM72QE.js";import"./enums.js";import"./index-Zvckkvpn.js";import"react/jsx-runtime";const R=e=>({"*":{key:"*",header:"",body:e}}),T=e=>null!==e&&"IFRAME"===e.tagName,U={setItem:(e,s)=>{if(S()||"undefined"==typeof document)return;localStorage.setItem(e,s);const t=document.getElementsByClassName("juki-iframe-cross-domain");for(const a of t)if(T(a)&&a.contentWindow){const t=a.contentWindow;t?.postMessage({action:"localStorage.setItem",key:e,value:s},new URL(a.src).origin)}},removeItem:e=>{if(S()||"undefined"==typeof document)return;localStorage.removeItem(e);const s=document.getElementsByClassName("juki-iframe-cross-domain");for(const t of s)if(T(t)&&t.contentWindow){const s=t.contentWindow;s?.postMessage({action:"localStorage.removeItem",key:e},new URL(t.src).origin)}}};export{S as getQuerySessionId,T as isIFrame,U as localStorageCrossDomains,R as oneTab};
@@ -1 +1 @@
1
- import{z as e}from"./index-D1LsGPMS.js";import{e as n,v as t,f as l,g as o,k as r,S as a}from"./types-DIz4kTf7.js";function i(e){const n=[],t=String(e||"");let l=t.indexOf(","),o=0,r=!1;for(;!r;){-1===l&&(l=t.length,r=!0);const e=t.slice(o,l).trim();!e&&r||n.push(e),o=l+1,l=t.indexOf(",",o)}return n}function u(e,n){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}const s=/[$_\p{ID_Start}]/u,c=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,p=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,f=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e){return!!e&&s.test(String.fromCodePoint(e))}function m(e,n){const t=(n||h).jsx?p:c;return!!e&&t.test(String.fromCodePoint(e))}function y(e,n){return((n||h).jsx?d:f).test(e)}const v=/[ \t\n\f\r]/g;function b(e){return"object"==typeof e?"text"===e.type&&w(e.value):w(e)}function w(e){return""===e.replace(v,"")}class x{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}}function k(e,n){const t={},l={};for(const n of e)Object.assign(t,n.property),Object.assign(l,n.normal);return new x(t,l,n)}function C(e){return e.toLowerCase()}x.prototype.normal={},x.prototype.property={},x.prototype.space=void 0;class S{constructor(e,n){this.attribute=n,this.property=e}}S.prototype.attribute="",S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property="",S.prototype.spaceSeparated=!1,S.prototype.space=void 0;let D=0;const A=T(),N=T(),L=T(),O=T(),P=T(),M=T(),R=T();function T(){return 2**++D}var E=Object.freeze({__proto__:null,boolean:A,booleanish:N,commaOrSpaceSeparated:R,commaSeparated:M,number:O,overloadedBoolean:L,spaceSeparated:P});const I=Object.keys(E);class B extends S{constructor(e,n,t,l){let o=-1;if(super(e,n),U(this,"space",l),"number"==typeof t)for(;++o<I.length;){const e=I[o];U(this,I[o],(t&E[e])===E[e])}}}function U(e,n,t){t&&(e[n]=t)}function j(e){const n={},t={};for(const[l,o]of Object.entries(e.properties)){const r=new B(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),n[l]=r,t[C(l)]=l,t[C(r.attribute)]=l}return new x(n,t,e.space)}B.prototype.defined=!0;const z=j({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:P,ariaCurrent:null,ariaDescribedBy:P,ariaDetails:null,ariaDisabled:N,ariaDropEffect:P,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:P,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P,ariaLevel:O,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:P,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:P,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:N,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform:(e,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function F(e,n){return n in e?e[n]:n}function _(e,n){return F(e,n.toLowerCase())}const H=j({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:M,acceptCharset:P,accessKey:P,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:P,autoFocus:A,autoPlay:A,blocking:P,capture:null,charSet:null,checked:A,cite:null,className:P,cols:O,colSpan:null,content:null,contentEditable:N,controls:A,controlsList:P,coords:O|M,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:L,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:P,height:O,hidden:L,high:O,href:null,hrefLang:null,htmlFor:P,httpEquiv:P,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:P,itemRef:P,itemScope:A,itemType:P,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,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:A,optimum:O,pattern:null,ping:P,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:P,required:A,reversed:A,rows:O,rowSpan:O,sandbox:P,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:N,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:A,disableRemotePlayback:A,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:_}),V=j({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",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:R,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:P,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:M,g2:M,glyphName:M,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F}),q=j({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,n)=>"xlink:"+n.slice(5).toLowerCase()}),W=j({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_}),X=j({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,n)=>"xml:"+n.slice(3).toLowerCase()}),$={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"},K=/[A-Z]/g,Y=/-[a-z]/g,G=/^data[-\w.:]+$/i;function Z(e,n){const t=C(n);let l=n,o=S;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&G.test(n)){if("-"===n.charAt(4)){const e=n.slice(5).replace(Y,Q);l="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=n.slice(4);if(!Y.test(e)){let t=e.replace(K,J);"-"!==t.charAt(0)&&(t="-"+t),n="data"+t}}o=B}return new o(l,n)}function J(e){return"-"+e.toLowerCase()}function Q(e){return e.charAt(1).toUpperCase()}const ee=k([z,H,q,W,X],"html"),ne=k([z,V,q,W,X],"svg");function te(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function le(e){return e.join(" ").trim()}var oe,re,ae,ie={};function ue(){if(ae)return ie;ae=1;var e=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ie,"__esModule",{value:!0}),ie.default=function(e,t){let l=null;if(!e||"string"!=typeof e)return l;const o=(0,n.default)(e),r="function"==typeof t;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:o}=e;r?t(n,o,e):o&&(l=l||{},l[n]=o)}),l};const n=e(function(){if(re)return oe;re=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,u="";function s(e){return e?e.replace(i,u):u}return oe=function(i,c){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];c=c||{};var p=1,f=1;function d(e){var t=e.match(n);t&&(p+=t.length);var l=e.lastIndexOf("\n");f=~l?e.length-l:f+e.length}function h(){var e={line:p,column:f};return function(n){return n.position=new g(e),v(),n}}function g(e){this.start=e,this.end={line:p,column:f},this.source=c.source}function m(e){var n=new Error(c.source+":"+p+":"+f+": "+e);if(n.reason=e,n.filename=c.source,n.line=p,n.column=f,n.source=i,!c.silent)throw n}function y(e){var n=e.exec(i);if(n){var t=n[0];return d(t),i=i.slice(t.length),n}}function v(){y(t)}function b(e){var n;for(e=e||[];n=w();)!1!==n&&e.push(n);return e}function w(){var e=h();if("/"==i.charAt(0)&&"*"==i.charAt(1)){for(var n=2;u!=i.charAt(n)&&("*"!=i.charAt(n)||"/"!=i.charAt(n+1));)++n;if(n+=2,u===i.charAt(n-1))return m("End of comment missing");var t=i.slice(2,n-2);return f+=2,d(t),i=i.slice(n),f+=2,e({type:"comment",comment:t})}}function x(){var n=h(),t=y(l);if(t){if(w(),!y(o))return m("property missing ':'");var i=y(r),c=n({type:"declaration",property:s(t[0].replace(e,u)),value:i?s(i[0].replace(e,u)):u});return y(a),c}}return g.prototype.content=i,v(),function(){var e,n=[];for(b(n);e=x();)!1!==e&&(n.push(e),b(n));return n}()},oe}());return ie}var se,ce,pe,fe={};function de(){if(se)return fe;se=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,r=function(e,n){return n.toUpperCase()},a=function(e,n){return"".concat(n,"-")};return fe.camelCase=function(i,u){return void 0===u&&(u={}),function(n){return!n||t.test(n)||e.test(n)}(i)?i:(i=i.toLowerCase(),(i=u.reactCompat?i.replace(o,a):i.replace(l,a)).replace(n,r))},fe}var he=function(){if(pe)return ce;pe=1;var e=(ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ue()),n=de();function t(t,l){var o={};return t&&"string"==typeof t?((0,e.default)(t,function(e,t){e&&t&&(o[(0,n.camelCase)(e,l)]=t)}),o):o}return t.default=t,ce=t}(),ge=e(he);const me=ve("end"),ye=ve("start");function ve(e){return function(n){const t=n&&n.position&&n.position[e]||{};if("number"==typeof t.line&&t.line>0&&"number"==typeof t.column&&t.column>0)return{line:t.line,column:t.column,offset:"number"==typeof t.offset&&t.offset>-1?t.offset:void 0}}}function be(e){const n=ye(e),t=me(e);if(n&&t)return{start:n,end:t}}function we(e){const t=[];let l=-1,o=0,r=0;for(;++l<e.length;){const a=e.charCodeAt(l);let i="";if(37===a&&n(e.charCodeAt(l+1))&&n(e.charCodeAt(l+2)))r=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const n=e.charCodeAt(l+1);a<56320&&n>56319&&n<57344?(i=String.fromCharCode(a,n),r=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,l),encodeURIComponent(i)),o=l+r+1,i=""),r&&(l+=r,r=0)}return t.join("")+e.slice(o)}function xe(e,n){const t=n.referenceType;let l="]";if("collapsed"===t?l+="[]":"full"===t&&(l+="["+(n.label||n.identifier)+"]"),"imageReference"===n.type)return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),r=o[0];r&&"text"===r.type?r.value="["+r.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=l:o.push({type:"text",value:l}),o}function ke(e){const n=e.spread;return null==n?e.children.length>1:n}function Ce(e){const n=String(e),t=/\r?\n|\r/g;let l=t.exec(n),o=0;const r=[];for(;l;)r.push(Se(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=t.exec(n);return r.push(Se(n.slice(o),o>0,!1)),r.join("")}function Se(e,n,t){let l=0,o=e.length;if(n){let n=e.codePointAt(l);for(;9===n||32===n;)l++,n=e.codePointAt(l)}if(t){let n=e.codePointAt(o-1);for(;9===n||32===n;)o--,n=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}const De={blockquote:function(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)},break:function(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:"\n"}]},code:function(e,n){const t=n.value?n.value+"\n":"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:t}]};return n.meta&&(r.data={meta:n.meta}),e.patch(n,r),r=e.applyData(n,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(n,r),r},delete:function(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},emphasis:function(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},footnoteReference:function(e,n){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=we(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);let a,i=e.footnoteCounts.get(l);void 0===i?(i=0,e.footnoteOrder.push(l),a=e.footnoteOrder.length):a=r+1,i+=1,e.footnoteCounts.set(l,i);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+o,id:t+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,s),e.applyData(n,s)},heading:function(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},html:function(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}},imageReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={src:we(l.url||""),alt:n.alt};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,r),e.applyData(n,r)},image:function(e,n){const t={src:we(n.url)};null!==n.alt&&void 0!==n.alt&&(t.alt=n.alt),null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,l),e.applyData(n,l)},inlineCode:function(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const l={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,l),e.applyData(n,l)},linkReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={href:we(l.url||"")};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)},link:function(e,n){const t={href:we(n.url)};null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)},listItem:function(e,n,t){const l=e.all(n),o=t?function(e){let n=!1;if("list"===e.type){n=e.spread||!1;const t=e.children;let l=-1;for(;!n&&++l<t.length;)n=ke(t[l])}return n}(t):ke(n),r={},a=[];if("boolean"==typeof n.checked){const e=l[0];let t;e&&"element"===e.type&&"p"===e.tagName?t=e:(t={type:"element",tagName:"p",properties:{},children:[]},l.unshift(t)),t.children.length>0&&t.children.unshift({type:"text",value:" "}),t.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let i=-1;for(;++i<l.length;){const e=l[i];(o||0!==i||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const u=l[l.length-1];u&&(o||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:r,children:a};return e.patch(n,s),e.applyData(n,s)},list:function(e,n){const t={},l=e.all(n);let o=-1;for("number"==typeof n.start&&1!==n.start&&(t.start=n.start);++o<l.length;){const e=l[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const r={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(l,!0)};return e.patch(n,r),e.applyData(n,r)},paragraph:function(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},root:function(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)},strong:function(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},table:function(e,n){const t=e.all(n),l=t.shift(),o=[];if(l){const t={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],t),o.push(t)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},r=ye(n.children[1]),a=me(n.children[n.children.length-1]);r&&a&&(l.position={start:r,end:a}),o.push(l)}const r={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,r),e.applyData(n,r)},tableCell:function(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},tableRow:function(e,n,t){const l=t?t.children:void 0,o=0===(l?l.indexOf(n):1)?"th":"td",r=t&&"table"===t.type?t.align:void 0,a=r?r.length:n.children.length;let i=-1;const u=[];for(;++i<a;){const t=n.children[i],l={},a=r?r[i]:void 0;a&&(l.align=a);let s={type:"element",tagName:o,properties:l,children:[]};t&&(s.children=e.all(t),e.patch(t,s),s=e.applyData(t,s)),u.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,s),e.applyData(n,s)},text:function(e,n){const t={type:"text",value:Ce(String(n.value))};return e.patch(n,t),e.applyData(n,t)},thematicBreak:function(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)},toml:Ae,yaml:Ae,definition:Ae,footnoteDefinition:Ae};function Ae(){}const Ne="object"==typeof self?self:globalThis,Le=e=>((e,n)=>{const t=(n,t)=>(e.set(t,n),n),l=o=>{if(e.has(o))return e.get(o);const[r,a]=n[o];switch(r){case 0:case-1:return t(a,o);case 1:{const e=t([],o);for(const n of a)e.push(l(n));return e}case 2:{const e=t({},o);for(const[n,t]of a)e[l(n)]=l(t);return e}case 3:return t(new Date(a),o);case 4:{const{source:e,flags:n}=a;return t(new RegExp(e,n),o)}case 5:{const e=t(new Map,o);for(const[n,t]of a)e.set(l(n),l(t));return e}case 6:{const e=t(new Set,o);for(const n of a)e.add(l(n));return e}case 7:{const{name:e,message:n}=a;return t(new Ne[e](n),o)}case 8:return t(BigInt(a),o);case"BigInt":return t(Object(BigInt(a)),o);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return t(new DataView(e),a)}}return t(new Ne[r](a),o)};return l})(new Map,e)(0),Oe="",{toString:Pe}={},{keys:Me}=Object,Re=e=>{const n=typeof e;if("object"!==n||!e)return[0,n];const t=Pe.call(e).slice(8,-1);switch(t){case"Array":return[1,Oe];case"Object":return[2,Oe];case"Date":return[3,Oe];case"RegExp":return[4,Oe];case"Map":return[5,Oe];case"Set":return[6,Oe];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Te=([e,n])=>0===e&&("function"===n||"symbol"===n),Ee=(e,{json:n,lossy:t}={})=>{const l=[];return((e,n,t,l)=>{const o=(e,n)=>{const o=l.push(e)-1;return t.set(n,o),o},r=l=>{if(t.has(l))return t.get(l);let[a,i]=Re(l);switch(a){case 0:{let n=l;switch(i){case"bigint":a=8,n=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);n=null;break;case"undefined":return o([-1],l)}return o([a,n],l)}case 1:{if(i){let e=l;return"DataView"===i?e=new Uint8Array(l.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(l)),o([i,[...e]],l)}const e=[],n=o([a,e],l);for(const n of l)e.push(r(n));return n}case 2:{if(i)switch(i){case"BigInt":return o([i,l.toString()],l);case"Boolean":case"Number":case"String":return o([i,l.valueOf()],l)}if(n&&"toJSON"in l)return r(l.toJSON());const t=[],u=o([a,t],l);for(const n of Me(l))!e&&Te(Re(l[n]))||t.push([r(n),r(l[n])]);return u}case 3:return o([a,l.toISOString()],l);case 4:{const{source:e,flags:n}=l;return o([a,{source:e,flags:n}],l)}case 5:{const n=[],t=o([a,n],l);for(const[t,o]of l)(e||!Te(Re(t))&&!Te(Re(o)))&&n.push([r(t),r(o)]);return t}case 6:{const n=[],t=o([a,n],l);for(const t of l)!e&&Te(Re(t))||n.push(r(t));return t}}const{message:u}=l;return o([a,{name:i,message:u}],l)};return r})(!(n||t),!!n,new Map,l)(e),l};var Ie="function"==typeof structuredClone?(e,n)=>n&&("json"in n||"lossy"in n)?Le(Ee(e,n)):structuredClone(e):(e,n)=>Le(Ee(e,n));function Be(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ue(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}const je={}.hasOwnProperty,ze={};function Fe(e,n){e.position&&(n.position=be(e))}function _e(e,n){let t=n;if(e&&e.data){const n=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if("string"==typeof n)if("element"===t.type)t.tagName=n;else{t={type:"element",tagName:n,properties:{},children:"children"in t?t.children:[t]}}"element"===t.type&&o&&Object.assign(t.properties,Ie(o)),"children"in t&&t.children&&null!=l&&(t.children=l)}return t}function He(e,n){const t=n.data||{},l=!("value"in n)||je.call(t,"hProperties")||je.call(t,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(n)}:{type:"text",value:n.value};return e.patch(n,l),e.applyData(n,l)}function Ve(e,n){const t=[];let l=-1;for(n&&t.push({type:"text",value:"\n"});++l<e.length;)l&&t.push({type:"text",value:"\n"}),t.push(e[l]);return n&&e.length>0&&t.push({type:"text",value:"\n"}),t}function qe(e){let n=0,t=e.charCodeAt(n);for(;9===t||32===t;)n++,t=e.charCodeAt(n);return e.slice(n)}function We(e,n){const l=function(e,n){const l=n||ze,o=new Map,r=new Map,a=new Map,i={...De,...l.handlers},u={all:function(e){const n=[];if("children"in e){const t=e.children;let l=-1;for(;++l<t.length;){const o=u.one(t[l],e);if(o){if(l&&"break"===t[l-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=qe(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=qe(e.value))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n},applyData:_e,definitionById:o,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,n){const t=e.type,l=u.handlers[t];if(je.call(u.handlers,t)&&l)return l(u,e,n);if(u.options.passThrough&&u.options.passThrough.includes(t)){if("children"in e){const{children:n,...t}=e,l=Ie(t);return l.children=u.all(e),l}return Ie(e)}return(u.options.unknownHandler||He)(u,e,n)},options:l,patch:Fe,wrap:Ve};return t(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const n="definition"===e.type?o:r,t=String(e.identifier).toUpperCase();n.has(t)||n.set(t,e)}}),u}(e,n),o=l.one(e,void 0),r=function(e){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Be,l=e.options.footnoteBackLabel||Ue,o=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let u=-1;for(;++u<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[u]);if(!o)continue;const r=e.all(o),a=String(o.identifier).toUpperCase(),s=we(a.toLowerCase());let c=0;const p=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){p.length>0&&p.push({type:"text",value:" "});let e="string"==typeof t?t:t(u,c);"string"==typeof e&&(e={type:"text",value:e}),p.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof l?l:l(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=r[r.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...p)}else r.push(...p);const h={type:"element",tagName:"li",properties:{id:n+"fn-"+s},children:e.wrap(r,!0)};e.patch(o,h),i.push(h)}if(0!==i.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Ie(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:"\n"}]}}(l),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return r&&a.children.push({type:"text",value:"\n"},r),a}function Xe(e,n){return e&&"run"in e?async function(t,l){const o=We(t,{file:l,...n});await e.run(o,l)}:function(t,l){return We(t,{file:l,...e||n})}}const $e=/[#.]/g;function Ke(e,n,t){const l=t?function(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}(t):void 0;return function(t,o,...r){let a;if(null==t){a={type:"root",children:[]};const e=o;r.unshift(e)}else{a=function(e,n){const t=e||"",l={};let o,r,a=0;for(;a<t.length;){$e.lastIndex=a;const e=$e.exec(t),n=t.slice(a,e?e.index:t.length);n&&(o?"#"===o?l.id=n:Array.isArray(l.className)?l.className.push(n):l.className=[n]:r=n,a+=n.length),e&&(o=e[0],a++)}return{type:"element",tagName:r||n||"div",properties:l,children:[]}}(t,n);const i=a.tagName.toLowerCase(),u=l?l.get(i):void 0;if(a.tagName=u||i,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const n=e,t=Object.keys(e);for(const e of t){const t=n[e];if(t&&"object"==typeof t){if(!Array.isArray(t))return!0;const e=t;for(const n of e)if("number"!=typeof n&&"string"!=typeof n)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(o))r.unshift(o);else for(const[n,t]of Object.entries(o))Ye(e,a.properties,n,t)}for(const e of r)Ge(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function Ye(e,n,t,l){const o=Z(e,t);let r;if(null!=l){if("number"==typeof l){if(Number.isNaN(l))return;r=l}else r="boolean"==typeof l?l:"string"==typeof l?o.spaceSeparated?te(l):o.commaSeparated?i(l):o.commaOrSpaceSeparated?te(i(l).join(" ")):Ze(o,o.property,l):Array.isArray(l)?[...l]:"style"===o.property?function(e){const n=[];for(const[t,l]of Object.entries(e))n.push([t,l].join(": "));return n.join("; ")}(l):String(l);if(Array.isArray(r)){const e=[];for(const n of r)e.push(Ze(o,o.property,n));r=e}"className"===o.property&&Array.isArray(n.className)&&(r=n.className.concat(r)),n[o.property]=r}}function Ge(e,n){if(null==n);else if("number"==typeof n||"string"==typeof n)e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ge(e,t);else{if("object"!=typeof n||!("type"in n))throw new Error("Expected node, nodes, or string, got `"+n+"`");"root"===n.type?Ge(e,n.children):e.push(n)}}function Ze(e,n,t){if("string"==typeof t){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(""===t||C(t)===C(n)))return!0}return t}const Je=Ke(ee,"div"),Qe=Ke(ne,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),en={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nn(e,n){const t=function(e,n){switch(e.nodeType){case 1:return function(e,n){const t=e.namespaceURI,l=t===en.svg?Qe:Je,o=t===en.html?e.tagName.toLowerCase():e.tagName,r=t===en.html&&"template"===o?e.content:e,a=e.getAttributeNames(),i={};let u=-1;for(;++u<a.length;)i[a[u]]=e.getAttribute(a[u])||"";return l(o,i,ln(r,n))}(e,n);case 3:return function(e){return{type:"text",value:e.nodeValue||""}}(e);case 8:return function(e){return{type:"comment",value:e.nodeValue||""}}(e);case 9:return tn(e,n);case 10:return{type:"doctype"};case 11:return tn(e,n);default:return}}(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function tn(e,n){return{type:"root",children:ln(e,n)}}function ln(e,n){const t=e.childNodes,l=[];let o=-1;for(;++o<t.length;){const e=nn(t[o],n);void 0!==e&&l.push(e)}return l}function on(e,n){const t=function(e){const n=document.createElement("template");return n.innerHTML=e,n.content}(e);return nn(t,{})||{type:"root",children:[]}}new DOMParser;const rn=function(e,n,t){const o=l(t);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof n){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((n=e.children.indexOf(n))<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(o(e.children[n],n,e))return e.children[n]},an=function(e){if(null==e)return sn;if("string"==typeof e)return function(e){return un(n);function n(n){return n.tagName===e}}(e);if("object"==typeof e)return function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=an(e[t]);return un(l);function l(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}(e);if("function"==typeof e)return un(e);throw new Error("Expected function, string, or array as `test`")};function un(e){return function(n,t,l){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}(n)&&e.call(this,n,"number"==typeof t?t:void 0,l||void 0))}}function sn(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}const cn=/\n/g,pn=/[\t ]+/g,fn=an("br"),dn=an(function(e){return"td"===e.tagName||"th"===e.tagName}),hn=an("p"),gn=an("tr"),mn=an(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),yn=an(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function vn(e,n,t){return"element"===e.type?function(e,n,t){const l=xn(e,t),o=e.children||[];let r,a,i=-1,u=[];if(mn(e))return u;fn(e)||gn(e)&&rn(n,e,gn)?a="\n":hn(e)?(r=2,a=2):yn(e)&&(r=1,a=1);for(;++i<o.length;)u=u.concat(vn(o[i],e,{whitespace:l,breakBefore:i?void 0:r,breakAfter:i<o.length-1?fn(o[i+1]):a}));dn(e)&&rn(n,e,dn)&&u.push("\t");r&&u.unshift(r);a&&u.push(a);return u}(e,n,t):"text"===e.type?"normal"===t.whitespace?bn(e,t):function(e){return[String(e.value)]}(e):[]}function bn(e,n){const t=String(e.value),l=[],o=[];let r=0;for(;r<=t.length;){cn.lastIndex=r;const e=cn.exec(t),o=e&&"index"in e?e.index:t.length;l.push(wn(t.slice(r,o).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==r||n.breakBefore,o!==t.length||n.breakAfter)),r=o+1}let a,i=-1;for(;++i<l.length;)8203===l[i].charCodeAt(l[i].length-1)||i<l.length-1&&8203===l[i+1].charCodeAt(0)?(o.push(l[i]),a=void 0):l[i]?("number"==typeof a&&o.push(a),o.push(l[i]),a=0):0!==i&&i!==l.length-1||o.push(0);return o}function wn(e,n,t){const l=[];let o,r=0;for(;r<e.length;){pn.lastIndex=r;const t=pn.exec(e);o=t?t.index:e.length,r||o||!t||n||l.push(""),r!==o&&l.push(e.slice(r,o)),r=t?o+t[0].length:o}return r===o||t||l.push(""),l.join(" ")}function xn(e,n){if("element"===e.type){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}const kn={},Cn=[];function Sn(e){const n=e||kn;return function(e,t){o(e,"element",function(e,l){const o=Array.isArray(e.properties.className)?e.properties.className:Cn,i=o.includes("language-math"),u=o.includes("math-display"),s=o.includes("math-inline");let c=u;if(!i&&!u&&!s)return;let p=l[l.length-1],f=e;if("code"===e.tagName&&i&&p&&"element"===p.type&&"pre"===p.tagName&&(f=p,p=l[l.length-2],c=!0),!p)return;const d=function(e,n){const t=n||{},l="children"in e?e.children:[],o=yn(e),r=xn(e,{whitespace:t.whitespace||"normal"}),a=[];"text"!==e.type&&"comment"!==e.type||a.push(...bn(e,{breakBefore:!0,breakAfter:!0}));let i=-1;for(;++i<l.length;)a.push(...vn(l[i],e,{whitespace:r,breakBefore:i?void 0:o,breakAfter:i<l.length-1?fn(l[i+1]):o}));const u=[];let s;for(i=-1;++i<a.length;){const e=a[i];"number"==typeof e?void 0!==s&&e>s&&(s=e):e&&(void 0!==s&&s>-1&&u.push("\n".repeat(s)||" "),s=-1,u.push(e))}return u.join("")}(f,{whitespace:"pre"});let h;try{h=r.renderToString(d,{...n,displayMode:c,throwOnError:!0})}catch(o){const a=o,i=a.name.toLowerCase();t.message("Could not render math with KaTeX",{ancestors:[...l,e],cause:a,place:e.position,ruleId:i,source:"rehype-katex"});try{h=r.renderToString(d,{...n,displayMode:c,strict:"ignore",throwOnError:!1})}catch{h=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(o)},children:[{type:"text",value:d}]}]}}if("string"==typeof h){h=on(h).children}const g=p.children.indexOf(f);return p.children.splice(g,1,...h),a})}}export{u as a,le as b,$ as c,ge as d,en as e,Z as f,Qe as g,ee as h,Je as i,me as j,Ie as k,Sn as l,be as m,y as n,g as o,ye as p,m as q,Xe as r,ne as s,b as w};
1
+ import{z as e}from"./index-DjHFXv3v.js";import{e as n,v as t,f as l,g as o,k as r,S as a}from"./types-Cb2rrWcY.js";function i(e){const n=[],t=String(e||"");let l=t.indexOf(","),o=0,r=!1;for(;!r;){-1===l&&(l=t.length,r=!0);const e=t.slice(o,l).trim();!e&&r||n.push(e),o=l+1,l=t.indexOf(",",o)}return n}function u(e,n){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}const s=/[$_\p{ID_Start}]/u,c=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,p=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,f=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e){return!!e&&s.test(String.fromCodePoint(e))}function m(e,n){const t=(n||h).jsx?p:c;return!!e&&t.test(String.fromCodePoint(e))}function y(e,n){return((n||h).jsx?d:f).test(e)}const v=/[ \t\n\f\r]/g;function b(e){return"object"==typeof e?"text"===e.type&&w(e.value):w(e)}function w(e){return""===e.replace(v,"")}class x{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}}function k(e,n){const t={},l={};for(const n of e)Object.assign(t,n.property),Object.assign(l,n.normal);return new x(t,l,n)}function C(e){return e.toLowerCase()}x.prototype.normal={},x.prototype.property={},x.prototype.space=void 0;class S{constructor(e,n){this.attribute=n,this.property=e}}S.prototype.attribute="",S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property="",S.prototype.spaceSeparated=!1,S.prototype.space=void 0;let D=0;const A=T(),N=T(),L=T(),O=T(),P=T(),M=T(),R=T();function T(){return 2**++D}var E=Object.freeze({__proto__:null,boolean:A,booleanish:N,commaOrSpaceSeparated:R,commaSeparated:M,number:O,overloadedBoolean:L,spaceSeparated:P});const I=Object.keys(E);class B extends S{constructor(e,n,t,l){let o=-1;if(super(e,n),U(this,"space",l),"number"==typeof t)for(;++o<I.length;){const e=I[o];U(this,I[o],(t&E[e])===E[e])}}}function U(e,n,t){t&&(e[n]=t)}function j(e){const n={},t={};for(const[l,o]of Object.entries(e.properties)){const r=new B(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),n[l]=r,t[C(l)]=l,t[C(r.attribute)]=l}return new x(n,t,e.space)}B.prototype.defined=!0;const z=j({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:P,ariaCurrent:null,ariaDescribedBy:P,ariaDetails:null,ariaDisabled:N,ariaDropEffect:P,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:P,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P,ariaLevel:O,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:P,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:P,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:N,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform:(e,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function F(e,n){return n in e?e[n]:n}function _(e,n){return F(e,n.toLowerCase())}const H=j({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:M,acceptCharset:P,accessKey:P,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:P,autoFocus:A,autoPlay:A,blocking:P,capture:null,charSet:null,checked:A,cite:null,className:P,cols:O,colSpan:null,content:null,contentEditable:N,controls:A,controlsList:P,coords:O|M,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:L,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:P,height:O,hidden:L,high:O,href:null,hrefLang:null,htmlFor:P,httpEquiv:P,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:P,itemRef:P,itemScope:A,itemType:P,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,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:A,optimum:O,pattern:null,ping:P,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:P,required:A,reversed:A,rows:O,rowSpan:O,sandbox:P,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:N,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:A,disableRemotePlayback:A,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:_}),V=j({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",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:R,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:P,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:M,g2:M,glyphName:M,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F}),q=j({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,n)=>"xlink:"+n.slice(5).toLowerCase()}),W=j({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_}),X=j({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,n)=>"xml:"+n.slice(3).toLowerCase()}),$={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"},K=/[A-Z]/g,Y=/-[a-z]/g,G=/^data[-\w.:]+$/i;function Z(e,n){const t=C(n);let l=n,o=S;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&G.test(n)){if("-"===n.charAt(4)){const e=n.slice(5).replace(Y,Q);l="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=n.slice(4);if(!Y.test(e)){let t=e.replace(K,J);"-"!==t.charAt(0)&&(t="-"+t),n="data"+t}}o=B}return new o(l,n)}function J(e){return"-"+e.toLowerCase()}function Q(e){return e.charAt(1).toUpperCase()}const ee=k([z,H,q,W,X],"html"),ne=k([z,V,q,W,X],"svg");function te(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function le(e){return e.join(" ").trim()}var oe,re,ae,ie={};function ue(){if(ae)return ie;ae=1;var e=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ie,"__esModule",{value:!0}),ie.default=function(e,t){let l=null;if(!e||"string"!=typeof e)return l;const o=(0,n.default)(e),r="function"==typeof t;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:o}=e;r?t(n,o,e):o&&(l=l||{},l[n]=o)}),l};const n=e(function(){if(re)return oe;re=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,u="";function s(e){return e?e.replace(i,u):u}return oe=function(i,c){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];c=c||{};var p=1,f=1;function d(e){var t=e.match(n);t&&(p+=t.length);var l=e.lastIndexOf("\n");f=~l?e.length-l:f+e.length}function h(){var e={line:p,column:f};return function(n){return n.position=new g(e),v(),n}}function g(e){this.start=e,this.end={line:p,column:f},this.source=c.source}function m(e){var n=new Error(c.source+":"+p+":"+f+": "+e);if(n.reason=e,n.filename=c.source,n.line=p,n.column=f,n.source=i,!c.silent)throw n}function y(e){var n=e.exec(i);if(n){var t=n[0];return d(t),i=i.slice(t.length),n}}function v(){y(t)}function b(e){var n;for(e=e||[];n=w();)!1!==n&&e.push(n);return e}function w(){var e=h();if("/"==i.charAt(0)&&"*"==i.charAt(1)){for(var n=2;u!=i.charAt(n)&&("*"!=i.charAt(n)||"/"!=i.charAt(n+1));)++n;if(n+=2,u===i.charAt(n-1))return m("End of comment missing");var t=i.slice(2,n-2);return f+=2,d(t),i=i.slice(n),f+=2,e({type:"comment",comment:t})}}function x(){var n=h(),t=y(l);if(t){if(w(),!y(o))return m("property missing ':'");var i=y(r),c=n({type:"declaration",property:s(t[0].replace(e,u)),value:i?s(i[0].replace(e,u)):u});return y(a),c}}return g.prototype.content=i,v(),function(){var e,n=[];for(b(n);e=x();)!1!==e&&(n.push(e),b(n));return n}()},oe}());return ie}var se,ce,pe,fe={};function de(){if(se)return fe;se=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,r=function(e,n){return n.toUpperCase()},a=function(e,n){return"".concat(n,"-")};return fe.camelCase=function(i,u){return void 0===u&&(u={}),function(n){return!n||t.test(n)||e.test(n)}(i)?i:(i=i.toLowerCase(),(i=u.reactCompat?i.replace(o,a):i.replace(l,a)).replace(n,r))},fe}var he=function(){if(pe)return ce;pe=1;var e=(ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ue()),n=de();function t(t,l){var o={};return t&&"string"==typeof t?((0,e.default)(t,function(e,t){e&&t&&(o[(0,n.camelCase)(e,l)]=t)}),o):o}return t.default=t,ce=t}(),ge=e(he);const me=ve("end"),ye=ve("start");function ve(e){return function(n){const t=n&&n.position&&n.position[e]||{};if("number"==typeof t.line&&t.line>0&&"number"==typeof t.column&&t.column>0)return{line:t.line,column:t.column,offset:"number"==typeof t.offset&&t.offset>-1?t.offset:void 0}}}function be(e){const n=ye(e),t=me(e);if(n&&t)return{start:n,end:t}}function we(e){const t=[];let l=-1,o=0,r=0;for(;++l<e.length;){const a=e.charCodeAt(l);let i="";if(37===a&&n(e.charCodeAt(l+1))&&n(e.charCodeAt(l+2)))r=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const n=e.charCodeAt(l+1);a<56320&&n>56319&&n<57344?(i=String.fromCharCode(a,n),r=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,l),encodeURIComponent(i)),o=l+r+1,i=""),r&&(l+=r,r=0)}return t.join("")+e.slice(o)}function xe(e,n){const t=n.referenceType;let l="]";if("collapsed"===t?l+="[]":"full"===t&&(l+="["+(n.label||n.identifier)+"]"),"imageReference"===n.type)return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),r=o[0];r&&"text"===r.type?r.value="["+r.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=l:o.push({type:"text",value:l}),o}function ke(e){const n=e.spread;return null==n?e.children.length>1:n}function Ce(e){const n=String(e),t=/\r?\n|\r/g;let l=t.exec(n),o=0;const r=[];for(;l;)r.push(Se(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=t.exec(n);return r.push(Se(n.slice(o),o>0,!1)),r.join("")}function Se(e,n,t){let l=0,o=e.length;if(n){let n=e.codePointAt(l);for(;9===n||32===n;)l++,n=e.codePointAt(l)}if(t){let n=e.codePointAt(o-1);for(;9===n||32===n;)o--,n=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}const De={blockquote:function(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)},break:function(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:"\n"}]},code:function(e,n){const t=n.value?n.value+"\n":"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:t}]};return n.meta&&(r.data={meta:n.meta}),e.patch(n,r),r=e.applyData(n,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(n,r),r},delete:function(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},emphasis:function(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},footnoteReference:function(e,n){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=we(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);let a,i=e.footnoteCounts.get(l);void 0===i?(i=0,e.footnoteOrder.push(l),a=e.footnoteOrder.length):a=r+1,i+=1,e.footnoteCounts.set(l,i);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+o,id:t+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,s),e.applyData(n,s)},heading:function(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},html:function(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}},imageReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={src:we(l.url||""),alt:n.alt};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,r),e.applyData(n,r)},image:function(e,n){const t={src:we(n.url)};null!==n.alt&&void 0!==n.alt&&(t.alt=n.alt),null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,l),e.applyData(n,l)},inlineCode:function(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const l={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,l),e.applyData(n,l)},linkReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={href:we(l.url||"")};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)},link:function(e,n){const t={href:we(n.url)};null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)},listItem:function(e,n,t){const l=e.all(n),o=t?function(e){let n=!1;if("list"===e.type){n=e.spread||!1;const t=e.children;let l=-1;for(;!n&&++l<t.length;)n=ke(t[l])}return n}(t):ke(n),r={},a=[];if("boolean"==typeof n.checked){const e=l[0];let t;e&&"element"===e.type&&"p"===e.tagName?t=e:(t={type:"element",tagName:"p",properties:{},children:[]},l.unshift(t)),t.children.length>0&&t.children.unshift({type:"text",value:" "}),t.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let i=-1;for(;++i<l.length;){const e=l[i];(o||0!==i||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const u=l[l.length-1];u&&(o||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:r,children:a};return e.patch(n,s),e.applyData(n,s)},list:function(e,n){const t={},l=e.all(n);let o=-1;for("number"==typeof n.start&&1!==n.start&&(t.start=n.start);++o<l.length;){const e=l[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const r={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(l,!0)};return e.patch(n,r),e.applyData(n,r)},paragraph:function(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},root:function(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)},strong:function(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},table:function(e,n){const t=e.all(n),l=t.shift(),o=[];if(l){const t={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],t),o.push(t)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},r=ye(n.children[1]),a=me(n.children[n.children.length-1]);r&&a&&(l.position={start:r,end:a}),o.push(l)}const r={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,r),e.applyData(n,r)},tableCell:function(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},tableRow:function(e,n,t){const l=t?t.children:void 0,o=0===(l?l.indexOf(n):1)?"th":"td",r=t&&"table"===t.type?t.align:void 0,a=r?r.length:n.children.length;let i=-1;const u=[];for(;++i<a;){const t=n.children[i],l={},a=r?r[i]:void 0;a&&(l.align=a);let s={type:"element",tagName:o,properties:l,children:[]};t&&(s.children=e.all(t),e.patch(t,s),s=e.applyData(t,s)),u.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,s),e.applyData(n,s)},text:function(e,n){const t={type:"text",value:Ce(String(n.value))};return e.patch(n,t),e.applyData(n,t)},thematicBreak:function(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)},toml:Ae,yaml:Ae,definition:Ae,footnoteDefinition:Ae};function Ae(){}const Ne="object"==typeof self?self:globalThis,Le=e=>((e,n)=>{const t=(n,t)=>(e.set(t,n),n),l=o=>{if(e.has(o))return e.get(o);const[r,a]=n[o];switch(r){case 0:case-1:return t(a,o);case 1:{const e=t([],o);for(const n of a)e.push(l(n));return e}case 2:{const e=t({},o);for(const[n,t]of a)e[l(n)]=l(t);return e}case 3:return t(new Date(a),o);case 4:{const{source:e,flags:n}=a;return t(new RegExp(e,n),o)}case 5:{const e=t(new Map,o);for(const[n,t]of a)e.set(l(n),l(t));return e}case 6:{const e=t(new Set,o);for(const n of a)e.add(l(n));return e}case 7:{const{name:e,message:n}=a;return t(new Ne[e](n),o)}case 8:return t(BigInt(a),o);case"BigInt":return t(Object(BigInt(a)),o);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return t(new DataView(e),a)}}return t(new Ne[r](a),o)};return l})(new Map,e)(0),Oe="",{toString:Pe}={},{keys:Me}=Object,Re=e=>{const n=typeof e;if("object"!==n||!e)return[0,n];const t=Pe.call(e).slice(8,-1);switch(t){case"Array":return[1,Oe];case"Object":return[2,Oe];case"Date":return[3,Oe];case"RegExp":return[4,Oe];case"Map":return[5,Oe];case"Set":return[6,Oe];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Te=([e,n])=>0===e&&("function"===n||"symbol"===n),Ee=(e,{json:n,lossy:t}={})=>{const l=[];return((e,n,t,l)=>{const o=(e,n)=>{const o=l.push(e)-1;return t.set(n,o),o},r=l=>{if(t.has(l))return t.get(l);let[a,i]=Re(l);switch(a){case 0:{let n=l;switch(i){case"bigint":a=8,n=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);n=null;break;case"undefined":return o([-1],l)}return o([a,n],l)}case 1:{if(i){let e=l;return"DataView"===i?e=new Uint8Array(l.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(l)),o([i,[...e]],l)}const e=[],n=o([a,e],l);for(const n of l)e.push(r(n));return n}case 2:{if(i)switch(i){case"BigInt":return o([i,l.toString()],l);case"Boolean":case"Number":case"String":return o([i,l.valueOf()],l)}if(n&&"toJSON"in l)return r(l.toJSON());const t=[],u=o([a,t],l);for(const n of Me(l))!e&&Te(Re(l[n]))||t.push([r(n),r(l[n])]);return u}case 3:return o([a,l.toISOString()],l);case 4:{const{source:e,flags:n}=l;return o([a,{source:e,flags:n}],l)}case 5:{const n=[],t=o([a,n],l);for(const[t,o]of l)(e||!Te(Re(t))&&!Te(Re(o)))&&n.push([r(t),r(o)]);return t}case 6:{const n=[],t=o([a,n],l);for(const t of l)!e&&Te(Re(t))||n.push(r(t));return t}}const{message:u}=l;return o([a,{name:i,message:u}],l)};return r})(!(n||t),!!n,new Map,l)(e),l};var Ie="function"==typeof structuredClone?(e,n)=>n&&("json"in n||"lossy"in n)?Le(Ee(e,n)):structuredClone(e):(e,n)=>Le(Ee(e,n));function Be(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ue(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}const je={}.hasOwnProperty,ze={};function Fe(e,n){e.position&&(n.position=be(e))}function _e(e,n){let t=n;if(e&&e.data){const n=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if("string"==typeof n)if("element"===t.type)t.tagName=n;else{t={type:"element",tagName:n,properties:{},children:"children"in t?t.children:[t]}}"element"===t.type&&o&&Object.assign(t.properties,Ie(o)),"children"in t&&t.children&&null!=l&&(t.children=l)}return t}function He(e,n){const t=n.data||{},l=!("value"in n)||je.call(t,"hProperties")||je.call(t,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(n)}:{type:"text",value:n.value};return e.patch(n,l),e.applyData(n,l)}function Ve(e,n){const t=[];let l=-1;for(n&&t.push({type:"text",value:"\n"});++l<e.length;)l&&t.push({type:"text",value:"\n"}),t.push(e[l]);return n&&e.length>0&&t.push({type:"text",value:"\n"}),t}function qe(e){let n=0,t=e.charCodeAt(n);for(;9===t||32===t;)n++,t=e.charCodeAt(n);return e.slice(n)}function We(e,n){const l=function(e,n){const l=n||ze,o=new Map,r=new Map,a=new Map,i={...De,...l.handlers},u={all:function(e){const n=[];if("children"in e){const t=e.children;let l=-1;for(;++l<t.length;){const o=u.one(t[l],e);if(o){if(l&&"break"===t[l-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=qe(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=qe(e.value))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n},applyData:_e,definitionById:o,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,n){const t=e.type,l=u.handlers[t];if(je.call(u.handlers,t)&&l)return l(u,e,n);if(u.options.passThrough&&u.options.passThrough.includes(t)){if("children"in e){const{children:n,...t}=e,l=Ie(t);return l.children=u.all(e),l}return Ie(e)}return(u.options.unknownHandler||He)(u,e,n)},options:l,patch:Fe,wrap:Ve};return t(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const n="definition"===e.type?o:r,t=String(e.identifier).toUpperCase();n.has(t)||n.set(t,e)}}),u}(e,n),o=l.one(e,void 0),r=function(e){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Be,l=e.options.footnoteBackLabel||Ue,o=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let u=-1;for(;++u<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[u]);if(!o)continue;const r=e.all(o),a=String(o.identifier).toUpperCase(),s=we(a.toLowerCase());let c=0;const p=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){p.length>0&&p.push({type:"text",value:" "});let e="string"==typeof t?t:t(u,c);"string"==typeof e&&(e={type:"text",value:e}),p.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof l?l:l(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=r[r.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...p)}else r.push(...p);const h={type:"element",tagName:"li",properties:{id:n+"fn-"+s},children:e.wrap(r,!0)};e.patch(o,h),i.push(h)}if(0!==i.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Ie(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:"\n"}]}}(l),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return r&&a.children.push({type:"text",value:"\n"},r),a}function Xe(e,n){return e&&"run"in e?async function(t,l){const o=We(t,{file:l,...n});await e.run(o,l)}:function(t,l){return We(t,{file:l,...e||n})}}const $e=/[#.]/g;function Ke(e,n,t){const l=t?function(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}(t):void 0;return function(t,o,...r){let a;if(null==t){a={type:"root",children:[]};const e=o;r.unshift(e)}else{a=function(e,n){const t=e||"",l={};let o,r,a=0;for(;a<t.length;){$e.lastIndex=a;const e=$e.exec(t),n=t.slice(a,e?e.index:t.length);n&&(o?"#"===o?l.id=n:Array.isArray(l.className)?l.className.push(n):l.className=[n]:r=n,a+=n.length),e&&(o=e[0],a++)}return{type:"element",tagName:r||n||"div",properties:l,children:[]}}(t,n);const i=a.tagName.toLowerCase(),u=l?l.get(i):void 0;if(a.tagName=u||i,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const n=e,t=Object.keys(e);for(const e of t){const t=n[e];if(t&&"object"==typeof t){if(!Array.isArray(t))return!0;const e=t;for(const n of e)if("number"!=typeof n&&"string"!=typeof n)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(o))r.unshift(o);else for(const[n,t]of Object.entries(o))Ye(e,a.properties,n,t)}for(const e of r)Ge(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function Ye(e,n,t,l){const o=Z(e,t);let r;if(null!=l){if("number"==typeof l){if(Number.isNaN(l))return;r=l}else r="boolean"==typeof l?l:"string"==typeof l?o.spaceSeparated?te(l):o.commaSeparated?i(l):o.commaOrSpaceSeparated?te(i(l).join(" ")):Ze(o,o.property,l):Array.isArray(l)?[...l]:"style"===o.property?function(e){const n=[];for(const[t,l]of Object.entries(e))n.push([t,l].join(": "));return n.join("; ")}(l):String(l);if(Array.isArray(r)){const e=[];for(const n of r)e.push(Ze(o,o.property,n));r=e}"className"===o.property&&Array.isArray(n.className)&&(r=n.className.concat(r)),n[o.property]=r}}function Ge(e,n){if(null==n);else if("number"==typeof n||"string"==typeof n)e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ge(e,t);else{if("object"!=typeof n||!("type"in n))throw new Error("Expected node, nodes, or string, got `"+n+"`");"root"===n.type?Ge(e,n.children):e.push(n)}}function Ze(e,n,t){if("string"==typeof t){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(""===t||C(t)===C(n)))return!0}return t}const Je=Ke(ee,"div"),Qe=Ke(ne,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),en={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nn(e,n){const t=function(e,n){switch(e.nodeType){case 1:return function(e,n){const t=e.namespaceURI,l=t===en.svg?Qe:Je,o=t===en.html?e.tagName.toLowerCase():e.tagName,r=t===en.html&&"template"===o?e.content:e,a=e.getAttributeNames(),i={};let u=-1;for(;++u<a.length;)i[a[u]]=e.getAttribute(a[u])||"";return l(o,i,ln(r,n))}(e,n);case 3:return function(e){return{type:"text",value:e.nodeValue||""}}(e);case 8:return function(e){return{type:"comment",value:e.nodeValue||""}}(e);case 9:return tn(e,n);case 10:return{type:"doctype"};case 11:return tn(e,n);default:return}}(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function tn(e,n){return{type:"root",children:ln(e,n)}}function ln(e,n){const t=e.childNodes,l=[];let o=-1;for(;++o<t.length;){const e=nn(t[o],n);void 0!==e&&l.push(e)}return l}function on(e,n){const t=function(e){const n=document.createElement("template");return n.innerHTML=e,n.content}(e);return nn(t,{})||{type:"root",children:[]}}new DOMParser;const rn=function(e,n,t){const o=l(t);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof n){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((n=e.children.indexOf(n))<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(o(e.children[n],n,e))return e.children[n]},an=function(e){if(null==e)return sn;if("string"==typeof e)return function(e){return un(n);function n(n){return n.tagName===e}}(e);if("object"==typeof e)return function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=an(e[t]);return un(l);function l(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}(e);if("function"==typeof e)return un(e);throw new Error("Expected function, string, or array as `test`")};function un(e){return function(n,t,l){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}(n)&&e.call(this,n,"number"==typeof t?t:void 0,l||void 0))}}function sn(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}const cn=/\n/g,pn=/[\t ]+/g,fn=an("br"),dn=an(function(e){return"td"===e.tagName||"th"===e.tagName}),hn=an("p"),gn=an("tr"),mn=an(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),yn=an(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function vn(e,n,t){return"element"===e.type?function(e,n,t){const l=xn(e,t),o=e.children||[];let r,a,i=-1,u=[];if(mn(e))return u;fn(e)||gn(e)&&rn(n,e,gn)?a="\n":hn(e)?(r=2,a=2):yn(e)&&(r=1,a=1);for(;++i<o.length;)u=u.concat(vn(o[i],e,{whitespace:l,breakBefore:i?void 0:r,breakAfter:i<o.length-1?fn(o[i+1]):a}));dn(e)&&rn(n,e,dn)&&u.push("\t");r&&u.unshift(r);a&&u.push(a);return u}(e,n,t):"text"===e.type?"normal"===t.whitespace?bn(e,t):function(e){return[String(e.value)]}(e):[]}function bn(e,n){const t=String(e.value),l=[],o=[];let r=0;for(;r<=t.length;){cn.lastIndex=r;const e=cn.exec(t),o=e&&"index"in e?e.index:t.length;l.push(wn(t.slice(r,o).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==r||n.breakBefore,o!==t.length||n.breakAfter)),r=o+1}let a,i=-1;for(;++i<l.length;)8203===l[i].charCodeAt(l[i].length-1)||i<l.length-1&&8203===l[i+1].charCodeAt(0)?(o.push(l[i]),a=void 0):l[i]?("number"==typeof a&&o.push(a),o.push(l[i]),a=0):0!==i&&i!==l.length-1||o.push(0);return o}function wn(e,n,t){const l=[];let o,r=0;for(;r<e.length;){pn.lastIndex=r;const t=pn.exec(e);o=t?t.index:e.length,r||o||!t||n||l.push(""),r!==o&&l.push(e.slice(r,o)),r=t?o+t[0].length:o}return r===o||t||l.push(""),l.join(" ")}function xn(e,n){if("element"===e.type){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}const kn={},Cn=[];function Sn(e){const n=e||kn;return function(e,t){o(e,"element",function(e,l){const o=Array.isArray(e.properties.className)?e.properties.className:Cn,i=o.includes("language-math"),u=o.includes("math-display"),s=o.includes("math-inline");let c=u;if(!i&&!u&&!s)return;let p=l[l.length-1],f=e;if("code"===e.tagName&&i&&p&&"element"===p.type&&"pre"===p.tagName&&(f=p,p=l[l.length-2],c=!0),!p)return;const d=function(e,n){const t=n||{},l="children"in e?e.children:[],o=yn(e),r=xn(e,{whitespace:t.whitespace||"normal"}),a=[];"text"!==e.type&&"comment"!==e.type||a.push(...bn(e,{breakBefore:!0,breakAfter:!0}));let i=-1;for(;++i<l.length;)a.push(...vn(l[i],e,{whitespace:r,breakBefore:i?void 0:o,breakAfter:i<l.length-1?fn(l[i+1]):o}));const u=[];let s;for(i=-1;++i<a.length;){const e=a[i];"number"==typeof e?void 0!==s&&e>s&&(s=e):e&&(void 0!==s&&s>-1&&u.push("\n".repeat(s)||" "),s=-1,u.push(e))}return u.join("")}(f,{whitespace:"pre"});let h;try{h=r.renderToString(d,{...n,displayMode:c,throwOnError:!0})}catch(o){const a=o,i=a.name.toLowerCase();t.message("Could not render math with KaTeX",{ancestors:[...l,e],cause:a,place:e.position,ruleId:i,source:"rehype-katex"});try{h=r.renderToString(d,{...n,displayMode:c,strict:"ignore",throwOnError:!1})}catch{h=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(o)},children:[{type:"text",value:d}]}]}}if("string"==typeof h){h=on(h).children}const g=p.children.indexOf(f);return p.children.splice(g,1,...h),a})}}export{u as a,le as b,$ as c,ge as d,en as e,Z as f,Qe as g,ee as h,Je as i,me as j,Ie as k,Sn as l,be as m,y as n,g as o,ye as p,m as q,Xe as r,ne as s,b as w};