cmcts-c-agent-embedding 1.0.15 → 1.0.16-cagent
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/.augment-guidelines +43 -0
- package/.eslintrc.cjs +1 -0
- package/README.md +349 -349
- package/dist/_basePickBy-1057a1b4.js +1 -0
- package/dist/_basePickBy-cbf78fb3.js +1 -0
- package/dist/_baseUniq-38ea2195.js +1 -0
- package/dist/_baseUniq-52a47b7b.js +1 -0
- package/dist/arc-6b847bc0.js +1 -0
- package/dist/arc-8928af28.js +1 -0
- package/dist/architecture-O4VJ6CD3-42323263.js +1 -0
- package/dist/architecture-O4VJ6CD3-b506967f.js +1 -0
- package/dist/architectureDiagram-VXUJARFQ-1bd867b6.js +1 -0
- package/dist/architectureDiagram-VXUJARFQ-2b851c59.js +1 -0
- package/dist/blockDiagram-VD42YOAC-5cea96b0.js +1 -0
- package/dist/blockDiagram-VD42YOAC-a909b757.js +1 -0
- package/dist/c4Diagram-YG6GDRKO-24d24519.js +1 -0
- package/dist/c4Diagram-YG6GDRKO-54783ab3.js +1 -0
- package/dist/channel-2af69aa2.js +1 -0
- package/dist/channel-f240e622.js +1 -0
- package/dist/chunk-4BX2VUAB-7747ae72.js +1 -0
- package/dist/chunk-4BX2VUAB-d05d937e.js +1 -0
- package/dist/chunk-55IACEB6-5a7b1be3.js +1 -0
- package/dist/chunk-55IACEB6-78729976.js +1 -0
- package/dist/chunk-B4BG7PRW-a97e69ff.js +1 -0
- package/dist/chunk-B4BG7PRW-cbf800c4.js +1 -0
- package/dist/chunk-DI55MBZ5-5dc4f926.js +1 -0
- package/dist/chunk-DI55MBZ5-95d71f6f.js +1 -0
- package/dist/chunk-FMBD7UC4-2c653fda.js +1 -0
- package/dist/chunk-FMBD7UC4-d75ed695.js +1 -0
- package/dist/chunk-QN33PNHL-0bf10733.js +1 -0
- package/dist/chunk-QN33PNHL-b00655c9.js +1 -0
- package/dist/chunk-QZHKN3VN-a979a9fe.js +1 -0
- package/dist/chunk-QZHKN3VN-d57979be.js +1 -0
- package/dist/chunk-TZMSLE5B-6755c559.js +1 -0
- package/dist/chunk-TZMSLE5B-ed6d6d7e.js +1 -0
- package/dist/classDiagram-2ON5EDUG-8b5a2a93.js +1 -0
- package/dist/classDiagram-2ON5EDUG-fa9ecfbb.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-8b5a2a93.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-fa9ecfbb.js +1 -0
- package/dist/clone-6cd174cf.js +1 -0
- package/dist/clone-8494eb3f.js +1 -0
- package/dist/components/Bot.d.ts +10 -0
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts +3 -0
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/Toast.d.ts +10 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts +5 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/LoadingBubble.d.ts +7 -1
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -1
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/ConsultationButton.d.ts +13 -0
- package/dist/components/buttons/ConsultationButton.d.ts.map +1 -0
- package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -1
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -1
- package/dist/components/buttons/ZaloChatButton.d.ts +16 -0
- package/dist/components/buttons/ZaloChatButton.d.ts.map +1 -0
- package/dist/components/demo/ZaloChatDemo.d.ts +2 -0
- package/dist/components/demo/ZaloChatDemo.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -1
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts +3 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/SupportIcon.d.ts +3 -0
- package/dist/components/icons/SupportIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts +3 -1
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -1
- package/dist/components/icons/ThumbsUpIcon.d.ts +3 -1
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -1
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/image/PreviewImage.d.ts +5 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +4 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +22 -3
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/components/modals/QuickChatModal.d.ts +10 -0
- package/dist/components/modals/QuickChatModal.d.ts.map +1 -0
- package/dist/components/modals/ZaloHybridWidget.d.ts +9 -0
- package/dist/components/modals/ZaloHybridWidget.d.ts.map +1 -0
- package/dist/components/modals/ZaloOfficialWidget.d.ts +12 -0
- package/dist/components/modals/ZaloOfficialWidget.d.ts.map +1 -0
- package/dist/components/modals/ZaloQRModal.d.ts +8 -0
- package/dist/components/modals/ZaloQRModal.d.ts.map +1 -0
- package/dist/components/modals/ZaloSmartWidget.d.ts +9 -0
- package/dist/components/modals/ZaloSmartWidget.d.ts.map +1 -0
- package/dist/components/modals/ZaloWebChatWidget.d.ts +9 -0
- package/dist/components/modals/ZaloWebChatWidget.d.ts.map +1 -0
- package/dist/components/quickchat/AlwaysOpenChat.d.ts +13 -0
- package/dist/components/quickchat/AlwaysOpenChat.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatButton.d.ts +10 -0
- package/dist/components/quickchat/QuickChatButton.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatConfig.d.ts +9 -0
- package/dist/components/quickchat/QuickChatConfig.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatPanel.d.ts +10 -0
- package/dist/components/quickchat/QuickChatPanel.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatWidget.d.ts +32 -0
- package/dist/components/quickchat/QuickChatWidget.d.ts.map +1 -0
- package/dist/components/quickchat/index.d.ts +7 -0
- package/dist/components/quickchat/index.d.ts.map +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/cose-bilkent-S5V4N54A-2f5eb275.js +1 -0
- package/dist/cose-bilkent-S5V4N54A-3cda82b5.js +1 -0
- package/dist/cytoscape.esm-9acb9bfe.js +1 -0
- package/dist/dagre-6UL2VRFP-9b648c54.js +1 -0
- package/dist/dagre-6UL2VRFP-e997588d.js +1 -0
- package/dist/defaultLocale-1fe70b7d.js +1 -0
- package/dist/diagram-PSM6KHXK-1234d08d.js +1 -0
- package/dist/diagram-PSM6KHXK-15013de5.js +1 -0
- package/dist/diagram-QEK2KX5R-489b9505.js +1 -0
- package/dist/diagram-QEK2KX5R-9e94df2a.js +1 -0
- package/dist/diagram-S2PKOQOG-6fef3823.js +1 -0
- package/dist/diagram-S2PKOQOG-c943ed25.js +1 -0
- package/dist/erDiagram-Q2GNP2WA-2b1823f2.js +1 -0
- package/dist/erDiagram-Q2GNP2WA-7e6c6a04.js +1 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/types.d.ts +1 -0
- package/dist/features/bubble/types.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/features/popup/components/Popup.d.ts.map +1 -1
- package/dist/flowDiagram-NV44I4VS-709c6479.js +1 -0
- package/dist/flowDiagram-NV44I4VS-98a84da9.js +1 -0
- package/dist/ganttDiagram-LVOFAZNH-1d379d6a.js +1 -0
- package/dist/ganttDiagram-LVOFAZNH-d8342586.js +1 -0
- package/dist/gitGraph-ZV4HHKMB-788776f3.js +1 -0
- package/dist/gitGraph-ZV4HHKMB-ba420dcc.js +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-804d1363.js +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-919097ea.js +1 -0
- package/dist/graph-834f6046.js +1 -0
- package/dist/graph-db4953aa.js +1 -0
- package/dist/info-63CPKGFF-2dccc483.js +1 -0
- package/dist/info-63CPKGFF-ef40f1c4.js +1 -0
- package/dist/infoDiagram-F6ZHWCRC-579d50b4.js +1 -0
- package/dist/infoDiagram-F6ZHWCRC-c9877bad.js +1 -0
- package/dist/init-cf76ae07.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-25d3c922.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-2d2cda1c.js +1 -0
- package/dist/kanban-definition-3W4ZIXB7-c556bee0.js +1 -0
- package/dist/kanban-definition-3W4ZIXB7-cdb93ec0.js +1 -0
- package/dist/katex-0a18b0df.js +1 -0
- package/dist/layout-40652dba.js +1 -0
- package/dist/layout-54ffc604.js +1 -0
- package/dist/linear-2f639b72.js +1 -0
- package/dist/linear-ed2367ff.js +1 -0
- package/dist/mermaid-parser.core-0cfa7d2a.js +1 -0
- package/dist/mermaid-parser.core-10bed742.js +1 -0
- package/dist/mindmap-definition-VGOIOE7T-169f5fe5.js +1 -0
- package/dist/mindmap-definition-VGOIOE7T-dea1c792.js +1 -0
- package/dist/ordinal-221e41d7.js +1 -0
- package/dist/packet-HUATNLJX-6f2471ea.js +1 -0
- package/dist/packet-HUATNLJX-c69e28eb.js +1 -0
- package/dist/pie-WTHONI2E-4143e44b.js +1 -0
- package/dist/pie-WTHONI2E-82b1fe3f.js +1 -0
- package/dist/pieDiagram-ADFJNKIX-499eec78.js +1 -0
- package/dist/pieDiagram-ADFJNKIX-657effd5.js +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-138a0c93.js +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-91137c4d.js +1 -0
- package/dist/queries/sendMessageQuery.d.ts +55 -1
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/radar-NJJJXTRR-5e934a95.js +1 -0
- package/dist/radar-NJJJXTRR-94d77527.js +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-a5d9fb39.js +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-d7aeec99.js +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-15053ae0.js +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-aadd2125.js +1 -0
- package/dist/sequenceDiagram-WL72ISMW-12e778ef.js +1 -0
- package/dist/sequenceDiagram-WL72ISMW-9330a98a.js +1 -0
- package/dist/stateDiagram-FKZM4ZOC-01225f0f.js +1 -0
- package/dist/stateDiagram-FKZM4ZOC-af4836d7.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-4774cc10.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-5ef8e019.js +1 -0
- package/dist/timeline-definition-IT6M3QCI-9921f937.js +1 -0
- package/dist/timeline-definition-IT6M3QCI-a7a9bbec.js +1 -0
- package/dist/treemap-75Q7IDZK-100ddeb7.js +1 -0
- package/dist/treemap-75Q7IDZK-851117b4.js +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/redisAndQueue.d.ts +32 -0
- package/dist/utils/redisAndQueue.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts +2 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/web-0016ac81.js +1 -0
- package/dist/web-4e6d8ea9.js +1 -0
- package/dist/web.d.ts +4 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +2 -0
- package/dist/window.d.ts.map +1 -1
- package/dist/xychartDiagram-PRI3JC2R-003630a4.js +1 -0
- package/dist/xychartDiagram-PRI3JC2R-df869780.js +1 -0
- package/package.json +5 -3
- package/public/index.html +30 -142
- package/server.js +401 -401
- package/.env +0 -36
- package/.husky/pre-commit +0 -18
- package/.idea/Flowise-share-chatbox.iml +0 -13
- package/.idea/codeStyles/Project.xml +0 -60
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -16
- package/.idea/modules.xml +0 -9
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -7
- package/a.json +0 -57
- package/bun.lockb +0 -0
- package/dist/BubbleChat.d.ts +0 -13
- package/dist/BubbleChat.d.ts.map +0 -1
- package/dist/FullPageChat.d.ts +0 -18
- package/dist/FullPageChat.d.ts.map +0 -1
- package/dist/components/ImageUploadButton.d.ts +0 -11
- package/dist/components/ImageUploadButton.d.ts.map +0 -1
- package/dist/components/RecordAudioButton.d.ts +0 -11
- package/dist/components/RecordAudioButton.d.ts.map +0 -1
- package/dist/components/SendButton.d.ts +0 -12
- package/dist/components/SendButton.d.ts.map +0 -1
- package/dist/index.js +0 -1
- package/test.html +0 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,a as e,d as a,b as r,c as s,e as i}from"./chunk-TZMSLE5B-6755c559.js";import{_ as n,s as o,c,n as h,g as l,b as d,o as p,d as g,p as u,J as x,t as y,l as m,i as b,x as T,e as E,L as f,M as w,u as I,a as L,j as v,k,m as P,N as _,O as N,E as A,P as M,Z as O}from"./web-4e6d8ea9.js";import{I as S}from"./chunk-QZHKN3VN-d57979be.js";var D=function(){var t=n((function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a}),"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],o=[1,11],c=[1,13],h=[1,14],l=[1,16],d=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],E=[1,31],f=[1,32],w=[1,33],I=[1,34],L=[1,35],v=[1,36],k=[1,37],P=[1,38],_=[1,39],N=[1,41],A=[1,42],M=[1,43],O=[1,44],S=[1,45],D=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],C=[2,71],$=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],F=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],W=[69,70,71],q=[1,127];e={trace:n((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:n((function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 63:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:case 53:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 54:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 55:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 59:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-2],i[o]];break;case 64:this.$=r.PLACEMENT.LEFTOF;break;case 65:this.$=r.PLACEMENT.RIGHTOF;break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 67:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 68:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 69:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 70:this.$=i[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:i[o]};break;case 72:this.$=r.LINETYPE.SOLID_OPEN;break;case 73:this.$=r.LINETYPE.DOTTED_OPEN;break;case 74:this.$=r.LINETYPE.SOLID;break;case 75:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=r.LINETYPE.DOTTED;break;case 77:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=r.LINETYPE.SOLID_CROSS;break;case 79:this.$=r.LINETYPE.DOTTED_CROSS;break;case 80:this.$=r.LINETYPE.SOLID_POINT;break;case 81:this.$=r.LINETYPE.DOTTED_POINT;break;case 82:this.$=r.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:c,14:h,17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},t(R,[2,5]),{9:47,12:12,13:c,14:h,17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:k,52:P,53:_},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:D},{22:55,71:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:D},{22:75,71:D},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:D},{22:92,71:D},{22:93,71:D},{22:94,71:D},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],C),t(R,[2,6]),t(R,[2,15]),t($,[2,9],{10:95}),t(R,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(R,[2,21]),{5:[1,99]},{5:[1,100]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(B,s,{7:101}),t(B,s,{7:102}),t(B,s,{7:103}),t(Y,s,{40:104,7:105}),t(V,s,{42:106,7:107}),t(V,s,{7:107,42:108}),t(F,s,{45:109,7:110}),t(B,s,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],C,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:D},t(W,[2,72]),t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(W,[2,79]),t(W,[2,80]),t(W,[2,81]),{22:123,71:D},{22:125,59:124,71:D},{71:[2,64]},{71:[2,65]},{57:126,86:q},{57:128,86:q},{57:129,86:q},{57:130,86:q},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:k,52:P,53:_},{5:[1,136]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[1,137],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[1,138],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[1,139],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[2,46],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,49:[1,141],50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{16:[1,142]},{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[2,44],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,48:[1,143],50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{16:[1,144]},{16:[1,145]},{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[2,42],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,47:[1,146],50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{4:i,5:o,8:8,9:10,12:12,13:c,14:h,16:[1,147],17:15,18:l,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:E,39:f,41:w,43:I,44:L,46:v,50:k,52:P,53:_,55:N,60:A,61:M,62:O,63:S,71:D},{15:[1,148]},t(R,[2,49]),t(R,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(R,[2,51]),t(R,[2,52]),{22:151,71:D},{22:152,71:D},{57:153,86:q},{57:154,86:q},{57:155,86:q},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(R,[2,16]),t($,[2,10]),{12:157,50:k,52:P,53:_},t($,[2,12]),t($,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,158]},t(R,[2,38]),{15:[1,159]},t(R,[2,39]),t(R,[2,40]),{15:[1,160]},t(R,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:q},{57:165,86:q},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:D},t($,[2,11]),t(Y,s,{7:105,40:167}),t(V,s,{7:107,42:168}),t(F,s,{7:110,45:169}),t(R,[2,48]),{5:[2,70]},t(R,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:n((function(t,e){var a;if(!e.recoverable)throw(a=new Error(t)).hash=e,a;this.trace(t)}),"parseError"),parse:n((function(t){var e,a=this,r=[0],s=[],i=[null],o=[],c=this.table,h="",l=0,d=0,p=o.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(u.yy[e]=this.yy[e]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var x=g.yylloc,y=(o.push(x),g.options&&g.options.ranges);function m(){var t=s.pop()||g.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(s=t).pop()),t=a.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,n((function(t){r.length=r.length-2*t,i.length=i.length-t,o.length=o.length-t}),"popStack"),n(m,"lex");for(var b,T,E,f,w,I,L={};;){if(T=r[r.length-1],void 0===(E=this.defaultActions[T]||(null==b&&(b=m()),c[T]&&c[T][b]))||!E.length||!E[0]){var v,k=[];for(f in c[T])this.terminals_[f]&&2<f&&k.push("'"+this.terminals_[f]+"'");v=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:x,expected:k})}if(E[0]instanceof Array&&1<E.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(E[0]){case 1:r.push(b),i.push(g.yytext),o.push(g.yylloc),r.push(E[1]),b=null,d=g.yyleng,h=g.yytext,l=g.yylineno,x=g.yylloc;break;case 2:if(w=this.productions_[E[1]][1],L.$=i[i.length-w],L._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},y&&(L._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(I=this.performAction.apply(L,[h,d,l,u.yy,E[1],i,o].concat(p))))return I;w&&(r=r.slice(0,-1*w*2),i=i.slice(0,-1*w),o=o.slice(0,-1*w)),r.push(this.productions_[E[1]][0]),i.push(L.$),o.push(L._$),I=c[r[r.length-2]][r[r.length-1]],r.push(I);break;case 3:return!0}}return!0}),"parse")},a={EOF:1,parseError:n((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:n((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:n((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:n((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g),r=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),a.length-1&&(this.yylineno-=a.length-1),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:a?(a.length===t.length?this.yylloc.first_column:0)+t[t.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:n((function(){return this._more=!0,this}),"more"),reject:n((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:n((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:n((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:n((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:n((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:n((function(t,e){var a,r;if(this.options.backtrack_lexer&&(r={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)&&(r.yylloc.range=this.yylloc.range.slice(0)),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var s in r)this[s]=r[s];return!1}),"test_match"),next:n((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,s=this._currentRules(),i=0;i<s.length;i++)if((a=this._input.match(this.rules[s[i]]))&&(!e||a[0].length>e[0].length))if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,s[r]))&&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:n((function(){return this.next()||this.lex()}),"lex"),begin:n((function(t){this.conditionStack.push(t)}),"begin"),popState:n((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:n((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:n((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:n((function(t){this.begin(t)}),"pushState"),stateStackSize:n((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:n((function(t,e,a,r){switch(a){case 0:case 56:case 72:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:case 57:return e.yytext=e.yytext.trim(),71;case 11:case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 73:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/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,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};function z(){this.yy={}}return e.lexer=a,n(z,"Parser"),new((z.prototype=e).Parser=z)}(),R=D.parser=D,C={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},$={FILLED:0,OPEN:1},B={LEFTOF:0,RIGHTOF:1,OVER:2},Y="actor",V="control",F="database",W="entity",q=class{constructor(){this.state=new S((()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),this.setAccTitle=o,this.setAccDescription=c,this.setDiagramTitle=h,this.getAccTitle=l,this.getAccDescription=d,this.getDiagramTitle=p,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(g().wrap),this.LINETYPE=C,this.ARROWTYPE=$,this.PLACEMENT=B}static{n(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,r,s){let i,n=this.state.records.currentBox;if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}",i=u(t,{schema:x})}if(r=i?.type??r,s=this.state.records.actors.get(t)){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw new Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(n=s.box||this.state.records.currentBox,s.box=n,s&&e===s.name&&null==a)return}null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),this.state.records.actors.set(t,{box:n,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor&&(s=this.state.records.actors.get(this.state.records.prevActor))&&(s.nextActor=t),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,s=!1){var i;if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1)throw(i=new Error("Trying to inactivate an inactive participant ("+t+")")).hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},i;return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s}),!0}hasAtLeastOneBox(){return 0<this.state.records.boxes.length}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some((t=>t.name))}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:g().sequence?.wrap??!1}clear(){this.state.reset(),y()}parseMessage(t){t=t.trim();var{wrap:t,cleanedText:e}=this.extractWrap(t),e={text:e,wrap:t};return m.debug("parseMessage: "+JSON.stringify(e)),e}parseBoxData(t){var e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",a)||(a="transparent",r=t.trim()):((e=(new Option).style).color=a,e.color!==a&&(a="transparent",r=t.trim()));var{wrap:e,cleanedText:t}=this.extractWrap(r);return{text:t?b(t,g()):void 0,color:a,wrap:e}}addNote(t,e,a){var r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()};t=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t[0],to:t[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){t=this.getActor(t);try{let r=b(e.text,g());r=(r=r.replace(/=/g,"=")).replace(/&/g,"&");var a=JSON.parse(r);this.insertLinks(t,a)}catch(t){m.error("error while parsing actor link text",t)}}addALink(t,e){t=this.getActor(t);try{var a={};let n=b(e.text,g());var r=n.indexOf("@"),s=(n=(n=n.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=n.slice(r+1).trim();a[s]=i,this.insertLinks(t,a)}catch(t){m.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){t=this.getActor(t);try{var a=b(e.text,g()),r=JSON.parse(a);this.insertProperties(t,r)}catch(t){m.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){t=this.getActor(t),e=document.getElementById(e.text);try{var a=e.innerHTML,r=JSON.parse(a);r.properties&&this.insertProperties(t,r.properties),r.links&&this.insertLinks(t,r.links)}catch(t){m.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach((t=>{this.apply(t)}));else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":o(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return g().sequence}},z=n((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n \n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n`),"getStyles"),H="actor-top",j="actor-bottom",U="actor-box",G="actor-man",K=n((function(t,e){return a(t,e)}),"drawRect"),X=n((function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};var i=e.links,n=e.actorCnt,o=e.rectData,c=(e="none",s&&(e="block !important"),t.append("g")),h=(s=(c.attr("id","actor"+n+"_popup"),c.attr("class","actorPopupMenu"),c.attr("display",e),""),void 0!==o.class&&(s=" "+o.class),o.width>a?o.width:a);if((t=c.append("rect")).attr("class","actorPopupMenuPanel"+s),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",h),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=i){var l,d=20;for(l in i){var p=c.append("a"),g=P(i[l]);p.attr("xlink:href",g),p.attr("target","_blank"),Pt(r)(l,p,o.x+10,o.height+d,h,20,{class:"actor"},r),d+=30}}return t.attr("height",d),{height:o.height+d,width:h}}),"drawPopup"),Z=n((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),J=n((async function(t,e,a=null){var r=t.append("foreignObject"),s=await N(e.text,A());s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),"noteText"===e.class){t=((t=t.node().firstChild).setAttribute("height",s.height+2*e.textMargin),t.getBBox());r.attr("x",Math.round(t.x+t.width/2-s.width/2)).attr("y",Math.round(t.y+t.height/2-s.height/2))}else if(a){let{startx:i,stopx:n,starty:o}=a;i>n&&(t=i,i=n,n=t),r.attr("x",Math.round(i+Math.abs(i-n)/2-s.width/2)),"loopText"===e.class?r.attr("y",Math.round(o)):r.attr("y",Math.round(o-s.height))}return[r]}),"drawKatex"),Q=n((function(t,e){let a=0,r=0;var s,i,o=e.text.split(E.lineBreakRegex),[c,h]=M(e.fontSize),l=[];let d=0,p=n((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin)switch(e.valign){case"top":case"start":p=n((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":p=n((()=>Math.round(e.y+(a+r+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":p=n((()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for([s,i]of o.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==c&&(d=s*c);var g,u=t.append("text"),x=(u.attr("x",e.x),u.attr("y",p()),void 0!==e.anchor&&u.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&u.style("font-family",e.fontFamily),void 0!==h&&u.style("font-size",h),void 0!==e.fontWeight&&u.style("font-weight",e.fontWeight),void 0!==e.fill&&u.attr("fill",e.fill),void 0!==e.class&&u.attr("class",e.class),void 0!==e.dy?u.attr("dy",e.dy):0!==d&&u.attr("dy",d),i||O);(e.tspan?((g=u.append("tspan")).attr("x",e.x),void 0!==e.fill&&g.attr("fill",e.fill),g):u).text(x),void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin&&(r+=(u._groups||u)[0][0].getBBox().height,a=r),l.push(u)}return l}),"drawText"),tt=n((function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}n(a,"genPoints");var r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,Q(t,e),r}),"drawLabel"),et=-1,at=n(((t,e,a,r)=>{t.select&&a.forEach((a=>{a=e.get(a);var s=t.select("#actor"+a.actorCnt);!r.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):r.mirrorActors&&s.attr("y2",a.stopy)}))}),"fixLifeLineHeights"),rt=n((function(e,a,r,n){var o=n?a.stopy:a.starty,c=a.x+a.width/2,h=o+a.height,l=e=e.append("g").lower();n||(et++,Object.keys(a.links||{}).length&&!r.forceMenus&&l.attr("onclick",Z(`actor${et}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+et).attr("x1",c).attr("y1",h).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),l=e.append("g"),a.actorCnt=et,null!=a.links&&l.attr("id","root-"+et)),h=t(),c="actor",a.properties?.class?c=a.properties.class:h.fill="#eaeaea",c+=n?" "+j:" "+H,h.x=a.x,h.y=o,h.width=a.width,h.height=a.height,h.class=c,h.rx=3,h.ry=3,h.name=a.name,e=K(l,h);a.rectData=h,a.properties?.icon&&("@"===(n=a.properties.icon.trim()).charAt(0)?s(l,h.x+h.width-20,h.y+10,n.substr(1)):i(l,h.x+h.width-20,h.y+10,n)),kt(r,f(a.description))(a.description,l,h.x,h.y,h.width,h.height,{class:"actor "+U},r);let d=a.height;return e.node&&(o=e.node().getBBox(),a.height=o.height,d=o.height),d}),"drawActorTypeParticipant"),st=n((function(e,a,r,n){var o=n?a.stopy:a.starty,c=a.x+a.width/2,h=o+a.height,l=e=e.append("g").lower();n||(et++,Object.keys(a.links||{}).length&&!r.forceMenus&&l.attr("onclick",Z(`actor${et}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+et).attr("x1",c).attr("y1",h).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),l=e.append("g"),a.actorCnt=et,null!=a.links&&l.attr("id","root-"+et)),h=t(),c="actor",a.properties?.class?c=a.properties.class:h.fill="#eaeaea",c+=n?" "+j:" "+H,h.x=a.x,h.y=o,h.width=a.width,h.height=a.height,h.class=c,h.name=a.name,e={...h,x:h.x+-6,y:h.y+6,class:"actor"},n=K(l,h);K(l,e),a.rectData=h,a.properties?.icon&&("@"===(o=a.properties.icon.trim()).charAt(0)?s(l,h.x+h.width-20,h.y+10,o.substr(1)):i(l,h.x+h.width-20,h.y+10,o)),kt(r,f(a.description))(a.description,l,h.x-6,h.y+6,h.width,h.height,{class:"actor "+U},r);let d=a.height;return n.node&&(c=n.node().getBBox(),a.height=c.height,d=c.height),d}),"drawActorTypeCollections"),it=n((function(e,a,r,n){var o=n?a.stopy:a.starty,c=a.x+a.width/2,h=o+a.height;let l=e=e.append("g").lower();n||(et++,Object.keys(a.links||{}).length&&!r.forceMenus&&l.attr("onclick",Z(`actor${et}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+et).attr("x1",c).attr("y1",h).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),l=e.append("g"),a.actorCnt=et,null!=a.links&&l.attr("id","root-"+et)),h=t();let d="actor";a.properties?.class?d=a.properties.class:h.fill="#eaeaea",d+=n?" "+j:" "+H,h.x=a.x,h.y=o,h.width=a.width,h.height=a.height,h.class=d,h.name=a.name;e=(c=h.height/2)/(2.5+h.height/50),n=l.append("g"),o=l.append("g");n.append("path").attr("d",`M ${h.x},${h.y+c}\n a ${e},${c} 0 0 0 0,${h.height}\n h ${h.width-2*e}\n a ${e},${c} 0 0 0 0,-${h.height}\n Z\n `).attr("class",d),o.append("path").attr("d",`M ${h.x},${h.y+c}\n a ${e},${c} 0 0 0 0,`+h.height).attr("stroke","#666").attr("stroke-width","1px").attr("class",d),n.attr("transform",`translate(${e}, ${-h.height/2})`),o.attr("transform",`translate(${h.width-e}, ${-h.height/2})`),a.rectData=h,a.properties?.icon&&(c=a.properties.icon.trim(),o=h.x+h.width-20,e=h.y+10,"@"===c.charAt(0)?s(l,o,e,c.substr(1)):i(l,o,e,c)),kt(r,f(a.description))(a.description,l,h.x,h.y,h.width,h.height,{class:"actor "+U},r);let p=a.height;return(o=n.select("path:last-child")).node()&&(e=o.node().getBBox(),a.height=e.height,p=e.height),p}),"drawActorTypeQueue"),nt=n((function(e,a,r,s){var i=s?a.stopy:a.starty,n=a.x+a.width/2,o=i+75,c=e.append("g").lower();s||(et++,c.append("line").attr("id","actor"+et).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),a.actorCnt=et),c=e.append("g");let h=G;return h+=s?" "+j:" "+H,c.attr("class",h),c.attr("name",a.name),(o=t()).x=a.x,o.y=i,o.fill="#eaeaea",o.width=a.width,o.height=a.height,o.class="actor",n=a.x+a.width/2,e=i+30,c.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),c.append("circle").attr("cx",n).attr("cy",e).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),c.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${n}, ${e-18})`),i=c.node().getBBox(),a.height=i.height+2*(r?.sequence?.labelBoxHeight??0),kt(r,f(a.description))(a.description,c,o.x,o.y+18+(s?5:10),o.width,o.height,{class:"actor "+G},r),a.height}),"drawActorTypeControl"),ot=n((function(e,a,r,s){var i=s?a.stopy:a.starty,n=a.x+a.width/2,o=i+75,c=e.append("g").lower();e=e.append("g");let h=G;h+=s?" "+j:" "+H,e.attr("class",h),e.attr("name",a.name);var l=t(),d=(l.x=a.x,l.y=i,l.fill="#eaeaea",l.width=a.width,l.height=a.height,l.class="actor",a.x+a.width/2),p=i+(s?10:25);e.append("circle").attr("cx",d).attr("cy",p).attr("r",18).attr("width",a.width).attr("height",a.height),e.append("line").attr("x1",d-18).attr("x2",d+18).attr("y1",p+18).attr("y2",p+18).attr("stroke","#333").attr("stroke-width",2),d=e.node().getBBox();return a.height=d.height+(r?.sequence?.labelBoxHeight??0),s||(et++,c.append("line").attr("id","actor"+et).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),a.actorCnt=et),kt(r,f(a.description))(a.description,e,l.x,l.y+(s?(p-i+18-5)/2:(p+18-i)/2),l.width,l.height,{class:"actor "+G},r),e.attr("transform","translate(0, 9)"),a.height}),"drawActorTypeEntity"),ct=n((function(e,a,r,s){var i=s?a.stopy:a.starty,n=a.x+a.width/2,o=i+a.height+2*r.boxTextMargin;let c=e=e.append("g").lower();s||(et++,Object.keys(a.links||{}).length&&!r.forceMenus&&c.attr("onclick",Z(`actor${et}_popup`)).attr("cursor","pointer"),c.append("line").attr("id","actor"+et).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),c=e.append("g"),a.actorCnt=et,null!=a.links&&c.attr("id","root-"+et)),o=t();let h="actor";a.properties?.class?h=a.properties.class:o.fill="#eaeaea",h+=s?" "+j:" "+H,o.x=a.x,o.y=i,o.width=a.width,o.height=a.height,o.class=h,o.name=a.name,o.x=a.x,o.y=i;n=o.width/4,e=o.width/4;var l=(i=n/2)/(2.5+n/50),d=c.append("g");i=`\n M ${o.x},${o.y+l}\n a ${i},${l} 0 0 0 ${n},0\n a ${i},${l} 0 0 0 -${n},0\n l 0,${e-2*l}\n a ${i},${l} 0 0 0 ${n},0\n l 0,-${e-2*l}\n`;return(i=(d.append("path").attr("d",i).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",h),s?d.attr("transform",`translate(${1.5*n}, ${o.height/4-2*l})`):d.attr("transform",`translate(${1.5*n}, ${(o.height+l)/4})`),a.rectData=o,kt(r,f(a.description))(a.description,c,o.x,o.y+(s?(o.height+e)/4:(o.height+l)/2),o.width,o.height,{class:"actor "+U},r),d.select("path:last-child"))).node()&&(n=i.node().getBBox(),a.height=n.height+(r.sequence.labelBoxHeight??0)),a.height}),"drawActorTypeDatabase"),ht=n((function(e,a,r,s){var i=s?a.stopy:a.starty,n=a.x+a.width/2,o=i+80,c=e.append("g").lower();s||(et++,c.append("line").attr("id","actor"+et).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),a.actorCnt=et),c=e.append("g");let h=G;return h+=s?" "+j:" "+H,c.attr("class",h),c.attr("name",a.name),(o=t()).x=a.x,o.y=i,o.fill="#eaeaea",o.width=a.width,o.height=a.height,o.class="actor",c.append("line").attr("id","actor-man-torso"+et).attr("x1",a.x+a.width/2-75).attr("y1",i+10).attr("x2",a.x+a.width/2-15).attr("y2",i+10),c.append("line").attr("id","actor-man-arms"+et).attr("x1",a.x+a.width/2-75).attr("y1",i+0).attr("x2",a.x+a.width/2-75).attr("y2",i+20),c.append("circle").attr("cx",a.x+a.width/2).attr("cy",i+10).attr("r",30),n=c.node().getBBox(),a.height=n.height+(r.sequence.labelBoxHeight??0),kt(r,f(a.description))(a.description,c,o.x,o.y+(s?11:18),o.width,o.height,{class:"actor "+G},r),c.attr("transform","translate(0,22)"),a.height}),"drawActorTypeBoundary"),lt=n((function(e,a,r,s){var i=s?a.stopy:a.starty,n=a.x+a.width/2,o=i+80,c=e.append("g").lower();s||(et++,c.append("line").attr("id","actor"+et).attr("x1",n).attr("y1",o).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",a.name),a.actorCnt=et),c=e.append("g");let h=G;return h+=s?" "+j:" "+H,c.attr("class",h),c.attr("name",a.name),(o=t()).x=a.x,o.y=i,o.fill="#eaeaea",o.width=a.width,o.height=a.height,o.class="actor",o.rx=3,o.ry=3,c.append("line").attr("id","actor-man-torso"+et).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),c.append("line").attr("id","actor-man-arms"+et).attr("x1",n-18).attr("y1",i+33).attr("x2",n+18).attr("y2",i+33),c.append("line").attr("x1",n-18).attr("y1",i+60).attr("x2",n).attr("y2",i+45),c.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+18-2).attr("y2",i+60),(e=c.append("circle")).attr("cx",a.x+a.width/2),e.attr("cy",i+10),e.attr("r",15),e.attr("width",a.width),e.attr("height",a.height),s=c.node().getBBox(),a.height=s.height,kt(r,f(a.description))(a.description,c,o.x,o.y+35,o.width,o.height,{class:"actor "+G},r),a.height}),"drawActorTypeActor"),dt=n((async function(t,e,a,r){switch(e.type){case"actor":return lt(t,e,a,r);case"participant":return rt(t,e,a,r);case"boundary":return ht(t,e,a,r);case"control":return nt(t,e,a,r);case"entity":return ot(t,e,a,r);case"database":return ct(t,e,a,r);case"collections":return st(t,e,a,r);case"queue":return it(t,e,a,r)}}),"drawActor"),pt=n((function(t,e,a){t=t.append("g"),yt(t,e),e.name&&kt(a)(e.name,t,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),t.lower()}),"drawBox"),gt=n((function(t){return t.append("g")}),"anchorElement"),ut=n((function(e,a,r,s,i){var n=t(),o=a.anchored;n.x=a.startx,n.y=a.starty,n.class="activation"+i%3,n.width=a.stopx-a.startx,n.height=r-a.starty,K(o,n)}),"drawActivation"),xt=n((async function(t,a,r,s){var{boxMargin:i,boxTextMargin:o,labelBoxHeight:s,labelBoxWidth:c,messageFontFamily:h,messageFontSize:l,messageFontWeight:d}=s;const p=t.append("g"),g=n((function(t,e,a,r){return p.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")}),"drawLoopLine");g(a.startx,a.starty,a.stopx,a.starty),g(a.stopx,a.starty,a.stopx,a.stopy),g(a.startx,a.stopy,a.stopx,a.stopy),g(a.startx,a.starty,a.startx,a.stopy),void 0!==a.sections&&a.sections.forEach((function(t){g(a.startx,t.y,a.stopx,t.y).style("stroke-dasharray","3, 3")}));let u=e();u.text=r,u.x=a.startx,u.y=a.starty,u.fontFamily=h,u.fontSize=l,u.fontWeight=d,u.anchor="middle",u.valign="middle",u.tspan=!1,u.width=c||50,u.height=s||20,u.textMargin=o,u.class="labelText",tt(p,u),(u=Lt()).text=a.title,u.x=a.startx+c/2+(a.stopx-a.startx)/2,u.y=a.starty+i+o,u.anchor="middle",u.valign="middle",u.textMargin=o,u.class="loopText",u.fontFamily=h,u.fontSize=l,u.fontWeight=d,u.wrap=!0;var x=f(u.text)?await J(p,u,a):Q(p,u);if(void 0!==a.sectionTitles)for(var[y,m]of Object.entries(a.sectionTitles))m.message&&(u.text=m.message,u.x=a.startx+(a.stopx-a.startx)/2,u.y=a.sections[y].y+i+o,u.class="loopText",u.anchor="middle",u.valign="middle",u.tspan=!1,u.fontFamily=h,u.fontSize=l,u.fontWeight=d,u.wrap=a.wrap,f(u.text)?(a.starty=a.sections[y].y,await J(p,u,a)):Q(p,u),m=Math.round(x.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e))),a.sections[y].height+=m-(i+o));return a.height=Math.round(a.stopy-a.starty),p}),"drawLoop"),yt=n((function(t,e){r(t,e)}),"drawBackgroundRect"),mt=n((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),bt=n((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),Tt=n((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),Et=n((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),ft=n((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),wt=n((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),It=n((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),Lt=n((function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}}),"getTextObj"),vt=n((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),kt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,i,n,o,c){var{actorFontSize:c,actorFontFamily:h,actorFontWeight:l}=c,[d,p]=M(c),g=t.split(E.lineBreakRegex);for(let t=0;t<g.length;t++){var u=t*d-d*(g.length-1)/2,x=e.append("text").attr("x",a+i/2).attr("y",r).style("text-anchor","middle").style("font-size",p).style("font-weight",l).style("font-family",h);x.append("tspan").attr("x",a+i/2).attr("dy",u).text(g[t]),x.attr("y",r+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(x,o)}}function a(t,a,r,i,n,o,c,h){var l=(a=a.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,a,r,i,n,o,c,h),s(l,c)}async function r(t,a,r,i,n,o,c,h){var l=await w(t,A());(l=(a=a.append("switch")).append("foreignObject").attr("x",r+n/2-l.width/2).attr("y",i+o/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await N(t,A())),e(t,a,r,i,n,o,c,h),s(l,c)}function s(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return n(t,"byText"),n(e,"byTspan"),n(a,"byFo"),n(r,"byKatex"),n(s,"_setTextAttrs"),function(s,i=!1){return i?r:"fo"===s.textPlacement?a:"old"===s.textPlacement?t:e}}(),Pt=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").text(t),o)}function e(t,e,a,s,i,n,o,c){var{actorFontSize:h,actorFontFamily:l,actorFontWeight:d}=c,p=t.split(E.lineBreakRegex);for(let t=0;t<p.length;t++){var g=t*h-h*(p.length-1)/2,u=e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").style("font-size",h).style("font-weight",d).style("font-family",l);u.append("tspan").attr("x",a).attr("dy",g).text(p[t]),u.attr("y",s+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(u,o)}}function a(t,a,s,i,n,o,c,h){(n=(a=a.append("switch")).append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,a,s,i,0,o,c,h),r(n,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return n(t,"byText"),n(e,"byTspan"),n(a,"byFo"),n(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),_t={drawRect:K,drawText:Q,drawLabel:tt,drawActor:dt,drawBox:pt,drawPopup:X,anchorElement:gt,drawActivation:ut,drawLoop:xt,drawBackgroundRect:yt,insertArrowHead:Et,insertArrowFilledHead:ft,insertSequenceNumber:wt,insertArrowCrossHead:It,insertDatabaseIcon:mt,insertComputerIcon:bt,insertClockIcon:Tt,getTextObj:Lt,getNoteRect:vt,fixLifeLineHeights:at,sanitizeUrl:P},Nt={},At={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:n((function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:n((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:n((function(t){this.boxes.push(t)}),"addBox"),addActor:n((function(t){this.actors.push(t)}),"addActor"),addLoop:n((function(t){this.loops.push(t)}),"addLoop"),addMessage:n((function(t){this.messages.push(t)}),"addMessage"),addNote:n((function(t){this.notes.push(t)}),"addNote"),lastActor:n((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:n((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:n((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:n((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:n((function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Vt(g())}),"init"),updateVal:n((function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])}),"updateVal"),updateBounds:n((function(t,e,a,r){const s=this;let i=0;function o(o){return n((function(n){i++;var c=s.sequenceItems.length-i+1;s.updateVal(n,"starty",e-c*Nt.boxMargin,Math.min),s.updateVal(n,"stopy",r+c*Nt.boxMargin,Math.max),s.updateVal(At.data,"startx",t-c*Nt.boxMargin,Math.min),s.updateVal(At.data,"stopx",a+c*Nt.boxMargin,Math.max),"activation"!==o&&(s.updateVal(n,"startx",t-c*Nt.boxMargin,Math.min),s.updateVal(n,"stopx",a+c*Nt.boxMargin,Math.max),s.updateVal(At.data,"starty",e-c*Nt.boxMargin,Math.min),s.updateVal(At.data,"stopy",r+c*Nt.boxMargin,Math.max))}),"updateItemBounds")}n(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))}),"updateBounds"),insert:n((function(t,e,a,r){var s=E.getMin(t,a);t=E.getMax(t,a),a=E.getMin(e,r),e=E.getMax(e,r);this.updateVal(At.data,"startx",s,Math.min),this.updateVal(At.data,"starty",a,Math.min),this.updateVal(At.data,"stopx",t,Math.max),this.updateVal(At.data,"stopy",e,Math.max),this.updateBounds(s,a,t,e)}),"insert"),newActivation:n((function(t,e,a){a=a.get(t.from);var r=Ft(t.from).length||0;a=a.x+a.width/2+(r-1)*Nt.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Nt.activationWidth,stopy:void 0,actor:t.from,anchored:_t.anchorElement(e)})}),"newActivation"),endActivation:n((function(t){return t=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from),this.activations.splice(t,1)[0]}),"endActivation"),createLoop:n((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:n((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:n((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:n((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:n((function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:At.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:n((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:n((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:n((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=E.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:n((function(){return this.verticalPos}),"getVerticalPos"),getBounds:n((function(){return{bounds:this.data,models:this.models}}),"getBounds")},Mt=n((async function(a,r){At.bumpVerticalPos(Nt.boxMargin),r.height=Nt.boxMargin,r.starty=At.getVerticalPos();var s=t(),i=(a=(s.x=r.startx,s.y=r.starty,s.width=r.width||Nt.width,s.class="note",a.append("g")),_t.drawRect(a,s)),n=(a=((n=e()).x=r.startx,n.y=r.starty,n.width=s.width,n.dy="1em",n.text=r.message,n.class="noteText",n.fontFamily=Nt.noteFontFamily,n.fontSize=Nt.noteFontSize,n.fontWeight=Nt.noteFontWeight,n.anchor=Nt.noteAlign,n.textMargin=Nt.noteMargin,n.valign="center",f(n.text)?await J(a,n):Q(a,n)),Math.round(a.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e))));i.attr("height",n+2*Nt.noteMargin),r.height+=n+2*Nt.noteMargin,At.bumpVerticalPos(n+2*Nt.noteMargin),r.stopy=r.starty+n+2*Nt.noteMargin,r.stopx=r.startx+s.width,At.insert(r.startx,r.starty,r.stopx,r.stopy),At.models.addNote(r)}),"drawNote"),Ot=n((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),St=n((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),Dt=n((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function Rt(t,e){At.bumpVerticalPos(10);var{startx:a,stopx:r,message:s}=e,i=E.splitBreaks(s).length,n=f(s),s=n?await w(s,g()):I.calculateTextDimensions(s,Ot(Nt));n||(n=s.height/i,e.height+=n,At.bumpVerticalPos(n));let o,c=s.height-10;return i=s.width,a===r?(o=At.getVerticalPos()+c,Nt.rightAngles||(c+=Nt.boxMargin,o=At.getVerticalPos()+c),c+=30,n=E.getMax(i/2,Nt.width/2),At.insert(a-n,At.getVerticalPos()-10+c,r+n,At.getVerticalPos()+30+c)):(c+=Nt.boxMargin,o=At.getVerticalPos()+c,At.insert(a,o-10,r,o)),At.bumpVerticalPos(c),e.height+=c,e.stopy=e.starty+e.height,At.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}n(Rt,"boundMessage");var Ct=n((async function(t,a,r,s){var{startx:a,stopx:i,starty:n,message:o,type:c,sequenceIndex:h,sequenceVisible:l}=a,d=I.calculateTextDimensions(o,Ot(Nt)),p=e(),n=(p.x=a,p.y=n+10,p.width=i-a,p.class="messageText",p.dy="1em",p.text=o,p.fontFamily=Nt.messageFontFamily,p.fontSize=Nt.messageFontSize,p.fontWeight=Nt.messageFontWeight,p.anchor=Nt.messageAlign,p.valign="center",p.textMargin=Nt.wrapPadding,p.tspan=!1,f(p.text)?await J(t,p,{startx:a,stopx:i,starty:r}):Q(t,p),d.width);let g,u=(a===i?g=Nt.rightAngles?t.append("path").attr("d",`M ${a},${r} H ${a+E.getMax(Nt.width/2,n/2)} V ${r+25} H `+a):t.append("path").attr("d","M "+a+","+r+" C "+(a+60)+","+(r-10)+" "+(a+60)+","+(r+30)+" "+a+","+(r+20)):((g=t.append("line")).attr("x1",a),g.attr("y1",r),g.attr("x2",i),g.attr("y2",r)),c===s.db.LINETYPE.DOTTED||c===s.db.LINETYPE.DOTTED_CROSS||c===s.db.LINETYPE.DOTTED_POINT||c===s.db.LINETYPE.DOTTED_OPEN||c===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0"),"");Nt.arrowMarkerAbsolute&&(u=_(!0)),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),c!==s.db.LINETYPE.SOLID&&c!==s.db.LINETYPE.DOTTED||g.attr("marker-end","url("+u+"#arrowhead)"),c!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&c!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(g.attr("marker-start","url("+u+"#arrowhead)"),g.attr("marker-end","url("+u+"#arrowhead)")),c!==s.db.LINETYPE.SOLID_POINT&&c!==s.db.LINETYPE.DOTTED_POINT||g.attr("marker-end","url("+u+"#filled-head)"),c!==s.db.LINETYPE.SOLID_CROSS&&c!==s.db.LINETYPE.DOTTED_CROSS||g.attr("marker-end","url("+u+"#crosshead)"),(l||Nt.showSequenceNumbers)&&(c!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&c!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(a<i?g.attr("x1",a+12):g.attr("x1",a+6)),t.append("line").attr("x1",a).attr("y1",r).attr("x2",a).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+u+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))}),"drawMessage"),$t=n((function(t,e,a,r,s,i,n){let o,c=0,h=0,l=0;for(const t of r){var d=e.get(t),p=d.box;o&&o!=p&&(n||At.models.addBox(o),h+=Nt.boxMargin+o.margin),p&&p!=o&&(n||(p.x=c+h,p.y=s),h+=p.margin),d.width=d.width||Nt.width,d.height=E.getMax(d.height||Nt.height,Nt.height),d.margin=d.margin||Nt.actorMargin,l=E.getMax(l,d.height),a.get(d.name)&&(h+=d.width/2),d.x=c+h,d.starty=At.getVerticalPos(),At.insert(d.x,s,d.x+d.width,d.height),c+=d.width+h,d.box&&(d.box.width=c+p.margin-d.box.x),h=d.margin,o=d.box,At.models.addActor(d)}o&&!n&&At.models.addBox(o),At.bumpVerticalPos(l)}),"addActorRenderingData"),Bt=n((async function(t,e,a,r){if(r){let r=0;At.bumpVerticalPos(2*Nt.boxMargin);for(const i of a){var s=((s=e.get(i)).stopy||(s.stopy=At.getVerticalPos()),await _t.drawActor(t,s,Nt,!0));r=E.getMax(r,s)}At.bumpVerticalPos(r+Nt.boxMargin)}else for(const r of a){var i=e.get(r);await _t.drawActor(t,i,Nt,!1)}}),"drawActors"),Yt=n((function(t,e,a,r){let s=0,i=0;for(const c of a){var n=e.get(c),o=Ut(n);(o=_t.drawPopup(t,n,o,Nt,Nt.forceMenus,r)).height>s&&(s=o.height),o.width+n.x>i&&(i=o.width+n.x)}return{maxHeight:s,maxWidth:i}}),"drawActorsPopup"),Vt=n((function(t){L(Nt,t),t.fontFamily&&(Nt.actorFontFamily=Nt.noteFontFamily=Nt.messageFontFamily=t.fontFamily),t.fontSize&&(Nt.actorFontSize=Nt.noteFontSize=Nt.messageFontSize=t.fontSize),t.fontWeight&&(Nt.actorFontWeight=Nt.noteFontWeight=Nt.messageFontWeight=t.fontWeight)}),"setConf"),Ft=n((function(t){return At.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),Wt=n((function(t,e){return e=e.get(t),[(t=Ft(t)).reduce((function(t,e){return E.getMin(t,e.startx)}),e.x+e.width/2-1),t.reduce((function(t,e){return E.getMax(t,e.stopx)}),e.x+e.width/2+1)]}),"activationBounds");function qt(t,e,a,r,s){At.bumpVerticalPos(a);let i=r;e.id&&e.message&&t[e.id]&&(a=t[e.id].width,t=Ot(Nt),e.message=I.wrapLabel(`[${e.message}]`,a-2*Nt.wrapPadding,t),e.width=a,e.wrap=!0,a=I.calculateTextDimensions(e.message,t),i=r+(t=E.getMax(a.height,Nt.labelBoxHeight)),m.debug(t+" - "+e.message)),s(e),At.bumpVerticalPos(i)}function zt(t,e,a,r,s,i,o){function c(a,r){a.x<s.get(t.from).x?(At.insert(e.stopx-r,e.starty,e.startx,e.stopy+a.height/2+Nt.noteMargin),e.stopx=e.stopx+r):(At.insert(e.startx,e.starty,e.stopx+r,e.stopy+a.height/2+Nt.noteMargin),e.stopx=e.stopx-r)}function h(a,r){a.x<s.get(t.to).x?(At.insert(e.startx-r,e.starty,e.stopx,e.stopy+a.height/2+Nt.noteMargin),e.startx=e.startx+r):(At.insert(e.stopx,e.starty,e.startx+r,e.stopy+a.height/2+Nt.noteMargin),e.startx=e.startx-r)}n(c,"receiverAdjustment"),n(h,"senderAdjustment");var l=[Y,V,W,F];i.get(t.to)==r?(c(i=s.get(t.to),l.includes(i.type)?21:i.width/2+3),i.starty=a-i.height/2,At.bumpVerticalPos(i.height/2)):o.get(t.from)==r?(i=s.get(t.from),Nt.mirrorActors&&h(i,l.includes(i.type)?18:i.width/2),i.stopy=a-i.height/2,At.bumpVerticalPos(i.height/2)):o.get(t.to)==r&&(i=s.get(t.to),Nt.mirrorActors&&c(i,l.includes(i.type)?21:i.width/2+3),i.stopy=a-i.height/2,At.bumpVerticalPos(i.height/2))}n(qt,"adjustLoopHeightForWrap"),n(zt,"adjustCreatedDestroyedData");var Ht=n((async function(t,e,a,r){var{securityLevel:s,sequence:i}=g();let o;Nt=i,"sandbox"===s&&(o=v("#i"+e));i=v("sandbox"===s?o.nodes()[0].contentDocument.body:"body");var c="sandbox"===s?o.nodes()[0].contentDocument:document;At.init(),m.debug(r.db);const h="sandbox"===s?i.select(`[id="${e}"]`):v(`[id="${e}"]`);var l=r.db.getActors(),d=r.db.getCreatedActors(),p=r.db.getDestroyedActors(),s=r.db.getBoxes();let u=r.db.getActorKeys();var i=r.db.getMessages(),x=(e=r.db.getDiagramTitle(),r.db.hasAtLeastOneBox()),y=r.db.hasAtLeastOneBoxWithTitle(),b=await jt(l,i,r);if(Nt.height=await Gt(l,b,s),_t.insertComputerIcon(h),_t.insertDatabaseIcon(h),_t.insertClockIcon(h),x&&(At.bumpVerticalPos(Nt.boxMargin),y)&&At.bumpVerticalPos(s[0].textMaxHeight),!0===Nt.hideUnusedParticipants){const t=new Set;i.forEach((e=>{t.add(e.from),t.add(e.to)})),u=u.filter((e=>t.has(e)))}$t(h,l,d,u,0,i,!1);var T=await Zt(i,l,b,r);function E(t,e){var a=At.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),_t.drawActivation(h,a,e,Nt,Ft(t.from).length),At.insert(a.startx,e-10,a.stopx,e)}_t.insertArrowHead(h),_t.insertArrowCrossHead(h),_t.insertArrowFilledHead(h),_t.insertSequenceNumber(h),n(E,"activeEnd");let f=1,w=1;var I=[],L=[];let P=0;for(const e of i){let a,s,i;switch(e.type){case r.db.LINETYPE.NOTE:At.resetVerticalPos(),s=e.noteModel,await Mt(h,s);break;case r.db.LINETYPE.ACTIVE_START:At.newActivation(e,h,l);break;case r.db.LINETYPE.ACTIVE_END:E(e,At.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:qt(T,e,Nt.boxMargin,Nt.boxMargin+Nt.boxTextMargin,(t=>At.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:a=At.endLoop(),await _t.drawLoop(h,a,"loop",Nt),At.bumpVerticalPos(a.stopy-At.getVerticalPos()),At.models.addLoop(a);break;case r.db.LINETYPE.RECT_START:qt(T,e,Nt.boxMargin,Nt.boxMargin,(t=>At.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:a=At.endLoop(),L.push(a),At.models.addLoop(a),At.bumpVerticalPos(a.stopy-At.getVerticalPos());break;case r.db.LINETYPE.OPT_START:qt(T,e,Nt.boxMargin,Nt.boxMargin+Nt.boxTextMargin,(t=>At.newLoop(t)));break;case r.db.LINETYPE.OPT_END:a=At.endLoop(),await _t.drawLoop(h,a,"opt",Nt),At.bumpVerticalPos(a.stopy-At.getVerticalPos()),At.models.addLoop(a);break;case r.db.LINETYPE.ALT_START:qt(T,e,Nt.boxMargin,Nt.boxMargin+Nt.boxTextMargin,(t=>At.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:qt(T,e,Nt.boxMargin+Nt.boxTextMargin,Nt.boxMargin,(t=>At.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:a=At.endLoop(),await _t.drawLoop(h,a,"alt",Nt),At.bumpVerticalPos(a.stopy-At.getVerticalPos()),At.models.addLoop(a);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:qt(T,e,Nt.boxMargin,Nt.boxMargin+Nt.boxTextMargin,(t=>At.newLoop(t))),At.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:qt(T,e,Nt.boxMargin+Nt.boxTextMargin,Nt.boxMargin,(t=>At.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:a=At.endLoop(),await _t.drawLoop(h,a,"par",Nt),At.bumpVerticalPos(a.stopy-At.getVerticalPos()),At.models.addLoop(a);break;case r.db.LINETYPE.AUTONUMBER:f=e.message.start||f,w=e.message.step||w,e.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:qt(T,e,Nt.boxMargin,Nt.boxMargin+Nt.boxTextMargin,(t=>At.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:qt(T,e,Nt.boxMargin+Nt.boxTextMargin,Nt.boxMargin,(t=>At.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:a=At.endLoop(),await _t.drawLoop(h,a,"critical",Nt),At.bumpVerticalPos(a.stopy-At.getVerticalPos()),At.models.addLoop(a);break;case r.db.LINETYPE.BREAK_START:qt(T,e,Nt.boxMargin,Nt.boxMargin+Nt.boxTextMargin,(t=>At.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:a=At.endLoop(),await _t.drawLoop(h,a,"break",Nt),At.bumpVerticalPos(a.stopy-At.getVerticalPos()),At.models.addLoop(a);break;default:try{(i=e.msgModel).starty=At.getVerticalPos(),i.sequenceIndex=f,i.sequenceVisible=r.db.showSequenceNumbers();var _=await Rt(0,i);zt(e,i,_,P,l,d,p),I.push({messageModel:i,lineStartY:_}),At.models.addMessage(i)}catch(t){m.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(f+=w),P++}m.debug("createdActors",d),m.debug("destroyedActors",p),await Bt(h,l,u,!1);for(const t of I)await Ct(h,t.messageModel,t.lineStartY,r);Nt.mirrorActors&&await Bt(h,l,u,!0),L.forEach((t=>_t.drawBackgroundRect(h,t))),at(h,l,u,Nt);for(const t of At.models.boxes){t.height=At.getVerticalPos()-t.y,At.insert(t.x,t.y,t.x+t.width,t.height);var N=2*Nt.boxMargin;t.startx=t.x-N,t.starty=t.y-.25*N,t.stopx=t.startx+t.width+2*N,t.stopy=t.starty+t.height+.75*N,t.stroke="rgb(0,0,0, 0.5)",_t.drawBox(h,t,Nt)}x&&At.bumpVerticalPos(Nt.boxMargin),y=Yt(h,l,u,c),void 0===(s=At.getBounds().bounds).startx&&(s.startx=0),void 0===s.starty&&(s.starty=0),void 0===s.stopx&&(s.stopx=0),void 0===s.stopy&&(s.stopy=0);let A=s.stopy-s.starty,M=(A=A<y.maxHeight?y.maxHeight:A)+2*Nt.diagramMarginY,O=(Nt.mirrorActors&&(M=M-Nt.boxMargin+Nt.bottomMarginAdj),s.stopx-s.startx);b=(O=O<y.maxWidth?y.maxWidth:O)+2*Nt.diagramMarginX,e&&h.append("text").text(e).attr("x",(s.stopx-s.startx)/2-2*Nt.diagramMarginX).attr("y",-25),k(h,M,b,Nt.useMaxWidth),i=e?40:0,h.attr("viewBox",s.startx-Nt.diagramMarginX+" -"+(Nt.diagramMarginY+i)+" "+b+" "+(M+i)),m.debug("models:",At.models)}),"draw");async function jt(t,e,a){var r,s,i,n,o={};for(const c of e)t.get(c.to)&&t.get(c.from)&&(r=t.get(c.to),c.placement===a.db.PLACEMENT.LEFTOF&&!r.prevActor||c.placement===a.db.PLACEMENT.RIGHTOF&&!r.nextActor||(s=!(i=void 0!==c.placement),i=(i?St:Ot)(Nt),n=c.wrap?I.wrapLabel(c.message,Nt.width-2*Nt.wrapPadding,i):c.message,n=(f(n)?await w(c.message,g()):I.calculateTextDimensions(n,i)).width+2*Nt.wrapPadding,s&&c.from===r.nextActor?o[c.to]=E.getMax(o[c.to]||0,n):s&&c.from===r.prevActor?o[c.from]=E.getMax(o[c.from]||0,n):s&&c.from===c.to?(o[c.from]=E.getMax(o[c.from]||0,n/2),o[c.to]=E.getMax(o[c.to]||0,n/2)):c.placement===a.db.PLACEMENT.RIGHTOF?o[c.from]=E.getMax(o[c.from]||0,n):c.placement===a.db.PLACEMENT.LEFTOF?o[r.prevActor]=E.getMax(o[r.prevActor]||0,n):c.placement===a.db.PLACEMENT.OVER&&(r.prevActor&&(o[r.prevActor]=E.getMax(o[r.prevActor]||0,n/2)),r.nextActor)&&(o[c.from]=E.getMax(o[c.from]||0,n/2))));return m.debug("maxMessageWidthPerActor:",o),o}n(jt,"getMaxMessageWidthPerActor");var Ut=n((function(t){let e=0;var a=Dt(Nt);for(const s in t.links){var r=I.calculateTextDimensions(s,a).width+2*Nt.wrapPadding+2*Nt.boxMargin;e<r&&(e=r)}return e}),"getRequiredPopupWidth");async function Gt(t,e,a){let r=0;for(const e of t.keys()){var s=t.get(e),i=(s.wrap&&(s.description=I.wrapLabel(s.description,Nt.width-2*Nt.wrapPadding,Dt(Nt))),f(s.description)?await w(s.description,g()):I.calculateTextDimensions(s.description,Dt(Nt)));s.width=s.wrap?Nt.width:E.getMax(Nt.width,i.width+2*Nt.wrapPadding),s.height=s.wrap?E.getMax(i.height,Nt.height):Nt.height,r=E.getMax(r,s.height)}for(const a in e){var n,o=t.get(a);o&&((n=t.get(o.nextActor))?(n=e[a]+Nt.actorMargin-o.width/2-n.width/2,o.margin=E.getMax(n,Nt.actorMargin)):(n=e[a]+Nt.actorMargin-o.width/2,o.margin=E.getMax(n,Nt.actorMargin)))}let c=0;return a.forEach((e=>{var a=Ot(Nt),r=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);r=r+8*Nt.boxMargin-2*Nt.boxTextMargin,e.wrap&&(e.name=I.wrapLabel(e.name,r-2*Nt.wrapPadding,a)),a=I.calculateTextDimensions(e.name,a),c=E.getMax(a.height,c),a=E.getMax(r,a.width+2*Nt.wrapPadding);e.margin=Nt.boxTextMargin,r<a&&(e.margin+=(a-r)/2)})),a.forEach((t=>t.textMaxHeight=c)),E.getMax(r,Nt.height)}n(Gt,"calculateActorMargins");var Kt=n((async function(t,e,a){var r=e.get(t.from),s=(e=e.get(t.to),r.x),i=e.x,n=t.wrap&&t.message,o=f(t.message)?await w(t.message,g()):I.calculateTextDimensions(n?I.wrapLabel(t.message,Nt.width,St(Nt)):t.message,St(Nt)),c={width:n?Nt.width:E.getMax(Nt.width,o.width+2*Nt.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(c.width=n?E.getMax(Nt.width,o.width):E.getMax(r.width/2+e.width/2,o.width+2*Nt.noteMargin),c.startx=s+(r.width+Nt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(c.width=n?E.getMax(Nt.width,o.width+2*Nt.noteMargin):E.getMax(r.width/2+e.width/2,o.width+2*Nt.noteMargin),c.startx=s-c.width+(r.width-Nt.actorMargin)/2):t.to===t.from?(o=I.calculateTextDimensions(n?I.wrapLabel(t.message,E.getMax(Nt.width,r.width),St(Nt)):t.message,St(Nt)),c.width=n?E.getMax(Nt.width,r.width):E.getMax(r.width,Nt.width,o.width+2*Nt.noteMargin),c.startx=s+(r.width-c.width)/2):(c.width=Math.abs(s+r.width/2-(i+e.width/2))+Nt.actorMargin,c.startx=s<i?s+r.width/2-Nt.actorMargin/2:i+e.width/2-Nt.actorMargin/2),n&&(c.message=I.wrapLabel(t.message,c.width-2*Nt.wrapPadding,St(Nt))),m.debug(`NM:[${c.startx},${c.stopx},${c.starty},${c.stopy}:${c.width},${c.height}=${t.message}]`),c}),"buildNoteModel"),Xt=n((function(t,e,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};var[r,s]=Wt(t.from,e),[e,i]=Wt(t.to,e);const o=r<=e;let c=o?s:r,h=o?e:i;var l=2<Math.abs(e-i),d=n((t=>o?-t:t),"adjustValue");t.from===t.to?h=c:(t.activate&&!l&&(h+=d(Nt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=d(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(c-=d(3))),l=[r,s,e,i],a=Math.abs(c-h),t.wrap&&t.message&&(t.message=I.wrapLabel(t.message,E.getMax(a+2*Nt.wrapPadding,Nt.width),Ot(Nt))),d=I.calculateTextDimensions(t.message,Ot(Nt));return{width:E.getMax(t.wrap?0:d.width+2*Nt.wrapPadding,a+2*Nt.wrapPadding,Nt.width),height:0,startx:c,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}}),"buildMessageModel"),Zt=n((async function(t,e,a,r){var s={},i=[];let n,o,c;for(const a of t){switch(a.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:a.message&&(s[(n=i.pop()).id]=n,s[a.id]=n,i.push(n));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s[(n=i.pop()).id]=n;break;case r.db.LINETYPE.ACTIVE_START:var h=e.get(a.from||a.to.actor),l=Ft(a.from||a.to.actor).length;l={startx:h=h.x+h.width/2+(l-1)*Nt.activationWidth/2,stopx:h+Nt.activationWidth,actor:a.from,enabled:!0};At.activations.push(l);break;case r.db.LINETYPE.ACTIVE_END:h=At.activations.map((t=>t.actor)).lastIndexOf(a.from),At.activations.splice(h,1).splice(0,1)}void 0!==a.placement?(o=await Kt(a,e,r),a.noteModel=o,i.forEach((t=>{(n=t).from=E.getMin(n.from,o.startx),n.to=E.getMax(n.to,o.startx+o.width),n.width=E.getMax(n.width,Math.abs(n.from-n.to))-Nt.labelBoxWidth}))):(c=Xt(a,e,r),(a.msgModel=c).startx&&c.stopx&&0<i.length&&i.forEach((t=>{var r;n=t,c.startx===c.stopx?(t=e.get(a.from),r=e.get(a.to),n.from=E.getMin(t.x-c.width/2,t.x-t.width/2,n.from),n.to=E.getMax(r.x+c.width/2,r.x+t.width/2,n.to),n.width=E.getMax(n.width,Math.abs(n.to-n.from))-Nt.labelBoxWidth):(n.from=E.getMin(c.startx,n.from),n.to=E.getMax(c.stopx,n.to),n.width=E.getMax(n.width,c.width)-Nt.labelBoxWidth)})))}return At.activations=[],m.debug("Loop type widths:",s),s}),"calculateLoopBounds"),Jt={parser:R,get db(){return new q},renderer:{bounds:At,drawActors:Bt,drawActorsPopup:Yt,setConf:Vt,draw:Ht},styles:z,init:n((t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,T({sequence:{wrap:t.wrap}}))}),"init")};export{Jt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,S as e,a}from"./chunk-DI55MBZ5-95d71f6f.js";import{_ as r,d as i,j as d,l as n,k as s,e as o,R as g,S as p,N as h,u as l}from"./web-0016ac81.js";import{G as c}from"./graph-db4953aa.js";import{l as x}from"./layout-40652dba.js";import"./chunk-55IACEB6-5a7b1be3.js";import"./chunk-QN33PNHL-b00655c9.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";var u,f=r((t=>t.append("circle").attr("class","start-state").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit).attr("cy",i().state.padding+i().state.sizeUnit)),"drawStartState"),y=r((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",i().state.textHeight).attr("class","divider").attr("x2",2*i().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),w=r(((t,e)=>{var a=(e=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+2*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",a.width+2*i().state.padding).attr("height",a.height+2*i().state.padding).attr("rx",i().state.radius),e}),"drawSimpleState"),m=r(((t,e)=>{const a=r((function(t,e,a){t=t.append("tspan").attr("x",2*i().state.padding).text(e),a||t.attr("dy",i().state.textHeight)}),"addTspan");var d=(p=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+1.3*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox()).height;const n=t.append("text").attr("x",i().state.padding).attr("y",d+.4*i().state.padding+i().state.dividerMargin+i().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(n,t,o),o=!1),s=!1}));e=t.append("line").attr("x1",i().state.padding).attr("y1",i().state.padding+d+i().state.dividerMargin/2).attr("y2",i().state.padding+d+i().state.dividerMargin/2).attr("class","descr-divider");var g=n.node().getBBox(),p=Math.max(g.width,p.width);return e.attr("x2",p+3*i().state.padding),t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",p+2*i().state.padding).attr("height",g.height+d+2*i().state.padding).attr("rx",i().state.radius),t}),"drawDescrState"),b=r(((t,e,a)=>{var r=i().state.padding,d=2*i().state.padding,n=(s=t.node().getBBox()).width,s=s.x,o=t.append("text").attr("x",0).attr("y",i().state.titleShift).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id),g=o.node().getBBox().width+d;let p,h=Math.max(g,n);h===n&&(h+=d);var l=t.node().getBBox();e.doc,p=s-r,n<g&&(p=(n-h)/2+r),Math.abs(s-l.x)<r&&n<g&&(p=s-(g-n)/2),e=1-i().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",e).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+i().state.textHeight+i().state.titleShift+1).attr("rx","0"),o.attr("x",p+r),g<=n&&o.attr("x",s+(h-d)/2-g/2+r),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",3*i().state.textHeight).attr("rx",i().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",l.height+3+2*i().state.textHeight).attr("rx",i().state.radius),t}),"addTitleAndBox"),B=r((t=>(t.append("circle").attr("class","end-state-outer").attr("r",i().state.sizeUnit+i().state.miniPadding).attr("cx",i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr("cy",i().state.padding+i().state.sizeUnit+i().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit+2).attr("cy",i().state.padding+i().state.sizeUnit+2))),"drawEndState"),v=r(((t,e)=>{let a=i().state.forkWidth,r=i().state.forkHeight;return e.parentId&&(e=a,a=r,r=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",r).attr("x",i().state.padding).attr("y",i().state.padding)}),"drawForkJoinState"),k=r(((t,e,a,r)=>{let d=0;var n=r.append("text");n.style("text-anchor","start"),n.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");r=(s=s.replace(/\n/g,"<br/>")).split(o.lineBreakRegex);let g=1.25*i().state.noteMargin;for(const t of r){var p,h=t.trim();0<h.length&&((p=n.append("tspan")).text(h),0===g&&(g+=(h=p.node().getBBox()).height),d+=g,p.attr("x",e+i().state.noteMargin),p.attr("y",a+d+1.25*i().state.noteMargin))}return{textWidth:n.node().getBBox().width,textHeight:d}}),"_drawLongText"),N=r(((t,e)=>{e.attr("class","state-note");var a=e.append("rect").attr("x",0).attr("y",i().state.padding),{textWidth:t,textHeight:e}=(e=e.append("g"),k(t,0,0,e));return a.attr("height",e+2*i().state.noteMargin),a.attr("width",t+2*i().state.noteMargin),a}),"drawNote"),S=r((function(t,e){var a={id:r=e.id,label:e.id,width:0,height:0},r=(t=t.append("g").attr("id",r).attr("class","stateGroup"),"start"===e.type&&f(t),"end"===e.type&&B(t),"fork"!==e.type&&"join"!==e.type||v(t,e),"note"===e.type&&N(e.note.text,t),"divider"===e.type&&y(t),"default"===e.type&&0===e.descriptions.length&&w(t,e),"default"===e.type&&0<e.descriptions.length&&m(t,e),t.node().getBBox());return a.width=r.width+2*i().state.padding,a.height=r.height+2*i().state.padding,a}),"drawState"),E=0,M=r((function(t,a,d){var s=r((function(t){switch(t){case e.relationType.AGGREGATION:return"aggregation";case e.relationType.EXTENSION:return"extension";case e.relationType.COMPOSITION:return"composition";case e.relationType.DEPENDENCY:return"dependency"}}),"getRelationType"),c=(a.points=a.points.filter((t=>!Number.isNaN(t.y))),a.points),x=g().x((function(t){return t.x})).y((function(t){return t.y})).curve(p);x=t.append("path").attr("d",x(c)).attr("id","edge"+E).attr("class","transition");let u="";if(i().state.arrowMarkerAbsolute&&(u=h(!0)),x.attr("marker-end","url("+u+"#"+s(e.relationType.DEPENDENCY)+"End)"),void 0!==d.title){var f=t.append("g").attr("class","stateLabel");const{x:e,y:r}=l.calcLabelPosition(a.points);var y=o.getRows(d.title);let s=0;var w=[];let g=0,p=0;for(let t=0;t<=y.length;t++){var m=f.append("text").attr("text-anchor","middle").text(y[t]).attr("x",e).attr("y",r+s),b=m.node().getBBox();g=Math.max(g,b.width),p=Math.min(p,b.x),n.info(b.x,e,r+s),0===s&&(b=m.node().getBBox(),s=b.height,n.info("Title height",s,r)),w.push(m)}let h=s*y.length;if(1<y.length){const t=(y.length-1)*s*.5;w.forEach(((e,a)=>e.attr("y",r+a*s-t))),h=s*y.length}c=f.node().getBBox(),f.insert("rect",":first-child").attr("class","box").attr("x",e-g/2-i().state.padding/2).attr("y",r-h/2-i().state.padding/2-3.5).attr("width",g+i().state.padding).attr("height",h+i().state.padding),n.info(c)}E++}),"drawEdge"),z={},H=r((function(){}),"setConf"),T=r((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),D=r((function(t,e,a,r){let o;u=i().state,"sandbox"===(p=i().securityLevel)&&(o=d("#i"+e));var g=d("sandbox"===p?o.nodes()[0].contentDocument.body:"body"),p="sandbox"===p?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t),t=g.select(`[id='${e}']`),T(t),e=r.db.getRootDoc(),A(e,t,void 0,!1,g,p,r),e=u.padding,p=(g=t.node().getBBox()).width+2*e,r=g.height+2*e;s(t,r,1.75*p,u.useMaxWidth),t.attr("viewBox",`${g.x-u.padding} ${g.y-u.padding} `+p+" "+r)}),"draw"),L=r((t=>t?t.length*u.fontSizeFactor:1),"getLabelWidth"),A=r(((t,e,a,r,i,d,s)=>{const g=new c({compound:!0,multigraph:!0});let p,h=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){h=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));var l=s.db.getStates(),f=s.db.getRelations();for(const t of Object.keys(l)){var y,w,m=l[t];let n;a&&(m.parentId=a),m.doc?(y=e.append("g").attr("id",m.id).attr("class","stateGroup"),n=A(m.doc,y,m.id,!r,i,d,s),y=(y=b(y,m,r)).node().getBBox(),n.width=y.width,n.height=y.height+u.padding/2,z[m.id]={y:u.compositTitleSize}):n=S(e,m,g),m.note?(y={descriptions:[],id:m.id+"-note",note:m.note,type:"note"},w=S(e,y,g),"left of"===m.note.position?(g.setNode(n.id+"-note",w),g.setNode(n.id,n)):(g.setNode(n.id,n),g.setNode(n.id+"-note",w)),g.setParent(n.id,n.id+"-group"),g.setParent(n.id+"-note",n.id+"-group")):g.setNode(n.id,n)}n.debug("Count=",g.nodeCount(),g);let B=0;f.forEach((function(t){B++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:L(t.title),height:u.labelHeight*o.getRows(t.title).length,labelpos:"c"},"id"+B)})),x(g),n.debug("Graph after layout",g.nodes());const v=e.node();g.nodes().forEach((function(t){void 0!==t&&void 0!==g.node(t)?(n.warn("Node "+t+": "+JSON.stringify(g.node(t))),i.select("#"+v.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(z[t]?z[t].y:0)-g.node(t).height/2)+" )"),i.select("#"+v.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2),d.querySelectorAll("#"+v.id+" #"+t+" .divider").forEach((t=>{var e=t.parentElement;let a=0,r=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r))&&(r=0),t.setAttribute("x1",0-r+8),t.setAttribute("x2",a-r-8)}))):n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))})),v.getBBox(),g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),M(e,g.edge(t),g.edge(t).relation))})),f=v.getBBox();var k={id:a||"root",label:a||"root",width:0,height:0};return k.width=f.width+2*u.padding,k.height=f.height+2*u.padding,n.debug("Doc rendered",k,g),k}),"renderDoc"),j={parser:t,get db(){return new e(1)},renderer:{setConf:H,draw:D},styles:a,init:r((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{j as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,S as e,a}from"./chunk-DI55MBZ5-5dc4f926.js";import{_ as r,d as i,j as d,l as n,k as s,e as o,R as g,S as p,N as h,u as l}from"./web-4e6d8ea9.js";import{G as c}from"./graph-834f6046.js";import{l as x}from"./layout-54ffc604.js";import"./chunk-55IACEB6-78729976.js";import"./chunk-QN33PNHL-0bf10733.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";var u,f=r((t=>t.append("circle").attr("class","start-state").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit).attr("cy",i().state.padding+i().state.sizeUnit)),"drawStartState"),y=r((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",i().state.textHeight).attr("class","divider").attr("x2",2*i().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),w=r(((t,e)=>{var a=(e=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+2*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",a.width+2*i().state.padding).attr("height",a.height+2*i().state.padding).attr("rx",i().state.radius),e}),"drawSimpleState"),m=r(((t,e)=>{const a=r((function(t,e,a){t=t.append("tspan").attr("x",2*i().state.padding).text(e),a||t.attr("dy",i().state.textHeight)}),"addTspan");var d=(p=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+1.3*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox()).height;const n=t.append("text").attr("x",i().state.padding).attr("y",d+.4*i().state.padding+i().state.dividerMargin+i().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(n,t,o),o=!1),s=!1}));e=t.append("line").attr("x1",i().state.padding).attr("y1",i().state.padding+d+i().state.dividerMargin/2).attr("y2",i().state.padding+d+i().state.dividerMargin/2).attr("class","descr-divider");var g=n.node().getBBox(),p=Math.max(g.width,p.width);return e.attr("x2",p+3*i().state.padding),t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",p+2*i().state.padding).attr("height",g.height+d+2*i().state.padding).attr("rx",i().state.radius),t}),"drawDescrState"),b=r(((t,e,a)=>{var r=i().state.padding,d=2*i().state.padding,n=(s=t.node().getBBox()).width,s=s.x,o=t.append("text").attr("x",0).attr("y",i().state.titleShift).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id),g=o.node().getBBox().width+d;let p,h=Math.max(g,n);h===n&&(h+=d);var l=t.node().getBBox();e.doc,p=s-r,n<g&&(p=(n-h)/2+r),Math.abs(s-l.x)<r&&n<g&&(p=s-(g-n)/2),e=1-i().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",e).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+i().state.textHeight+i().state.titleShift+1).attr("rx","0"),o.attr("x",p+r),g<=n&&o.attr("x",s+(h-d)/2-g/2+r),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",3*i().state.textHeight).attr("rx",i().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",l.height+3+2*i().state.textHeight).attr("rx",i().state.radius),t}),"addTitleAndBox"),B=r((t=>(t.append("circle").attr("class","end-state-outer").attr("r",i().state.sizeUnit+i().state.miniPadding).attr("cx",i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr("cy",i().state.padding+i().state.sizeUnit+i().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit+2).attr("cy",i().state.padding+i().state.sizeUnit+2))),"drawEndState"),v=r(((t,e)=>{let a=i().state.forkWidth,r=i().state.forkHeight;return e.parentId&&(e=a,a=r,r=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",r).attr("x",i().state.padding).attr("y",i().state.padding)}),"drawForkJoinState"),k=r(((t,e,a,r)=>{let d=0;var n=r.append("text");n.style("text-anchor","start"),n.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");r=(s=s.replace(/\n/g,"<br/>")).split(o.lineBreakRegex);let g=1.25*i().state.noteMargin;for(const t of r){var p,h=t.trim();0<h.length&&((p=n.append("tspan")).text(h),0===g&&(g+=(h=p.node().getBBox()).height),d+=g,p.attr("x",e+i().state.noteMargin),p.attr("y",a+d+1.25*i().state.noteMargin))}return{textWidth:n.node().getBBox().width,textHeight:d}}),"_drawLongText"),N=r(((t,e)=>{e.attr("class","state-note");var a=e.append("rect").attr("x",0).attr("y",i().state.padding),{textWidth:t,textHeight:e}=(e=e.append("g"),k(t,0,0,e));return a.attr("height",e+2*i().state.noteMargin),a.attr("width",t+2*i().state.noteMargin),a}),"drawNote"),S=r((function(t,e){var a={id:r=e.id,label:e.id,width:0,height:0},r=(t=t.append("g").attr("id",r).attr("class","stateGroup"),"start"===e.type&&f(t),"end"===e.type&&B(t),"fork"!==e.type&&"join"!==e.type||v(t,e),"note"===e.type&&N(e.note.text,t),"divider"===e.type&&y(t),"default"===e.type&&0===e.descriptions.length&&w(t,e),"default"===e.type&&0<e.descriptions.length&&m(t,e),t.node().getBBox());return a.width=r.width+2*i().state.padding,a.height=r.height+2*i().state.padding,a}),"drawState"),E=0,M=r((function(t,a,d){var s=r((function(t){switch(t){case e.relationType.AGGREGATION:return"aggregation";case e.relationType.EXTENSION:return"extension";case e.relationType.COMPOSITION:return"composition";case e.relationType.DEPENDENCY:return"dependency"}}),"getRelationType"),c=(a.points=a.points.filter((t=>!Number.isNaN(t.y))),a.points),x=g().x((function(t){return t.x})).y((function(t){return t.y})).curve(p);x=t.append("path").attr("d",x(c)).attr("id","edge"+E).attr("class","transition");let u="";if(i().state.arrowMarkerAbsolute&&(u=h(!0)),x.attr("marker-end","url("+u+"#"+s(e.relationType.DEPENDENCY)+"End)"),void 0!==d.title){var f=t.append("g").attr("class","stateLabel");const{x:e,y:r}=l.calcLabelPosition(a.points);var y=o.getRows(d.title);let s=0;var w=[];let g=0,p=0;for(let t=0;t<=y.length;t++){var m=f.append("text").attr("text-anchor","middle").text(y[t]).attr("x",e).attr("y",r+s),b=m.node().getBBox();g=Math.max(g,b.width),p=Math.min(p,b.x),n.info(b.x,e,r+s),0===s&&(b=m.node().getBBox(),s=b.height,n.info("Title height",s,r)),w.push(m)}let h=s*y.length;if(1<y.length){const t=(y.length-1)*s*.5;w.forEach(((e,a)=>e.attr("y",r+a*s-t))),h=s*y.length}c=f.node().getBBox(),f.insert("rect",":first-child").attr("class","box").attr("x",e-g/2-i().state.padding/2).attr("y",r-h/2-i().state.padding/2-3.5).attr("width",g+i().state.padding).attr("height",h+i().state.padding),n.info(c)}E++}),"drawEdge"),z={},H=r((function(){}),"setConf"),T=r((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),D=r((function(t,e,a,r){let o;u=i().state,"sandbox"===(p=i().securityLevel)&&(o=d("#i"+e));var g=d("sandbox"===p?o.nodes()[0].contentDocument.body:"body"),p="sandbox"===p?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t),t=g.select(`[id='${e}']`),T(t),e=r.db.getRootDoc(),A(e,t,void 0,!1,g,p,r),e=u.padding,p=(g=t.node().getBBox()).width+2*e,r=g.height+2*e;s(t,r,1.75*p,u.useMaxWidth),t.attr("viewBox",`${g.x-u.padding} ${g.y-u.padding} `+p+" "+r)}),"draw"),L=r((t=>t?t.length*u.fontSizeFactor:1),"getLabelWidth"),A=r(((t,e,a,r,i,d,s)=>{const g=new c({compound:!0,multigraph:!0});let p,h=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){h=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));var l=s.db.getStates(),f=s.db.getRelations();for(const t of Object.keys(l)){var y,w,m=l[t];let n;a&&(m.parentId=a),m.doc?(y=e.append("g").attr("id",m.id).attr("class","stateGroup"),n=A(m.doc,y,m.id,!r,i,d,s),y=(y=b(y,m,r)).node().getBBox(),n.width=y.width,n.height=y.height+u.padding/2,z[m.id]={y:u.compositTitleSize}):n=S(e,m,g),m.note?(y={descriptions:[],id:m.id+"-note",note:m.note,type:"note"},w=S(e,y,g),"left of"===m.note.position?(g.setNode(n.id+"-note",w),g.setNode(n.id,n)):(g.setNode(n.id,n),g.setNode(n.id+"-note",w)),g.setParent(n.id,n.id+"-group"),g.setParent(n.id+"-note",n.id+"-group")):g.setNode(n.id,n)}n.debug("Count=",g.nodeCount(),g);let B=0;f.forEach((function(t){B++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:L(t.title),height:u.labelHeight*o.getRows(t.title).length,labelpos:"c"},"id"+B)})),x(g),n.debug("Graph after layout",g.nodes());const v=e.node();g.nodes().forEach((function(t){void 0!==t&&void 0!==g.node(t)?(n.warn("Node "+t+": "+JSON.stringify(g.node(t))),i.select("#"+v.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(z[t]?z[t].y:0)-g.node(t).height/2)+" )"),i.select("#"+v.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2),d.querySelectorAll("#"+v.id+" #"+t+" .divider").forEach((t=>{var e=t.parentElement;let a=0,r=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r))&&(r=0),t.setAttribute("x1",0-r+8),t.setAttribute("x2",a-r-8)}))):n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))})),v.getBBox(),g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),M(e,g.edge(t),g.edge(t).relation))})),f=v.getBBox();var k={id:a||"root",label:a||"root",width:0,height:0};return k.width=f.width+2*u.padding,k.height=f.height+2*u.padding,n.debug("Doc rendered",k,g),k}),"renderDoc"),j={parser:t,get db(){return new e(1)},renderer:{setConf:H,draw:D},styles:a,init:r((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{j as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,S as s,b as t,a as e}from"./chunk-DI55MBZ5-5dc4f926.js";import{_ as a}from"./web-4e6d8ea9.js";import"./chunk-55IACEB6-78729976.js";import"./chunk-QN33PNHL-0bf10733.js";var o={parser:r,get db(){return new s(2)},renderer:t,styles:e,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{o as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,S as s,b as t,a as e}from"./chunk-DI55MBZ5-95d71f6f.js";import{_ as a}from"./web-0016ac81.js";import"./chunk-55IACEB6-5a7b1be3.js";import"./chunk-QN33PNHL-b00655c9.js";var o={parser:r,get db(){return new s(2)},renderer:t,styles:e,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{o as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,B as e,V as n,t as i,j as r,d as a,l as s,W as o,X as l,Y as c,$ as h}from"./web-4e6d8ea9.js";import{d}from"./arc-8928af28.js";var u=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[6,8,10,11,12,14,16,17,20,21],i=[1,9],r=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17];i={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:t((function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:i.addTask(a[o],0,""),this.$=a[o];break;case 16:i.addEvent(a[o].substr(2)),this.$=a[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:18,11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,19]},{15:[1,20]},e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,4]),e(n,[2,9]),e(n,[2,10])],defaultActions:{},parseError:t((function(t,e){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:t((function(e){var n,i=this,r=[0],a=[],s=[null],o=[],l=this.table,c="",h=0,d=0,u=o.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(y.yy[n]=this.yy[n]);p.setInput(e,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc,f=(o.push(g),p.options&&p.options.ranges);function m(){var t=a.pop()||p.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){r.length=r.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),t(m,"lex");for(var x,b,k,_,v,w,S={};;){if(b=r[r.length-1],void 0===(k=this.defaultActions[b]||(null==x&&(x=m()),l[b]&&l[b][x]))||!k.length||!k[0]){var $,E=[];for(_ in l[b])this.terminals_[_]&&2<_&&E.push("'"+this.terminals_[_]+"'");$=p.showPosition?"Parse error on line "+(h+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError($,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:g,expected:E})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(k[0]){case 1:r.push(x),s.push(p.yytext),o.push(p.yylloc),r.push(k[1]),x=null,d=p.yyleng,c=p.yytext,h=p.yylineno,g=p.yylloc;break;case 2:if(v=this.productions_[k[1]][1],S.$=s[s.length-v],S._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},f&&(S._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,h,y.yy,k[1],s,o].concat(u))))return w;v&&(r=r.slice(0,-1*v*2),s=s.slice(0,-1*v),o=o.slice(0,-1*v)),r.push(this.productions_[k[1]][0]),s.push(S.$),o.push(S._$),w=l[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}),"parse")},r={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),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[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(20<t.length?"...":"")+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)+(20<t.length?"...":"")).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;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)),(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],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 i)this[r]=i[r];return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,r=this._currentRules(),a=0;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>e[0].length))if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,r[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 0<this.conditionStack.length-1?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]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:t((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||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: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 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/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],inclusive:!0}}};function h(){this.yy={}}return i.lexer=r,t(h,"Parser"),new((h.prototype=i).Parser=h)}(),p=u.parser=u,y={},g=(e(y,{addEvent:()=>E,addSection:()=>v,addTask:()=>$,addTaskOrg:()=>T,clear:()=>_,default:()=>M,getCommonDb:()=>k,getSections:()=>w,getTasks:()=>S}),""),f=0,m=[],x=[],b=[],k=t((()=>n),"getCommonDb"),_=t((function(){m.length=0,x.length=0,g="",b.length=0,i()}),"clear"),v=t((function(t){g=t,m.push(t)}),"addSection"),w=t((function(){return m}),"getSections"),S=t((function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return x.push(...b),x}),"getTasks"),$=t((function(t,e,n){t={id:f++,section:g,type:g,task:t,score:e||0,events:n?[n]:[]},b.push(t)}),"addTask"),E=t((function(t){b.find((t=>t.id===f-1)).events.push(t)}),"addEvent"),T=t((function(t){t={section:g,type:g,description:t,task:t,classes:[]},x.push(t)}),"addTaskOrg"),I=t((function(){var e,n,i=t((function(t){return b[t].processed}),"compileTask");let r=!0;for([e,n]of b.entries())i(e),r=r&&n.processed;return r}),"compileTasks"),M={clear:_,getCommonDb:k,addSection:v,getSections:w,getTasks:S,addTask:$,addTaskOrg:T,addEvent:E},N=t((function(t,e){return(t=t.append("rect")).attr("x",e.x),t.attr("y",e.y),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("width",e.width),t.attr("height",e.height),t.attr("rx",e.rx),t.attr("ry",e.ry),void 0!==e.class&&t.attr("class",e.class),t}),"drawRect"),A=t((function(e,n){var i=e.append("circle").attr("cx",n.cx).attr("cy",n.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function r(t){var e=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+n.cx+","+(n.cy+2)+")")}function a(t){var e=d().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",e).attr("transform","translate("+n.cx+","+(n.cy+7)+")")}function s(t){t.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=e.append("g")).append("circle").attr("cx",n.cx-5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",n.cx+5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t(r,"smile"),t(a,"sad"),t(s,"ambivalent"),(3<n.score?r:n.score<3?a:s)(e),i}),"drawFace"),C=t((function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t}),"drawCircle"),L=t((function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(n),t}),"drawText"),P=t((function(e,n){function i(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}t(i,"genPoints");var r=e.append("polygon");r.attr("points",i(n.x,n.y,50,20,7)),r.attr("class","labelBox"),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,L(e,n)}),"drawLabel"),H=t((function(t,e,n){t=t.append("g");var i=z();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),O=-1,j=t((function(t,e,n){var i=e.x+n.width/2;t=t.append("g");(i=(O++,t.append("line").attr("id","task"+O).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),A(t,{cx:i,cy:300+30*(5-e.score),score:e.score}),z())).x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="task task-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.task,t,i.x,i.y,i.width,i.height,{class:"task"},n,e.colour)}),"drawTask"),R=t((function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),D=t((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),z=t((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),B=function(){function e(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function n(t,e,n,i,a,s,o,l,c){var{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var p=t*h-h*(u.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(u[t]),y.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,o)}}function i(t,e,i,a,s,o,l,c){var h=(e=e.append("switch")).append("foreignObject").attr("x",i).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),n(t,e,i,a,s,o,l,c),r(h,l)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return t(e,"byText"),t(n,"byTspan"),t(i,"byFo"),t(r,"_setTextAttrs"),function(t){return"fo"===t.textPlacement?i:"old"===t.textPlacement?e:n}}(),F=t((function(t){t.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");function W(t,e){t.each((function(){var t,n=r(this),i=n.text().split(/(\s+|<br>)/).reverse(),a=[],s=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",o+"em");for(let r=0;r<i.length;r++)t=i[i.length-1-r],a.push(t),l.text(a.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(a.pop(),l.text(a.join(" ").trim()),a="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",s).attr("dy","1.1em").text(t))}))}t(W,"wrap");var V=t((function(t,e,n,i){n=n%12-1,t=t.append("g");var r=(e.section=n,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+n),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Y(r,e,n,i),e}),"drawNode"),G=t((function(t,e,n){var i=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox();n=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.remove(),i.height+1.1*n*.5+e.padding}),"getVirtualNodeHeight"),Y=t((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),q={drawRect:N,drawCircle:C,drawSection:H,drawText:L,drawLabel:P,drawTask:j,drawBackgroundRect:R,getTextObj:D,getNoteRect:z,initGraphics:F,drawNode:V,getVirtualNodeHeight:G},U=t((function(t,e,n,i){const l=a();var c=l.timeline?.leftMargin??50,h=(s.debug("timeline",i.db),l.securityLevel);let d;"sandbox"===h&&(d=r("#i"+e));const u=r("sandbox"===h?d.nodes()[0].contentDocument.body:"body").select("#"+e),p=(u.append("g"),i.db.getTasks());h=i.db.getCommonDb().getDiagramTitle(),s.debug("task",p),q.initGraphics(u),e=i.db.getSections(),s.debug("sections",e);let y=0,g=0;var f,m;let x,b=50+c,k=50,_=(x=50,0),v=!0,w=(e.forEach((function(t){t={number:_,descr:t,section:_,width:150,padding:20,maxHeight:y},t=q.getVirtualNodeHeight(u,t,l),s.debug("sectionHeight before draw",t),y=Math.max(y,t+20)})),0),S=0;for([f,m]of(s.debug("tasks.length",p.length),p.entries())){var $={number:f,descr:m,section:m.section,width:150,padding:20,maxHeight:g};$=q.getVirtualNodeHeight(u,$,l);s.debug("taskHeight before draw",$),g=Math.max(g,$+20),w=Math.max(w,m.events.length);let t=0;for(const e of m.events){var E={descr:e,section:m.section,number:m.section,width:150,padding:20,maxHeight:50};t+=q.getVirtualNodeHeight(u,E,l)}0<m.events.length&&(t+=10*(m.events.length-1)),S=Math.max(S,t)}s.debug("maxSectionHeight before draw",y),s.debug("maxTaskHeight before draw",g),e&&0<e.length?e.forEach((t=>{var e=p.filter((e=>e.section===t)),n={number:_,descr:t,section:_,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y},i=(s.debug("sectionNode",n),u.append("g"));n=q.drawNode(i,n,_,l);s.debug("sectionNode output",n),i.attr("transform",`translate(${b}, 50)`),k+=y+50,0<e.length&&X(u,e,_,b,k,g,l,w,S,y,!1),b+=200*Math.max(e.length,1),k=50,_++})):(v=!1,X(u,p,_,b,k,g,l,w,S,y,!0)),i=u.node().getBBox(),s.debug("bounds",i),h&&u.append("text").text(h).attr("x",i.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),e=v?y+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",e).attr("x2",i.width+3*c).attr("y2",e).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),o(void 0,u,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)}),"draw"),X=t((function(t,e,n,i,r,a,o,l,c,h,d){for(const l of e){var u={descr:l.task,section:n,number:n,width:150,padding:20,maxHeight:a},p=(s.debug("taskNode",u),t.append("g").attr("class","taskWrapper"));u=q.drawNode(p,u,n,o).height;s.debug("taskHeight after draw",u),p.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,u),l.events&&(p=t.append("g").attr("class","lineWrapper"),r+=100,Z(t,l.events,n,i,r,o),r-=100,p.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),i+=200,d&&!o.timeline?.disableMulticolor&&n++}}),"drawTasks"),Z=t((function(t,e,n,i,r,a){let o=0;var l=r;r+=100;for(const l of e){var c={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50},h=(s.debug("eventNode",c),t.append("g").attr("class","eventWrapper"));o+=c=q.drawNode(h,c,n,a).height,h.attr("transform",`translate(${i}, ${r})`),r=r+10+c}return r=l,o}),"drawEvents"),J={setConf:t((()=>{}),"setConf"),draw:U},K=t((t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],l(t["lineColor"+e])?t["lineColor"+e]=c(t["lineColor"+e],20):t["lineColor"+e]=h(t["lineColor"+e],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){var n=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${n};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e}),"genSections"),Q=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${K(t)}\n .section-root rect, .section-root path, .section-root circle {\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 .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles"),tt={db:y,renderer:J,parser:p,styles:Q};export{tt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,B as e,V as n,t as i,j as r,d as a,l as s,W as o,X as l,Y as c,$ as h}from"./web-0016ac81.js";import{d}from"./arc-6b847bc0.js";var u=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[6,8,10,11,12,14,16,17,20,21],i=[1,9],r=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17];i={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:t((function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:i.addTask(a[o],0,""),this.$=a[o];break;case 16:i.addEvent(a[o].substr(2)),this.$=a[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:18,11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,19]},{15:[1,20]},e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,4]),e(n,[2,9]),e(n,[2,10])],defaultActions:{},parseError:t((function(t,e){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:t((function(e){var n,i=this,r=[0],a=[],s=[null],o=[],l=this.table,c="",h=0,d=0,u=o.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(y.yy[n]=this.yy[n]);p.setInput(e,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc,f=(o.push(g),p.options&&p.options.ranges);function m(){var t=a.pop()||p.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){r.length=r.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),t(m,"lex");for(var x,b,k,_,v,w,S={};;){if(b=r[r.length-1],void 0===(k=this.defaultActions[b]||(null==x&&(x=m()),l[b]&&l[b][x]))||!k.length||!k[0]){var $,E=[];for(_ in l[b])this.terminals_[_]&&2<_&&E.push("'"+this.terminals_[_]+"'");$=p.showPosition?"Parse error on line "+(h+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError($,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:g,expected:E})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(k[0]){case 1:r.push(x),s.push(p.yytext),o.push(p.yylloc),r.push(k[1]),x=null,d=p.yyleng,c=p.yytext,h=p.yylineno,g=p.yylloc;break;case 2:if(v=this.productions_[k[1]][1],S.$=s[s.length-v],S._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},f&&(S._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,h,y.yy,k[1],s,o].concat(u))))return w;v&&(r=r.slice(0,-1*v*2),s=s.slice(0,-1*v),o=o.slice(0,-1*v)),r.push(this.productions_[k[1]][0]),s.push(S.$),o.push(S._$),w=l[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}),"parse")},r={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),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[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(20<t.length?"...":"")+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)+(20<t.length?"...":"")).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;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)),(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],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 i)this[r]=i[r];return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,r=this._currentRules(),a=0;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>e[0].length))if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,r[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 0<this.conditionStack.length-1?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]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:t((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||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: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 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/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],inclusive:!0}}};function h(){this.yy={}}return i.lexer=r,t(h,"Parser"),new((h.prototype=i).Parser=h)}(),p=u.parser=u,y={},g=(e(y,{addEvent:()=>E,addSection:()=>v,addTask:()=>$,addTaskOrg:()=>T,clear:()=>_,default:()=>M,getCommonDb:()=>k,getSections:()=>w,getTasks:()=>S}),""),f=0,m=[],x=[],b=[],k=t((()=>n),"getCommonDb"),_=t((function(){m.length=0,x.length=0,g="",b.length=0,i()}),"clear"),v=t((function(t){g=t,m.push(t)}),"addSection"),w=t((function(){return m}),"getSections"),S=t((function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return x.push(...b),x}),"getTasks"),$=t((function(t,e,n){t={id:f++,section:g,type:g,task:t,score:e||0,events:n?[n]:[]},b.push(t)}),"addTask"),E=t((function(t){b.find((t=>t.id===f-1)).events.push(t)}),"addEvent"),T=t((function(t){t={section:g,type:g,description:t,task:t,classes:[]},x.push(t)}),"addTaskOrg"),I=t((function(){var e,n,i=t((function(t){return b[t].processed}),"compileTask");let r=!0;for([e,n]of b.entries())i(e),r=r&&n.processed;return r}),"compileTasks"),M={clear:_,getCommonDb:k,addSection:v,getSections:w,getTasks:S,addTask:$,addTaskOrg:T,addEvent:E},N=t((function(t,e){return(t=t.append("rect")).attr("x",e.x),t.attr("y",e.y),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("width",e.width),t.attr("height",e.height),t.attr("rx",e.rx),t.attr("ry",e.ry),void 0!==e.class&&t.attr("class",e.class),t}),"drawRect"),A=t((function(e,n){var i=e.append("circle").attr("cx",n.cx).attr("cy",n.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function r(t){var e=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+n.cx+","+(n.cy+2)+")")}function a(t){var e=d().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",e).attr("transform","translate("+n.cx+","+(n.cy+7)+")")}function s(t){t.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=e.append("g")).append("circle").attr("cx",n.cx-5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",n.cx+5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t(r,"smile"),t(a,"sad"),t(s,"ambivalent"),(3<n.score?r:n.score<3?a:s)(e),i}),"drawFace"),C=t((function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t}),"drawCircle"),L=t((function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(n),t}),"drawText"),P=t((function(e,n){function i(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}t(i,"genPoints");var r=e.append("polygon");r.attr("points",i(n.x,n.y,50,20,7)),r.attr("class","labelBox"),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,L(e,n)}),"drawLabel"),H=t((function(t,e,n){t=t.append("g");var i=z();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),O=-1,j=t((function(t,e,n){var i=e.x+n.width/2;t=t.append("g");(i=(O++,t.append("line").attr("id","task"+O).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),A(t,{cx:i,cy:300+30*(5-e.score),score:e.score}),z())).x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="task task-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.task,t,i.x,i.y,i.width,i.height,{class:"task"},n,e.colour)}),"drawTask"),R=t((function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),D=t((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),z=t((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),B=function(){function e(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function n(t,e,n,i,a,s,o,l,c){var{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var p=t*h-h*(u.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(u[t]),y.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,o)}}function i(t,e,i,a,s,o,l,c){var h=(e=e.append("switch")).append("foreignObject").attr("x",i).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),n(t,e,i,a,s,o,l,c),r(h,l)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return t(e,"byText"),t(n,"byTspan"),t(i,"byFo"),t(r,"_setTextAttrs"),function(t){return"fo"===t.textPlacement?i:"old"===t.textPlacement?e:n}}(),F=t((function(t){t.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");function W(t,e){t.each((function(){var t,n=r(this),i=n.text().split(/(\s+|<br>)/).reverse(),a=[],s=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",o+"em");for(let r=0;r<i.length;r++)t=i[i.length-1-r],a.push(t),l.text(a.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(a.pop(),l.text(a.join(" ").trim()),a="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",s).attr("dy","1.1em").text(t))}))}t(W,"wrap");var V=t((function(t,e,n,i){n=n%12-1,t=t.append("g");var r=(e.section=n,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+n),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Y(r,e,n,i),e}),"drawNode"),G=t((function(t,e,n){var i=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox();n=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.remove(),i.height+1.1*n*.5+e.padding}),"getVirtualNodeHeight"),Y=t((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),q={drawRect:N,drawCircle:C,drawSection:H,drawText:L,drawLabel:P,drawTask:j,drawBackgroundRect:R,getTextObj:D,getNoteRect:z,initGraphics:F,drawNode:V,getVirtualNodeHeight:G},U=t((function(t,e,n,i){const l=a();var c=l.timeline?.leftMargin??50,h=(s.debug("timeline",i.db),l.securityLevel);let d;"sandbox"===h&&(d=r("#i"+e));const u=r("sandbox"===h?d.nodes()[0].contentDocument.body:"body").select("#"+e),p=(u.append("g"),i.db.getTasks());h=i.db.getCommonDb().getDiagramTitle(),s.debug("task",p),q.initGraphics(u),e=i.db.getSections(),s.debug("sections",e);let y=0,g=0;var f,m;let x,b=50+c,k=50,_=(x=50,0),v=!0,w=(e.forEach((function(t){t={number:_,descr:t,section:_,width:150,padding:20,maxHeight:y},t=q.getVirtualNodeHeight(u,t,l),s.debug("sectionHeight before draw",t),y=Math.max(y,t+20)})),0),S=0;for([f,m]of(s.debug("tasks.length",p.length),p.entries())){var $={number:f,descr:m,section:m.section,width:150,padding:20,maxHeight:g};$=q.getVirtualNodeHeight(u,$,l);s.debug("taskHeight before draw",$),g=Math.max(g,$+20),w=Math.max(w,m.events.length);let t=0;for(const e of m.events){var E={descr:e,section:m.section,number:m.section,width:150,padding:20,maxHeight:50};t+=q.getVirtualNodeHeight(u,E,l)}0<m.events.length&&(t+=10*(m.events.length-1)),S=Math.max(S,t)}s.debug("maxSectionHeight before draw",y),s.debug("maxTaskHeight before draw",g),e&&0<e.length?e.forEach((t=>{var e=p.filter((e=>e.section===t)),n={number:_,descr:t,section:_,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y},i=(s.debug("sectionNode",n),u.append("g"));n=q.drawNode(i,n,_,l);s.debug("sectionNode output",n),i.attr("transform",`translate(${b}, 50)`),k+=y+50,0<e.length&&X(u,e,_,b,k,g,l,w,S,y,!1),b+=200*Math.max(e.length,1),k=50,_++})):(v=!1,X(u,p,_,b,k,g,l,w,S,y,!0)),i=u.node().getBBox(),s.debug("bounds",i),h&&u.append("text").text(h).attr("x",i.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),e=v?y+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",e).attr("x2",i.width+3*c).attr("y2",e).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),o(void 0,u,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)}),"draw"),X=t((function(t,e,n,i,r,a,o,l,c,h,d){for(const l of e){var u={descr:l.task,section:n,number:n,width:150,padding:20,maxHeight:a},p=(s.debug("taskNode",u),t.append("g").attr("class","taskWrapper"));u=q.drawNode(p,u,n,o).height;s.debug("taskHeight after draw",u),p.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,u),l.events&&(p=t.append("g").attr("class","lineWrapper"),r+=100,Z(t,l.events,n,i,r,o),r-=100,p.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),i+=200,d&&!o.timeline?.disableMulticolor&&n++}}),"drawTasks"),Z=t((function(t,e,n,i,r,a){let o=0;var l=r;r+=100;for(const l of e){var c={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50},h=(s.debug("eventNode",c),t.append("g").attr("class","eventWrapper"));o+=c=q.drawNode(h,c,n,a).height,h.attr("transform",`translate(${i}, ${r})`),r=r+10+c}return r=l,o}),"drawEvents"),J={setConf:t((()=>{}),"setConf"),draw:U},K=t((t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],l(t["lineColor"+e])?t["lineColor"+e]=c(t["lineColor"+e],20):t["lineColor"+e]=h(t["lineColor"+e],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){var n=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${n};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e}),"genSections"),Q=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${K(t)}\n .section-root rect, .section-root path, .section-root circle {\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 .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles"),tt={db:y,renderer:J,parser:p,styles:Q};export{tt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{T as TreemapModule,h as createTreemapServices}from"./mermaid-parser.core-10bed742.js";import"./web-4e6d8ea9.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";import"./clone-6cd174cf.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{T as TreemapModule,h as createTreemapServices}from"./mermaid-parser.core-0cfa7d2a.js";import"./web-0016ac81.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ export declare const isNotDefined: <T>(value: T | null | undefined) => value is
|
|
|
2
2
|
export declare const isDefined: <T>(value: T | null | undefined) => value is NonNullable<T>;
|
|
3
3
|
export declare const isEmpty: (value: string | undefined | null) => value is undefined;
|
|
4
4
|
export declare const isNotEmpty: (value: string | undefined | null) => value is string;
|
|
5
|
+
/**
|
|
6
|
+
* Clears authentication data from localStorage
|
|
7
|
+
* Used when 401 errors are detected or user logs out
|
|
8
|
+
*/
|
|
5
9
|
export declare const sendRequest: <ResponseData>(params: string | {
|
|
6
10
|
url: string;
|
|
7
11
|
method: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface RedisConfig {
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
password?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
}
|
|
7
|
+
declare class RedisService {
|
|
8
|
+
private client;
|
|
9
|
+
private isConnected;
|
|
10
|
+
private connectionPromise;
|
|
11
|
+
constructor(config: RedisConfig);
|
|
12
|
+
connect(): Promise<void>;
|
|
13
|
+
private _connect;
|
|
14
|
+
disconnect(): Promise<void>;
|
|
15
|
+
set(key: string, value: string, expireSeconds?: number): Promise<string | null>;
|
|
16
|
+
get(key: string): Promise<string | null>;
|
|
17
|
+
del(key: string): Promise<number>;
|
|
18
|
+
exists(key: string): Promise<number>;
|
|
19
|
+
expire(key: string, seconds: number): Promise<boolean>;
|
|
20
|
+
keys(pattern: string): Promise<string[]>;
|
|
21
|
+
private ensureConnection;
|
|
22
|
+
getConnectionStatus(): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const REDIS_CONFIG: {
|
|
25
|
+
HOST: string;
|
|
26
|
+
PORT: number;
|
|
27
|
+
PASSWORD: string;
|
|
28
|
+
URL: string;
|
|
29
|
+
};
|
|
30
|
+
export { RedisService };
|
|
31
|
+
export type { RedisConfig };
|
|
32
|
+
//# sourceMappingURL=redisAndQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redisAndQueue.d.ts","sourceRoot":"","sources":["../../src/utils/redisAndQueue.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,cAAM,YAAY;IAChB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,iBAAiB,CAA8B;gBAE3C,MAAM,EAAE,WAAW;IAsCzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAahB,QAAQ;IAYhB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmB/E,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUxC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUjC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUpC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtD,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAUhC,gBAAgB;IAM9B,mBAAmB,IAAI,OAAO;CAG/B;AAGD,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upload audio blob to server and get transcription
|
|
3
|
+
* @param blob - Audio blob to transcribe
|
|
4
|
+
* @param transcriptApiEndpoint - API endpoint for transcription service
|
|
5
|
+
* @returns Promise<string> - Transcribed text
|
|
6
|
+
*/
|
|
7
|
+
export declare const uploadAndTranscriptAudio: (blob: Blob, transcriptApiEndpoint?: string) => Promise<string>;
|
|
8
|
+
//# sourceMappingURL=transcriptApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAgB,IAAI,0BAA0B,MAAM,KAAG,QAAQ,MAAM,CAoCzG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ultimateJsonParser.d.ts","sourceRoot":"","sources":["../../src/utils/ultimateJsonParser.ts"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAkDzD"}
|