vibelet 1.2.239 → 1.2.241

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 (138) hide show
  1. package/README.md +26 -6
  2. package/dist/cloudflared/LICENSE +202 -0
  3. package/dist/cloudflared/manifest.json +96 -0
  4. package/dist/index.cjs +1 -1
  5. package/dist/inventory-scan-worker.cjs +1 -1
  6. package/dist/remoteDirect/manifest.json +65 -0
  7. package/dist/runtime-version.cjs +1 -1
  8. package/dist/vibelet.mjs +67 -9
  9. package/dist/web/assets/App-DXhmlTQu.js +2 -0
  10. package/dist/web/assets/{App-B0w50ugd.css → App-DoFtS2ld.css} +1 -1
  11. package/dist/web/assets/BrowserControlPanel-HSOIppjA.js +1 -0
  12. package/dist/web/assets/ChatPane-BaAKWPnJ.js +2 -0
  13. package/dist/web/assets/ChatPane-DG_WUdJo.css +1 -0
  14. package/dist/web/assets/{ChipGroup-CW7pSZ1H.js → ChipGroup-CXqq2wlt.js} +1 -1
  15. package/dist/web/assets/{ComposerMenus-wrk6Gio2.js → ComposerMenus-rXTcwRKu.js} +1 -1
  16. package/dist/web/assets/{DiffDrawer-BA2Hbb9d.js → DiffDrawer-CXfOImnm.js} +1 -1
  17. package/dist/web/assets/{FilesControlPanel-BazHfGx5.js → FilesControlPanel-Dlvt1Gp1.js} +1 -1
  18. package/dist/web/assets/{GlobalPendingDialog-CzVR6KXb.js → GlobalPendingDialog-B4mfzOBi.js} +1 -1
  19. package/dist/web/assets/{ImageViewer-TeTrYqhq.js → ImageViewer-C36pXFoT.js} +1 -1
  20. package/dist/web/assets/{LanguageSettingsPanel-BU_E69VO.js → LanguageSettingsPanel-Bb44m-LR.js} +1 -1
  21. package/dist/web/assets/{MarkdownModePanel-Cf1zF1CS.js → MarkdownModePanel-CNaSfmI8.js} +1 -1
  22. package/dist/web/assets/{MessageImage-Beca9pI9.js → MessageImage-CAhJXwr7.js} +1 -1
  23. package/dist/web/assets/NewSessionDialog-BIVNe-MJ.js +1 -0
  24. package/dist/web/assets/NewSessionDialog-eX_6NPbk.css +1 -0
  25. package/dist/web/assets/{NotificationSettingsPanel-DbDEqalL.js → NotificationSettingsPanel-FbuRkW04.js} +1 -1
  26. package/dist/web/assets/{PanelFind-C_SuWRdx.js → PanelFind-DnzTO9GZ.js} +1 -1
  27. package/dist/web/assets/RemoteLifeOSBlock-Bhm7Sf00.js +2 -0
  28. package/dist/web/assets/{RemoteWorkspaceSettings-C2-LkNIY.js → RemoteWorkspaceSettings-DX0IhsyZ.js} +1 -1
  29. package/dist/web/assets/{SessionTerminalPanel-0eTDyrbE.js → SessionTerminalPanel-CBbwf8LG.js} +2 -2
  30. package/dist/web/assets/{SpeechInputSettingsPanel-CPbNY2rE.js → SpeechInputSettingsPanel-Cx71yVTZ.js} +1 -1
  31. package/dist/web/assets/{ThemeSettingsPanel-18vq_pMT.js → ThemeSettingsPanel-CxEeL1Yb.js} +1 -1
  32. package/dist/web/assets/{__vite-browser-external-2447137e-DiZsMwIM.js → __vite-browser-external-2447137e-DrC7dgv5.js} +1 -1
  33. package/dist/web/assets/{abnfDiagram-VRR7QNED-D16YT2oa.js → abnfDiagram-VRR7QNED-ChWHpAet.js} +1 -1
  34. package/dist/web/assets/{arc-CD8cZzH1.js → arc-Dfxnvl-t.js} +1 -1
  35. package/dist/web/assets/{architectureDiagram-ZJ3FMSHR-BoHVV-Bf.js → architectureDiagram-ZJ3FMSHR-kBLnPqES.js} +1 -1
  36. package/dist/web/assets/{arrow-left-BWX9F1j7.js → arrow-left-BUz_m4Oq.js} +1 -1
  37. package/dist/web/assets/{arrow-right-DL315HuR.js → arrow-right-BY4NPg2p.js} +1 -1
  38. package/dist/web/assets/{blockDiagram-677ZJIJ3-dankl6OT.js → blockDiagram-677ZJIJ3-BNtwjuTh.js} +1 -1
  39. package/dist/web/assets/{c4Diagram-LMCZKHZV-CnEfLirT.js → c4Diagram-LMCZKHZV-8D-Mwesb.js} +1 -1
  40. package/dist/web/assets/channel-DZo4wTF7.js +1 -0
  41. package/dist/web/assets/chevron-up-DQfpYsuw.js +1 -0
  42. package/dist/web/assets/{chunk-2Q5K7J3B-Cf6eEkXb.js → chunk-2Q5K7J3B-B5fYkjtP.js} +1 -1
  43. package/dist/web/assets/{chunk-32BRIVSS-B-mFVfY1.js → chunk-32BRIVSS-tN_bs2O_.js} +1 -1
  44. package/dist/web/assets/{chunk-5VM5RSS4-vZpebBcz.js → chunk-5VM5RSS4-BVcBoYrd.js} +1 -1
  45. package/dist/web/assets/{chunk-EX3LRPZG-qX5Ystpv.js → chunk-EX3LRPZG-CuXY6NcI.js} +1 -1
  46. package/dist/web/assets/{chunk-JWPE2WC7-CikZm0lV.js → chunk-JWPE2WC7-C9fui0AP.js} +1 -1
  47. package/dist/web/assets/{chunk-MOJQB5TN-BLeio_v0.js → chunk-MOJQB5TN-BsNzYnoh.js} +1 -1
  48. package/dist/web/assets/{chunk-RYQCIY6F-BYZjdg_s.js → chunk-RYQCIY6F-KV-COyMH.js} +1 -1
  49. package/dist/web/assets/{chunk-V7JOEXUC-5QaQnF3b.js → chunk-V7JOEXUC-BtdUd2AL.js} +1 -1
  50. package/dist/web/assets/{chunk-VR4S4FIN-ztEf7jtF.js → chunk-VR4S4FIN-CvibGV30.js} +1 -1
  51. package/dist/web/assets/{chunk-XXDRQBXY-BKO3NrVs.js → chunk-XXDRQBXY-BQgo6g4Q.js} +1 -1
  52. package/dist/web/assets/classDiagram-OUVF2IWQ-kVNkVXMH.js +1 -0
  53. package/dist/web/assets/classDiagram-v2-EOCWNBFH-kVNkVXMH.js +1 -0
  54. package/dist/web/assets/{collectMessageImages-D1Qfi5Ue.js → collectMessageImages-DfQK7APc.js} +1 -1
  55. package/dist/web/assets/{cose-bilkent-JH36ORCC-BjuHC-9r.js → cose-bilkent-JH36ORCC-DqJjP-1o.js} +1 -1
  56. package/dist/web/assets/{cynefin-VYW2F7L2-C9WA3Klp.js → cynefin-VYW2F7L2-CYle_Oh3.js} +1 -1
  57. package/dist/web/assets/{cynefinDiagram-TSTJHNR4-BrkQLEng.js → cynefinDiagram-TSTJHNR4-Cs6U5rP8.js} +1 -1
  58. package/dist/web/assets/{dagre-VKFMJZFB-COXHxqP3.js → dagre-VKFMJZFB-B0PDjiVu.js} +1 -1
  59. package/dist/web/assets/{diagram-FQU43EPY-BFIgdo4s.js → diagram-FQU43EPY-D1G0yF91.js} +1 -1
  60. package/dist/web/assets/{diagram-G47NLZAW-D1fQm8BL.js → diagram-G47NLZAW-jMb0G0ac.js} +1 -1
  61. package/dist/web/assets/{diagram-NH7WQ7WH-BD0xfVRd.js → diagram-NH7WQ7WH-Dsybvax5.js} +1 -1
  62. package/dist/web/assets/{diagram-OA4YK3LP-CaiohUvX.js → diagram-OA4YK3LP-C-mEVY1q.js} +1 -1
  63. package/dist/web/assets/{diagram-WEI45ONY-CcH3TCt-.js → diagram-WEI45ONY-AWFjaNNW.js} +1 -1
  64. package/dist/web/assets/{ebnfDiagram-CCIWWBDH-qLIcGxWI.js → ebnfDiagram-CCIWWBDH-DDcjK3O9.js} +1 -1
  65. package/dist/web/assets/{erDiagram-Q63AITRT-CoL7qrIU.js → erDiagram-Q63AITRT-EbcQ9tS4.js} +1 -1
  66. package/dist/web/assets/{file-editor-FileCodeEditor-fPld0d8r.js → file-editor-FileCodeEditor-b6IgEhB0.js} +1 -1
  67. package/dist/web/assets/{file-editor-ObsidianCodeEditor-DfjD9J5s.js → file-editor-ObsidianCodeEditor-B8GDcuAu.js} +1 -1
  68. package/dist/web/assets/file-editor-ObsidianFileEditor-xduoJU9L.js +2 -0
  69. package/dist/web/assets/{flowDiagram-23GEKE2U-upXJb-cK.js → flowDiagram-23GEKE2U-Duhlfe1V.js} +1 -1
  70. package/dist/web/assets/{folder-plus-DrReR7Th.js → folder-plus-CPlBpAjK.js} +1 -1
  71. package/dist/web/assets/{ganttDiagram-NO4QXBWP-Boq7ZfbG.js → ganttDiagram-NO4QXBWP-rxIBQVNR.js} +1 -1
  72. package/dist/web/assets/{gitGraphDiagram-IHSO6WYX-C3UD7kxM.js → gitGraphDiagram-IHSO6WYX-CfgOr47E.js} +1 -1
  73. package/dist/web/assets/highlighted-body-TPN3WLV5-Cnt0-aIs.js +1 -0
  74. package/dist/web/assets/{imageViewerCopy-BMcwovIT.js → imageViewerCopy-DbcGAYOb.js} +1 -1
  75. package/dist/web/assets/{index-OdgHTLbm.js → index-C0OnaOQ9.js} +1 -1
  76. package/dist/web/assets/{index-CJZRHYmg.js → index-CUEPjMAK.js} +1 -1
  77. package/dist/web/assets/index-Cg-hTlne.js +2 -0
  78. package/dist/web/assets/{index-IHEjoxaX.js → index-DIhhLINU.js} +1 -1
  79. package/dist/web/assets/infoDiagram-FWYZ7A6U-ClEYLmSr.js +1 -0
  80. package/dist/web/assets/{ishikawaDiagram-FXEZZL3T-C5c9muOA.js → ishikawaDiagram-FXEZZL3T-CrwkydfS.js} +1 -1
  81. package/dist/web/assets/{journeyDiagram-5HDEW3XC-D6YhCPzt.js → journeyDiagram-5HDEW3XC-9mpjCVzY.js} +1 -1
  82. package/dist/web/assets/{kanban-definition-HUTT4EX6-DDtSDQB3.js → kanban-definition-HUTT4EX6-BHH-hi9E.js} +1 -1
  83. package/dist/web/assets/{key-round-Bu4tTOs1.js → key-round-BTcpevK5.js} +1 -1
  84. package/dist/web/assets/{linear-Cn0QcXcT.js → linear-BFyDT02f.js} +1 -1
  85. package/dist/web/assets/{mermaid-O7DHMXV3-Da6OUdgR.js → mermaid-O7DHMXV3-Btm49B1f.js} +2 -2
  86. package/dist/web/assets/{mermaid.core-B71KCuEy.js → mermaid.core-DsV-uGyB.js} +2 -2
  87. package/dist/web/assets/{mic-BJRlwfse.js → mic--tu-R1CO.js} +1 -1
  88. package/dist/web/assets/{mindmap-definition-LN4V7U3C-CzqgcnU8.js → mindmap-definition-LN4V7U3C-BKiIDYsx.js} +1 -1
  89. package/dist/web/assets/{pegDiagram-2B236MQR-BBBLeyAR.js → pegDiagram-2B236MQR-sKr_MbJ8.js} +1 -1
  90. package/dist/web/assets/{pieDiagram-ENE6RG2P-wDmBek2O.js → pieDiagram-ENE6RG2P-BDfwhOm3.js} +1 -1
  91. package/dist/web/assets/{quadrantDiagram-ABIIQ3AL-CiHFwAYe.js → quadrantDiagram-ABIIQ3AL-DP98F4Tc.js} +1 -1
  92. package/dist/web/assets/{railroadDiagram-RFXS5EU6-Bzato2yp.js → railroadDiagram-RFXS5EU6-CEIxXnOV.js} +1 -1
  93. package/dist/web/assets/{requirementDiagram-TGXJPOKE-D_9LFmYp.js → requirementDiagram-TGXJPOKE-BFQiFukq.js} +1 -1
  94. package/dist/web/assets/{sankeyDiagram-HTMAVEWB-D108ZeA-.js → sankeyDiagram-HTMAVEWB-CK7qSKcH.js} +1 -1
  95. package/dist/web/assets/{sequenceDiagram-DBY2YBRQ-BpS0Gg69.js → sequenceDiagram-DBY2YBRQ-DAsJtbEE.js} +1 -1
  96. package/dist/web/assets/{shield-check-CGxGNyPR.js → shield-check-DPmOpYg5.js} +1 -1
  97. package/dist/web/assets/{sizeCapture-X5ZJPWSS-BSEM5OEf.js → sizeCapture-X5ZJPWSS-BGpUlliu.js} +1 -1
  98. package/dist/web/assets/{stateDiagram-2N3HPSRC-Do4VQPVi.js → stateDiagram-2N3HPSRC-C54QLFU7.js} +1 -1
  99. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-C1gZlI03.js +1 -0
  100. package/dist/web/assets/{swimlanes-5IMT3BWC-r788e2DT.js → swimlanes-5IMT3BWC-BiTjNgIT.js} +2 -2
  101. package/dist/web/assets/swimlanesDiagram-G3AALYLV-DMEyjS0M.js +1 -0
  102. package/dist/web/assets/{timeline-definition-FHXFAJF6-YulkUzoz.js → timeline-definition-FHXFAJF6-C8-hX5IV.js} +1 -1
  103. package/dist/web/assets/{ComposerModelSettings-CHnw14co.css → useComposerCompletion-B0xUeljY.css} +1 -1
  104. package/dist/web/assets/useComposerCompletion-gVIPCpAa.js +1 -0
  105. package/dist/web/assets/{useMessageImage-DAqXbRED.js → useMessageImage-IJxrl7nu.js} +1 -1
  106. package/dist/web/assets/{vennDiagram-L72KCM5P-BQEO8zby.js → vennDiagram-L72KCM5P-Dsqo3cMF.js} +1 -1
  107. package/dist/web/assets/{wardleyDiagram-EHGQE667-CR0Nflio.js → wardleyDiagram-EHGQE667-CeAk-yQG.js} +1 -1
  108. package/dist/web/assets/{xychartDiagram-FW5EYKEG-DSDhUpzz.js → xychartDiagram-FW5EYKEG-y6abbBAM.js} +1 -1
  109. package/dist/web/assets/{zap-CxrOlc87.js → zap-BBEUMj_u.js} +1 -1
  110. package/dist/web/index.html +1 -1
  111. package/dist/web/obsidian-editor-assets.json +1 -1
  112. package/package.json +23 -2
  113. package/scripts/install-cloudflared.mjs +58 -0
  114. package/scripts/install-remote-direct.mjs +50 -0
  115. package/dist/remoteDirect/vibelet-remote-direct-darwin-amd64 +0 -0
  116. package/dist/remoteDirect/vibelet-remote-direct-darwin-arm64 +0 -0
  117. package/dist/remoteDirect/vibelet-remote-direct-linux-amd64 +0 -0
  118. package/dist/remoteDirect/vibelet-remote-direct-linux-arm64 +0 -0
  119. package/dist/remoteDirect/vibelet-remote-direct-win32-amd64.exe +0 -0
  120. package/dist/remoteDirect/vibelet-remote-direct-win32-arm64.exe +0 -0
  121. package/dist/web/assets/App-DKhLAmub.js +0 -2
  122. package/dist/web/assets/BrowserControlPanel-CauziPMg.js +0 -1
  123. package/dist/web/assets/ChatPane-CEoPrwLT.css +0 -1
  124. package/dist/web/assets/ChatPane-Dsv1Sp_0.js +0 -2
  125. package/dist/web/assets/ComposerModelSettings-D3QMPRfS.js +0 -1
  126. package/dist/web/assets/NewSessionDialog-5JSvL7EJ.css +0 -1
  127. package/dist/web/assets/NewSessionDialog-CPC0n7i2.js +0 -1
  128. package/dist/web/assets/RemoteLifeOSBlock-aE9tb99H.js +0 -2
  129. package/dist/web/assets/channel-eAy6Uhzj.js +0 -1
  130. package/dist/web/assets/chevron-up-bHY6-UxU.js +0 -1
  131. package/dist/web/assets/classDiagram-OUVF2IWQ-DH_JRr8n.js +0 -1
  132. package/dist/web/assets/classDiagram-v2-EOCWNBFH-DH_JRr8n.js +0 -1
  133. package/dist/web/assets/file-editor-ObsidianFileEditor-jdTZNnN9.js +0 -2
  134. package/dist/web/assets/highlighted-body-TPN3WLV5-iUQ394Gx.js +0 -1
  135. package/dist/web/assets/index-CArel_iz.js +0 -2
  136. package/dist/web/assets/infoDiagram-FWYZ7A6U-D9e8ooN4.js +0 -1
  137. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-DEy9N7yk.js +0 -1
  138. package/dist/web/assets/swimlanesDiagram-G3AALYLV-BbEmmRWA.js +0 -1
