vibelet 1.2.244 → 1.2.246

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 (118) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/inventory-scan-worker.cjs +1 -1
  3. package/dist/remoteDirect/manifest.json +12 -12
  4. package/dist/runtime-version.cjs +1 -1
  5. package/dist/web/assets/App-CZIOZPdk.js +2 -0
  6. package/dist/web/assets/App-DLiIDPsk.css +97 -0
  7. package/dist/web/assets/{BrowserControlPanel-CPoKd7Kw.js → BrowserControlPanel-CcLSEdgn.js} +1 -1
  8. package/dist/web/assets/ChatPane-Bo37QSWB.js +2 -0
  9. package/dist/web/assets/{ChipGroup-CBLaaeLz.js → ChipGroup-5ggS1zhF.js} +1 -1
  10. package/dist/web/assets/{ComposerMenus-DsmaPUcI.js → ComposerMenus-C_2jf_F6.js} +1 -1
  11. package/dist/web/assets/{DiffDrawer-OzwH-ohL.js → DiffDrawer-Dzc8Y3K8.js} +1 -1
  12. package/dist/web/assets/{FilesControlPanel-OMKoXFux.js → FilesControlPanel-DGE645aW.js} +1 -1
  13. package/dist/web/assets/{GlobalPendingDialog-C7pEj7Bn.js → GlobalPendingDialog-lhxxOaxl.js} +1 -1
  14. package/dist/web/assets/{ImageViewer-Cob3hI1x.js → ImageViewer-BFyngBVd.js} +1 -1
  15. package/dist/web/assets/{LanguageSettingsPanel-CDBK3924.js → LanguageSettingsPanel-B3ExjM7G.js} +1 -1
  16. package/dist/web/assets/{MarkdownModePanel-DGwvMtZM.js → MarkdownModePanel-C3abGyM_.js} +1 -1
  17. package/dist/web/assets/{MessageImage-Cf2bcj81.js → MessageImage-BW_oaSy1.js} +1 -1
  18. package/dist/web/assets/{NewSessionDialog-DUooZQm1.js → NewSessionDialog-CFS01iwD.js} +1 -1
  19. package/dist/web/assets/{NotificationSettingsPanel-CEEZqgwB.js → NotificationSettingsPanel-_Kd2iXel.js} +1 -1
  20. package/dist/web/assets/{PanelFind-DTUP5y3B.js → PanelFind-Ca11oUXn.js} +1 -1
  21. package/dist/web/assets/{RemoteLifeOSBlock-BlUqhm3D.js → RemoteLifeOSBlock-CB1oIUUB.js} +2 -2
  22. package/dist/web/assets/{RemoteWorkspaceSettings--qq9qs_Y.js → RemoteWorkspaceSettings-IsU20C86.js} +1 -1
  23. package/dist/web/assets/{SessionTerminalPanel-BaZnSZot.js → SessionTerminalPanel-BwRHLtT-.js} +2 -2
  24. package/dist/web/assets/{SpeechInputSettingsPanel-BK0fKCTr.js → SpeechInputSettingsPanel-jTi16Lhn.js} +1 -1
  25. package/dist/web/assets/{ThemeSettingsPanel-DI84WGvC.js → ThemeSettingsPanel-malZcyw_.js} +1 -1
  26. package/dist/web/assets/{__vite-browser-external-2447137e-DW3mvo_M.js → __vite-browser-external-2447137e-DI8NWlgj.js} +1 -1
  27. package/dist/web/assets/{abnfDiagram-VRR7QNED-C3rbCRUQ.js → abnfDiagram-VRR7QNED-D11tKR6T.js} +1 -1
  28. package/dist/web/assets/{arc-BMRI7ug0.js → arc-CAu3R4PF.js} +1 -1
  29. package/dist/web/assets/{architectureDiagram-ZJ3FMSHR-C6Sppdgd.js → architectureDiagram-ZJ3FMSHR-8_ttgIH0.js} +1 -1
  30. package/dist/web/assets/{arrow-left-Dn8a_P9r.js → arrow-left-DNcyw5uL.js} +1 -1
  31. package/dist/web/assets/{arrow-right-CD9DUizK.js → arrow-right-BcMLENxH.js} +1 -1
  32. package/dist/web/assets/{blockDiagram-677ZJIJ3-Bm8Ayy1Z.js → blockDiagram-677ZJIJ3-YkJq9UEM.js} +1 -1
  33. package/dist/web/assets/{c4Diagram-LMCZKHZV-BJzRiX9s.js → c4Diagram-LMCZKHZV-eV_SqBvD.js} +1 -1
  34. package/dist/web/assets/channel-DhhPBrFp.js +1 -0
  35. package/dist/web/assets/chevron-up-B9V3ULAL.js +1 -0
  36. package/dist/web/assets/{chunk-2Q5K7J3B-CQ1-wT5k.js → chunk-2Q5K7J3B-CZrLnVb9.js} +1 -1
  37. package/dist/web/assets/{chunk-32BRIVSS-C9h1MPOY.js → chunk-32BRIVSS-B2KKs_79.js} +1 -1
  38. package/dist/web/assets/{chunk-5VM5RSS4-676Zf_tM.js → chunk-5VM5RSS4-mjW-zQqf.js} +1 -1
  39. package/dist/web/assets/{chunk-EX3LRPZG-CN-9cKRq.js → chunk-EX3LRPZG-CFVHluWq.js} +1 -1
  40. package/dist/web/assets/{chunk-JWPE2WC7-DMSZNrOK.js → chunk-JWPE2WC7-pcVFSgQ7.js} +1 -1
  41. package/dist/web/assets/{chunk-MOJQB5TN-CA493fAj.js → chunk-MOJQB5TN-6Ch6QipJ.js} +1 -1
  42. package/dist/web/assets/{chunk-RYQCIY6F-CuhZfXOr.js → chunk-RYQCIY6F-BtsCrKLW.js} +1 -1
  43. package/dist/web/assets/{chunk-V7JOEXUC-BISX05OV.js → chunk-V7JOEXUC-CP_vXf2S.js} +1 -1
  44. package/dist/web/assets/{chunk-VR4S4FIN-BrxW8t76.js → chunk-VR4S4FIN-C00Rcz5N.js} +1 -1
  45. package/dist/web/assets/{chunk-XXDRQBXY-B11WukNi.js → chunk-XXDRQBXY-DZ3L0vCa.js} +1 -1
  46. package/dist/web/assets/classDiagram-OUVF2IWQ-H6ukLNln.js +1 -0
  47. package/dist/web/assets/classDiagram-v2-EOCWNBFH-H6ukLNln.js +1 -0
  48. package/dist/web/assets/{collectMessageImages-ByGEJk4W.js → collectMessageImages-Cxly4LiQ.js} +1 -1
  49. package/dist/web/assets/{cose-bilkent-JH36ORCC-BBct79nj.js → cose-bilkent-JH36ORCC-FA45m3G-.js} +1 -1
  50. package/dist/web/assets/{cynefin-VYW2F7L2-DkjP8Uvr.js → cynefin-VYW2F7L2-DrlLUUXc.js} +1 -1
  51. package/dist/web/assets/{cynefinDiagram-TSTJHNR4-BshnTL7c.js → cynefinDiagram-TSTJHNR4-DmWiopuG.js} +1 -1
  52. package/dist/web/assets/{dagre-VKFMJZFB-CDJ1LBpz.js → dagre-VKFMJZFB-C4D00zaR.js} +1 -1
  53. package/dist/web/assets/{diagram-FQU43EPY-CFT8Dh3F.js → diagram-FQU43EPY-C5MNCVmr.js} +1 -1
  54. package/dist/web/assets/{diagram-G47NLZAW-FlGvlbBY.js → diagram-G47NLZAW-C6u6SzM7.js} +1 -1
  55. package/dist/web/assets/{diagram-NH7WQ7WH-C3FZqCGr.js → diagram-NH7WQ7WH-BlWpP8Fq.js} +1 -1
  56. package/dist/web/assets/{diagram-OA4YK3LP-CqA8qU8l.js → diagram-OA4YK3LP-2KSlrt3a.js} +1 -1
  57. package/dist/web/assets/{diagram-WEI45ONY-CWxsHN3a.js → diagram-WEI45ONY-tG88nrWj.js} +1 -1
  58. package/dist/web/assets/{ebnfDiagram-CCIWWBDH-D-nwbyZM.js → ebnfDiagram-CCIWWBDH-B3r6m73Z.js} +1 -1
  59. package/dist/web/assets/{erDiagram-Q63AITRT-Cw4QFFdq.js → erDiagram-Q63AITRT-BX2lM8uO.js} +1 -1
  60. package/dist/web/assets/{file-editor-FileCodeEditor-BTvQY5aN.js → file-editor-FileCodeEditor-DTK6AVcO.js} +1 -1
  61. package/dist/web/assets/{file-editor-ObsidianCodeEditor-CnBokVUd.js → file-editor-ObsidianCodeEditor-DKfROgto.js} +1 -1
  62. package/dist/web/assets/{file-editor-ObsidianFileEditor-BHqr5Od1.js → file-editor-ObsidianFileEditor-BGlzU1oI.js} +1 -1
  63. package/dist/web/assets/{flowDiagram-23GEKE2U-_YtzmK1c.js → flowDiagram-23GEKE2U-Wx_x_vgS.js} +1 -1
  64. package/dist/web/assets/{folder-plus-B5Pq2nu3.js → folder-plus-Casm32Oo.js} +1 -1
  65. package/dist/web/assets/{ganttDiagram-NO4QXBWP-CooJp1Sy.js → ganttDiagram-NO4QXBWP-CvSH-uLg.js} +1 -1
  66. package/dist/web/assets/{gitGraphDiagram-IHSO6WYX-DLkVxgBO.js → gitGraphDiagram-IHSO6WYX-BqcZKHQX.js} +1 -1
  67. package/dist/web/assets/highlighted-body-TPN3WLV5-DgGGl4JT.js +1 -0
  68. package/dist/web/assets/{imageViewerCopy-DPlsO9Fq.js → imageViewerCopy-DOocifTl.js} +1 -1
  69. package/dist/web/assets/index-BA-jHUYu.js +2 -0
  70. package/dist/web/assets/{index-MzY1_GM8.js → index-Bwzkr19k.js} +1 -1
  71. package/dist/web/assets/{index-CJdSlCST.js → index-DPecT8Xb.js} +1 -1
  72. package/dist/web/assets/{index-or5MsQ9j.js → index-DtkApYTC.js} +1 -1
  73. package/dist/web/assets/infoDiagram-FWYZ7A6U-DIOngJPr.js +1 -0
  74. package/dist/web/assets/{ishikawaDiagram-FXEZZL3T-D49dd8yi.js → ishikawaDiagram-FXEZZL3T-Dg7haTIM.js} +1 -1
  75. package/dist/web/assets/{journeyDiagram-5HDEW3XC-HCOjLMVz.js → journeyDiagram-5HDEW3XC-DnsOyebr.js} +1 -1
  76. package/dist/web/assets/{kanban-definition-HUTT4EX6-C-r1YL8K.js → kanban-definition-HUTT4EX6-D6Ur8-Ra.js} +1 -1
  77. package/dist/web/assets/{key-round-CBXf9jso.js → key-round-BN9-w6xo.js} +1 -1
  78. package/dist/web/assets/{linear-Dieq9bEI.js → linear-BwQSJk8K.js} +1 -1
  79. package/dist/web/assets/{mermaid-O7DHMXV3-CQ5BQ7KZ.js → mermaid-O7DHMXV3-C2WwE-4v.js} +2 -2
  80. package/dist/web/assets/{mermaid.core-Wy19F3JO.js → mermaid.core-DvQhEKPq.js} +2 -2
  81. package/dist/web/assets/{mic-D4goCrg5.js → mic-Wkfe6Dmv.js} +1 -1
  82. package/dist/web/assets/{mindmap-definition-LN4V7U3C-DjxMFts-.js → mindmap-definition-LN4V7U3C-CE0A90dm.js} +1 -1
  83. package/dist/web/assets/{pegDiagram-2B236MQR-BZAyERYc.js → pegDiagram-2B236MQR-C9I4hu_u.js} +1 -1
  84. package/dist/web/assets/{pieDiagram-ENE6RG2P-CqK22Xww.js → pieDiagram-ENE6RG2P-Na6IiIKC.js} +1 -1
  85. package/dist/web/assets/{quadrantDiagram-ABIIQ3AL-a7VYXceJ.js → quadrantDiagram-ABIIQ3AL-Cw-peedp.js} +1 -1
  86. package/dist/web/assets/{railroadDiagram-RFXS5EU6-C0Hh-9Vy.js → railroadDiagram-RFXS5EU6-VmTA4UlT.js} +1 -1
  87. package/dist/web/assets/{requirementDiagram-TGXJPOKE-Dyk0T0Kw.js → requirementDiagram-TGXJPOKE-BxS8s9iz.js} +1 -1
  88. package/dist/web/assets/{sankeyDiagram-HTMAVEWB-OPHtJfE4.js → sankeyDiagram-HTMAVEWB-feLCtFVd.js} +1 -1
  89. package/dist/web/assets/{sequenceDiagram-DBY2YBRQ-Dy6ExaPH.js → sequenceDiagram-DBY2YBRQ-DMUb6yoI.js} +1 -1
  90. package/dist/web/assets/{shield-check-dTSt1i64.js → shield-check-fq8ccvnx.js} +1 -1
  91. package/dist/web/assets/{sizeCapture-X5ZJPWSS-DISoB4Kg.js → sizeCapture-X5ZJPWSS-sJ1EXr16.js} +1 -1
  92. package/dist/web/assets/{stateDiagram-2N3HPSRC-BMeAqaRI.js → stateDiagram-2N3HPSRC-BUKVxQjf.js} +1 -1
  93. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-6SlTXBxX.js +1 -0
  94. package/dist/web/assets/{swimlanes-5IMT3BWC-CLpuLt5m.js → swimlanes-5IMT3BWC-QX9NdcCM.js} +2 -2
  95. package/dist/web/assets/swimlanesDiagram-G3AALYLV-FT9WGBsn.js +1 -0
  96. package/dist/web/assets/{timeline-definition-FHXFAJF6-DBVYShyC.js → timeline-definition-FHXFAJF6-C8F-gNGO.js} +1 -1
  97. package/dist/web/assets/{useComposerCompletion-BlG5_30j.js → useComposerCompletion-DXuukkyo.js} +1 -1
  98. package/dist/web/assets/{useMessageImage-DiamlPBI.js → useMessageImage-CJJyUDKA.js} +1 -1
  99. package/dist/web/assets/{vennDiagram-L72KCM5P-D17Xr4C3.js → vennDiagram-L72KCM5P-7Jg4qUfl.js} +1 -1
  100. package/dist/web/assets/{wardleyDiagram-EHGQE667-CVEwY56S.js → wardleyDiagram-EHGQE667-B3cMuWyX.js} +1 -1
  101. package/dist/web/assets/{xychartDiagram-FW5EYKEG-J00Holt1.js → xychartDiagram-FW5EYKEG-cHXf4gDI.js} +1 -1
  102. package/dist/web/assets/{zap-NrgCEPGA.js → zap-CX0Ci5uK.js} +1 -1
  103. package/dist/web/index.html +1 -1
  104. package/dist/web/obsidian-editor-assets.json +1 -1
  105. package/package.json +7 -7
  106. package/dist/web/assets/App-CtirzFRk.js +0 -2
  107. package/dist/web/assets/App-DHnygrdE.css +0 -97
  108. package/dist/web/assets/ChatPane-Bja1-mNo.js +0 -2
  109. package/dist/web/assets/channel-BT2Xr9HW.js +0 -1
  110. package/dist/web/assets/chevron-up-e3ZkhBY9.js +0 -1
  111. package/dist/web/assets/classDiagram-OUVF2IWQ-DNNZ5Mwy.js +0 -1
  112. package/dist/web/assets/classDiagram-v2-EOCWNBFH-DNNZ5Mwy.js +0 -1
  113. package/dist/web/assets/highlighted-body-TPN3WLV5-rxDgpOLU.js +0 -1
  114. package/dist/web/assets/index-LydAx7j8.js +0 -2
  115. package/dist/web/assets/infoDiagram-FWYZ7A6U-CkTGtG4c.js +0 -1
  116. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-SerPF47v.js +0 -1
  117. package/dist/web/assets/swimlanesDiagram-G3AALYLV-JC2_r0aG.js +0 -1
  118. package/dist/web/logo.svg +0 -1
