@hienlh/ppm 0.9.93 → 0.9.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/.env.example +98 -0
- package/.opencode/skills/ads-management/scripts/.env.example +13 -0
- package/.opencode/skills/ai-multimodal/.env.example +230 -0
- package/.opencode/skills/cip-design/.env.example +6 -0
- package/.opencode/skills/devops/.env.example +76 -0
- package/.opencode/skills/docs-seeker/.env.example +15 -0
- package/.opencode/skills/elevenlabs/.env.example +3 -0
- package/.opencode/skills/marketing-dashboard/.env.example +15 -0
- package/.opencode/skills/marketing-dashboard/app/.env.example +2 -0
- package/.opencode/skills/marketing-dashboard/server/.env.example +2 -0
- package/.opencode/skills/mcp-management/scripts/dist/analyze-tools.js +70 -0
- package/.opencode/skills/mcp-management/scripts/dist/cli.js +160 -0
- package/.opencode/skills/mcp-management/scripts/dist/mcp-client.js +183 -0
- package/.opencode/skills/payment-integration/scripts/.env.example +20 -0
- package/.opencode/skills/sequential-thinking/.env.example +8 -0
- package/CHANGELOG.md +15 -0
- package/bun.lock +6 -0
- package/dist/web/assets/ai-settings-section-LMO_cfIW.js +1 -0
- package/dist/web/assets/api-client-o_6TmLGC.js +1 -0
- package/dist/web/assets/api-settings-CoKe_BdR.js +1 -0
- package/dist/web/assets/architecture-PBZL5I3N-CUZIB1Vq.js +1 -0
- package/dist/web/assets/arrow-up-Dtrfv490.js +1 -0
- package/dist/web/assets/chat-tab-BRM81W0L.js +10 -0
- package/dist/web/assets/chevron-right-BzAdxJRG.js +1 -0
- package/dist/web/assets/code-CuravVys.js +1 -0
- package/dist/web/assets/code-editor-lxeFhLDX.js +8 -0
- package/dist/web/assets/columns-2-4fQcE4PF.js +1 -0
- package/dist/web/assets/conflict-editor-CO6NyEYJ.js +19 -0
- package/dist/web/assets/createLucideIcon-BjHrJDVb.js +1 -0
- package/dist/web/assets/{csv-preview-BZRICDP0.js → csv-preview-BizIVMyb.js} +2 -2
- package/dist/web/assets/database-D4DIhgi-.js +1 -0
- package/dist/web/assets/database-viewer-CU2X8VC-.js +2 -0
- package/dist/web/assets/diff-viewer-EybMrfw9.js +4 -0
- package/dist/web/assets/dist-C5IgeqrV.js +1 -0
- package/dist/web/assets/dist-im4ynINo.js +11 -0
- package/dist/web/assets/esm-K1XIK4vc.js +2 -0
- package/dist/web/assets/extension-store-3yZYn07W.js +1 -0
- package/dist/web/assets/extension-webview-DkacDy3f.js +3 -0
- package/dist/web/assets/gitGraph-HDMCJU4V-CtOMUphQ.js +1 -0
- package/dist/web/assets/index-BZ4G-2BK.css +2 -0
- package/dist/web/assets/index-D7PJ14mf.js +26 -0
- package/dist/web/assets/info-3K5VOQVL-BCrPCWGY.js +1 -0
- package/dist/web/assets/input-CHRMley8.js +1 -0
- package/dist/web/assets/keybindings-store-BAuymsWd.js +1 -0
- package/dist/web/assets/keybindings-store-BKyNIeFB.js +1 -0
- package/dist/web/assets/{lib-DSLzfeW0.js → lib-D_kRA9p6.js} +1 -1
- package/dist/web/assets/markdown-renderer-ocvtw_4F.js +3 -0
- package/dist/web/assets/packet-RMMSAZCW-D_OqB-zi.js +1 -0
- package/dist/web/assets/pie-UPGHQEXC-WUHpLNJz.js +1 -0
- package/dist/web/assets/plus-51UQ45rf.js +1 -0
- package/dist/web/assets/port-forwarding-tab-Chz3t_rM.js +1 -0
- package/dist/web/assets/postgres-viewer-cf8Xbssy.js +3 -0
- package/dist/web/assets/project-store-Ciq-cK1O.js +1 -0
- package/dist/web/assets/radar-KQ55EAFF-HQIIecVM.js +1 -0
- package/dist/web/assets/react-GqWghJ-L.js +1 -0
- package/dist/web/assets/refresh-cw-CSFrDtiu.js +1 -0
- package/dist/web/assets/scroll-area-DwWF9FpN.js +1 -0
- package/dist/web/assets/settings-store-B470PCWf.js +2 -0
- package/dist/web/assets/settings-tab-1jARRAlz.js +1 -0
- package/dist/web/assets/{sql-query-editor-DaePHpQI.js → sql-query-editor-DZ9xskL8.js} +1 -1
- package/dist/web/assets/sqlite-viewer-CveDk6KG.js +1 -0
- package/dist/web/assets/square-nsMa3iMk.js +1 -0
- package/dist/web/assets/tab-store-DZbiYk7y.js +1 -0
- package/dist/web/assets/table-Dq575bPF.js +1 -0
- package/dist/web/assets/terminal-tab-RvacNDWY.js +1 -0
- package/dist/web/assets/text-wrap-Cn6BNQfq.js +1 -0
- package/dist/web/assets/trash-2-CJYoLw7Q.js +1 -0
- package/dist/web/assets/treemap-KZPCXAKY-0wLgUUTz.js +1 -0
- package/dist/web/assets/{use-monaco-theme-CM4IMROI.js → use-monaco-theme-OY18iXNi.js} +1 -1
- package/dist/web/assets/vendor-markdown-0Mxgxy0L.js +295 -0
- package/dist/web/assets/vendor-mermaid-B2SLgECS.js +2657 -0
- package/dist/web/assets/vendor-ui-B-T_damt.js +45 -0
- package/dist/web/assets/vendor-xterm-ejLe7-tK.js +36 -0
- package/dist/web/assets/x-DlFGzN8d.js +1 -0
- package/dist/web/index.html +26 -21
- package/dist/web/sw.js +1 -1
- package/docs/code-standards.md +56 -4
- package/docs/journals/260415-frontend-memory-optimization.md +73 -0
- package/docs/project-changelog.md +11 -1
- package/docs/system-architecture.md +36 -0
- package/package.json +1 -1
- package/src/cli/commands/stop.ts +31 -0
- package/src/server/index.ts +68 -17
- package/src/services/autostart-generator.ts +1 -1
- package/src/services/autostart-register.ts +34 -29
- package/src/web/components/chat/message-list.tsx +59 -22
- package/src/web/components/chat/tool-cards.tsx +11 -4
- package/src/web/components/database/data-grid.tsx +2 -1
- package/src/web/components/editor/code-editor.tsx +14 -8
- package/src/web/components/editor/conflict-editor.tsx +2 -1
- package/src/web/components/editor/diff-viewer.tsx +2 -1
- package/src/web/components/editor/editor-breadcrumb.tsx +2 -1
- package/src/web/components/explorer/file-tree.tsx +6 -5
- package/src/web/components/explorer/search-panel.tsx +2 -1
- package/src/web/components/extensions/extension-webview.tsx +16 -30
- package/src/web/components/git/git-status-panel.tsx +2 -1
- package/src/web/components/layout/add-project-form.tsx +2 -1
- package/src/web/components/layout/mobile-drawer.tsx +2 -1
- package/src/web/components/layout/mobile-nav.tsx +2 -1
- package/src/web/components/layout/panel-layout.tsx +3 -3
- package/src/web/components/layout/project-bar.tsx +7 -6
- package/src/web/components/layout/project-bottom-sheet.tsx +2 -1
- package/src/web/components/layout/sidebar.tsx +5 -4
- package/src/web/components/layout/status-bar.tsx +5 -4
- package/src/web/components/layout/tab-bar.tsx +3 -3
- package/src/web/components/layout/tab-content.tsx +2 -1
- package/src/web/components/postgres/postgres-viewer.tsx +7 -5
- package/src/web/components/settings/settings-tab.tsx +2 -1
- package/src/web/components/shared/markdown-code-block.tsx +10 -8
- package/src/web/components/terminal/terminal-tab.tsx +3 -3
- package/src/web/hooks/use-chat.ts +4 -1
- package/vite.config.ts +17 -0
- package/dist/web/assets/_basePickBy-Bj0dI1ei.js +0 -1
- package/dist/web/assets/_baseUniq-CyzdZeQH.js +0 -1
- package/dist/web/assets/ai-settings-section-Bo9lCaTd.js +0 -1
- package/dist/web/assets/api-client-BvxmRZUi.js +0 -1
- package/dist/web/assets/api-settings-CUxg9RE5.js +0 -1
- package/dist/web/assets/arc-CxgHJ7Z4.js +0 -1
- package/dist/web/assets/architecture-PBZL5I3N-DDFO_NKq.js +0 -1
- package/dist/web/assets/architectureDiagram-2XIMDMQ5-D16OotsC.js +0 -36
- package/dist/web/assets/array-BFDiaBgf.js +0 -1
- package/dist/web/assets/arrow-up-I9-21gkR.js +0 -1
- package/dist/web/assets/blockDiagram-WCTKOSBZ-Ct57Wtfk.js +0 -132
- package/dist/web/assets/c4Diagram-IC4MRINW-BIymcNsg.js +0 -10
- package/dist/web/assets/channel-wumTB1if.js +0 -1
- package/dist/web/assets/chat-tab-CC721_mQ.js +0 -10
- package/dist/web/assets/chevron-right-DY_wImxB.js +0 -1
- package/dist/web/assets/chunk-4BX2VUAB-CENmY7Kw.js +0 -1
- package/dist/web/assets/chunk-55IACEB6-DhZGI1l3.js +0 -1
- package/dist/web/assets/chunk-7E7YKBS2-DZcnC7Ow.js +0 -1
- package/dist/web/assets/chunk-7R4GIKGN-y8bfHEy-.js +0 -80
- package/dist/web/assets/chunk-C72U2L5F-BHPkfQj2.js +0 -1
- package/dist/web/assets/chunk-EGIJ26TM-nant2LXl.js +0 -1
- package/dist/web/assets/chunk-FMBD7UC4-Bog4cpN-.js +0 -15
- package/dist/web/assets/chunk-GEFDOKGD-86LFbsAC.js +0 -2
- package/dist/web/assets/chunk-GLR3WWYH-Re-5eSlQ.js +0 -2
- package/dist/web/assets/chunk-HHEYEP7N-C45i5G_3.js +0 -1
- package/dist/web/assets/chunk-JSJVCQXG-23eG9mgt.js +0 -1
- package/dist/web/assets/chunk-KX2RTZJC-CHj8TnTB.js +0 -1
- package/dist/web/assets/chunk-KYZI473N-gqRLpJ4w.js +0 -53
- package/dist/web/assets/chunk-L3YUKLVL-DnSMmNFC.js +0 -1
- package/dist/web/assets/chunk-MX3YWQON-B6g1ZH9X.js +0 -1
- package/dist/web/assets/chunk-NQ4KR5QH-DX32345Y.js +0 -220
- package/dist/web/assets/chunk-O4XLMI2P-Vp_V4P-b.js +0 -7
- package/dist/web/assets/chunk-OZEHJAEY-lKq2SWjA.js +0 -1
- package/dist/web/assets/chunk-PQ6SQG4A-Bik13fTV.js +0 -1
- package/dist/web/assets/chunk-PU5JKC2W-DD95Rx35.js +0 -70
- package/dist/web/assets/chunk-QZHKN3VN-N3VXx1VH.js +0 -1
- package/dist/web/assets/chunk-R5LLSJPH-dRhXRnrb.js +0 -1
- package/dist/web/assets/chunk-WL4C6EOR-B1iIvLOG.js +0 -189
- package/dist/web/assets/chunk-XIRO2GV7-DZBoNl1_.js +0 -1
- package/dist/web/assets/chunk-XPW4576I-CgLyyW03.js +0 -32
- package/dist/web/assets/chunk-XZSTWKYB-DjV8xl5A.js +0 -94
- package/dist/web/assets/chunk-YBOYWFTD-D_ILLe6_.js +0 -1
- package/dist/web/assets/classDiagram-VBA2DB6C-mr-Cb1me.js +0 -1
- package/dist/web/assets/classDiagram-v2-RAHNMMFH-BKe8_uda.js +0 -1
- package/dist/web/assets/clone--z5KLAuR.js +0 -1
- package/dist/web/assets/code-editor-BZ0xwZ4Z.js +0 -8
- package/dist/web/assets/columns-2-IeETSfON.js +0 -1
- package/dist/web/assets/conflict-editor-Bwls2-yk.js +0 -19
- package/dist/web/assets/cose-bilkent-S5V4N54A-BGNPFv3x.js +0 -1
- package/dist/web/assets/cytoscape.esm-C8i2jUzT.js +0 -321
- package/dist/web/assets/dagre-CkhlMHnx.js +0 -1
- package/dist/web/assets/dagre-KLK3FWXG-Cnp996VG.js +0 -4
- package/dist/web/assets/database-CgTomMxt.js +0 -1
- package/dist/web/assets/database-viewer-DiXWqOJH.js +0 -2
- package/dist/web/assets/defaultLocale-ZeknFqNe.js +0 -1
- package/dist/web/assets/diagram-E7M64L7V-BZF0tSOr.js +0 -24
- package/dist/web/assets/diagram-IFDJBPK2-nUcO8sN8.js +0 -43
- package/dist/web/assets/diagram-P4PSJMXO-CW0eCkwC.js +0 -24
- package/dist/web/assets/diff-viewer-CC-RmeV5.js +0 -4
- package/dist/web/assets/dist-CM0oD8tQ.js +0 -1
- package/dist/web/assets/dist-DZmJeHOA.js +0 -1
- package/dist/web/assets/erDiagram-INFDFZHY-DSkriYZ9.js +0 -70
- package/dist/web/assets/extension-webview-C1d6fezE.js +0 -3
- package/dist/web/assets/flowDiagram-PKNHOUZH-CFYAfZBx.js +0 -162
- package/dist/web/assets/ganttDiagram-A5KZAMGK-KSn4XAU4.js +0 -292
- package/dist/web/assets/gitGraph-HDMCJU4V-OkvBPi6H.js +0 -1
- package/dist/web/assets/gitGraphDiagram-K3NZZRJ6-BMgjjVys.js +0 -65
- package/dist/web/assets/graphlib-BWe1iK_s.js +0 -1
- package/dist/web/assets/index-BcIyrJiY.js +0 -26
- package/dist/web/assets/index-Chf0otez.css +0 -2
- package/dist/web/assets/info-3K5VOQVL-BDU2_bYD.js +0 -1
- package/dist/web/assets/infoDiagram-LFFYTUFH-Diq4Cyc3.js +0 -2
- package/dist/web/assets/init-0VJVrkRJ.js +0 -1
- package/dist/web/assets/input-BHj0veau.js +0 -45
- package/dist/web/assets/isArrayLikeObject-ClzWCpcm.js +0 -1
- package/dist/web/assets/isEmpty-BfLnxq-B.js +0 -1
- package/dist/web/assets/ishikawaDiagram-PHBUUO56-CiVEvp8o.js +0 -70
- package/dist/web/assets/journeyDiagram-4ABVD52K-CG_v5Aho.js +0 -139
- package/dist/web/assets/jsx-runtime-BRW_vwa9.js +0 -1
- package/dist/web/assets/kanban-definition-K7BYSVSG-miB0-_Zq.js +0 -89
- package/dist/web/assets/keybindings-store-BIufrOzJ.js +0 -1
- package/dist/web/assets/line-CSuSrJ9J.js +0 -1
- package/dist/web/assets/linear-DFN_MPsw.js +0 -1
- package/dist/web/assets/markdown-renderer-C5UPA1-7.js +0 -306
- package/dist/web/assets/math-CRc16Nj6.js +0 -1
- package/dist/web/assets/mermaid-parser.core-CFdP1Z5_.js +0 -4
- package/dist/web/assets/mindmap-definition-YRQLILUH-pYPWwASE.js +0 -68
- package/dist/web/assets/ordinal-DpFn432U.js +0 -1
- package/dist/web/assets/packet-RMMSAZCW-BwpIpYB3.js +0 -1
- package/dist/web/assets/path-INs8XTPH.js +0 -1
- package/dist/web/assets/pie-UPGHQEXC-BPgAfmes.js +0 -1
- package/dist/web/assets/pieDiagram-SKSYHLDU-Dovdlvhu.js +0 -30
- package/dist/web/assets/plus-DQGIb4mQ.js +0 -1
- package/dist/web/assets/port-forwarding-tab-DmifthYH.js +0 -1
- package/dist/web/assets/postgres-viewer-Bo7jEQfQ.js +0 -13
- package/dist/web/assets/preload-helper-mr3rCizq.js +0 -1
- package/dist/web/assets/quadrantDiagram-337W2JSQ-TXe6cU_F.js +0 -7
- package/dist/web/assets/radar-KQ55EAFF-TqxBkWx-.js +0 -1
- package/dist/web/assets/react-0tkk-ztn.js +0 -1
- package/dist/web/assets/react-dom-Bpkvzu3U.js +0 -1
- package/dist/web/assets/react-nm2Ru1Pt.js +0 -1
- package/dist/web/assets/refresh-cw-Clk8fdUD.js +0 -1
- package/dist/web/assets/requirementDiagram-Z7DCOOCP-CuiiuGS9.js +0 -73
- package/dist/web/assets/rough.esm-eLccZ4OJ.js +0 -1
- package/dist/web/assets/sankeyDiagram-WA2Y5GQK-BbRmhv0t.js +0 -10
- package/dist/web/assets/scroll-area-BpXCNme3.js +0 -1
- package/dist/web/assets/sequenceDiagram-2WXFIKYE-B2D8IQDb.js +0 -145
- package/dist/web/assets/settings-tab-D9GicyA9.js +0 -1
- package/dist/web/assets/sqlite-viewer-pacZlViY.js +0 -1
- package/dist/web/assets/square-vBdqj0bF.js +0 -1
- package/dist/web/assets/src-CqyWLlNZ.js +0 -1
- package/dist/web/assets/stateDiagram-RAJIS63D-ylr4HxPu.js +0 -1
- package/dist/web/assets/stateDiagram-v2-FVOUBMTO-D6zvxf3M.js +0 -1
- package/dist/web/assets/table-Bi27fEaN.js +0 -1
- package/dist/web/assets/terminal-tab-DpzE3yoD.js +0 -36
- package/dist/web/assets/text-wrap-D_OmSzhp.js +0 -1
- package/dist/web/assets/timeline-definition-YZTLITO2-pMv1grvM.js +0 -61
- package/dist/web/assets/trash-2-CNuB-htI.js +0 -1
- package/dist/web/assets/treemap-KZPCXAKY-Kck06FKU.js +0 -1
- package/dist/web/assets/vennDiagram-LZ73GAT5-C-rkIUbo.js +0 -34
- package/dist/web/assets/x-Dw3TjeY_.js +0 -1
- package/dist/web/assets/xychartDiagram-JWTSCODW-CtpjAakO.js +0 -7
- /package/dist/web/assets/{csv-parser-i7fjqP2H.js → csv-parser--2WJNgS7.js} +0 -0
- /package/dist/web/assets/{katex-DR0kdMDv.js → katex-CKoArbIw.js} +0 -0
- /package/dist/web/assets/{chunk-CFjPhJqf.js → rolldown-runtime-FhOqtrmT.js} +0 -0
- /package/dist/web/assets/{sql-completion-provider-B8uUWWej.js → sql-completion-provider-C3cq9j99.js} +0 -0
- /package/dist/web/assets/{utils-DX8jb5qv.js → utils-ChWX7pZv.js} +0 -0
- /package/dist/web/assets/{terminal-tab-BrP-ENHg.css → vendor-xterm-BrP-ENHg.css} +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import{f as e}from"./chunk-GEFDOKGD-86LFbsAC.js";import{h as t}from"./src-CqyWLlNZ.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,b as c,c as l,s as u,v as d}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as f}from"./chunk-HHEYEP7N-C45i5G_3.js";import"./dist-DZmJeHOA.js";import{t as p}from"./rough.esm-eLccZ4OJ.js";var m=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:t(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:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`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:r,7:[1,10],9:9,12:11,13:i,14:a},e(o,[2,3]),{1:[2,2]},e(o,[2,4]),e(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(u,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;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 g(){this.yy={}}return t(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,s()}getRoot(){return this.root}addNode(e,t){let n=u.sanitizeText(t,c());if(!this.root){this.baseLevel=e,this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],a(n);return}let r=e-(this.baseLevel??0);for(r<=0&&(r=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=r;)this.stack.pop();let i=this.stack[this.stack.length-1].node,o={text:n,children:[]};i.children.push(o),this.stack.push({level:r,node:o})}getAccTitle(){return d()}setAccTitle(e){i(e)}getAccDescription(){return o()}setAccDescription(e){n(e)}getDiagramTitle(){return r()}setDiagramTitle(e){a(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=t((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,a=r.height+t*2;l(e,a,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${a}`)},`applyPaddedViewBox`),E=t((t,n,r,i)=>{let a=i.db.getRoot();if(!a)return;let o=c(),{look:s,handDrawnSeed:l,themeVariables:u}=o,d=e(o.fontSize)[0]??_,m=s===`handDrawn`,h=a.children??[],g=o.ishikawa?.diagramPadding??20,y=o.ishikawa?.useMaxWidth??!1,b=f(n),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?p.svg(b.node()):void 0,C=S?{roughSvg:S,seed:l??0,lineColor:u?.lineColor??`#333`,fillColor:u?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${n}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).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 E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,a.text,d,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=d*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;e<V;e++){let t=x.append(`g`).attr(`class`,`ishikawa-pair`);for(let[n,r,i]of[[h[e*2],-1,R],[h[e*2+1],1,z]])n&&M(t,n,E,k,r,i,d,C);E=t.selectAll(`text`).nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=t(e=>{let n=t(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return e.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=t((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=t((e,n)=>{let r=[],i=[],a=t((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(e,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=t((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=t((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=t((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=t(e=>e.split(/<br\s*\/?>|\n/),`splitLines`),P=t((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(`
|
|
7
|
-
`)},`wrapText`),F=t((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=t((e,t,n)=>e+(t-e)*n,`lerp`),L=t((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:t(e=>`
|
|
8
|
-
.ishikawa .ishikawa-spine,
|
|
9
|
-
.ishikawa .ishikawa-branch,
|
|
10
|
-
.ishikawa .ishikawa-sub-branch {
|
|
11
|
-
stroke: ${e.lineColor};
|
|
12
|
-
stroke-width: 2;
|
|
13
|
-
fill: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ishikawa .ishikawa-sub-branch {
|
|
17
|
-
stroke-width: 1;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ishikawa .ishikawa-arrow {
|
|
21
|
-
fill: ${e.lineColor};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ishikawa .ishikawa-head {
|
|
25
|
-
fill: ${e.mainBkg};
|
|
26
|
-
stroke: ${e.lineColor};
|
|
27
|
-
stroke-width: 2;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.ishikawa .ishikawa-label-box {
|
|
31
|
-
fill: ${e.mainBkg};
|
|
32
|
-
stroke: ${e.lineColor};
|
|
33
|
-
stroke-width: 2;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.ishikawa text {
|
|
37
|
-
font-family: ${e.fontFamily};
|
|
38
|
-
font-size: ${e.fontSize};
|
|
39
|
-
fill: ${e.textColor};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ishikawa .ishikawa-head-label {
|
|
43
|
-
font-weight: 600;
|
|
44
|
-
text-anchor: middle;
|
|
45
|
-
dominant-baseline: middle;
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.ishikawa .ishikawa-label {
|
|
50
|
-
text-anchor: end;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ishikawa .ishikawa-label.cause {
|
|
54
|
-
text-anchor: middle;
|
|
55
|
-
dominant-baseline: middle;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.ishikawa .ishikawa-label.align {
|
|
59
|
-
text-anchor: end;
|
|
60
|
-
dominant-baseline: middle;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.ishikawa .ishikawa-label.up {
|
|
64
|
-
dominant-baseline: baseline;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.ishikawa .ishikawa-label.down {
|
|
68
|
-
dominant-baseline: hanging;
|
|
69
|
-
}
|
|
70
|
-
`,`getStyles`)};export{R as diagram};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import{h as e,p as t}from"./src-CqyWLlNZ.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,b as c,c as l,v as u}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as d}from"./arc-CxgHJ7Z4.js";import"./dist-DZmJeHOA.js";import{t as f}from"./chunk-FMBD7UC4-Bog4cpN-.js";import{a as p,n as m,o as h,s as g}from"./chunk-JSJVCQXG-23eG9mgt.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;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 e(u,`Parser`),u.prototype=l,l.Parser=u,new u})();_.parser=_;var v=_,y=``,b=[],x=[],S=[],C=e(function(){b.length=0,x.length=0,y=``,S.length=0,s()},`clear`),w=e(function(e){y=e,b.push(e)},`addSection`),T=e(function(){return b},`getSections`),E=e(function(){let e=A(),t=0;for(;!e&&t<100;)e=A(),t++;return x.push(...S),x},`getTasks`),D=e(function(){let e=[];return x.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),O=e(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:y,type:y,people:a,task:e,score:r};S.push(o)},`addTask`),k=e(function(e){let t={section:y,type:y,description:e,task:e,classes:[]};x.push(t)},`addTaskOrg`),A=e(function(){let t=e(function(e){return S[e].processed},`compileTask`),n=!0;for(let[e,r]of S.entries())t(e),n&&=r.processed;return n},`compileTasks`),j={getConfig:e(()=>c().journey,`getConfig`),clear:C,setDiagramTitle:a,getDiagramTitle:r,setAccTitle:i,getAccTitle:u,setAccDescription:n,getAccDescription:o,addSection:w,getSections:T,getTasks:E,addTask:O,addTaskOrg:k,getActors:e(function(){return D()},`getActors`)},M=e(e=>`.label {
|
|
7
|
-
font-family: ${e.fontFamily};
|
|
8
|
-
color: ${e.textColor};
|
|
9
|
-
}
|
|
10
|
-
.mouth {
|
|
11
|
-
stroke: #666;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
line {
|
|
15
|
-
stroke: ${e.textColor}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.legend {
|
|
19
|
-
fill: ${e.textColor};
|
|
20
|
-
font-family: ${e.fontFamily};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.label text {
|
|
24
|
-
fill: #333;
|
|
25
|
-
}
|
|
26
|
-
.label {
|
|
27
|
-
color: ${e.textColor}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.face {
|
|
31
|
-
${e.faceColor?`fill: ${e.faceColor}`:`fill: #FFF8DC`};
|
|
32
|
-
stroke: #999;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.node rect,
|
|
36
|
-
.node circle,
|
|
37
|
-
.node ellipse,
|
|
38
|
-
.node polygon,
|
|
39
|
-
.node path {
|
|
40
|
-
fill: ${e.mainBkg};
|
|
41
|
-
stroke: ${e.nodeBorder};
|
|
42
|
-
stroke-width: 1px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.node .label {
|
|
46
|
-
text-align: center;
|
|
47
|
-
}
|
|
48
|
-
.node.clickable {
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.arrowheadPath {
|
|
53
|
-
fill: ${e.arrowheadColor};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.edgePath .path {
|
|
57
|
-
stroke: ${e.lineColor};
|
|
58
|
-
stroke-width: 1.5px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.flowchart-link {
|
|
62
|
-
stroke: ${e.lineColor};
|
|
63
|
-
fill: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.edgeLabel {
|
|
67
|
-
background-color: ${e.edgeLabelBackground};
|
|
68
|
-
rect {
|
|
69
|
-
opacity: 0.5;
|
|
70
|
-
}
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.cluster rect {
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.cluster text {
|
|
78
|
-
fill: ${e.titleColor};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
div.mermaidTooltip {
|
|
82
|
-
position: absolute;
|
|
83
|
-
text-align: center;
|
|
84
|
-
max-width: 200px;
|
|
85
|
-
padding: 2px;
|
|
86
|
-
font-family: ${e.fontFamily};
|
|
87
|
-
font-size: 12px;
|
|
88
|
-
background: ${e.tertiaryColor};
|
|
89
|
-
border: 1px solid ${e.border2};
|
|
90
|
-
border-radius: 2px;
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
z-index: 100;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.task-type-0, .section-type-0 {
|
|
96
|
-
${e.fillType0?`fill: ${e.fillType0}`:``};
|
|
97
|
-
}
|
|
98
|
-
.task-type-1, .section-type-1 {
|
|
99
|
-
${e.fillType0?`fill: ${e.fillType1}`:``};
|
|
100
|
-
}
|
|
101
|
-
.task-type-2, .section-type-2 {
|
|
102
|
-
${e.fillType0?`fill: ${e.fillType2}`:``};
|
|
103
|
-
}
|
|
104
|
-
.task-type-3, .section-type-3 {
|
|
105
|
-
${e.fillType0?`fill: ${e.fillType3}`:``};
|
|
106
|
-
}
|
|
107
|
-
.task-type-4, .section-type-4 {
|
|
108
|
-
${e.fillType0?`fill: ${e.fillType4}`:``};
|
|
109
|
-
}
|
|
110
|
-
.task-type-5, .section-type-5 {
|
|
111
|
-
${e.fillType0?`fill: ${e.fillType5}`:``};
|
|
112
|
-
}
|
|
113
|
-
.task-type-6, .section-type-6 {
|
|
114
|
-
${e.fillType0?`fill: ${e.fillType6}`:``};
|
|
115
|
-
}
|
|
116
|
-
.task-type-7, .section-type-7 {
|
|
117
|
-
${e.fillType0?`fill: ${e.fillType7}`:``};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.actor-0 {
|
|
121
|
-
${e.actor0?`fill: ${e.actor0}`:``};
|
|
122
|
-
}
|
|
123
|
-
.actor-1 {
|
|
124
|
-
${e.actor1?`fill: ${e.actor1}`:``};
|
|
125
|
-
}
|
|
126
|
-
.actor-2 {
|
|
127
|
-
${e.actor2?`fill: ${e.actor2}`:``};
|
|
128
|
-
}
|
|
129
|
-
.actor-3 {
|
|
130
|
-
${e.actor3?`fill: ${e.actor3}`:``};
|
|
131
|
-
}
|
|
132
|
-
.actor-4 {
|
|
133
|
-
${e.actor4?`fill: ${e.actor4}`:``};
|
|
134
|
-
}
|
|
135
|
-
.actor-5 {
|
|
136
|
-
${e.actor5?`fill: ${e.actor5}`:``};
|
|
137
|
-
}
|
|
138
|
-
${f()}
|
|
139
|
-
`,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=d().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=d().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),ee=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),V(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),R=-1,z=e(function(e,t,n){let r=t.x+n.width/2,i=e.append(`g`);R++,i.append(`line`).attr(`id`,`task`+R).attr(`x1`,r).attr(`y1`,t.y).attr(`x2`,r).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(i,{cx:r,cy:300+(5-t.score)*30,score:t.score});let a=g();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=n.width,a.height=n.height,a.class=`task task-type-`+t.num,a.rx=3,a.ry=3,N(i,a);let o=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color;F(i,{cx:o,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position}),o+=10}),V(n)(t.task,i,a.x,a.y,a.width,a.height,{class:`task`},n,t.colour)},`drawTask`),B=e(function(e,t){m(e,t)},`drawBackgroundRect`),V=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}e(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}e(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return e(i,`_setTextAttrs`),function(e){return e.textPlacement===`fo`?r:e.textPlacement===`old`?t:n}})(),H={drawRect:N,drawCircle:F,drawSection:ee,drawText:I,drawLabel:L,drawTask:z,drawBackgroundRect:B,initGraphics:e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`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`)},U=e(function(e){Object.keys(e).forEach(function(t){q[t]=e[t]})},`setConf`),W={},G=0;function K(e){let t=c().journey,n=t.maxLabelWidth;G=0;let r=60;Object.keys(W).forEach(i=>{let a=W[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:W[i].position};H.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&l.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&l.push(r),s.remove()}l.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=H.drawText(e,a).node().getBoundingClientRect().width;o>G&&o>t.leftMargin-o&&(G=o)}),r+=Math.max(20,l.length*20)})}e(K,`drawActorLegend`);var q=c().journey,J=0,Y=e(function(e,n,r,i){let a=c(),o=a.journey.titleColor,s=a.journey.titleFontSize,u=a.journey.titleFontFamily,d=a.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);H.initGraphics(m);let h=i.db.getTasks(),g=i.db.getDiagramTitle(),_=i.db.getActors();for(let e in W)delete W[e];let v=0;_.forEach(e=>{W[e]={color:q.actorColours[v%q.actorColours.length],position:v},v++}),K(m),J=q.leftMargin+G,X.insert(0,0,J,Object.keys(W).length*50),te(m,h,0);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,J).attr(`font-size`,s).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,o).attr(`font-family`,u);let b=y.stopy-y.starty+2*q.diagramMarginY,x=J+y.stopx+2*q.diagramMarginX;l(m,b,x,q.useMaxWidth),m.append(`line`).attr(`x1`,J).attr(`y1`,q.height*4).attr(`x2`,x-J-4).attr(`y2`,q.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=c().journey,o=this,s=0;function l(c){return e(function(e){s++;let l=o.sequenceItems.length-s+1;o.updateVal(e,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(e,`stopy`,i+l*a.boxMargin,Math.max),o.updateVal(X.data,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopx`,r+l*a.boxMargin,Math.max),c!==`activation`&&(o.updateVal(e,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(e,`stopx`,r+l*a.boxMargin,Math.max),o.updateVal(X.data,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopy`,i+l*a.boxMargin,Math.max))},`updateItemBounds`)}e(l,`updateFn`),this.sequenceItems.forEach(l())},`updateBounds`),insert:e(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return this.data},`getBounds`)},Z=q.sectionFills,Q=q.sectionColours,te=e(function(e,t,n){let r=c().journey,i=``,a=n+(r.height*2+r.diagramMarginY),o=0,s=`#CCC`,l=`black`,u=0;for(let[n,c]of t.entries()){if(i!==c.section){s=Z[o%Z.length],u=o%Z.length,l=Q[o%Q.length];let a=0,d=c.section;for(let e=n;e<t.length&&t[e].section==d;e++)a+=1;let f={x:n*r.taskMargin+n*r.width+J,y:50,text:c.section,fill:s,num:u,colour:l,taskCount:a};H.drawSection(e,f,r),i=c.section,o++}let d=c.people.reduce((e,t)=>(W[t]&&(e[t]=W[t]),e),{});c.x=n*r.taskMargin+n*r.width+J,c.y=a,c.width=r.diagramMarginX,c.height=r.diagramMarginY,c.colour=l,c.fill=s,c.num=u,c.actors=d,H.drawTask(e,c,r),X.insert(c.x,c.y,c.x+c.width+r.taskMargin,450)}},`drawTasks`),$={setConf:U,draw:Y},ne={parser:v,db:j,renderer:$,styles:M,init:e(e=>{$.setConf(e.journey),j.clear()},`init`)};export{ne as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CFjPhJqf.js";import{t as n}from"./react-nm2Ru1Pt.js";var r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},c=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},l=e(n()),u=(0,l.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:a=``,children:o,iconNode:u,...d},f)=>(0,l.createElement)(`svg`,{ref:f,...s,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:r(`lucide`,a),...!o&&!c(d)&&{"aria-hidden":`true`},...d},[...u.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(o)?o:[o]])),d=(e,t)=>{let n=(0,l.forwardRef)(({className:n,...a},s)=>(0,l.createElement)(u,{ref:s,iconNode:t,className:r(`lucide-${i(o(e))}`,`lucide-${e}`,n),...a}));return n.displayName=o(e),n},f=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),p=t(((e,t)=>{t.exports=f()}));export{d as n,p as t};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import"./chunk-GEFDOKGD-86LFbsAC.js";import{g as e,h as t}from"./src-CqyWLlNZ.js";import{$ as n,K as r,L as i,Q as a,b as o,d as s,tt as c}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as l}from"./chunk-HHEYEP7N-C45i5G_3.js";import"./dist-DZmJeHOA.js";import"./chunk-PU5JKC2W-DD95Rx35.js";import{t as u}from"./chunk-FMBD7UC4-Bog4cpN-.js";import"./chunk-YBOYWFTD-D_ILLe6_.js";import"./chunk-PQ6SQG4A-Bik13fTV.js";import{a as d,c as f,i as p}from"./chunk-KYZI473N-gqRLpJ4w.js";import{n as m,t as h}from"./chunk-XPW4576I-CgLyyW03.js";var g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={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(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`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:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(h,[2,25]),e(h,[2,26]),e(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},e(g,[2,14],{7:_,11:v}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(h,[2,31]),{21:[1,39]},{22:[1,40]},e(g,[2,13],{7:_,11:v}),e(y,[2,11]),e(y,[2,12]),e(p,[2,15],{24:b}),e(h,[2,30]),{22:[1,41]},e(h,[2,27]),e(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;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 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.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 S(){this.yy={}}return t(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=t(()=>{v=[],y=[],b=0,x={}},`clear`),C=t(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].level<t)throw Error(`Items without section detected, found section ("`+v[e].label+`")`);return e===n?.level?null:n},`getSection`),w=t(function(){return y},`getSections`),T=t(function(){let e=[],t=[],n=w(),r=o();for(let e of n){let n={id:e.id,label:i(e.label??``,r),labelType:`markdown`,isGroup:!0,ticket:e.ticket,shape:`kanbanSection`,level:e.level,look:r.look};t.push(n);let a=v.filter(t=>t.parentId===e.id);for(let n of a){let a={id:n.id,parentId:e.id,label:i(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(a)}}return{nodes:t,edges:e,other:{},config:o()}},`getData`),E=t((e,t,n,r,a)=>{let c=o(),l=c.mindmap?.padding??s.mindmap.padding;switch(r){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let u={id:i(t,c)||`kbn`+ b++,level:e,label:i(n,c),width:c.mindmap?.maxNodeWidth??s.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(a!==void 0){let e;e=a.includes(`
|
|
7
|
-
`)?a+`
|
|
8
|
-
`:`{
|
|
9
|
-
`+a+`
|
|
10
|
-
}`;let t=m(e,{schema:h});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+ b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:t((t,n)=>{switch(e.debug(`In get type`,t,n),t){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:t((e,t)=>{x[e]=t},`setElementForId`),decorateNode:t(e=>{if(!e)return;let t=o(),n=v[v.length-1];e.icon&&(n.icon=i(e.icon,t)),e.class&&(n.cssClasses=i(e.class,t))},`decorateNode`),type2Str:t(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:t(()=>e,`getLogger`),getElementById:t(e=>x[e],`getElementById`)},k={draw:t(async(t,n,i,a)=>{e.debug(`Rendering kanban diagram
|
|
11
|
-
`+t);let c=a.db.getData(),u=o();u.htmlLabels=!1;let m=l(n),h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await p(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-1.5*10;let r=(await d(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await f(t),i=t.y+r.height/2+10/2}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}r(void 0,m,u.mindmap?.padding??s.kanban.padding,u.mindmap?.useMaxWidth??s.kanban.useMaxWidth)},`draw`)},A=t(e=>{let r=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],c(e[`lineColor`+t])?e[`lineColor`+t]=n(e[`lineColor`+t],20):e[`lineColor`+t]=a(e[`lineColor`+t],20);let i=t((t,r)=>e.darkMode?a(t,r):n(t,r),`adjuster`);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let n=``+(17-3*t);r+=`
|
|
12
|
-
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
|
|
13
|
-
fill: ${i(e[`cScale`+t],10)};
|
|
14
|
-
stroke: ${i(e[`cScale`+t],10)};
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
.section-${t-1} text {
|
|
18
|
-
fill: ${e[`cScaleLabel`+t]};
|
|
19
|
-
}
|
|
20
|
-
.node-icon-${t-1} {
|
|
21
|
-
font-size: 40px;
|
|
22
|
-
color: ${e[`cScaleLabel`+t]};
|
|
23
|
-
}
|
|
24
|
-
.section-edge-${t-1}{
|
|
25
|
-
stroke: ${e[`cScale`+t]};
|
|
26
|
-
}
|
|
27
|
-
.edge-depth-${t-1}{
|
|
28
|
-
stroke-width: ${n};
|
|
29
|
-
}
|
|
30
|
-
.section-${t-1} line {
|
|
31
|
-
stroke: ${e[`cScaleInv`+t]} ;
|
|
32
|
-
stroke-width: 3;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.disabled, .disabled circle, .disabled text {
|
|
36
|
-
fill: lightgray;
|
|
37
|
-
}
|
|
38
|
-
.disabled text {
|
|
39
|
-
fill: #efefef;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.node rect,
|
|
43
|
-
.node circle,
|
|
44
|
-
.node ellipse,
|
|
45
|
-
.node polygon,
|
|
46
|
-
.node path {
|
|
47
|
-
fill: ${e.background};
|
|
48
|
-
stroke: ${e.nodeBorder};
|
|
49
|
-
stroke-width: 1px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.kanban-ticket-link {
|
|
53
|
-
fill: ${e.background};
|
|
54
|
-
stroke: ${e.nodeBorder};
|
|
55
|
-
text-decoration: underline;
|
|
56
|
-
}
|
|
57
|
-
`}return r},`genSections`),j={db:O,renderer:k,parser:_,styles:t(e=>`
|
|
58
|
-
.edge {
|
|
59
|
-
stroke-width: 3;
|
|
60
|
-
}
|
|
61
|
-
${A(e)}
|
|
62
|
-
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
|
-
fill: ${e.git0};
|
|
64
|
-
}
|
|
65
|
-
.section-root text {
|
|
66
|
-
fill: ${e.gitBranchLabel0};
|
|
67
|
-
}
|
|
68
|
-
.icon-container {
|
|
69
|
-
height:100%;
|
|
70
|
-
display: flex;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
align-items: center;
|
|
73
|
-
}
|
|
74
|
-
.edge {
|
|
75
|
-
fill: none;
|
|
76
|
-
}
|
|
77
|
-
.cluster-label, .label {
|
|
78
|
-
color: ${e.textColor};
|
|
79
|
-
fill: ${e.textColor};
|
|
80
|
-
}
|
|
81
|
-
.kanban-label {
|
|
82
|
-
dy: 1em;
|
|
83
|
-
alignment-baseline: middle;
|
|
84
|
-
text-anchor: middle;
|
|
85
|
-
dominant-baseline: middle;
|
|
86
|
-
text-align: center;
|
|
87
|
-
}
|
|
88
|
-
${u()}
|
|
89
|
-
`,`getStyles`)};export{j as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./react-nm2Ru1Pt.js";import"./api-client-BvxmRZUi.js";import{w as e}from"./index-BcIyrJiY.js";export{e as useKeybindingsStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as e}from"./chunk-GEFDOKGD-86LFbsAC.js";import{n as t,t as n}from"./path-INs8XTPH.js";import{t as r}from"./array-BFDiaBgf.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=t(!0),l=null,u=e,d=null,f=n(p);o=typeof o==`function`?o:o===void 0?i:t(o),s=typeof s==`function`?s:s===void 0?a:t(s);function p(e){var t,n=(e=r(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=n;++t)!(t<n&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(e){return arguments.length?(o=typeof e==`function`?e:t(+e),p):o},p.y=function(e){return arguments.length?(s=typeof e==`function`?e:t(+e),p):s},p.defined=function(e){return arguments.length?(c=typeof e==`function`?e:t(!!e),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e,n as t,o as n,r,t as i}from"./src-CqyWLlNZ.js";import{i as a,n as o,r as s,t as c}from"./defaultLocale-ZeknFqNe.js";import{t as l}from"./init-0VJVrkRJ.js";function u(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function d(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function f(e){let t,n,r;e.length===2?(t=e===u||e===d?e:p,n=e,r=e):(t=u,n=(t,n)=>u(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function p(){return 0}function m(e){return e===null?NaN:+e}var h=f(u),g=h.right;h.left,f(m).center;var _=Math.sqrt(50),v=Math.sqrt(10),y=Math.sqrt(2);function b(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=_?10:a>=v?5:a>=y?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?b(e,t,n*2):[s,c,l]}function x(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?b(t,e,n):b(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function S(e,t,n){return t=+t,e=+e,n=+n,b(e,t,n)[2]}function C(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?S(t,e,n):S(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function w(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function T(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=k(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function D(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function O(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=k(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function k(a,o){var s=typeof o,c;return o==null||s===`boolean`?n(o):(s===`number`?t:s===`string`?(c=e(o))?(o=c,r):i:o instanceof e?r:o instanceof Date?D:T(o)?w:Array.isArray(o)?E:typeof o.valueOf!=`function`&&typeof o.toString!=`function`||isNaN(o)?O:t)(a,o)}function A(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function j(e){return Math.max(0,-a(Math.abs(e)))}function M(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(t)/3)))*3-a(Math.abs(e)))}function N(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a(t)-a(e))+1}function P(e){return function(){return e}}function F(e){return+e}var I=[0,1];function L(e){return e}function R(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:P(isNaN(t)?NaN:.5)}function z(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function B(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=R(i,r),a=n(o,a)):(r=R(r,i),a=n(a,o)),function(e){return a(r(e))}}function V(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=R(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=g(e,t,1,r)-1;return a[n](i[n](t))}}function H(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function U(){var e=I,n=I,r=k,i,a,o,s=L,c,l,u;function d(){var t=Math.min(e.length,n.length);return s!==L&&(s=z(e[0],e[t-1])),c=t>2?V:B,l=u=null,f}function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return f.invert=function(r){return s(a((u||=c(n,e.map(i),t))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,F),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=A,d()},f.clamp=function(e){return arguments.length?(s=e?!0:L,d()):s!==L},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function W(){return U()(L,L)}function G(e,t,n,r){var i=C(e,t,n),a;switch(r=s(r??`,f`),r.type){case`s`:var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=M(i,l))&&(r.precision=a),o(r,l);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=N(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=j(i))&&(r.precision=a-(r.type===`%`)*2);break}return c(r)}function K(e){var t=e.domain;return e.ticks=function(e){var n=t();return x(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return G(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=S(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function q(){var e=W();return e.copy=function(){return H(e,q())},l.apply(e,arguments),K(e)}export{f as a,C as i,W as n,H as r,q as t};
|