@@ -1 +1 @@
1
- import{u as e,a as t,n,b as i,c as r,m as o,d as l,e as a,g as s,s as c,r as u,h as f,i as h,j as p,k as g}from"./index-OdgHTLbm.js";import{c as d,v as m,o as k,a as b,h as x}from"./index-CJZRHYmg.js";function y(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=y(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function v(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=y(e))&&(i&&(i+=" "),i+=t);return i}function C(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function w(e){return"function"==typeof e?e:function(){return e}}const D="phrasing",F=["autolink","link","image","label"];function L(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function A(e){this.config.enter.autolinkProtocol.call(this,e)}function M(e){this.config.exit.autolinkProtocol.call(this,e)}function S(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];k("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function j(e){this.config.exit.autolinkEmail.call(this,e)}function O(e){this.exit(e)}function z(e){!function(e,t){const n=d(({ignore:["link","linkReference"]}||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const e=n[i];t.push([C(e[0]),w(e[1])])}return t}(t);let r=-1;for(;++r<i.length;)m(e,"text",o);function o(e,t){let o,l=-1;for(;++l<t.length;){const e=t[l],i=o?o.children:void 0;if(n(e,i?i.indexOf(e):void 0,o))return;o=e}if(o)return function(e,t){const n=t[t.length-1],o=i[r][0],l=i[r][1];let a=0;const s=n.children.indexOf(e);let c=!1,u=[];o.lastIndex=0;let f=o.exec(e.value);for(;f;){const n=f.index,i={index:f.index,input:f.input,stack:[...t,e]};let r=l(...f,i);if("string"==typeof r&&(r=r.length>0?{type:"text",value:r}:void 0),!1===r?o.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(r)?u.push(...r):r&&u.push(r),a=n+f[0].length,c=!0),!o.global)break;f=o.exec(e.value)}return c?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...u)):u=[e],s+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),E]])}function R(e,t,n,i,r){let o="";if(!T(r))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const l=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=b(e,"(");let o=b(e,")");for(;-1!==i&&r>o;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[e,n]}(n+i);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function E(e,t,n,i){return!(!T(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function T(n,i){const r=n.input.charCodeAt(n.index-1);return(0===n.index||e(r)||t(r))&&(!i||47!==r)}function I(){this.buffer()}function _(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function P(){this.buffer()}function H(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function B(e){const t=this.resume(),i=this.stack[this.stack.length-1];k("footnoteReference"===i.type),i.identifier=n(this.sliceSerialize(e)).toLowerCase(),i.label=t}function W(e){this.exit(e)}function q(e){const t=this.resume(),i=this.stack[this.stack.length-1];k("footnoteDefinition"===i.type),i.identifier=n(this.sliceSerialize(e)).toLowerCase(),i.label=t}function V(e){this.exit(e)}function $(e,t,n,i){const r=n.createTracker(i);let o=r.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=r.move("]"),o}function U(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,i,r){const o=i.createTracker(r);let l=o.move("[^");const a=i.enter("footnoteDefinition"),s=i.enter("label");return l+=o.move(i.safe(i.associationId(e),{before:l,after:"]"})),s(),l+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),l+=o.move((t?"\n":" ")+i.indentLines(i.containerFlow(e,o.current()),t?K:Z))),a(),l},footnoteReference:$},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Z(e,t,n){return 0===t?e:K(e,0,n)}function K(e,t,n){return(n?"":" ")+e}$.peek=function(){return"["};const Q=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function G(e){this.enter({type:"delete",children:[]},e)}function J(e){this.exit(e)}function N(e,t,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let l=r.move("~~");return l+=n.containerPhrasing(e,{...r.current(),before:l,after:"~"}),l+=r.move("~~"),o(),l}function X(e){return e.length}function Y(e){return null==e?"":String(e)}function ee(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function te(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function ne(e){this.exit(e),this.data.inTable=void 0}function ie(e){this.enter({type:"tableRow",children:[]},e)}function re(e){this.exit(e)}function oe(e){this.enter({type:"tableCell",children:[]},e)}function le(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ae));const n=this.stack[this.stack.length-1];k("inlineCode"===n.type),n.value=t,this.exit(e)}function ae(e,t){return"|"===t?t:e}function se(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let i=x.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(i=i.replace(/\|/g,"\\$&")),i},table:function(e,t,n,i){return a(function(e,t,n){const i=e.children;let r=-1;const o=[],l=t.enter("table");for(;++r<i.length;)o[r]=s(i[r],t,n);return l(),o}(e,n,i),e.align)},tableCell:l,tableRow:function(e,t,n,i){const r=a([s(e,n,i)]);return r.slice(0,r.indexOf("\n"))}}};function l(e,t,n,i){const r=n.enter("tableCell"),l=n.enter("phrasing"),a=n.containerPhrasing(e,{...i,before:o,after:o});return l(),r(),a}function a(e,t){return function(e,t){const n=t||{},i=(n.align||[]).concat(),r=n.stringLength||X,o=[],l=[],a=[],s=[];let c=0,u=-1;for(;++u<e.length;){const t=[],i=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const l=Y(e[u][o]);if(!1!==n.alignDelimiters){const e=r(l);i[o]=e,(void 0===s[o]||e>s[o])&&(s[o]=e)}t.push(l)}l[u]=t,a[u]=i}let f=-1;if("object"==typeof i&&"length"in i)for(;++f<c;)o[f]=ee(i[f]);else{const e=ee(i);for(;++f<c;)o[f]=e}f=-1;const h=[],p=[];for(;++f<c;){const e=o[f];let t="",i="";99===e?(t=":",i=":"):108===e?t=":":114===e&&(i=":");let r=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-i.length);const l=t+"-".repeat(r)+i;!1!==n.alignDelimiters&&(r=t.length+r+i.length,r>s[f]&&(s[f]=r),p[f]=r),h[f]=l}l.splice(1,0,h),a.splice(1,0,p),u=-1;const g=[];for(;++u<l.length;){const e=l[u],t=a[u];f=-1;const i=[];for(;++f<c;){const r=e[f]||"";let l="",a="";if(!1!==n.alignDelimiters){const e=s[f]-(t[f]||0),n=o[f];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(l=" ".repeat(e/2),a=l):a=" ".repeat(e)}!1===n.delimiterStart||f||i.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===r||!1===n.delimiterStart&&!f||i.push(" "),!1!==n.alignDelimiters&&i.push(l),i.push(r),!1!==n.alignDelimiters&&i.push(a),!1!==n.padding&&i.push(" "),!1===n.delimiterEnd&&f===c-1||i.push("|")}g.push(!1===n.delimiterEnd?i.join("").replace(/ +$/,""):i.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:i,padding:n,stringLength:r})}function s(e,t,n){const i=e.children;let r=-1;const o=[],a=t.enter("tableRow");for(;++r<i.length;)o[r]=l(i[r],0,t,n);return a(),o}}function ce(e){const t=this.stack[this.stack.length-2];k("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function ue(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];k("paragraph"===e.type);const n=e.children[0];if(n&&"text"===n.type){const i=t.children;let r,o=-1;for(;++o<i.length;){const e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fe(e,t,n,i){const r=e.children[0],o="boolean"==typeof e.checked&&r&&"paragraph"===r.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(l);let s=x.listItem(e,t,n,{...i,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}N.peek=function(){return"~"};const he={tokenize:function(e,t,n){let i=0;return function t(o){return(87===o||119===o)&&i<3?(i++,e.consume(o),t):46===o&&3===i?(e.consume(o),r):n(o)};function r(e){return null===e?n(e):t(e)}},partial:!0},pe={tokenize:function(n,i,r){let l,a,s;return c;function c(i){return 46===i||95===i?n.check(de,f,u)(i):null===i||o(i)||e(i)||45!==i&&t(i)?f(i):(s=!0,n.consume(i),c)}function u(e){return 95===e?l=!0:(a=l,l=void 0),n.consume(e),c}function f(e){return a||l||!s?r(e):i(e)}},partial:!0},ge={tokenize:function(t,n){let i=0,r=0;return l;function l(s){return 40===s?(i++,t.consume(s),l):41===s&&r<i?a(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?t.check(de,n,a)(s):null===s||o(s)||e(s)?n(s):(t.consume(s),l)}function a(e){return 41===e&&r++,t.consume(e),l}},partial:!0},de={tokenize:function(t,n,i){return l;function l(r){return 33===r||34===r||39===r||41===r||42===r||44===r||46===r||58===r||59===r||63===r||95===r||126===r?(t.consume(r),l):38===r?(t.consume(r),s):93===r?(t.consume(r),a):60===r||null===r||o(r)||e(r)?n(r):i(r)}function a(t){return null===t||40===t||91===t||o(t)||e(t)?n(t):l(t)}function s(e){return r(e)?c(e):i(e)}function c(e){return 59===e?(t.consume(e),l):r(e)?(t.consume(e),c):i(e)}},partial:!0},me={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return i(e)?n(e):t(e)}},partial:!0},ke={name:"wwwAutolink",tokenize:function(e,t,n){const i=this;return function(t){return 87!==t&&119!==t||!Ce.call(i,i.previous)||Le(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(he,e.attempt(pe,e.attempt(ge,r),n),n)(t))};function r(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Ce},be={name:"protocolAutolink",tokenize:function(n,i,a){const s=this;let c="",u=!1;return function(e){return 72!==e&&104!==e||!we.call(s,s.previous)||Le(s.events)?a(e):(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),c+=String.fromCodePoint(e),n.consume(e),f)};function f(e){if(r(e)&&c.length<5)return c+=String.fromCodePoint(e),n.consume(e),f;if(58===e){const t=c.toLowerCase();if("http"===t||"https"===t)return n.consume(e),h}return a(e)}function h(e){return 47===e?(n.consume(e),u?p:(u=!0,h)):a(e)}function p(i){return null===i||l(i)||o(i)||e(i)||t(i)?a(i):n.attempt(pe,n.attempt(ge,g),a)(i)}function g(e){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),i(e)}},previous:we},xe={name:"emailAutolink",tokenize:function(e,t,n){const o=this;let l,a;return function(t){return Fe(t)&&De.call(o,o.previous)&&!Le(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return Fe(t)?(e.consume(t),s):64===t?(e.consume(t),c):n(t)}function c(t){return 46===t?e.check(me,f,u)(t):45===t||95===t||i(t)?(a=!0,e.consume(t),c):f(t)}function u(t){return e.consume(t),l=!0,c}function f(i){return a&&l&&r(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:De},ye={};let ve=48;for(;ve<123;)ye[ve]=xe,ve++,58===ve?ve=65:91===ve&&(ve=97);function Ce(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||o(e)}function we(e){return!r(e)}function De(e){return!(47===e||Fe(e))}function Fe(e){return 43===e||45===e||46===e||95===e||i(e)}function Le(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}ye[43]=xe,ye[45]=xe,ye[46]=xe,ye[95]=xe,ye[72]=[xe,be],ye[104]=[xe,be],ye[87]=[xe,ke],ye[119]=[xe,ke];const Ae={tokenize:function(e,t,n){const i=this;return s(e,function(e){const r=i.events[i.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Me(e,t,i){const r=this;let o=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return i(o);const s=n(r.sliceSerialize({start:a.end,end:r.now()}));return 94===s.codePointAt(0)&&l.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):i(o)}}function Se(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...a),e}function je(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),c};function c(t){return 94!==t?i(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(s>999||93===c&&!a||null===c||91===c||o(c))return i(c);if(93===c){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return l.includes(n(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):i(c)}return o(c)||(a=!0),s++,e.consume(c),92===c?f:u}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function Oe(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,c,u=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),f};function f(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):i(t)}function h(t){if(u>999||93===t&&!c||null===t||91===t||o(t))return i(t);if(93===t){e.exit("chunkString");const i=e.exit("gfmFootnoteDefinitionLabelString");return a=n(r.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return o(t)||(c=!0),u++,e.consume(t),92===t?p:h}function p(t){return 91===t||92===t||93===t?(e.consume(t),u++,h):h(t)}function g(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l.includes(a)||l.push(a),s(e,d,"gfmFootnoteDefinitionWhitespace")):i(t)}function d(e){return t(e)}}function ze(e,t,n){return e.check(a,t,e.attempt(Ae,t,n))}function Re(e){e.exit("gfmFootnoteDefinition")}function Ee(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,i){const r=this.previous,o=this.events;let l=0;return function(t){return 126===r&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const s=f(r);if(126===o)return l>1?i(o):(e.consume(o),l++,a);if(l<2&&!t)return i(o);const c=e.exit("strikethroughSequenceTemporary"),u=f(o);return c._open=!u||2===u&&Boolean(s),c._close=!s||2===s&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let i=n;for(;i--;)if("exit"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[n][1].type="strikethroughSequence",e[i][1].type="strikethroughSequence";const r={type:"strikethrough",start:Object.assign({},e[i][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&c(l,l.length,0,u(a,e.slice(i+1,n),t)),c(l,l.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",r,t]]),c(e,i-1,n-i+3,l),n=i+l.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Te{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,i){let r=0;if(0!==n||0!==i.length){for(;r<e.map.length;){if(e.map[r][0]===t)return e.map[r][1]+=n,void e.map[r][2].push(...i);r+=1}e.map.push([t,n,i])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(const t of i)e.push(t);i=n.pop()}this.map.length=0}}function Ie(e,t){let n=!1;const i=[];for(;t<e.length;){const r=e[t];if(n){if("enter"===r[0])"tableContent"===r[1].type&&i.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===r[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=i.length-1;i[e]="left"===i[e]?"center":"right"}}else if("tableDelimiterRow"===r[1].type)break}else"enter"===r[0]&&"tableDelimiterRow"===r[1].type&&(n=!0);t+=1}return i}function _e(e,t,n){const i=this;let r,l=0,a=0;return function(e){let t=i.events.length-1;for(;t>-1;){const e=i.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?D:c;return o===D&&i.parser.lazy[i.now().line]?n(e):o(e)};function c(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(r=!0,a+=1),u(e)}(t)}function u(t){return null===t?n(t):h(t)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):p(t)?s(e,u,"whitespace")(t):(a+=1,r&&(r=!1,l+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,u):(e.enter("data"),f(t)))}function f(t){return null===t||124===t||o(t)?(e.exit("data"),u(t)):(e.consume(t),92===t?g:f)}function g(t){return 92===t||124===t?(e.consume(t),f):f(t)}function d(t){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(t):(e.enter("tableDelimiterRow"),r=!1,p(t)?s(e,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):m(t))}function m(t){return 45===t||58===t?b(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),k):w(t)}function k(t){return p(t)?s(e,b,"whitespace")(t):b(t)}function b(t){return 58===t?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),x):45===t?(a+=1,x(t)):null===t||h(t)?C(t):w(t)}function x(t){return 45===t?(e.enter("tableDelimiterFiller"),y(t)):w(t)}function y(t){return 45===t?(e.consume(t),y):58===t?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return p(t)?s(e,C,"whitespace")(t):C(t)}function C(n){return 124===n?m(n):(null===n||h(n))&&r&&l===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):w(n)}function w(e){return n(e)}function D(t){return e.enter("tableRow"),F(t)}function F(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),F):null===n||h(n)?(e.exit("tableRow"),t(n)):p(n)?s(e,F,"whitespace")(n):(e.enter("data"),L(n))}function L(t){return null===t||124===t||o(t)?(e.exit("data"),F(t)):(e.consume(t),92===t?A:L)}function A(t){return 92===t||124===t?(e.consume(t),L):L(t)}}function Pe(e,t){let n,i,r,o=-1,l=!0,a=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,f=0;const h=new Te;for(;++o<e.length;){const p=e[o],g=p[1];"enter"===p[0]?"tableHead"===g.type?(u=!1,0!==f&&(Be(h,t,f,n,i),i=void 0,f=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(o,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(l=!0,r=void 0,s=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,i={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(o,0,[["enter",i,t]])),a="tableDelimiterRow"===g.type?2:i?3:1):!a||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type?"tableCellDivider"===g.type&&(l?l=!1:(0!==s[1]&&(c[0]=c[1],r=He(h,t,s,a,void 0,r)),s=c,c=[s[1],o,0,0])):(l=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],r=He(h,t,s,a,void 0,r),s=[0,0,0,0]),c[2]=o)):"tableHead"===g.type?(u=!0,f=o):"tableRow"===g.type||"tableDelimiterRow"===g.type?(f=o,0!==s[1]?(c[0]=c[1],r=He(h,t,s,a,o,r)):0!==c[1]&&(r=He(h,t,c,a,o,r)),a=0):!a||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type||(c[3]=o)}for(0!==f&&Be(h,t,f,n,i),h.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ie(t.events,o))}return e}function He(e,t,n,i,r,o){const l=1===i?"tableHeader":2===i?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},We(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=We(t.events,n[1]);if(o={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const r=We(t.events,n[2]),o=We(t.events,n[3]),l={type:"tableContent",start:Object.assign({},r),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",l,t]]),2!==i){const i=t.events[n[2]],r=t.events[n[3]];if(i[1].end=Object.assign({},r[1].end),i[1].type="chunkText",i[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,i=n[3]-n[2]-1;e.add(t,i,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==r&&(o.end=Object.assign({},We(t.events,r)),e.add(r,0,[["exit",o,t]]),o=void 0),o}function Be(e,t,n,i,r){const o=[],l=We(t.events,n);r&&(r.end=Object.assign({},l),o.push(["exit",r,t])),i.end=Object.assign({},l),o.push(["exit",i,t]),e.add(n+1,0,o)}function We(e,t){const n=e[t],i="enter"===n[0]?"start":"end";return n[1][i]}const qe={name:"tasklistCheck",tokenize:function(e,t,n){const i=this;return function(t){return null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),r):n(t)};function r(t){return o(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),l):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),l):n(t)}function l(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(i){return h(i)?t(i):p(i)?e.check({tokenize:Ve},t,n)(i):n(i)}}};function Ve(e,t,n){return s(e,function(e){return null===e?n(e):t(e)},"whitespace")}const $e={};function Ue(e){const t=e||$e,n=this.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),r=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(function(e){return g([{text:ye},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Oe,continuation:{tokenize:ze},exit:Re}},text:{91:{name:"gfmFootnoteCall",tokenize:je},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Me,resolveTo:Se}}},Ee(e),{flow:{null:{name:"table",tokenize:_e,resolveAll:Pe}}},{text:{91:qe}}])}(t)),r.push([{transforms:[z],enter:{literalAutolink:L,literalAutolinkEmail:A,literalAutolinkHttp:A,literalAutolinkWww:A},exit:{literalAutolink:O,literalAutolinkEmail:j,literalAutolinkHttp:M,literalAutolinkWww:S}},{enter:{gfmFootnoteCallString:I,gfmFootnoteCall:_,gfmFootnoteDefinitionLabelString:P,gfmFootnoteDefinition:H},exit:{gfmFootnoteCallString:B,gfmFootnoteCall:W,gfmFootnoteDefinitionLabelString:q,gfmFootnoteDefinition:V}},{canContainEols:["delete"],enter:{strikethrough:G},exit:{strikethrough:J}},{enter:{table:te,tableData:oe,tableHeader:oe,tableRow:ie},exit:{codeText:le,table:ne,tableData:re,tableHeader:re,tableRow:re}},{exit:{taskListCheckValueChecked:ce,taskListCheckValueUnchecked:ce,paragraph:ue}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:D,notInConstruct:F},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:D,notInConstruct:F},{character:":",before:"[ps]",after:"\\/",inConstruct:D,notInConstruct:F}]},U(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Q}],handlers:{delete:N}},se(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fe}}]}}(t))}export{v as c,Ue as r};
1
+ import{u as e,a as t,n,b as i,c as r,m as o,d as l,e as a,g as s,s as c,r as u,h as f,i as h,j as p,k as g}from"./index-C0OnaOQ9.js";import{c as d,v as m,o as k,a as b,h as x}from"./index-CUEPjMAK.js";function y(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=y(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function v(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=y(e))&&(i&&(i+=" "),i+=t);return i}function C(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function w(e){return"function"==typeof e?e:function(){return e}}const D="phrasing",F=["autolink","link","image","label"];function L(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function A(e){this.config.enter.autolinkProtocol.call(this,e)}function M(e){this.config.exit.autolinkProtocol.call(this,e)}function S(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];k("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function j(e){this.config.exit.autolinkEmail.call(this,e)}function O(e){this.exit(e)}function z(e){!function(e,t){const n=d(({ignore:["link","linkReference"]}||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const e=n[i];t.push([C(e[0]),w(e[1])])}return t}(t);let r=-1;for(;++r<i.length;)m(e,"text",o);function o(e,t){let o,l=-1;for(;++l<t.length;){const e=t[l],i=o?o.children:void 0;if(n(e,i?i.indexOf(e):void 0,o))return;o=e}if(o)return function(e,t){const n=t[t.length-1],o=i[r][0],l=i[r][1];let a=0;const s=n.children.indexOf(e);let c=!1,u=[];o.lastIndex=0;let f=o.exec(e.value);for(;f;){const n=f.index,i={index:f.index,input:f.input,stack:[...t,e]};let r=l(...f,i);if("string"==typeof r&&(r=r.length>0?{type:"text",value:r}:void 0),!1===r?o.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(r)?u.push(...r):r&&u.push(r),a=n+f[0].length,c=!0),!o.global)break;f=o.exec(e.value)}return c?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...u)):u=[e],s+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),E]])}function R(e,t,n,i,r){let o="";if(!T(r))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const l=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=b(e,"(");let o=b(e,")");for(;-1!==i&&r>o;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[e,n]}(n+i);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function E(e,t,n,i){return!(!T(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function T(n,i){const r=n.input.charCodeAt(n.index-1);return(0===n.index||e(r)||t(r))&&(!i||47!==r)}function I(){this.buffer()}function _(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function P(){this.buffer()}function H(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function B(e){const t=this.resume(),i=this.stack[this.stack.length-1];k("footnoteReference"===i.type),i.identifier=n(this.sliceSerialize(e)).toLowerCase(),i.label=t}function W(e){this.exit(e)}function q(e){const t=this.resume(),i=this.stack[this.stack.length-1];k("footnoteDefinition"===i.type),i.identifier=n(this.sliceSerialize(e)).toLowerCase(),i.label=t}function V(e){this.exit(e)}function $(e,t,n,i){const r=n.createTracker(i);let o=r.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=r.move("]"),o}function U(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,i,r){const o=i.createTracker(r);let l=o.move("[^");const a=i.enter("footnoteDefinition"),s=i.enter("label");return l+=o.move(i.safe(i.associationId(e),{before:l,after:"]"})),s(),l+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),l+=o.move((t?"\n":" ")+i.indentLines(i.containerFlow(e,o.current()),t?K:Z))),a(),l},footnoteReference:$},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Z(e,t,n){return 0===t?e:K(e,0,n)}function K(e,t,n){return(n?"":" ")+e}$.peek=function(){return"["};const Q=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function G(e){this.enter({type:"delete",children:[]},e)}function J(e){this.exit(e)}function N(e,t,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let l=r.move("~~");return l+=n.containerPhrasing(e,{...r.current(),before:l,after:"~"}),l+=r.move("~~"),o(),l}function X(e){return e.length}function Y(e){return null==e?"":String(e)}function ee(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function te(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function ne(e){this.exit(e),this.data.inTable=void 0}function ie(e){this.enter({type:"tableRow",children:[]},e)}function re(e){this.exit(e)}function oe(e){this.enter({type:"tableCell",children:[]},e)}function le(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ae));const n=this.stack[this.stack.length-1];k("inlineCode"===n.type),n.value=t,this.exit(e)}function ae(e,t){return"|"===t?t:e}function se(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let i=x.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(i=i.replace(/\|/g,"\\$&")),i},table:function(e,t,n,i){return a(function(e,t,n){const i=e.children;let r=-1;const o=[],l=t.enter("table");for(;++r<i.length;)o[r]=s(i[r],t,n);return l(),o}(e,n,i),e.align)},tableCell:l,tableRow:function(e,t,n,i){const r=a([s(e,n,i)]);return r.slice(0,r.indexOf("\n"))}}};function l(e,t,n,i){const r=n.enter("tableCell"),l=n.enter("phrasing"),a=n.containerPhrasing(e,{...i,before:o,after:o});return l(),r(),a}function a(e,t){return function(e,t){const n=t||{},i=(n.align||[]).concat(),r=n.stringLength||X,o=[],l=[],a=[],s=[];let c=0,u=-1;for(;++u<e.length;){const t=[],i=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const l=Y(e[u][o]);if(!1!==n.alignDelimiters){const e=r(l);i[o]=e,(void 0===s[o]||e>s[o])&&(s[o]=e)}t.push(l)}l[u]=t,a[u]=i}let f=-1;if("object"==typeof i&&"length"in i)for(;++f<c;)o[f]=ee(i[f]);else{const e=ee(i);for(;++f<c;)o[f]=e}f=-1;const h=[],p=[];for(;++f<c;){const e=o[f];let t="",i="";99===e?(t=":",i=":"):108===e?t=":":114===e&&(i=":");let r=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-i.length);const l=t+"-".repeat(r)+i;!1!==n.alignDelimiters&&(r=t.length+r+i.length,r>s[f]&&(s[f]=r),p[f]=r),h[f]=l}l.splice(1,0,h),a.splice(1,0,p),u=-1;const g=[];for(;++u<l.length;){const e=l[u],t=a[u];f=-1;const i=[];for(;++f<c;){const r=e[f]||"";let l="",a="";if(!1!==n.alignDelimiters){const e=s[f]-(t[f]||0),n=o[f];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(l=" ".repeat(e/2),a=l):a=" ".repeat(e)}!1===n.delimiterStart||f||i.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===r||!1===n.delimiterStart&&!f||i.push(" "),!1!==n.alignDelimiters&&i.push(l),i.push(r),!1!==n.alignDelimiters&&i.push(a),!1!==n.padding&&i.push(" "),!1===n.delimiterEnd&&f===c-1||i.push("|")}g.push(!1===n.delimiterEnd?i.join("").replace(/ +$/,""):i.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:i,padding:n,stringLength:r})}function s(e,t,n){const i=e.children;let r=-1;const o=[],a=t.enter("tableRow");for(;++r<i.length;)o[r]=l(i[r],0,t,n);return a(),o}}function ce(e){const t=this.stack[this.stack.length-2];k("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function ue(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];k("paragraph"===e.type);const n=e.children[0];if(n&&"text"===n.type){const i=t.children;let r,o=-1;for(;++o<i.length;){const e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fe(e,t,n,i){const r=e.children[0],o="boolean"==typeof e.checked&&r&&"paragraph"===r.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(l);let s=x.listItem(e,t,n,{...i,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}N.peek=function(){return"~"};const he={tokenize:function(e,t,n){let i=0;return function t(o){return(87===o||119===o)&&i<3?(i++,e.consume(o),t):46===o&&3===i?(e.consume(o),r):n(o)};function r(e){return null===e?n(e):t(e)}},partial:!0},pe={tokenize:function(n,i,r){let l,a,s;return c;function c(i){return 46===i||95===i?n.check(de,f,u)(i):null===i||o(i)||e(i)||45!==i&&t(i)?f(i):(s=!0,n.consume(i),c)}function u(e){return 95===e?l=!0:(a=l,l=void 0),n.consume(e),c}function f(e){return a||l||!s?r(e):i(e)}},partial:!0},ge={tokenize:function(t,n){let i=0,r=0;return l;function l(s){return 40===s?(i++,t.consume(s),l):41===s&&r<i?a(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?t.check(de,n,a)(s):null===s||o(s)||e(s)?n(s):(t.consume(s),l)}function a(e){return 41===e&&r++,t.consume(e),l}},partial:!0},de={tokenize:function(t,n,i){return l;function l(r){return 33===r||34===r||39===r||41===r||42===r||44===r||46===r||58===r||59===r||63===r||95===r||126===r?(t.consume(r),l):38===r?(t.consume(r),s):93===r?(t.consume(r),a):60===r||null===r||o(r)||e(r)?n(r):i(r)}function a(t){return null===t||40===t||91===t||o(t)||e(t)?n(t):l(t)}function s(e){return r(e)?c(e):i(e)}function c(e){return 59===e?(t.consume(e),l):r(e)?(t.consume(e),c):i(e)}},partial:!0},me={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return i(e)?n(e):t(e)}},partial:!0},ke={name:"wwwAutolink",tokenize:function(e,t,n){const i=this;return function(t){return 87!==t&&119!==t||!Ce.call(i,i.previous)||Le(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(he,e.attempt(pe,e.attempt(ge,r),n),n)(t))};function r(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Ce},be={name:"protocolAutolink",tokenize:function(n,i,a){const s=this;let c="",u=!1;return function(e){return 72!==e&&104!==e||!we.call(s,s.previous)||Le(s.events)?a(e):(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),c+=String.fromCodePoint(e),n.consume(e),f)};function f(e){if(r(e)&&c.length<5)return c+=String.fromCodePoint(e),n.consume(e),f;if(58===e){const t=c.toLowerCase();if("http"===t||"https"===t)return n.consume(e),h}return a(e)}function h(e){return 47===e?(n.consume(e),u?p:(u=!0,h)):a(e)}function p(i){return null===i||l(i)||o(i)||e(i)||t(i)?a(i):n.attempt(pe,n.attempt(ge,g),a)(i)}function g(e){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),i(e)}},previous:we},xe={name:"emailAutolink",tokenize:function(e,t,n){const o=this;let l,a;return function(t){return Fe(t)&&De.call(o,o.previous)&&!Le(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return Fe(t)?(e.consume(t),s):64===t?(e.consume(t),c):n(t)}function c(t){return 46===t?e.check(me,f,u)(t):45===t||95===t||i(t)?(a=!0,e.consume(t),c):f(t)}function u(t){return e.consume(t),l=!0,c}function f(i){return a&&l&&r(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:De},ye={};let ve=48;for(;ve<123;)ye[ve]=xe,ve++,58===ve?ve=65:91===ve&&(ve=97);function Ce(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||o(e)}function we(e){return!r(e)}function De(e){return!(47===e||Fe(e))}function Fe(e){return 43===e||45===e||46===e||95===e||i(e)}function Le(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}ye[43]=xe,ye[45]=xe,ye[46]=xe,ye[95]=xe,ye[72]=[xe,be],ye[104]=[xe,be],ye[87]=[xe,ke],ye[119]=[xe,ke];const Ae={tokenize:function(e,t,n){const i=this;return s(e,function(e){const r=i.events[i.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Me(e,t,i){const r=this;let o=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return i(o);const s=n(r.sliceSerialize({start:a.end,end:r.now()}));return 94===s.codePointAt(0)&&l.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):i(o)}}function Se(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...a),e}function je(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),c};function c(t){return 94!==t?i(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(s>999||93===c&&!a||null===c||91===c||o(c))return i(c);if(93===c){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return l.includes(n(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):i(c)}return o(c)||(a=!0),s++,e.consume(c),92===c?f:u}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function Oe(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,c,u=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),f};function f(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):i(t)}function h(t){if(u>999||93===t&&!c||null===t||91===t||o(t))return i(t);if(93===t){e.exit("chunkString");const i=e.exit("gfmFootnoteDefinitionLabelString");return a=n(r.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return o(t)||(c=!0),u++,e.consume(t),92===t?p:h}function p(t){return 91===t||92===t||93===t?(e.consume(t),u++,h):h(t)}function g(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l.includes(a)||l.push(a),s(e,d,"gfmFootnoteDefinitionWhitespace")):i(t)}function d(e){return t(e)}}function ze(e,t,n){return e.check(a,t,e.attempt(Ae,t,n))}function Re(e){e.exit("gfmFootnoteDefinition")}function Ee(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,i){const r=this.previous,o=this.events;let l=0;return function(t){return 126===r&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const s=f(r);if(126===o)return l>1?i(o):(e.consume(o),l++,a);if(l<2&&!t)return i(o);const c=e.exit("strikethroughSequenceTemporary"),u=f(o);return c._open=!u||2===u&&Boolean(s),c._close=!s||2===s&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let i=n;for(;i--;)if("exit"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[n][1].type="strikethroughSequence",e[i][1].type="strikethroughSequence";const r={type:"strikethrough",start:Object.assign({},e[i][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&c(l,l.length,0,u(a,e.slice(i+1,n),t)),c(l,l.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",r,t]]),c(e,i-1,n-i+3,l),n=i+l.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Te{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,i){let r=0;if(0!==n||0!==i.length){for(;r<e.map.length;){if(e.map[r][0]===t)return e.map[r][1]+=n,void e.map[r][2].push(...i);r+=1}e.map.push([t,n,i])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(const t of i)e.push(t);i=n.pop()}this.map.length=0}}function Ie(e,t){let n=!1;const i=[];for(;t<e.length;){const r=e[t];if(n){if("enter"===r[0])"tableContent"===r[1].type&&i.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===r[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=i.length-1;i[e]="left"===i[e]?"center":"right"}}else if("tableDelimiterRow"===r[1].type)break}else"enter"===r[0]&&"tableDelimiterRow"===r[1].type&&(n=!0);t+=1}return i}function _e(e,t,n){const i=this;let r,l=0,a=0;return function(e){let t=i.events.length-1;for(;t>-1;){const e=i.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?D:c;return o===D&&i.parser.lazy[i.now().line]?n(e):o(e)};function c(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(r=!0,a+=1),u(e)}(t)}function u(t){return null===t?n(t):h(t)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):p(t)?s(e,u,"whitespace")(t):(a+=1,r&&(r=!1,l+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,u):(e.enter("data"),f(t)))}function f(t){return null===t||124===t||o(t)?(e.exit("data"),u(t)):(e.consume(t),92===t?g:f)}function g(t){return 92===t||124===t?(e.consume(t),f):f(t)}function d(t){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(t):(e.enter("tableDelimiterRow"),r=!1,p(t)?s(e,m,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):m(t))}function m(t){return 45===t||58===t?b(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),k):w(t)}function k(t){return p(t)?s(e,b,"whitespace")(t):b(t)}function b(t){return 58===t?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),x):45===t?(a+=1,x(t)):null===t||h(t)?C(t):w(t)}function x(t){return 45===t?(e.enter("tableDelimiterFiller"),y(t)):w(t)}function y(t){return 45===t?(e.consume(t),y):58===t?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return p(t)?s(e,C,"whitespace")(t):C(t)}function C(n){return 124===n?m(n):(null===n||h(n))&&r&&l===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):w(n)}function w(e){return n(e)}function D(t){return e.enter("tableRow"),F(t)}function F(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),F):null===n||h(n)?(e.exit("tableRow"),t(n)):p(n)?s(e,F,"whitespace")(n):(e.enter("data"),L(n))}function L(t){return null===t||124===t||o(t)?(e.exit("data"),F(t)):(e.consume(t),92===t?A:L)}function A(t){return 92===t||124===t?(e.consume(t),L):L(t)}}function Pe(e,t){let n,i,r,o=-1,l=!0,a=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,f=0;const h=new Te;for(;++o<e.length;){const p=e[o],g=p[1];"enter"===p[0]?"tableHead"===g.type?(u=!1,0!==f&&(Be(h,t,f,n,i),i=void 0,f=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(o,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(l=!0,r=void 0,s=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,i={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(o,0,[["enter",i,t]])),a="tableDelimiterRow"===g.type?2:i?3:1):!a||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type?"tableCellDivider"===g.type&&(l?l=!1:(0!==s[1]&&(c[0]=c[1],r=He(h,t,s,a,void 0,r)),s=c,c=[s[1],o,0,0])):(l=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],r=He(h,t,s,a,void 0,r),s=[0,0,0,0]),c[2]=o)):"tableHead"===g.type?(u=!0,f=o):"tableRow"===g.type||"tableDelimiterRow"===g.type?(f=o,0!==s[1]?(c[0]=c[1],r=He(h,t,s,a,o,r)):0!==c[1]&&(r=He(h,t,c,a,o,r)),a=0):!a||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type||(c[3]=o)}for(0!==f&&Be(h,t,f,n,i),h.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ie(t.events,o))}return e}function He(e,t,n,i,r,o){const l=1===i?"tableHeader":2===i?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},We(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=We(t.events,n[1]);if(o={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const r=We(t.events,n[2]),o=We(t.events,n[3]),l={type:"tableContent",start:Object.assign({},r),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",l,t]]),2!==i){const i=t.events[n[2]],r=t.events[n[3]];if(i[1].end=Object.assign({},r[1].end),i[1].type="chunkText",i[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,i=n[3]-n[2]-1;e.add(t,i,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==r&&(o.end=Object.assign({},We(t.events,r)),e.add(r,0,[["exit",o,t]]),o=void 0),o}function Be(e,t,n,i,r){const o=[],l=We(t.events,n);r&&(r.end=Object.assign({},l),o.push(["exit",r,t])),i.end=Object.assign({},l),o.push(["exit",i,t]),e.add(n+1,0,o)}function We(e,t){const n=e[t],i="enter"===n[0]?"start":"end";return n[1][i]}const qe={name:"tasklistCheck",tokenize:function(e,t,n){const i=this;return function(t){return null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),r):n(t)};function r(t){return o(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),l):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),l):n(t)}function l(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(i){return h(i)?t(i):p(i)?e.check({tokenize:Ve},t,n)(i):n(i)}}};function Ve(e,t,n){return s(e,function(e){return null===e?n(e):t(e)},"whitespace")}const $e={};function Ue(e){const t=e||$e,n=this.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),r=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(function(e){return g([{text:ye},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Oe,continuation:{tokenize:ze},exit:Re}},text:{91:{name:"gfmFootnoteCall",tokenize:je},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Me,resolveTo:Se}}},Ee(e),{flow:{null:{name:"table",tokenize:_e,resolveAll:Pe}}},{text:{91:qe}}])}(t)),r.push([{transforms:[z],enter:{literalAutolink:L,literalAutolinkEmail:A,literalAutolinkHttp:A,literalAutolinkWww:A},exit:{literalAutolink:O,literalAutolinkEmail:j,literalAutolinkHttp:M,literalAutolinkWww:S}},{enter:{gfmFootnoteCallString:I,gfmFootnoteCall:_,gfmFootnoteDefinitionLabelString:P,gfmFootnoteDefinition:H},exit:{gfmFootnoteCallString:B,gfmFootnoteCall:W,gfmFootnoteDefinitionLabelString:q,gfmFootnoteDefinition:V}},{canContainEols:["delete"],enter:{strikethrough:G},exit:{strikethrough:J}},{enter:{table:te,tableData:oe,tableHeader:oe,tableRow:ie},exit:{codeText:le,table:ne,tableData:re,tableHeader:re,tableRow:re}},{exit:{taskListCheckValueChecked:ce,taskListCheckValueUnchecked:ce,paragraph:ue}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:D,notInConstruct:F},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:D,notInConstruct:F},{character:":",before:"[ps]",after:"\\/",inConstruct:D,notInConstruct:F}]},U(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Q}],handlers:{delete:N}},se(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fe}}]}}(t))}export{v as c,Ue as r};
@@ -0,0 +1 @@
1
+ import{_ as e,l as r,F as t,e as i}from"./mermaid.core-DsV-uGyB.js";import{p as s}from"./cynefin-VYW2F7L2-CYle_Oh3.js";import"./index-Cg-hTlne.js";import"./RemoteLifeOSBlock-Bhm7Sf00.js";import"./index-C0OnaOQ9.js";import"./index-CUEPjMAK.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DXhmlTQu.js";import"./chevron-up-DQfpYsuw.js";import"./__vite-browser-external-2447137e-DrC7dgv5.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";var o={parser:{parse:e(async e=>{const t=await s("info",e);r.debug(t)},"parse")},db:{getVersion:e(()=>"11.16.0","getVersion")},renderer:{draw:e((e,s,o)=>{r.debug("rendering info diagram\n"+e);const a=t(s);i(a,100,400,!0),a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw")}};export{o as diagram};
@@ -1 +1 @@
1
- var t;import{_ as e,c as i,a1 as n,F as s,ak as a,q as r,k as h,o,a as l,b as c,g as u,s as d,p as y,e as p}from"./mermaid.core-B71KCuEy.js";import"./RemoteLifeOSBlock-aE9tb99H.js";import"./index-CArel_iz.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-OdgHTLbm.js";import"./index-CJZRHYmg.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DKhLAmub.js";import"./chevron-up-bHY6-UxU.js";import"./__vite-browser-external-2447137e-DiZsMwIM.js";var g=function(){var t=e(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),i=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:n,7:[1,10],9:9,12:11,13:s,14:a},t(r,[2,3]),{1:[2,2]},t(r,[2,4]),t(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:e(function(t){var i=this,n=[0],s=[],a=[null],r=[],h=this.table,o="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,e(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),e(k,"lex");for(var m,w,x,_,b,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==m&&(m=k()),x=h[w]&&h[w][m]),void 0===x||!x.length||!x[0]){var A;for(b in $=[],h[w])this.terminals_[b]&&b>2&&$.push("'"+this.terminals_[b]+"'");A=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(x[0]){case 1:n.push(m),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),m=null,c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(I,[o,c,l,y.yy,x[1],a,r].concat(u))))return _;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=h[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:e(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:e(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:e(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:e(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:e(function(t){this.unput(this.match.slice(t))},"less"),pastInput:e(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:e(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((i=this._input.match(this.rules[s[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){return this.next()||this.lex()},"lex"),begin:e(function(t){this.conditionStack.push(t)},"begin"),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:e(function(t){this.begin(t)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,e(k,"Parser"),k.prototype=g,g.Parser=k,new k}();g.parser=g;var f=g,k=(e(t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,r()}getRoot(){return this.root}addNode(t,e){const n=h.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return l()}setAccTitle(t){c(t)}getAccDescription(){return u()}setAccDescription(t){d(t)}getDiagramTitle(){return y()}setDiagramTitle(t){o(t)}},"IshikawaDB"),t),m=250,w=82*Math.PI/180,x=Math.cos(w),_=Math.sin(w),b=e((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,a=n.height+2*e;p(t,a,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${a}`)},"applyPaddedViewBox"),v=e((t,e,r,h)=>{const o=h.db.getRoot();if(!o)return;const l=i(),{look:c,handDrawnSeed:u,themeVariables:d}=l,y=n(l.fontSize)[0]??14,p="handDrawn"===c,g=o.children??[],f=l.ishikawa?.diagramPadding??20,k=l.ishikawa?.useMaxWidth??!1,w=s(e),x=w.append("g").attr("class","ishikawa"),_=p?a.svg(w.node()):void 0,v=_?{roughSvg:_,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${e}`;p||x.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let A=0,E=m;const L=p?void 0:T(x,A,E,A,E,"ishikawa-spine");if($(x,A,E,o.text,y,v),!g.length)return p&&T(x,A,E,A,E,"ishikawa-spine",v),void b(w,f,k);A-=20;const M=g.filter((t,e)=>e%2==0),j=g.filter((t,e)=>e%2==1),P=S(M),B=S(j),N=P.total+B.total;let O=m,D=m;if(N>0){const t=500,e=75;O=Math.max(e,t*(P.total/N)),D=Math.max(e,t*(B.total/N))}const W=2*y;O=Math.max(O,P.max*W),D=Math.max(D,B.max*W),E=Math.max(O,m),L&&L.attr("y1",E).attr("y2",E),x.select(".ishikawa-head-group").attr("transform",`translate(0,${E})`);const R=Math.ceil(g.length/2);for(let i=0;i<R;i++){const t=x.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[g[2*i],-1,O],[g[2*i+1],1,D]])e&&C(t,e,A,E,n,s,y,v);A=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(p)T(x,A,E,0,E,"ishikawa-spine",v);else{L.attr("x1",A);const t=`url(#${I})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}b(w,f,k)},"draw"),S=e(t=>{const i=e(t=>t.children.reduce((t,e)=>t+1+i(e),0),"countDescendants");return t.reduce((t,e)=>{const n=i(e);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),$=e((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=j(h,M(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),I=e((t,i)=>{const n=[],s=[],a=e((t,e,r)=>{const h=-1===i?[...t].reverse():t;for(const i of h){const t=n.length,h=i.children??[];n.push({depth:r,text:M(i.text,15),parentIndex:e,childCount:h.length}),r%2==0?(s.push(t),h.length&&a(h,t,r+1)):(h.length&&a(h,t,r+1),s.push(t))}},"walk");return a(t,-1,2),{entries:n,yOrder:s}},"flattenTree"),A=e((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=j(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),E=e((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),C=e((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=_*l*s,u=i+-x*l,d=n+c;if(T(t,i,n,u,d,"ishikawa-branch",h),h&&E(t,i,n,i-u,n-d,h),A(t,e.text,u,d,s,r,h),!o.length)return;const{entries:y,yOrder:p}=I(o,s),g=y.length,f=new Array(g);for(const[x,_]of p.entries())f[_]=n+c*((x+1)/(g+1));const k=new Map;k.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const m=-x,w=_*s,b=s<0?"ishikawa-label up":"ishikawa-label down";for(const[x,_]of y.entries()){const e=f[x],i=k.get(_.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(_.depth%2==0){const t=i.y1-i.y0;s=P(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(_.childCount>0?60+5*_.childCount:30),T(n,s,e,o,e,"ishikawa-sub-branch",h),h&&E(n,s,e,1,0,h),j(n,_.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=P(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+m*((e-a)/w),T(n,s,a,o,e,"ishikawa-sub-branch",h),h&&E(n,s,a,s-o,a-e,h),j(n,_.text,o,e,b,"end",r)}_.childCount>0&&k.set(x,{x0:s,y0:a,x1:o,y1:e,childCount:_.childCount,childrenDrawn:0})}},"drawBranch"),L=e(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),M=e((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),j=e((t,e,i,n,s,a,r)=>{const h=L(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),P=e((t,e,i)=>t+(e-t)*i,"lerp"),T=e((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),B={draw:v},N=e(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),O={parser:f,get db(){return new k},renderer:B,styles:N};export{O as diagram};
1
+ var t;import{_ as e,c as i,a1 as n,F as s,ak as a,q as r,k as h,o,a as l,b as c,g as u,s as d,p as y,e as p}from"./mermaid.core-DsV-uGyB.js";import"./RemoteLifeOSBlock-Bhm7Sf00.js";import"./index-Cg-hTlne.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-C0OnaOQ9.js";import"./index-CUEPjMAK.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DXhmlTQu.js";import"./chevron-up-DQfpYsuw.js";import"./__vite-browser-external-2447137e-DrC7dgv5.js";var g=function(){var t=e(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),i=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:n,7:[1,10],9:9,12:11,13:s,14:a},t(r,[2,3]),{1:[2,2]},t(r,[2,4]),t(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:e(function(t){var i=this,n=[0],s=[],a=[null],r=[],h=this.table,o="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,e(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),e(k,"lex");for(var m,w,x,_,b,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==m&&(m=k()),x=h[w]&&h[w][m]),void 0===x||!x.length||!x[0]){var A;for(b in $=[],h[w])this.terminals_[b]&&b>2&&$.push("'"+this.terminals_[b]+"'");A=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(x[0]){case 1:n.push(m),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),m=null,c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(I,[o,c,l,y.yy,x[1],a,r].concat(u))))return _;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=h[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:e(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:e(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:e(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:e(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:e(function(t){this.unput(this.match.slice(t))},"less"),pastInput:e(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:e(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((i=this._input.match(this.rules[s[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){return this.next()||this.lex()},"lex"),begin:e(function(t){this.conditionStack.push(t)},"begin"),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:e(function(t){this.begin(t)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,e(k,"Parser"),k.prototype=g,g.Parser=k,new k}();g.parser=g;var f=g,k=(e(t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,r()}getRoot(){return this.root}addNode(t,e){const n=h.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return l()}setAccTitle(t){c(t)}getAccDescription(){return u()}setAccDescription(t){d(t)}getDiagramTitle(){return y()}setDiagramTitle(t){o(t)}},"IshikawaDB"),t),m=250,w=82*Math.PI/180,x=Math.cos(w),_=Math.sin(w),b=e((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,a=n.height+2*e;p(t,a,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${a}`)},"applyPaddedViewBox"),v=e((t,e,r,h)=>{const o=h.db.getRoot();if(!o)return;const l=i(),{look:c,handDrawnSeed:u,themeVariables:d}=l,y=n(l.fontSize)[0]??14,p="handDrawn"===c,g=o.children??[],f=l.ishikawa?.diagramPadding??20,k=l.ishikawa?.useMaxWidth??!1,w=s(e),x=w.append("g").attr("class","ishikawa"),_=p?a.svg(w.node()):void 0,v=_?{roughSvg:_,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${e}`;p||x.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let A=0,E=m;const L=p?void 0:T(x,A,E,A,E,"ishikawa-spine");if($(x,A,E,o.text,y,v),!g.length)return p&&T(x,A,E,A,E,"ishikawa-spine",v),void b(w,f,k);A-=20;const M=g.filter((t,e)=>e%2==0),j=g.filter((t,e)=>e%2==1),P=S(M),B=S(j),N=P.total+B.total;let O=m,D=m;if(N>0){const t=500,e=75;O=Math.max(e,t*(P.total/N)),D=Math.max(e,t*(B.total/N))}const W=2*y;O=Math.max(O,P.max*W),D=Math.max(D,B.max*W),E=Math.max(O,m),L&&L.attr("y1",E).attr("y2",E),x.select(".ishikawa-head-group").attr("transform",`translate(0,${E})`);const R=Math.ceil(g.length/2);for(let i=0;i<R;i++){const t=x.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[g[2*i],-1,O],[g[2*i+1],1,D]])e&&C(t,e,A,E,n,s,y,v);A=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(p)T(x,A,E,0,E,"ishikawa-spine",v);else{L.attr("x1",A);const t=`url(#${I})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}b(w,f,k)},"draw"),S=e(t=>{const i=e(t=>t.children.reduce((t,e)=>t+1+i(e),0),"countDescendants");return t.reduce((t,e)=>{const n=i(e);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),$=e((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=j(h,M(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),I=e((t,i)=>{const n=[],s=[],a=e((t,e,r)=>{const h=-1===i?[...t].reverse():t;for(const i of h){const t=n.length,h=i.children??[];n.push({depth:r,text:M(i.text,15),parentIndex:e,childCount:h.length}),r%2==0?(s.push(t),h.length&&a(h,t,r+1)):(h.length&&a(h,t,r+1),s.push(t))}},"walk");return a(t,-1,2),{entries:n,yOrder:s}},"flattenTree"),A=e((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=j(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),E=e((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),C=e((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=_*l*s,u=i+-x*l,d=n+c;if(T(t,i,n,u,d,"ishikawa-branch",h),h&&E(t,i,n,i-u,n-d,h),A(t,e.text,u,d,s,r,h),!o.length)return;const{entries:y,yOrder:p}=I(o,s),g=y.length,f=new Array(g);for(const[x,_]of p.entries())f[_]=n+c*((x+1)/(g+1));const k=new Map;k.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const m=-x,w=_*s,b=s<0?"ishikawa-label up":"ishikawa-label down";for(const[x,_]of y.entries()){const e=f[x],i=k.get(_.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(_.depth%2==0){const t=i.y1-i.y0;s=P(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(_.childCount>0?60+5*_.childCount:30),T(n,s,e,o,e,"ishikawa-sub-branch",h),h&&E(n,s,e,1,0,h),j(n,_.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=P(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+m*((e-a)/w),T(n,s,a,o,e,"ishikawa-sub-branch",h),h&&E(n,s,a,s-o,a-e,h),j(n,_.text,o,e,b,"end",r)}_.childCount>0&&k.set(x,{x0:s,y0:a,x1:o,y1:e,childCount:_.childCount,childrenDrawn:0})}},"drawBranch"),L=e(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),M=e((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),j=e((t,e,i,n,s,a,r)=>{const h=L(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),P=e((t,e,i)=>t+(e-t)*i,"lerp"),T=e((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),B={draw:v},N=e(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),O={parser:f,get db(){return new k},renderer:B,styles:N};export{O as diagram};
@@ -1 +1 @@
1
- import{g as t}from"./chunk-5VM5RSS4-vZpebBcz.js";import{a as e,g as n,h as i,d as s}from"./chunk-32BRIVSS-B-mFVfY1.js";import{_ as r,g as a,s as o,a as l,b as c,p as h,o as u,c as p,d as y,e as d,q as f}from"./mermaid.core-B71KCuEy.js";import"./RemoteLifeOSBlock-aE9tb99H.js";import{d as g}from"./arc-CD8cZzH1.js";import"./index-CArel_iz.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-OdgHTLbm.js";import"./index-CJZRHYmg.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DKhLAmub.js";import"./chevron-up-bHY6-UxU.js";import"./__vite-browser-external-2447137e-DiZsMwIM.js";var m=function(){var t=r(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],a=[1,12],o=[1,13],l=[1,14],c={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:r(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:a,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:a,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:r(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:r(function(t){var e=this,n=[0],i=[],s=[null],a=[],o=this.table,l="",c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r(function(t){n.length=n.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),r(m,"lex");for(var x,k,_,b,w,v,$,S,T={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=o[k]&&o[k][x]),void 0===_||!_.length||!_[0]){var M;for(w in S=[],o[k])this.terminals_[w]&&w>2&&S.push("'"+this.terminals_[w]+"'");M=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),s.push(p.yytext),a.push(p.yylloc),n.push(_[1]),x=null,h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[_[1]][1],T.$=s[s.length-v],T._$={first_line:a[a.length-(v||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(v||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(v||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(T,[l,h,c,y.yy,_[1],s,a].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),a=a.slice(0,-1*v)),n.push(this.productions_[_[1]][0]),s.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:r(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:r(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:r(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:r(function(t){this.unput(this.match.slice(t))},"less"),pastInput:r(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:r(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){return this.next()||this.lex()},"lex"),begin:r(function(t){this.conditionStack.push(t)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:r(function(t){this.begin(t)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,r(u,"Parser"),u.prototype=c,c.Parser=u,new u}();m.parser=m;var x=m,k="",_=[],b=[],w=[],v=r(function(){_.length=0,b.length=0,k="",w.length=0,f()},"clear"),$=r(function(t){k=t,_.push(t)},"addSection"),S=r(function(){return _},"getSections"),T=r(function(){let t=E(),e=0;for(;!t&&e<100;)t=E(),e++;return b.push(...w),b},"getTasks"),M=r(function(){const t=[];return b.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),j=r(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),C=r(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};b.push(e)},"addTaskOrg"),E=r(function(){const t=r(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),A=r(function(){return M()},"getActors"),I={getConfig:r(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:u,getDiagramTitle:h,setAccTitle:c,getAccTitle:l,setAccDescription:o,getAccDescription:a,addSection:$,getSections:S,getTasks:T,addTask:j,addTaskOrg:C,getActors:A},P=r(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),V=r(function(t,e){return s(t,e)},"drawRect"),B=r(function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function s(t){const n=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){const n=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r(s,"smile"),r(a,"sad"),r(o,"ambivalent"),e.score>3?s(i):e.score<3?a(i):o(i),n},"drawFace"),F=r(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),R=r(function(t,e){return i(t,e)},"drawText"),L=r(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}r(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,R(t,e)},"drawLabel"),O=r(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,V(s,r),q(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=r(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++,a.append("line").attr("id",s+"-task"+D).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,V(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};F(a,i),l+=10}),q(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=r(function(t,n){e(t,n)},"drawBackgroundRect"),q=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,l=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),l.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return r(t,"byText"),r(e,"byTspan"),r(n,"byFo"),r(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Y={drawRect:V,drawCircle:F,drawSection:O,drawText:R,drawLabel:L,drawTask:N,drawBackgroundRect:z,initGraphics:r(function(t,e){D=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},W=r(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),X={},G=0;function U(t){const e=p().journey,n=e.maxLabelWidth;G=0;let i=60;Object.keys(X).forEach(s=>{const r=X[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:X[s].position};Y.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;if(o.text(e),o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=Y.drawText(t,r).node().getBoundingClientRect().width;a>G&&a>e.leftMargin-a&&(G=a)}),i+=Math.max(20,20*c.length)})}r(U,"drawActorLegend");var H=p().journey,K=0,Q=r(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");Z.init();const u=h.select("#"+e);Y.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const p in X)delete X[p];let x=0;m.forEach(t=>{X[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),K=H.leftMargin+G,Z.insert(0,0,K,50*Object.keys(X).length),et(u,f,0,e);const k=Z.getBounds();g&&u.append("text").text(g).attr("x",K).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const _=k.stopy-k.starty+2*H.diagramMarginY,b=K+k.stopx+2*H.diagramMarginX;d(u,_,b,H.useMaxWidth),u.append("line").attr("x1",K).attr("y1",4*H.height).attr("x2",b-K-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${b} ${_+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",_+w+25)},"draw"),Z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:r(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:r(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:r(function(t,e,n,i){const s=p().journey,a=this;let o=0;function l(l){return r(function(r){o++;const c=a.sequenceItems.length-o+1;a.updateVal(r,"starty",e-c*s.boxMargin,Math.min),a.updateVal(r,"stopy",i+c*s.boxMargin,Math.max),a.updateVal(Z.data,"startx",t-c*s.boxMargin,Math.min),a.updateVal(Z.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==l&&(a.updateVal(r,"startx",t-c*s.boxMargin,Math.min),a.updateVal(r,"stopx",n+c*s.boxMargin,Math.max),a.updateVal(Z.data,"starty",e-c*s.boxMargin,Math.min),a.updateVal(Z.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}r(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:r(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Z.data,"startx",s,Math.min),this.updateVal(Z.data,"starty",a,Math.min),this.updateVal(Z.data,"stopx",r,Math.max),this.updateVal(Z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:r(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:r(function(){return this.verticalPos},"getVerticalPos"),getBounds:r(function(){return this.data},"getBounds")},J=H.sectionFills,tt=H.sectionColours,et=r(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[u,p]of e.entries()){if(r!==p.section){l=J[o%J.length],h=o%J.length,c=tt[o%tt.length];let n=0;const i=p.section;for(let t=u;t<e.length&&e[t].section==i;t++)n+=1;const a={x:u*s.taskMargin+u*s.width+K,y:50,text:p.section,fill:l,num:h,colour:c,taskCount:n};Y.drawSection(t,a,s),r=p.section,o++}const n=p.people.reduce((t,e)=>(X[e]&&(t[e]=X[e]),t),{});p.x=u*s.taskMargin+u*s.width+K,p.y=a,p.width=s.diagramMarginX,p.height=s.diagramMarginY,p.colour=c,p.fill=l,p.num=h,p.actors=n,Y.drawTask(t,p,s,i),Z.insert(p.x,p.y,p.x+p.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:Q},it={parser:x,db:I,renderer:nt,styles:P,init:r(t=>{nt.setConf(t.journey),I.clear()},"init")};export{it as diagram};
1
+ import{g as t}from"./chunk-5VM5RSS4-BVcBoYrd.js";import{a as e,g as n,h as i,d as s}from"./chunk-32BRIVSS-tN_bs2O_.js";import{_ as r,g as a,s as o,a as l,b as c,p as h,o as u,c as p,d as y,e as d,q as f}from"./mermaid.core-DsV-uGyB.js";import"./RemoteLifeOSBlock-Bhm7Sf00.js";import{d as g}from"./arc-Dfxnvl-t.js";import"./index-Cg-hTlne.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-C0OnaOQ9.js";import"./index-CUEPjMAK.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DXhmlTQu.js";import"./chevron-up-DQfpYsuw.js";import"./__vite-browser-external-2447137e-DrC7dgv5.js";var m=function(){var t=r(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],a=[1,12],o=[1,13],l=[1,14],c={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:r(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:a,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:a,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:r(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:r(function(t){var e=this,n=[0],i=[],s=[null],a=[],o=this.table,l="",c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r(function(t){n.length=n.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),r(m,"lex");for(var x,k,_,b,w,v,$,S,T={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=o[k]&&o[k][x]),void 0===_||!_.length||!_[0]){var M;for(w in S=[],o[k])this.terminals_[w]&&w>2&&S.push("'"+this.terminals_[w]+"'");M=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:S})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),s.push(p.yytext),a.push(p.yylloc),n.push(_[1]),x=null,h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[_[1]][1],T.$=s[s.length-v],T._$={first_line:a[a.length-(v||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(v||1)].first_column,last_column:a[a.length-1].last_column},g&&(T._$.range=[a[a.length-(v||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(T,[l,h,c,y.yy,_[1],s,a].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),a=a.slice(0,-1*v)),n.push(this.productions_[_[1]][0]),s.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:r(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:r(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:r(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:r(function(t){this.unput(this.match.slice(t))},"less"),pastInput:r(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:r(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){return this.next()||this.lex()},"lex"),begin:r(function(t){this.conditionStack.push(t)},"begin"),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:r(function(t){this.begin(t)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,r(u,"Parser"),u.prototype=c,c.Parser=u,new u}();m.parser=m;var x=m,k="",_=[],b=[],w=[],v=r(function(){_.length=0,b.length=0,k="",w.length=0,f()},"clear"),$=r(function(t){k=t,_.push(t)},"addSection"),S=r(function(){return _},"getSections"),T=r(function(){let t=E(),e=0;for(;!t&&e<100;)t=E(),e++;return b.push(...w),b},"getTasks"),M=r(function(){const t=[];return b.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),j=r(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),C=r(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};b.push(e)},"addTaskOrg"),E=r(function(){const t=r(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),A=r(function(){return M()},"getActors"),I={getConfig:r(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:u,getDiagramTitle:h,setAccTitle:c,getAccTitle:l,setAccDescription:o,getAccDescription:a,addSection:$,getSections:S,getTasks:T,addTask:j,addTaskOrg:C,getActors:A},P=r(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),V=r(function(t,e){return s(t,e)},"drawRect"),B=r(function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function s(t){const n=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){const n=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r(s,"smile"),r(a,"sad"),r(o,"ambivalent"),e.score>3?s(i):e.score<3?a(i):o(i),n},"drawFace"),F=r(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),R=r(function(t,e){return i(t,e)},"drawText"),L=r(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}r(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,R(t,e)},"drawLabel"),O=r(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,V(s,r),q(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=r(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++,a.append("line").attr("id",s+"-task"+D).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,V(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};F(a,i),l+=10}),q(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=r(function(t,n){e(t,n)},"drawBackgroundRect"),q=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,l=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),l.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return r(t,"byText"),r(e,"byTspan"),r(n,"byFo"),r(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),Y={drawRect:V,drawCircle:F,drawSection:O,drawText:R,drawLabel:L,drawTask:N,drawBackgroundRect:z,initGraphics:r(function(t,e){D=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},W=r(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),X={},G=0;function U(t){const e=p().journey,n=e.maxLabelWidth;G=0;let i=60;Object.keys(X).forEach(s=>{const r=X[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:X[s].position};Y.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;if(o.text(e),o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=Y.drawText(t,r).node().getBoundingClientRect().width;a>G&&a>e.leftMargin-a&&(G=a)}),i+=Math.max(20,20*c.length)})}r(U,"drawActorLegend");var H=p().journey,K=0,Q=r(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");Z.init();const u=h.select("#"+e);Y.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const p in X)delete X[p];let x=0;m.forEach(t=>{X[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),K=H.leftMargin+G,Z.insert(0,0,K,50*Object.keys(X).length),et(u,f,0,e);const k=Z.getBounds();g&&u.append("text").text(g).attr("x",K).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const _=k.stopy-k.starty+2*H.diagramMarginY,b=K+k.stopx+2*H.diagramMarginX;d(u,_,b,H.useMaxWidth),u.append("line").attr("x1",K).attr("y1",4*H.height).attr("x2",b-K-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${b} ${_+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",_+w+25)},"draw"),Z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:r(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:r(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:r(function(t,e,n,i){const s=p().journey,a=this;let o=0;function l(l){return r(function(r){o++;const c=a.sequenceItems.length-o+1;a.updateVal(r,"starty",e-c*s.boxMargin,Math.min),a.updateVal(r,"stopy",i+c*s.boxMargin,Math.max),a.updateVal(Z.data,"startx",t-c*s.boxMargin,Math.min),a.updateVal(Z.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==l&&(a.updateVal(r,"startx",t-c*s.boxMargin,Math.min),a.updateVal(r,"stopx",n+c*s.boxMargin,Math.max),a.updateVal(Z.data,"starty",e-c*s.boxMargin,Math.min),a.updateVal(Z.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}r(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:r(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Z.data,"startx",s,Math.min),this.updateVal(Z.data,"starty",a,Math.min),this.updateVal(Z.data,"stopx",r,Math.max),this.updateVal(Z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:r(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:r(function(){return this.verticalPos},"getVerticalPos"),getBounds:r(function(){return this.data},"getBounds")},J=H.sectionFills,tt=H.sectionColours,et=r(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[u,p]of e.entries()){if(r!==p.section){l=J[o%J.length],h=o%J.length,c=tt[o%tt.length];let n=0;const i=p.section;for(let t=u;t<e.length&&e[t].section==i;t++)n+=1;const a={x:u*s.taskMargin+u*s.width+K,y:50,text:p.section,fill:l,num:h,colour:c,taskCount:n};Y.drawSection(t,a,s),r=p.section,o++}const n=p.people.reduce((t,e)=>(X[e]&&(t[e]=X[e]),t),{});p.x=u*s.taskMargin+u*s.width+K,p.y=a,p.width=s.diagramMarginX,p.height=s.diagramMarginY,p.colour=c,p.fill=l,p.num=h,p.actors=n,Y.drawTask(t,p,s,i),Z.insert(p.x,p.y,p.x+p.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:Q},it={parser:x,db:I,renderer:nt,styles:P,init:r(t=>{nt.setConf(t.journey),I.clear()},"init")};export{it as diagram};
@@ -1 +1 @@
1
- import{_ as t,l as e,c as n,F as i,ae as s,af as r,ag as o,ac as a,D as c,i as l,Y as h,Z as u,a9 as g,aa as d,ab as p}from"./mermaid.core-B71KCuEy.js";import{g as y}from"./chunk-5VM5RSS4-vZpebBcz.js";import"./index-CArel_iz.js";import"./RemoteLifeOSBlock-aE9tb99H.js";import"./index-OdgHTLbm.js";import"./index-CJZRHYmg.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DKhLAmub.js";import"./chevron-up-bHY6-UxU.js";import"./__vite-browser-external-2447137e-DiZsMwIM.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";var f=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(f,[2,14],{7:m,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);g.setInput(e,d.yy),d.yy.lexer=g,d.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;o.push(y);var f=g.options&&g.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(m,"lex");for(var b,_,k,E,S,x,N,L,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=m()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var I;for(S in L=[],a[_])this.terminals_[S]&&S>2&&L.push("'"+this.terminals_[S]+"'");I=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(g.yytext),o.push(g.yylloc),i.push(k[1]),b=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(x=this.productions_[k[1]][1],D.$=r[r.length-x],D._$={first_line:o[o.length-(x||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(x||1)].first_column,last_column:o[o.length-1].last_column},f&&(D._$.range=[o[o.length-(x||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[c,h,l,d.yy,k[1],r,o].concat(u))))return E;x&&(i=i.slice(0,-1*x*2),r=r.slice(0,-1*x),o=o.slice(0,-1*x)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),N=a[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:t(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){return this.next()||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function x(){this.yy={}}return E.lexer=S,t(x,"Parser"),x.prototype=E,E.Parser=x,new x}();f.parser=f;var m=f,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),x=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let i=b.length-1;i>=0;i--)if(b[i].level!==e||n||(n=b[i]),b[i].level<e)throw new Error('Items without section detected, found section ("'+b[i].label+'")');return t===n?.level?null:n},"getSection"),N=t(function(){return _},"getSections"),L=t(function(){const t=[],e=N(),i=n();for(const n of e){const e={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const r of s){const e={id:r.id,parentId:n.id,label:l(r.label??"",i),labelType:"markdown",isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{const o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case I.ROUNDED_RECT:case I.RECT:case I.HEXAGON:a*=2}const g={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(g.shape=e?.shape),e?.label&&(g.label=e?.label),e?.icon&&(g.icon=e?.icon.toString()),e?.assigned&&(g.assigned=e?.assigned.toString()),e?.ticket&&(g.ticket=e?.ticket.toString()),e?.priority&&(g.priority=e?.priority)}const d=x(t);d?g.parentId=d.id||"kbn"+k++:_.push(g),b.push(g)},"addNode"),I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:D,getSections:N,getData:L,nodeType:I,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return I.RECT;case"(":return")"===n?I.ROUNDED_RECT:I.CLOUD;case"((":return I.CIRCLE;case")":return I.CLOUD;case"))":return I.BANG;case"{{":return I.HEXAGON;default:return I.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=l(t.icon,e)),t.class&&(i.cssClasses=l(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case I.DEFAULT:return"no-border";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded-rect";case I.CIRCLE:return"circle";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},v={draw:t(async(t,l,h,u)=>{e.debug("Rendering kanban diagram\n"+t);const g=u.db.getData(),d=n();d.htmlLabels=!1;const p=i(l);for(const e of g.nodes)e.domId=`${l}-${e.id}`;const y=p.append("g");y.attr("class","sections");const f=p.append("g");f.attr("class","items");const m=g.nodes.filter(t=>t.isGroup);let b=0;const _=[];let k=25;for(const e of m){const t=d?.kanban?.sectionWidth||200;b+=1,e.x=t*b+10*(b-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+b;const n=await s(y,e);k=Math.max(k,n?.labelBBox?.height),_.push(n)}let E=0;for(const e of m){const t=_[E];E+=1;const n=d?.kanban?.sectionWidth||200,i=3*-n/2+k;let s=i;const a=g.nodes.filter(t=>t.parentId===e.id);for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(f,h,{config:d})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const c=t.cluster.select("rect"),l=Math.max(s-i+30,50)+(k-25);c.attr("height",l)}a(void 0,p,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],g(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):d(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:O,renderer:v,parser:m,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
1
+ import{_ as t,l as e,c as n,F as i,ae as s,af as r,ag as o,ac as a,D as c,i as l,Y as h,Z as u,a9 as g,aa as d,ab as p}from"./mermaid.core-DsV-uGyB.js";import{g as y}from"./chunk-5VM5RSS4-BVcBoYrd.js";import"./index-Cg-hTlne.js";import"./RemoteLifeOSBlock-Bhm7Sf00.js";import"./index-C0OnaOQ9.js";import"./index-CUEPjMAK.js";import"./file-editor-index-C6CU7Fik.js";import"./App-DXhmlTQu.js";import"./chevron-up-DQfpYsuw.js";import"./__vite-browser-external-2447137e-DrC7dgv5.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";var f=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(f,[2,14],{7:m,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);g.setInput(e,d.yy),d.yy.lexer=g,d.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;o.push(y);var f=g.options&&g.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(m,"lex");for(var b,_,k,E,S,x,N,L,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=m()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var I;for(S in L=[],a[_])this.terminals_[S]&&S>2&&L.push("'"+this.terminals_[S]+"'");I=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(g.yytext),o.push(g.yylloc),i.push(k[1]),b=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(x=this.productions_[k[1]][1],D.$=r[r.length-x],D._$={first_line:o[o.length-(x||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(x||1)].first_column,last_column:o[o.length-1].last_column},f&&(D._$.range=[o[o.length-(x||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[c,h,l,d.yy,k[1],r,o].concat(u))))return E;x&&(i=i.slice(0,-1*x*2),r=r.slice(0,-1*x),o=o.slice(0,-1*x)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),N=a[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:t(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){return this.next()||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function x(){this.yy={}}return E.lexer=S,t(x,"Parser"),x.prototype=E,E.Parser=x,new x}();f.parser=f;var m=f,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),x=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let i=b.length-1;i>=0;i--)if(b[i].level!==e||n||(n=b[i]),b[i].level<e)throw new Error('Items without section detected, found section ("'+b[i].label+'")');return t===n?.level?null:n},"getSection"),N=t(function(){return _},"getSections"),L=t(function(){const t=[],e=N(),i=n();for(const n of e){const e={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const r of s){const e={id:r.id,parentId:n.id,label:l(r.label??"",i),labelType:"markdown",isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{const o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case I.ROUNDED_RECT:case I.RECT:case I.HEXAGON:a*=2}const g={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(g.shape=e?.shape),e?.label&&(g.label=e?.label),e?.icon&&(g.icon=e?.icon.toString()),e?.assigned&&(g.assigned=e?.assigned.toString()),e?.ticket&&(g.ticket=e?.ticket.toString()),e?.priority&&(g.priority=e?.priority)}const d=x(t);d?g.parentId=d.id||"kbn"+k++:_.push(g),b.push(g)},"addNode"),I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:D,getSections:N,getData:L,nodeType:I,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return I.RECT;case"(":return")"===n?I.ROUNDED_RECT:I.CLOUD;case"((":return I.CIRCLE;case")":return I.CLOUD;case"))":return I.BANG;case"{{":return I.HEXAGON;default:return I.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=l(t.icon,e)),t.class&&(i.cssClasses=l(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case I.DEFAULT:return"no-border";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded-rect";case I.CIRCLE:return"circle";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},v={draw:t(async(t,l,h,u)=>{e.debug("Rendering kanban diagram\n"+t);const g=u.db.getData(),d=n();d.htmlLabels=!1;const p=i(l);for(const e of g.nodes)e.domId=`${l}-${e.id}`;const y=p.append("g");y.attr("class","sections");const f=p.append("g");f.attr("class","items");const m=g.nodes.filter(t=>t.isGroup);let b=0;const _=[];let k=25;for(const e of m){const t=d?.kanban?.sectionWidth||200;b+=1,e.x=t*b+10*(b-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+b;const n=await s(y,e);k=Math.max(k,n?.labelBBox?.height),_.push(n)}let E=0;for(const e of m){const t=_[E];E+=1;const n=d?.kanban?.sectionWidth||200,i=3*-n/2+k;let s=i;const a=g.nodes.filter(t=>t.parentId===e.id);for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(f,h,{config:d})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const c=t.cluster.select("rect"),l=Math.max(s-i+30,50)+(k-25);c.attr("height",l)}a(void 0,p,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],g(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):d(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:O,renderer:v,parser:m,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
@@ -1 +1 @@
1
- import{c as a}from"./index-CArel_iz.js";const r=a("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);export{r as K};
1
+ import{c as a}from"./index-Cg-hTlne.js";const r=a("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);export{r as K};
@@ -1 +1 @@
1
- import{b8 as n,b9 as t,ba as r,bb as e,bc as a}from"./mermaid.core-B71KCuEy.js";import{i as u}from"./init-C0SZ43gy.js";import{e as o,f as i,a as f,b as c}from"./defaultLocale-Z7o9ZNZF.js";function l(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function s(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function h(n){let t,r,e;function a(n,e,a=0,u=n.length){if(a<u){if(0!==t(e,e))return u;do{const t=a+u>>>1;r(n[t],e)<0?a=t+1:u=t}while(a<u)}return a}return 2!==n.length?(t=l,r=(t,r)=>l(n(t),r),e=(t,r)=>n(t)-r):(t=n===l||n===s?n:M,r=n,e=n),{left:a,center:function(n,t,r=0,u=n.length){const o=a(n,t,r,u-1);return o>r&&e(n[o-1],t)>-e(n[o],t)?o-1:o},right:function(n,e,a=0,u=n.length){if(a<u){if(0!==t(e,e))return u;do{const t=a+u>>>1;r(n[t],e)<=0?a=t+1:u=t}while(a<u)}return a}}}function M(){return 0}const m=h(l).right;h(function(n){return null===n?NaN:+n}).center;const p=Math.sqrt(50),g=Math.sqrt(10),N=Math.sqrt(2);function v(n,t,r){const e=(t-n)/Math.max(0,r),a=Math.floor(Math.log10(e)),u=e/Math.pow(10,a),o=u>=p?10:u>=g?5:u>=N?2:1;let i,f,c;return a<0?(c=Math.pow(10,-a)/o,i=Math.round(n*c),f=Math.round(t*c),i/c<n&&++i,f/c>t&&--f,c=-c):(c=Math.pow(10,a)*o,i=Math.round(n/c),f=Math.round(t/c),i*c<n&&++i,f*c>t&&--f),f<i&&.5<=r&&r<2?v(n,t,2*r):[i,f,c]}function b(n,t,r){return v(n=+n,t=+t,r=+r)[2]}function y(n,t,r){r=+r;const e=(t=+t)<(n=+n),a=e?b(t,n,r):b(n,t,r);return(e?-1:1)*(a<0?1/-a:a)}function w(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,a=t.slice();return function(u){for(r=0;r<e;++r)a[r]=n[r]*(1-u)+t[r]*u;return a}}function d(n,t){var r,e=t?t.length:0,a=n?Math.min(e,n.length):0,u=new Array(a),o=new Array(e);for(r=0;r<a;++r)u[r]=k(n[r],t[r]);for(;r<e;++r)o[r]=t[r];return function(n){for(r=0;r<a;++r)o[r]=u[r](n);return o}}function A(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function x(n,t){var r,e={},a={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=k(n[r],t[r]):a[r]=t[r];return function(n){for(r in e)a[r]=e[r](n);return a}}function k(u,o){var i,f=typeof o;return null==o||"boolean"===f?n(o):("number"===f?t:"string"===f?(i=a(o))?(o=i,r):e:o instanceof a?r:o instanceof Date?A:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(o)?w:Array.isArray(o)?d:"function"!=typeof o.valueOf&&"function"!=typeof o.toString||isNaN(o)?x:t)(u,o)}function j(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function q(n){return+n}var D=[0,1];function V(n){return n}function B(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:function(n){return function(){return n}}(isNaN(t)?NaN:.5)}function F(n,t,r){var e=n[0],a=n[1],u=t[0],o=t[1];return a<e?(e=B(a,e),u=r(o,u)):(e=B(e,a),u=r(u,o)),function(n){return u(e(n))}}function L(n,t,r){var e=Math.min(n.length,t.length)-1,a=new Array(e),u=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<e;)a[o]=B(n[o],n[o+1]),u[o]=r(t[o],t[o+1]);return function(t){var r=m(n,t,1,e)-1;return u[r](a[r](t))}}function O(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Q(){return function(){var n,r,e,a,u,o,i=D,f=D,c=k,l=V;function s(){var n=Math.min(i.length,f.length);return l!==V&&(l=function(n,t){var r;return n>t&&(r=n,n=t,t=r),function(r){return Math.max(n,Math.min(t,r))}}(i[0],i[n-1])),a=n>2?L:F,u=o=null,h}function h(t){return null==t||isNaN(t=+t)?e:(u||(u=a(i.map(n),f,c)))(n(l(t)))}return h.invert=function(e){return l(r((o||(o=a(f,i.map(n),t)))(e)))},h.domain=function(n){return arguments.length?(i=Array.from(n,q),s()):i.slice()},h.range=function(n){return arguments.length?(f=Array.from(n),s()):f.slice()},h.rangeRound=function(n){return f=Array.from(n),c=j,s()},h.clamp=function(n){return arguments.length?(l=!!n||V,s()):l!==V},h.interpolate=function(n){return arguments.length?(c=n,s()):c},h.unknown=function(n){return arguments.length?(e=n,h):e},function(t,e){return n=t,r=e,s()}}()(V,V)}function R(){var n=Q();return n.copy=function(){return O(n,R())},u.apply(n,arguments),function(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)===(t=+t))return[n];const e=t<n,[a,u,o]=e?v(t,n,r):v(n,t,r);if(!(u>=a))return[];const i=u-a+1,f=new Array(i);if(e)if(o<0)for(let c=0;c<i;++c)f[c]=(u-c)/-o;else for(let c=0;c<i;++c)f[c]=(u-c)*o;else if(o<0)for(let c=0;c<i;++c)f[c]=(a+c)/-o;else for(let c=0;c<i;++c)f[c]=(a+c)*o;return f}(r[0],r[r.length-1],n??10)},n.tickFormat=function(n,r){var e=t();return function(n,t,r,e){var a,u=y(n,t,r);switch((e=i(e??",f")).type){case"s":var l=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(a=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(o(t)/3)))-o(Math.abs(n)))}(u,l))||(e.precision=a),f(e,l);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(a=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,o(t)-o(n))+1}(u,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=a-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(a=function(n){return Math.max(0,-o(Math.abs(n)))}(u))||(e.precision=a-2*("%"===e.type))}return c(e)}(e[0],e[e.length-1],n??10,r)},n.nice=function(r){null==r&&(r=10);var e,a,u=t(),o=0,i=u.length-1,f=u[o],c=u[i],l=10;for(c<f&&(a=f,f=c,c=a,a=o,o=i,i=a);l-- >0;){if((a=b(f,c,r))===e)return u[o]=f,u[i]=c,t(u);if(a>0)f=Math.floor(f/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;f=Math.ceil(f*a)/a,c=Math.floor(c*a)/a}e=a}return n},n}(n)}export{O as a,h as b,Q as c,R as l,y as t};
1
+ import{b8 as n,b9 as t,ba as r,bb as e,bc as a}from"./mermaid.core-DsV-uGyB.js";import{i as u}from"./init-C0SZ43gy.js";import{e as o,f as i,a as f,b as c}from"./defaultLocale-Z7o9ZNZF.js";function l(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function s(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function h(n){let t,r,e;function a(n,e,a=0,u=n.length){if(a<u){if(0!==t(e,e))return u;do{const t=a+u>>>1;r(n[t],e)<0?a=t+1:u=t}while(a<u)}return a}return 2!==n.length?(t=l,r=(t,r)=>l(n(t),r),e=(t,r)=>n(t)-r):(t=n===l||n===s?n:M,r=n,e=n),{left:a,center:function(n,t,r=0,u=n.length){const o=a(n,t,r,u-1);return o>r&&e(n[o-1],t)>-e(n[o],t)?o-1:o},right:function(n,e,a=0,u=n.length){if(a<u){if(0!==t(e,e))return u;do{const t=a+u>>>1;r(n[t],e)<=0?a=t+1:u=t}while(a<u)}return a}}}function M(){return 0}const m=h(l).right;h(function(n){return null===n?NaN:+n}).center;const p=Math.sqrt(50),g=Math.sqrt(10),N=Math.sqrt(2);function v(n,t,r){const e=(t-n)/Math.max(0,r),a=Math.floor(Math.log10(e)),u=e/Math.pow(10,a),o=u>=p?10:u>=g?5:u>=N?2:1;let i,f,c;return a<0?(c=Math.pow(10,-a)/o,i=Math.round(n*c),f=Math.round(t*c),i/c<n&&++i,f/c>t&&--f,c=-c):(c=Math.pow(10,a)*o,i=Math.round(n/c),f=Math.round(t/c),i*c<n&&++i,f*c>t&&--f),f<i&&.5<=r&&r<2?v(n,t,2*r):[i,f,c]}function b(n,t,r){return v(n=+n,t=+t,r=+r)[2]}function y(n,t,r){r=+r;const e=(t=+t)<(n=+n),a=e?b(t,n,r):b(n,t,r);return(e?-1:1)*(a<0?1/-a:a)}function w(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,a=t.slice();return function(u){for(r=0;r<e;++r)a[r]=n[r]*(1-u)+t[r]*u;return a}}function d(n,t){var r,e=t?t.length:0,a=n?Math.min(e,n.length):0,u=new Array(a),o=new Array(e);for(r=0;r<a;++r)u[r]=k(n[r],t[r]);for(;r<e;++r)o[r]=t[r];return function(n){for(r=0;r<a;++r)o[r]=u[r](n);return o}}function A(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function x(n,t){var r,e={},a={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=k(n[r],t[r]):a[r]=t[r];return function(n){for(r in e)a[r]=e[r](n);return a}}function k(u,o){var i,f=typeof o;return null==o||"boolean"===f?n(o):("number"===f?t:"string"===f?(i=a(o))?(o=i,r):e:o instanceof a?r:o instanceof Date?A:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(o)?w:Array.isArray(o)?d:"function"!=typeof o.valueOf&&"function"!=typeof o.toString||isNaN(o)?x:t)(u,o)}function j(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function q(n){return+n}var D=[0,1];function V(n){return n}function B(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:function(n){return function(){return n}}(isNaN(t)?NaN:.5)}function F(n,t,r){var e=n[0],a=n[1],u=t[0],o=t[1];return a<e?(e=B(a,e),u=r(o,u)):(e=B(e,a),u=r(u,o)),function(n){return u(e(n))}}function L(n,t,r){var e=Math.min(n.length,t.length)-1,a=new Array(e),u=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<e;)a[o]=B(n[o],n[o+1]),u[o]=r(t[o],t[o+1]);return function(t){var r=m(n,t,1,e)-1;return u[r](a[r](t))}}function O(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Q(){return function(){var n,r,e,a,u,o,i=D,f=D,c=k,l=V;function s(){var n=Math.min(i.length,f.length);return l!==V&&(l=function(n,t){var r;return n>t&&(r=n,n=t,t=r),function(r){return Math.max(n,Math.min(t,r))}}(i[0],i[n-1])),a=n>2?L:F,u=o=null,h}function h(t){return null==t||isNaN(t=+t)?e:(u||(u=a(i.map(n),f,c)))(n(l(t)))}return h.invert=function(e){return l(r((o||(o=a(f,i.map(n),t)))(e)))},h.domain=function(n){return arguments.length?(i=Array.from(n,q),s()):i.slice()},h.range=function(n){return arguments.length?(f=Array.from(n),s()):f.slice()},h.rangeRound=function(n){return f=Array.from(n),c=j,s()},h.clamp=function(n){return arguments.length?(l=!!n||V,s()):l!==V},h.interpolate=function(n){return arguments.length?(c=n,s()):c},h.unknown=function(n){return arguments.length?(e=n,h):e},function(t,e){return n=t,r=e,s()}}()(V,V)}function R(){var n=Q();return n.copy=function(){return O(n,R())},u.apply(n,arguments),function(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)===(t=+t))return[n];const e=t<n,[a,u,o]=e?v(t,n,r):v(n,t,r);if(!(u>=a))return[];const i=u-a+1,f=new Array(i);if(e)if(o<0)for(let c=0;c<i;++c)f[c]=(u-c)/-o;else for(let c=0;c<i;++c)f[c]=(u-c)*o;else if(o<0)for(let c=0;c<i;++c)f[c]=(a+c)/-o;else for(let c=0;c<i;++c)f[c]=(a+c)*o;return f}(r[0],r[r.length-1],n??10)},n.tickFormat=function(n,r){var e=t();return function(n,t,r,e){var a,u=y(n,t,r);switch((e=i(e??",f")).type){case"s":var l=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(a=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(o(t)/3)))-o(Math.abs(n)))}(u,l))||(e.precision=a),f(e,l);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(a=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,o(t)-o(n))+1}(u,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=a-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(a=function(n){return Math.max(0,-o(Math.abs(n)))}(u))||(e.precision=a-2*("%"===e.type))}return c(e)}(e[0],e[e.length-1],n??10,r)},n.nice=function(r){null==r&&(r=10);var e,a,u=t(),o=0,i=u.length-1,f=u[o],c=u[i],l=10;for(c<f&&(a=f,f=c,c=a,a=o,o=i,i=a);l-- >0;){if((a=b(f,c,r))===e)return u[o]=f,u[i]=c,t(u);if(a>0)f=Math.floor(f/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;f=Math.ceil(f*a)/a,c=Math.floor(c*a)/a}e=a}return n},n}(n)}export{O as a,h as b,Q as c,R as l,y as t};