@@ -1 +1 @@
1
- import{f as e,h as t,t as n,l as r}from"./index-CJdSlCST.js";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(t){const n=this;n.parser=function(r){return e(r,{...n.data("settings"),...t,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}const s={}.hasOwnProperty;function c(e,t){const n=t||{};function r(t,...n){let o=r.invalid;const i=r.handlers;if(t&&s.call(t,e)){const n=String(t[e]);o=s.call(i,n)?i[n]:r.unknown}if(o)return o.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function a(e,t,n){return">"+(n?"":" ")+e}function u(e,t){return f(e,t.inConstruct,!0)&&!f(e,t.notInConstruct,!1)}function f(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function l(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&u(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function h(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>s&&(s=i):i=1,o=r+t.length,r=n.indexOf(t,o);return s}function p(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function d(e,t,n){return(n?"":" ")+e}function m(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function g(e){return"&#x"+e.toString(16).toUpperCase()+";"}function y(e,n,r){const o=t(e),i=t(n);return void 0===o?void 0===i?"_"===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===o?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function v(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),s=n.createTracker(r),c=s.move(o);let a=s.move(n.containerPhrasing(e,{after:o,before:c,...s.current()}));const u=a.charCodeAt(0),f=y(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(a=g(u)+a.slice(1));const l=a.charCodeAt(a.length-1),h=y(r.after.charCodeAt(0),l,o);h.inside&&(a=a.slice(0,-1)+g(l));const p=s.move(o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},c+a+p}v.peek=function(e,t,n){return n.options.emphasis||"*"};const b=function(e){if(null==e)return x;if("function"==typeof e)return w(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=b(e[n]);return w(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return w(function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0})}(e);if("string"==typeof e)return function(e){return w(function(t){return t&&t.type===e})}(e);throw new Error("Expected function, string, or object as test")};function w(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function x(){return!0}const k=[],E=!0,A=!1,P="skip";function I(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=b(o),s=r?-1:1;!function e(o,c,a){const u=o&&"object"==typeof o?o:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return f;function f(){let u,f,l,h=k;if((!t||i(o,c,a[a.length-1]||void 0))&&(h=function(e){return Array.isArray(e)?e:"number"==typeof e?[E,e]:null==e?k:[e]}(n(o,a)),h[0]===A))return h;if("children"in o&&o.children){const t=o;if(t.children&&h[0]!==P)for(f=(r?t.children.length:-1)+s,l=a.concat(t);f>-1&&f<t.children.length;){const n=t.children[f];if(u=e(n,f,l)(),u[0]===A)return u;f="number"==typeof u[1]?u[1]:f+s}}return h}}(e,void 0,[])()}function T(e,t,n,r){let o,i,s;"function"==typeof t&&"function"!=typeof n?(i=void 0,s=t,o=n):(i=t,s=n,o=r),I(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},o)}function C(e,t){let r=!1;return T(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,A}),Boolean((!e.depth||e.depth<3)&&n(e)&&(t.options.setext||r))}function O(e){return e.value||""}function S(e,t,n,r){const o=m(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("image");let c=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),c()),u+=a.move(")"),s(),u}function R(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const c=n.createTracker(r);let a=c.move("![");const u=n.safe(e.alt,{before:a,after:"]",...c.current()});a+=c.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const l=n.safe(n.associationId(e),{before:a,after:"]",...c.current()});return s(),n.stack=f,i(),"full"!==o&&u&&u===l?"shortcut"===o?a=a.slice(0,-1):a+=c.move("]"):a+=c.move(l+"]"),a}function z(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function _(e,t){const r=n(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function L(e,t,n,r){const o=m(n),i='"'===o?"Quote":"Apostrophe",s=n.createTracker(r);let c,a;if(_(e,n)){const t=n.stack;n.stack=[],c=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),c(),n.stack=t,r}c=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(n.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),a()),u+=s.move(")"),c(),u}function j(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const c=n.createTracker(r);let a=c.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...c.current()});a+=c.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const l=n.safe(n.associationId(e),{before:a,after:"]",...c.current()});return s(),n.stack=f,i(),"full"!==o&&u&&u===l?"shortcut"===o?a=a.slice(0,-1):a+=c.move("]"):a+=c.move(l+"]"),a}function F(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function U(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}O.peek=function(){return"<"},S.peek=function(){return"!"},R.peek=function(){return"!"},z.peek=function(){return"`"},L.peek=function(e,t,n){return _(e,n)?"<":"["},j.peek=function(){return"["};const B=b(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function M(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),s=n.createTracker(r),c=s.move(o+o);let a=s.move(n.containerPhrasing(e,{after:o,before:c,...s.current()}));const u=a.charCodeAt(0),f=y(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(a=g(u)+a.slice(1));const l=a.charCodeAt(a.length-1),h=y(r.after.charCodeAt(0),l,o);h.inside&&(a=a.slice(0,-1)+g(l));const p=s.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},c+a+p}M.peek=function(e,t,n){return n.options.strong||"*"};const N={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),a);return o(),s},break:l,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",s="`"===o?"GraveAccent":"Tilde";if(p(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,d);return e(),t}const c=n.createTracker(r),a=o.repeat(Math.max(h(i,o)+1,3)),u=n.enter("codeFenced");let f=c.move(a);if(e.lang){const t=n.enter(`codeFencedLang${s}`);f+=c.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...c.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);f+=c.move(" "),f+=c.move(n.safe(e.meta,{before:f,after:"\n",encode:["`"],...c.current()})),t()}return f+=c.move("\n"),i&&(f+=c.move(i+"\n")),f+=c.move(a),u(),f},definition:function(e,t,n,r){const o=m(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("definition");let c=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":"\n",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),c()),s(),u},emphasis:v,hardBreak:l,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(C(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===o?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(o),c=n.enter("headingAtx"),a=n.enter("phrasing");i.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(u)&&(u=g(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),c(),u},html:O,image:S,imageReference:R,inlineCode:z,link:L,linkReference:j,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):F(n);const c=e.ordered?"."===s?")":".":function(e){const t=F(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let a=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(a=!0),U(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){a=!0;break}}}}a&&(s=c),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),u},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||F(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let s=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const c=n.createTracker(r);c.move(i+" ".repeat(s-i.length)),c.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,c.current()),function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?i:i+" ".repeat(s-i.length))+e});return a(),u},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),o(),s},root:function(e,t,n,r){return(e.children.some(function(e){return B(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:M,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(U(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function V(e){if(e)throw e}var $,q;const D=o(function(){if(q)return $;q=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return $=function e(){var t,n,r,a,u,f,l=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},h=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=c(l,n),l!==(a=c(t,n))&&(d&&a&&(i(a)||(u=o(a)))?(u?(u=!1,f=r&&o(r)?r:[]):f=r&&i(r)?r:{},s(l,{name:n,newValue:e(d,f,a)})):void 0!==a&&s(l,{name:n,newValue:a}));return l}}());function G(){}function H(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}class Q extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let o="",i={},s=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?o=e:!i.cause&&e&&(s=!0,o=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const c=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=r(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="",Q.prototype.name="",Q.prototype.reason="",Q.prototype.message="",Q.prototype.stack="",Q.prototype.column=void 0,Q.prototype.line=void 0,Q.prototype.ancestors=void 0,Q.prototype.cause=void 0,Q.prototype.fatal=void 0,Q.prototype.place=void 0,Q.prototype.ruleId=void 0,Q.prototype.source=void 0;const J=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');W(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,c=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(o=i):(c=-1,o=s));return r===o?o=s:o<0&&(o=e.length),e.slice(r,o)},Y=function(...e){let t,n=-1;for(;++n<e.length;)W(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){W(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,s=-1,c=0,a=-1;for(;++a<=e.length;){if(a<e.length)n=e.codePointAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===c);else if(s!==a-1&&2===c){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),s=a,c=0;continue}}else if(o.length>0){o="",i=0,s=a,c=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(s+1,a):o=e.slice(s+1,a),i=a-s-1;s=a,c=0}else 46===n&&c>-1?c++:c=-1}return o}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)};function W(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function K(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}const X=["history","path","basename","stem","extname","dirname"];class Z{constructor(e){let t;t=e?K(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<X.length;){const e=X[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)X.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?J(this.path):void 0}set basename(e){te(e,"basename"),ee(e,"basename"),this.path=Y(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?function(e){if(W(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)}(this.path):void 0}set dirname(e){ne(this.basename,"dirname"),this.path=Y(e||"",this.basename)}get extname(){return"string"==typeof this.path?function(e){W(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const c=e.codePointAt(n);if(47!==c)r<0&&(t=!0,r=n+1),46===c?i<0?i=n:1!==s&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}return i<0||r<0||0===s||1===s&&i===r-1&&i===o+1?"":e.slice(i,r)}(this.path):void 0}set extname(e){if(ee(e,"extname"),ne(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Y(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){K(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!K(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),te(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?J(this.path,this.extname):void 0}set stem(e){te(e,"stem"),ee(e,"stem"),this.path=Y(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Q(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ee(e,t){if(e&&e.includes("/"))throw new Error("`"+t+"` cannot be a path: did not expect `/`")}function te(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ne(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const re=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},oe={}.hasOwnProperty;class ie extends re{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...s){const c=e[++n];let a=-1;if(i)r(i);else{for(;++a<t.length;)null!==s[a]&&void 0!==s[a]||(s[a]=t[a]);t=s,c?function(e,t){let n;return function(...t){const s=e.length>t.length;let c;s&&t.push(r);try{c=e.apply(this,t)}catch(i){if(s&&n)throw i;return r(i)}s||(c&&c.then&&"function"==typeof c.then?c.then(o,r):c instanceof Error?r(c):o(c))};function r(e,...r){n||(n=!0,t(e,...r))}function o(e){r(null,e)}}(c,o)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const e=new ie;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(D(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(ue("data",this.frozen),this.namespace[e]=t,this):oe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ue("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=he(e),n=this.parser||this.Parser;return ce("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ce("process",this.parser||this.Parser),ae("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=he(e),s=n.parse(i);function c(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(s,i,function(e,t,r){if(e||!t||!r)return c(e);const o=t,i=n.stringify(o,r);!function(e){return"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)}(i)?r.result=i:r.value=i,c(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ce("processSync",this.parser||this.Parser),ae("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,V(e),t=r}),le("processSync","process",n),t}run(e,t,n){fe(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const s=he(t);r.run(e,s,function(t,r,s){const c=r||e;t?i(t):o?o(c):n(void 0,c,s)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){V(e),n=t,r=!0}),le("runSync","run",r),n}stringify(e,t){this.freeze();const n=he(t),r=this.compiler||this.Compiler;return ae("stringify",r),fe(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ue("use",this.frozen),null==e);else if("function"==typeof e)c(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):i(e)}return this;function o(e){if("function"==typeof e)c(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;c(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=D(!0,r.settings,e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)o(e[t])}}function c(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const s=n[o][1];H(s)&&H(r)&&(r=D(!0,s,r)),n[o]=[e,r,...i]}}}}const se=(new ie).freeze();function ce(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function ae(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ue(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fe(e){if(!H(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function le(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function he(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Z(e)}const pe={characterGroupPunctuation:2,characterGroupWhitespace:1,tabSize:4},de={linePrefix:"linePrefix",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"};function me(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}export{E as C,P as S,Q as V,me as a,T as b,b as c,C as d,g as e,p as f,o as g,N as h,pe as i,h as l,G as o,u as p,i as r,de as t,se as u,I as v,c as z};
1
+ import{f as e,h as t,t as n,l as r}from"./index-DPecT8Xb.js";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(t){const n=this;n.parser=function(r){return e(r,{...n.data("settings"),...t,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}const s={}.hasOwnProperty;function c(e,t){const n=t||{};function r(t,...n){let o=r.invalid;const i=r.handlers;if(t&&s.call(t,e)){const n=String(t[e]);o=s.call(i,n)?i[n]:r.unknown}if(o)return o.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function a(e,t,n){return">"+(n?"":" ")+e}function u(e,t){return f(e,t.inConstruct,!0)&&!f(e,t.notInConstruct,!1)}function f(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function l(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&u(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function h(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>s&&(s=i):i=1,o=r+t.length,r=n.indexOf(t,o);return s}function p(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function d(e,t,n){return(n?"":" ")+e}function m(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function g(e){return"&#x"+e.toString(16).toUpperCase()+";"}function y(e,n,r){const o=t(e),i=t(n);return void 0===o?void 0===i?"_"===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===o?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function v(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),s=n.createTracker(r),c=s.move(o);let a=s.move(n.containerPhrasing(e,{after:o,before:c,...s.current()}));const u=a.charCodeAt(0),f=y(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(a=g(u)+a.slice(1));const l=a.charCodeAt(a.length-1),h=y(r.after.charCodeAt(0),l,o);h.inside&&(a=a.slice(0,-1)+g(l));const p=s.move(o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},c+a+p}v.peek=function(e,t,n){return n.options.emphasis||"*"};const b=function(e){if(null==e)return x;if("function"==typeof e)return w(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=b(e[n]);return w(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return w(function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0})}(e);if("string"==typeof e)return function(e){return w(function(t){return t&&t.type===e})}(e);throw new Error("Expected function, string, or object as test")};function w(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function x(){return!0}const k=[],E=!0,A=!1,P="skip";function I(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=b(o),s=r?-1:1;!function e(o,c,a){const u=o&&"object"==typeof o?o:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return f;function f(){let u,f,l,h=k;if((!t||i(o,c,a[a.length-1]||void 0))&&(h=function(e){return Array.isArray(e)?e:"number"==typeof e?[E,e]:null==e?k:[e]}(n(o,a)),h[0]===A))return h;if("children"in o&&o.children){const t=o;if(t.children&&h[0]!==P)for(f=(r?t.children.length:-1)+s,l=a.concat(t);f>-1&&f<t.children.length;){const n=t.children[f];if(u=e(n,f,l)(),u[0]===A)return u;f="number"==typeof u[1]?u[1]:f+s}}return h}}(e,void 0,[])()}function T(e,t,n,r){let o,i,s;"function"==typeof t&&"function"!=typeof n?(i=void 0,s=t,o=n):(i=t,s=n,o=r),I(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},o)}function C(e,t){let r=!1;return T(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,A}),Boolean((!e.depth||e.depth<3)&&n(e)&&(t.options.setext||r))}function O(e){return e.value||""}function S(e,t,n,r){const o=m(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("image");let c=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),c()),u+=a.move(")"),s(),u}function R(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const c=n.createTracker(r);let a=c.move("![");const u=n.safe(e.alt,{before:a,after:"]",...c.current()});a+=c.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const l=n.safe(n.associationId(e),{before:a,after:"]",...c.current()});return s(),n.stack=f,i(),"full"!==o&&u&&u===l?"shortcut"===o?a=a.slice(0,-1):a+=c.move("]"):a+=c.move(l+"]"),a}function z(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function _(e,t){const r=n(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function L(e,t,n,r){const o=m(n),i='"'===o?"Quote":"Apostrophe",s=n.createTracker(r);let c,a;if(_(e,n)){const t=n.stack;n.stack=[],c=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),c(),n.stack=t,r}c=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(n.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),a()),u+=s.move(")"),c(),u}function j(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const c=n.createTracker(r);let a=c.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...c.current()});a+=c.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const l=n.safe(n.associationId(e),{before:a,after:"]",...c.current()});return s(),n.stack=f,i(),"full"!==o&&u&&u===l?"shortcut"===o?a=a.slice(0,-1):a+=c.move("]"):a+=c.move(l+"]"),a}function F(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function U(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}O.peek=function(){return"<"},S.peek=function(){return"!"},R.peek=function(){return"!"},z.peek=function(){return"`"},L.peek=function(e,t,n){return _(e,n)?"<":"["},j.peek=function(){return"["};const B=b(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function M(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),s=n.createTracker(r),c=s.move(o+o);let a=s.move(n.containerPhrasing(e,{after:o,before:c,...s.current()}));const u=a.charCodeAt(0),f=y(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(a=g(u)+a.slice(1));const l=a.charCodeAt(a.length-1),h=y(r.after.charCodeAt(0),l,o);h.inside&&(a=a.slice(0,-1)+g(l));const p=s.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},c+a+p}M.peek=function(e,t,n){return n.options.strong||"*"};const N={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),a);return o(),s},break:l,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",s="`"===o?"GraveAccent":"Tilde";if(p(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,d);return e(),t}const c=n.createTracker(r),a=o.repeat(Math.max(h(i,o)+1,3)),u=n.enter("codeFenced");let f=c.move(a);if(e.lang){const t=n.enter(`codeFencedLang${s}`);f+=c.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...c.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);f+=c.move(" "),f+=c.move(n.safe(e.meta,{before:f,after:"\n",encode:["`"],...c.current()})),t()}return f+=c.move("\n"),i&&(f+=c.move(i+"\n")),f+=c.move(a),u(),f},definition:function(e,t,n,r){const o=m(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("definition");let c=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":"\n",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),c()),s(),u},emphasis:v,hardBreak:l,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(C(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===o?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(o),c=n.enter("headingAtx"),a=n.enter("phrasing");i.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(u)&&(u=g(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),c(),u},html:O,image:S,imageReference:R,inlineCode:z,link:L,linkReference:j,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):F(n);const c=e.ordered?"."===s?")":".":function(e){const t=F(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let a=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(a=!0),U(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){a=!0;break}}}}a&&(s=c),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),u},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||F(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let s=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const c=n.createTracker(r);c.move(i+" ".repeat(s-i.length)),c.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,c.current()),function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?i:i+" ".repeat(s-i.length))+e});return a(),u},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),o(),s},root:function(e,t,n,r){return(e.children.some(function(e){return B(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:M,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(U(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function V(e){if(e)throw e}var $,q;const D=o(function(){if(q)return $;q=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return $=function e(){var t,n,r,a,u,f,l=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},h=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=c(l,n),l!==(a=c(t,n))&&(d&&a&&(i(a)||(u=o(a)))?(u?(u=!1,f=r&&o(r)?r:[]):f=r&&i(r)?r:{},s(l,{name:n,newValue:e(d,f,a)})):void 0!==a&&s(l,{name:n,newValue:a}));return l}}());function G(){}function H(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}class Q extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let o="",i={},s=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?o=e:!i.cause&&e&&(s=!0,o=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const c=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=r(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="",Q.prototype.name="",Q.prototype.reason="",Q.prototype.message="",Q.prototype.stack="",Q.prototype.column=void 0,Q.prototype.line=void 0,Q.prototype.ancestors=void 0,Q.prototype.cause=void 0,Q.prototype.fatal=void 0,Q.prototype.place=void 0,Q.prototype.ruleId=void 0,Q.prototype.source=void 0;const J=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');W(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,c=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(o=i):(c=-1,o=s));return r===o?o=s:o<0&&(o=e.length),e.slice(r,o)},Y=function(...e){let t,n=-1;for(;++n<e.length;)W(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){W(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,s=-1,c=0,a=-1;for(;++a<=e.length;){if(a<e.length)n=e.codePointAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===c);else if(s!==a-1&&2===c){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),s=a,c=0;continue}}else if(o.length>0){o="",i=0,s=a,c=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(s+1,a):o=e.slice(s+1,a),i=a-s-1;s=a,c=0}else 46===n&&c>-1?c++:c=-1}return o}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)};function W(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function K(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}const X=["history","path","basename","stem","extname","dirname"];class Z{constructor(e){let t;t=e?K(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<X.length;){const e=X[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)X.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?J(this.path):void 0}set basename(e){te(e,"basename"),ee(e,"basename"),this.path=Y(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?function(e){if(W(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)}(this.path):void 0}set dirname(e){ne(this.basename,"dirname"),this.path=Y(e||"",this.basename)}get extname(){return"string"==typeof this.path?function(e){W(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const c=e.codePointAt(n);if(47!==c)r<0&&(t=!0,r=n+1),46===c?i<0?i=n:1!==s&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}return i<0||r<0||0===s||1===s&&i===r-1&&i===o+1?"":e.slice(i,r)}(this.path):void 0}set extname(e){if(ee(e,"extname"),ne(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Y(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){K(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!K(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),te(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?J(this.path,this.extname):void 0}set stem(e){te(e,"stem"),ee(e,"stem"),this.path=Y(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Q(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ee(e,t){if(e&&e.includes("/"))throw new Error("`"+t+"` cannot be a path: did not expect `/`")}function te(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ne(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const re=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},oe={}.hasOwnProperty;class ie extends re{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...s){const c=e[++n];let a=-1;if(i)r(i);else{for(;++a<t.length;)null!==s[a]&&void 0!==s[a]||(s[a]=t[a]);t=s,c?function(e,t){let n;return function(...t){const s=e.length>t.length;let c;s&&t.push(r);try{c=e.apply(this,t)}catch(i){if(s&&n)throw i;return r(i)}s||(c&&c.then&&"function"==typeof c.then?c.then(o,r):c instanceof Error?r(c):o(c))};function r(e,...r){n||(n=!0,t(e,...r))}function o(e){r(null,e)}}(c,o)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const e=new ie;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(D(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(ue("data",this.frozen),this.namespace[e]=t,this):oe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ue("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=he(e),n=this.parser||this.Parser;return ce("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ce("process",this.parser||this.Parser),ae("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=he(e),s=n.parse(i);function c(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(s,i,function(e,t,r){if(e||!t||!r)return c(e);const o=t,i=n.stringify(o,r);!function(e){return"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)}(i)?r.result=i:r.value=i,c(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ce("processSync",this.parser||this.Parser),ae("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,V(e),t=r}),le("processSync","process",n),t}run(e,t,n){fe(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const s=he(t);r.run(e,s,function(t,r,s){const c=r||e;t?i(t):o?o(c):n(void 0,c,s)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){V(e),n=t,r=!0}),le("runSync","run",r),n}stringify(e,t){this.freeze();const n=he(t),r=this.compiler||this.Compiler;return ae("stringify",r),fe(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ue("use",this.frozen),null==e);else if("function"==typeof e)c(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):i(e)}return this;function o(e){if("function"==typeof e)c(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;c(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=D(!0,r.settings,e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)o(e[t])}}function c(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const s=n[o][1];H(s)&&H(r)&&(r=D(!0,s,r)),n[o]=[e,r,...i]}}}}const se=(new ie).freeze();function ce(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function ae(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ue(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fe(e){if(!H(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function le(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function he(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Z(e)}const pe={characterGroupPunctuation:2,characterGroupWhitespace:1,tabSize:4},de={linePrefix:"linePrefix",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"};function me(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}export{E as C,P as S,Q as V,me as a,T as b,b as c,C as d,g as e,p as f,o as g,N as h,pe as i,h as l,G as o,u as p,i as r,de as t,se as u,I as v,c as z};
@@ -0,0 +1 @@
1
+ import{_ as e,l as r,F as t,e as i}from"./mermaid.core-DvQhEKPq.js";import{p as s}from"./cynefin-VYW2F7L2-DrlLUUXc.js";import"./index-BA-jHUYu.js";import"./RemoteLifeOSBlock-CB1oIUUB.js";import"./index-DPecT8Xb.js";import"./index-DtkApYTC.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CZIOZPdk.js";import"./chevron-up-B9V3ULAL.js";import"./__vite-browser-external-2447137e-DI8NWlgj.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-Wy19F3JO.js";import"./RemoteLifeOSBlock-BlUqhm3D.js";import"./index-LydAx7j8.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-CJdSlCST.js";import"./index-or5MsQ9j.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CtirzFRk.js";import"./chevron-up-e3ZkhBY9.js";import"./__vite-browser-external-2447137e-DW3mvo_M.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-DvQhEKPq.js";import"./RemoteLifeOSBlock-CB1oIUUB.js";import"./index-BA-jHUYu.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-DPecT8Xb.js";import"./index-DtkApYTC.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CZIOZPdk.js";import"./chevron-up-B9V3ULAL.js";import"./__vite-browser-external-2447137e-DI8NWlgj.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-676Zf_tM.js";import{a as e,g as n,h as i,d as s}from"./chunk-32BRIVSS-C9h1MPOY.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-Wy19F3JO.js";import"./RemoteLifeOSBlock-BlUqhm3D.js";import{d as g}from"./arc-BMRI7ug0.js";import"./index-LydAx7j8.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-CJdSlCST.js";import"./index-or5MsQ9j.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CtirzFRk.js";import"./chevron-up-e3ZkhBY9.js";import"./__vite-browser-external-2447137e-DW3mvo_M.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-mjW-zQqf.js";import{a as e,g as n,h as i,d as s}from"./chunk-32BRIVSS-B2KKs_79.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-DvQhEKPq.js";import"./RemoteLifeOSBlock-CB1oIUUB.js";import{d as g}from"./arc-CAu3R4PF.js";import"./index-BA-jHUYu.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";import"./index-DPecT8Xb.js";import"./index-DtkApYTC.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CZIOZPdk.js";import"./chevron-up-B9V3ULAL.js";import"./__vite-browser-external-2447137e-DI8NWlgj.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-Wy19F3JO.js";import{g as y}from"./chunk-5VM5RSS4-676Zf_tM.js";import"./index-LydAx7j8.js";import"./RemoteLifeOSBlock-BlUqhm3D.js";import"./index-CJdSlCST.js";import"./index-or5MsQ9j.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CtirzFRk.js";import"./chevron-up-e3ZkhBY9.js";import"./__vite-browser-external-2447137e-DW3mvo_M.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-DvQhEKPq.js";import{g as y}from"./chunk-5VM5RSS4-mjW-zQqf.js";import"./index-BA-jHUYu.js";import"./RemoteLifeOSBlock-CB1oIUUB.js";import"./index-DPecT8Xb.js";import"./index-DtkApYTC.js";import"./file-editor-index-C6CU7Fik.js";import"./App-CZIOZPdk.js";import"./chevron-up-B9V3ULAL.js";import"./__vite-browser-external-2447137e-DI8NWlgj.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-LydAx7j8.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-BA-jHUYu.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-Wy19F3JO.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-DvQhEKPq.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};