upfynai-code 2.4.1 → 2.5.0
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/client/dist/assets/AppContent-CRld2UWX.js +513 -0
- package/client/dist/assets/CanvasPanel-CB4sweQq.js +34 -0
- package/client/dist/assets/CanvasPanel-WhZulBJw.css +1 -0
- package/client/dist/assets/DashboardPanel-BXaA-b9z.js +1 -0
- package/client/dist/assets/LoginModal-BwkvjfPR.js +19 -0
- package/client/dist/assets/{Onboarding-CtIoXiTp.js → Onboarding-2A_5fPxy.js} +1 -1
- package/client/dist/assets/{SetupForm-B4p8im5O.js → SetupForm-CH5EA5W0.js} +1 -1
- package/client/dist/assets/WorkflowsPanel-CO5g5yGG.js +1 -0
- package/client/dist/assets/{ar-SA-G6X2FPQ2-2gfmdvHk.js → ar-SA-G6X2FPQ2-DoJuo98H.js} +2 -2
- package/client/dist/assets/{arc-DCZSHhoJ.js → arc-B0wBaTeh.js} +1 -1
- package/client/dist/assets/az-AZ-76LH7QW2-xdrt1Z13.js +1 -0
- package/client/dist/assets/{bg-BG-XCXSNQG7-D6__XtOK.js → bg-BG-XCXSNQG7-D8NAiF6Y.js} +2 -2
- package/client/dist/assets/{blockDiagram-38ab4fdb-Cfbaeyp6.js → blockDiagram-38ab4fdb-DSnyKzK4.js} +2 -2
- package/client/dist/assets/{bn-BD-2XOGV67Q-DHNJw3OG.js → bn-BD-2XOGV67Q-B0qWv8_J.js} +2 -2
- package/client/dist/assets/{c4Diagram-3d4e48cf-BBCnjOTy.js → c4Diagram-3d4e48cf-DoZJ13XA.js} +2 -2
- package/client/dist/assets/{ca-ES-6MX7JW3Y-r5g4o3zQ.js → ca-ES-6MX7JW3Y-RgLhfbZZ.js} +3 -3
- package/client/dist/assets/channel-BmO6nY0W.js +1 -0
- package/client/dist/assets/classDiagram-70f12bd4-GNyDrRCk.js +2 -0
- package/client/dist/assets/classDiagram-v2-f2320105-CxdGhHm2.js +2 -0
- package/client/dist/assets/clone-xuHMqFoD.js +1 -0
- package/client/dist/assets/{createText-2e5e7dd3-B8jCDmF_.js → createText-2e5e7dd3-DiPywQOa.js} +1 -1
- package/client/dist/assets/{cs-CZ-2BRQDIVT-p08jRLRC.js → cs-CZ-2BRQDIVT-BAjmnuoC.js} +2 -2
- package/client/dist/assets/{da-DK-5WZEPLOC-CnhOImFf.js → da-DK-5WZEPLOC-JxKVGt8o.js} +2 -2
- package/client/dist/assets/{de-DE-XR44H4JA-BunSXZ-Y.js → de-DE-XR44H4JA-CrnRlt4z.js} +2 -2
- package/client/dist/assets/{edges-e0da2a9e-CGBBhG8k.js → edges-e0da2a9e-DDsXzXLJ.js} +1 -1
- package/client/dist/assets/{el-GR-BZB4AONW-D4wv1oIz.js → el-GR-BZB4AONW-DQd8iogq.js} +2 -2
- package/client/dist/assets/{erDiagram-9861fffd-CYaF3q1I.js → erDiagram-9861fffd-CBiCC4rl.js} +2 -2
- package/client/dist/assets/{es-ES-U4NZUMDT-CGeTKXgd.js → es-ES-U4NZUMDT-vvUblc5i.js} +2 -2
- package/client/dist/assets/{eu-ES-A7QVB2H4-Cayx1TxR.js → eu-ES-A7QVB2H4-De4NNCc1.js} +2 -2
- package/client/dist/assets/{fa-IR-HGAKTJCU-CmUg8pmw.js → fa-IR-HGAKTJCU-DFBXqIqq.js} +2 -2
- package/client/dist/assets/{fi-FI-Z5N7JZ37-xvHcPhsU.js → fi-FI-Z5N7JZ37-DV9zESPg.js} +2 -2
- package/client/dist/assets/{flowDb-956e92f1-C-_LFz70.js → flowDb-956e92f1-BhdSHbdO.js} +1 -1
- package/client/dist/assets/{flowDiagram-66a62f08-C1sHdSjn.js → flowDiagram-66a62f08-M-fp1_Ie.js} +2 -2
- package/client/dist/assets/flowDiagram-v2-96b9c2cf-C5eiN8Pg.js +1 -0
- package/client/dist/assets/{flowchart-elk-definition-4a651766-CNGfpudb.js → flowchart-elk-definition-4a651766-Bp0SonQx.js} +2 -2
- package/client/dist/assets/{fr-FR-RHASNOE6-DBoHEcNj.js → fr-FR-RHASNOE6-CKTMXuGk.js} +2 -2
- package/client/dist/assets/ganttDiagram-c361ad54-iA737GUS.js +257 -0
- package/client/dist/assets/{gitGraphDiagram-72cf32ee-DojCDvlS.js → gitGraphDiagram-72cf32ee-BX-wj-PV.js} +2 -2
- package/client/dist/assets/{gl-ES-HMX3MZ6V-p6hrn2cN.js → gl-ES-HMX3MZ6V-Cdiqq4jY.js} +2 -2
- package/client/dist/assets/{graph-DXM7lcy1.js → graph-Rxkx3sEa.js} +1 -1
- package/client/dist/assets/{he-IL-6SHJWFNN-y2jEX6-0.js → he-IL-6SHJWFNN-gYmR5_KT.js} +2 -2
- package/client/dist/assets/{hi-IN-IWLTKZ5I-99pNfyWr.js → hi-IN-IWLTKZ5I-pyqK94AR.js} +2 -2
- package/client/dist/assets/{hu-HU-A5ZG7DT2-hygceGMS.js → hu-HU-A5ZG7DT2-DpacJgJy.js} +2 -2
- package/client/dist/assets/{id-ID-SAP4L64H-CyIqi1hv.js → id-ID-SAP4L64H-CAvIX-mj.js} +2 -2
- package/client/dist/assets/{index-3862675e-4idOQN2N.js → index-3862675e-BX3Fpn6V.js} +1 -1
- package/client/dist/assets/{index-BHZfFT_V.js → index-BBlwbHq_.js} +4 -4
- package/client/dist/assets/{index-BGmwbRlb.js → index-ClfzLIqY.js} +6 -6
- package/client/dist/assets/index-Td4UdtLF.css +1 -0
- package/client/dist/assets/{infoDiagram-f8f76790-CFLrHqtc.js → infoDiagram-f8f76790-Ckv8imiv.js} +2 -2
- package/client/dist/assets/{it-IT-JPQ66NNP-DzVvVdQI.js → it-IT-JPQ66NNP-BtpNRSce.js} +2 -2
- package/client/dist/assets/{ja-JP-DBVTYXUO-BI4fPexV.js → ja-JP-DBVTYXUO-CwJRyY6M.js} +2 -2
- package/client/dist/assets/{journeyDiagram-49397b02-C3CFDo8z.js → journeyDiagram-49397b02-DWWZssji.js} +2 -2
- package/client/dist/assets/kaa-6HZHGXH3-DIWQEb4A.js +1 -0
- package/client/dist/assets/{kab-KAB-ZGHBKWFO-DBI_ri48.js → kab-KAB-ZGHBKWFO-DjGbqhUg.js} +2 -2
- package/client/dist/assets/kk-KZ-P5N5QNE5-B_VzJdWf.js +1 -0
- package/client/dist/assets/{km-KH-HSX4SM5Z-DOMFSres.js → km-KH-HSX4SM5Z-DUD5mi0o.js} +2 -2
- package/client/dist/assets/{ko-KR-MTYHY66A-tb08hXzd.js → ko-KR-MTYHY66A--sDB10db.js} +3 -3
- package/client/dist/assets/{ku-TR-6OUDTVRD-DlIQCCY4.js → ku-TR-6OUDTVRD-CKvKrkcX.js} +2 -2
- package/client/dist/assets/{layout-B_11mCXA.js → layout-CkB7sSeq.js} +1 -1
- package/client/dist/assets/{line-B-qmK_vI.js → line-DC7MA9qY.js} +1 -1
- package/client/dist/assets/{linear-Ph6uuYcX.js → linear-C1lBBthf.js} +1 -1
- package/client/dist/assets/{lt-LT-XHIRWOB4--qWy24_Z.js → lt-LT-XHIRWOB4-MSZf7xYG.js} +2 -2
- package/client/dist/assets/{lv-LV-5QDEKY6T-Bnd_1GDb.js → lv-LV-5QDEKY6T-C-gvvmBB.js} +2 -2
- package/client/dist/assets/{mindmap-definition-fc14e90a-Do79tIc0.js → mindmap-definition-fc14e90a-B3O7hztq.js} +2 -2
- package/client/dist/assets/{mr-IN-CRQNXWMA-BsV6HaD9.js → mr-IN-CRQNXWMA-XHtBUWQH.js} +2 -2
- package/client/dist/assets/my-MM-5M5IBNSE-D9eD2edL.js +1 -0
- package/client/dist/assets/{nb-NO-T6EIAALU-Cvf9FdSF.js → nb-NO-T6EIAALU-BlImC6gp.js} +3 -3
- package/client/dist/assets/{nl-NL-IS3SIHDZ-DA1yqpXw.js → nl-NL-IS3SIHDZ-CPFhnaSP.js} +2 -2
- package/client/dist/assets/{nn-NO-6E72VCQL-89lm3vku.js → nn-NO-6E72VCQL-BMvoJSKQ.js} +2 -2
- package/client/dist/assets/{oc-FR-POXYY2M6-BsrjTJQh.js → oc-FR-POXYY2M6-Buye63LS.js} +2 -2
- package/client/dist/assets/{pa-IN-N4M65BXN-CczefYaj.js → pa-IN-N4M65BXN-D9uQ3niy.js} +2 -2
- package/client/dist/assets/{percentages-BXMCSKIN-Be6p9phi.js → percentages-BXMCSKIN-BzXIakGM.js} +7 -7
- package/client/dist/assets/{pieDiagram-8a3498a8-CfblQHdm.js → pieDiagram-8a3498a8-BU38mzx-.js} +3 -3
- package/client/dist/assets/{pl-PL-T2D74RX3-DdhH-zcK.js → pl-PL-T2D74RX3-BqM4xdcg.js} +2 -2
- package/client/dist/assets/{pt-BR-5N22H2LF-gpwlheL6.js → pt-BR-5N22H2LF-rAjrxGyI.js} +2 -2
- package/client/dist/assets/{pt-PT-UZXXM6DQ-Cs87vICi.js → pt-PT-UZXXM6DQ-DXsqcwLt.js} +2 -2
- package/client/dist/assets/{quadrantDiagram-120e2f19-CRMSamSP.js → quadrantDiagram-120e2f19-HhK4H1WU.js} +2 -2
- package/client/dist/assets/{requirementDiagram-deff3bca-D3LBN016.js → requirementDiagram-deff3bca-aDrcyj-A.js} +2 -2
- package/client/dist/assets/{ro-RO-JPDTUUEW-CWTSJ1Dt.js → ro-RO-JPDTUUEW-D_F9UKer.js} +2 -2
- package/client/dist/assets/{ru-RU-B4JR7IUQ-Bq7aN2ep.js → ru-RU-B4JR7IUQ-MirqN29p.js} +2 -2
- package/client/dist/assets/sankeyDiagram-04a897e0-C6ij7qbQ.js +8 -0
- package/client/dist/assets/{sequenceDiagram-704730f1-BRYXVDGX.js → sequenceDiagram-704730f1-C0EKO3th.js} +2 -2
- package/client/dist/assets/si-LK-N5RQ5JYF-DyZC3mkC.js +1 -0
- package/client/dist/assets/{sk-SK-C5VTKIMK-ByjKQzUb.js → sk-SK-C5VTKIMK-D-ksz-WY.js} +2 -2
- package/client/dist/assets/{sl-SI-NN7IZMDC-B8WCyMBU.js → sl-SI-NN7IZMDC-CknuYoQ1.js} +2 -2
- package/client/dist/assets/stateDiagram-587899a1-CYoq2VjL.js +1 -0
- package/client/dist/assets/stateDiagram-v2-d93cdb3a-C5lbp5px.js +1 -0
- package/client/dist/assets/{styles-6aaf32cf-Dr-lfIOW.js → styles-6aaf32cf-Dkfsk8gt.js} +1 -1
- package/client/dist/assets/{styles-9a916d00-DS4wRpL7.js → styles-9a916d00-CMYqtcEN.js} +1 -1
- package/client/dist/assets/{styles-c10674c1-nKRF6NrH.js → styles-c10674c1-Bp-5OlRU.js} +1 -1
- package/client/dist/assets/{subset-shared.chunk-KT79s7KG.js → subset-shared.chunk-kfIB1Zam.js} +3 -3
- package/client/dist/assets/subset-worker.chunk-DwQBgc4z.js +1 -0
- package/client/dist/assets/{sv-SE-XGPEYMSR-BiIPUVbv.js → sv-SE-XGPEYMSR-DwN13se1.js} +2 -2
- package/client/dist/assets/{svgDrawCommon-08f97a94-C3uP9PYr.js → svgDrawCommon-08f97a94-CEgCMqs4.js} +1 -1
- package/client/dist/assets/{ta-IN-2NMHFXQM-Cidadso2.js → ta-IN-2NMHFXQM-ejDfFhwa.js} +2 -2
- package/client/dist/assets/th-TH-HPSO5L25-Bqc90ZNn.js +2 -0
- package/client/dist/assets/{timeline-definition-85554ec2-BSsLsIgF.js → timeline-definition-85554ec2-BmGdKqG0.js} +2 -2
- package/client/dist/assets/{tr-TR-DEFEU3FU-DaFcI-KL.js → tr-TR-DEFEU3FU-CJvlPbcW.js} +2 -2
- package/client/dist/assets/{uk-UA-QMV73CPH-DkBW36St.js → uk-UA-QMV73CPH-D26-cbWL.js} +3 -3
- package/client/dist/assets/vendor-codemirror-D_s0aGBu.js +35 -0
- package/client/dist/assets/{vendor-icons-Dh9m_Ydt.js → vendor-icons-aNdOvTr_.js} +159 -119
- package/client/dist/assets/{vi-VN-M7AON7JQ-KrtfxOzl.js → vi-VN-M7AON7JQ-MbqIIwYM.js} +2 -2
- package/client/dist/assets/{xychartDiagram-e933f94c-CgNgZ4pp.js → xychartDiagram-e933f94c-gfcTauxU.js} +2 -2
- package/client/dist/assets/{zh-CN-LNUGB5OW-BQu12RoD.js → zh-CN-LNUGB5OW-BZSmhUdL.js} +3 -3
- package/client/dist/assets/zh-HK-E62DVLB3-BJqejpiX.js +1 -0
- package/client/dist/assets/{zh-TW-RAJ6MFWO-ffJWgVxn.js → zh-TW-RAJ6MFWO-BBXtV-Uz.js} +2 -2
- package/client/dist/index.html +3 -3
- package/package.json +5 -2
- package/server/cli.js +1 -1
- package/server/database/auth.db +0 -0
- package/server/database/db.js +203 -1
- package/server/index.js +111 -18
- package/server/middleware/auth.js +11 -6
- package/server/projects.js +95 -202
- package/server/relay-client.js +47 -10
- package/server/routes/auth.js +6 -0
- package/server/routes/dashboard.js +52 -0
- package/server/routes/projects.js +38 -35
- package/server/routes/voice.js +198 -0
- package/server/routes/webhooks.js +166 -0
- package/server/routes/workflows.js +118 -0
- package/server/services/whisperService.js +84 -0
- package/server/services/workflowScheduler.js +186 -0
- package/client/dist/assets/AppContent-DTZ2FbvM.js +0 -513
- package/client/dist/assets/CanvasPanel-DlTW6Jh6.js +0 -6
- package/client/dist/assets/CanvasPanel-q4HEqNtV.css +0 -1
- package/client/dist/assets/LoginModal-CWoFm0au.js +0 -19
- package/client/dist/assets/az-AZ-76LH7QW2-CDdeucRZ.js +0 -1
- package/client/dist/assets/channel-O3ovC0x9.js +0 -1
- package/client/dist/assets/classDiagram-70f12bd4-D0lhAcxU.js +0 -2
- package/client/dist/assets/classDiagram-v2-f2320105-BuwUsF3F.js +0 -2
- package/client/dist/assets/clone-BG9u7vLi.js +0 -1
- package/client/dist/assets/flowDiagram-v2-96b9c2cf-Cd0Iascd.js +0 -1
- package/client/dist/assets/ganttDiagram-c361ad54-B8HJQqjt.js +0 -257
- package/client/dist/assets/index-B8wwD_Xo.css +0 -1
- package/client/dist/assets/kaa-6HZHGXH3-fwOleoQB.js +0 -1
- package/client/dist/assets/kk-KZ-P5N5QNE5-zpl7uvyF.js +0 -1
- package/client/dist/assets/my-MM-5M5IBNSE-kZQURVIi.js +0 -1
- package/client/dist/assets/sankeyDiagram-04a897e0-CsFqOQZN.js +0 -8
- package/client/dist/assets/si-LK-N5RQ5JYF-BBjcNYQh.js +0 -1
- package/client/dist/assets/stateDiagram-587899a1-BHoy9LtD.js +0 -1
- package/client/dist/assets/stateDiagram-v2-d93cdb3a-BvMUA6bS.js +0 -1
- package/client/dist/assets/subset-worker.chunk-BMx1eyv3.js +0 -1
- package/client/dist/assets/th-TH-HPSO5L25-CFNnJwSv.js +0 -2
- package/client/dist/assets/vendor-codemirror-langs-BH1ZcKHY.js +0 -20
- package/client/dist/assets/vendor-codemirror-rix45NST.js +0 -16
- package/client/dist/assets/zh-HK-E62DVLB3-zx9CvERq.js +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/percentages-BXMCSKIN-Be6p9phi.js","assets/vendor-syntax-DnmwQQJF.js","assets/vendor-react-9mUTKBHH.js","assets/vendor-markdown-BXEi_H3G.js","assets/AppContent-DTZ2FbvM.js","assets/index-BGmwbRlb.js","assets/vendor-icons-Dh9m_Ydt.js","assets/vendor-i18n-DCFGyhQR.js","assets/index-B8wwD_Xo.css","assets/LoginModal-CWoFm0au.js","assets/vendor-xterm-CZq1hqo1.js","assets/vendor-xterm-qxJ8_QYu.css","assets/vendor-codemirror-rix45NST.js","assets/vendor-codemirror-langs-BH1ZcKHY.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{b as O}from"./vendor-syntax-DnmwQQJF.js";import{r as m,j as i,v as W}from"./vendor-react-9mUTKBHH.js";import{S as $,F,d as G,A as V}from"./vendor-icons-Dh9m_Ydt.js";import"./vendor-markdown-BXEi_H3G.js";const _=240,j=120,D=32,K=12,p={note:{bg:"#1e293b",border:"#3b82f6",text:"#e2e8f0",accent:"#60a5fa"},pdf:{bg:"#1e1b2e",border:"#ef4444",text:"#e2e8f0",accent:"#f87171"},summary:{bg:"#1a2e1a",border:"#22c55e",text:"#e2e8f0",accent:"#4ade80"}};function g(){return crypto.randomUUID()}function M(n,e,t,s,o){return{id:o.id,type:"rectangle",x:n,y:e,width:t,height:s,angle:0,strokeColor:o.border,backgroundColor:o.bg,fillStyle:"solid",strokeWidth:2,roughness:0,opacity:100,groupIds:o.groupIds,roundness:{type:3,value:K},isDeleted:!1,boundElements:null,locked:!1,customData:o.customData,version:1,versionNonce:Math.floor(Math.random()*1e9),seed:Math.floor(Math.random()*1e9)}}function w(n,e,t,s){const o=s.fontSize??14;return{id:s.id,type:"text",x:n,y:e,width:s.width??_-24,height:s.height??o+6,angle:0,strokeColor:s.color,backgroundColor:"transparent",fillStyle:"solid",strokeWidth:1,roughness:0,opacity:100,groupIds:s.groupIds,roundness:null,isDeleted:!1,boundElements:null,locked:!1,text:t,fontSize:o,fontFamily:1,textAlign:"left",verticalAlign:"top",containerId:null,originalText:t,autoResize:!1,lineHeight:1.25,customData:s.customData,version:1,versionNonce:Math.floor(Math.random()*1e9),seed:Math.floor(Math.random()*1e9)}}function R(n,e,t="New note..."){const s=g(),o=g(),c=t.split(`
|
|
3
|
-
`),a=Math.max(j-D,c.length*20+16),r=D+a,l=M(n,e,_,r,{id:o,groupIds:[s],bg:p.note.bg,border:p.note.border,customData:{blockType:"note",blockId:o,content:t}}),d=w(n+12,e+8,"📝 Note",{id:g(),groupIds:[s],color:p.note.accent,fontSize:13}),f=w(n+12,e+D+4,t,{id:g(),groupIds:[s],color:p.note.text,fontSize:13,height:a-12});return{elements:[l,d,f],blockId:o,groupId:s}}function z(n,e,t,s,o,c){const a=g(),r=g(),l=t.length>28?t.slice(0,25)+"...":t,d=M(n,e,_,j,{id:r,groupIds:[a],bg:p.pdf.bg,border:p.pdf.border,customData:{blockType:"pdf",blockId:r,fileName:t,pageCount:s,extractedText:o,thumbnail:c??null}}),f=w(n+12,e+8,`📄 ${l}`,{id:g(),groupIds:[a],color:p.pdf.accent,fontSize:13}),h=w(n+12,e+32,`${s} page${s!==1?"s":""}`,{id:g(),groupIds:[a],color:p.pdf.text,fontSize:12}),u=w(n+12,e+56,o.slice(0,80)+(o.length>80?"...":""),{id:g(),groupIds:[a],color:"#94a3b8",fontSize:11,height:48});return{elements:[d,f,h,u],blockId:r,groupId:a}}function H(n,e,t,s="Generating summary..."){const o=g(),c=g(),a=s.split(`
|
|
4
|
-
`),r=Math.max(j-D,a.length*20+16),l=D+r,d=M(n,e,_,l,{id:c,groupIds:[o],bg:p.summary.bg,border:p.summary.border,customData:{blockType:"summary",blockId:c,sourceIds:t,generatedContent:s}}),f=w(n+12,e+8,"✨ Summary",{id:g(),groupIds:[o],color:p.summary.accent,fontSize:13}),h=w(n+12,e+D+4,s,{id:g(),groupIds:[o],color:p.summary.text,fontSize:13,height:r-12});return{elements:[d,f,h],blockId:c,groupId:o}}function U(n,e){const t=g();return{element:{id:t,type:"arrow",x:0,y:0,width:100,height:0,angle:0,strokeColor:"#6366f1",backgroundColor:"transparent",fillStyle:"solid",strokeWidth:2,roughness:0,opacity:80,groupIds:[],roundness:{type:2},isDeleted:!1,boundElements:null,locked:!1,points:[[0,0],[100,0]],startBinding:{elementId:n,focus:0,gap:4},endBinding:{elementId:e,focus:0,gap:4},startArrowhead:null,endArrowhead:"arrow",customData:{blockType:"context-link",sourceId:n,targetId:e},version:1,versionNonce:Math.floor(Math.random()*1e9),seed:Math.floor(Math.random()*1e9)},linkId:t}}async function J(n){try{const e=await O(()=>import("./pdf-CE_K4jFx.js"),[]);e.GlobalWorkerOptions.workerSrc=new URL("/assets/pdf.worker-BA9kU3Pw.mjs",import.meta.url).toString();const t=await n.arrayBuffer(),s=await e.getDocument({data:t}).promise,o=s.numPages,c=[],a=Math.min(o,10);for(let l=1;l<=a;l++){const h=(await(await s.getPage(l)).getTextContent()).items.map(u=>u.str).join(" ");c.push(h)}let r=null;try{const l=await s.getPage(1),d=l.getViewport({scale:.5}),f=document.createElement("canvas");f.width=d.width,f.height=d.height;const h=f.getContext("2d");h&&(await l.render({canvasContext:h,viewport:d}).promise,r=f.toDataURL("image/png",.6))}catch{}return{text:c.join(`
|
|
5
|
-
|
|
6
|
-
`),pageCount:o,thumbnail:r}}catch(e){return console.error("PDF extraction failed:",e),{text:"",pageCount:0,thumbnail:null}}}function P(n){const e=n.getAppState(),t=(-e.scrollX+e.width/2)/e.zoom.value,s=(-e.scrollY+e.height/2)/e.zoom.value;return{x:Math.round(t-120),y:Math.round(s-60)}}function A(n,e){const t=n.getSceneElements();n.updateScene({elements:[...t,...e]})}function Y({api:n}){const e=m.useRef(null),[t,s]=m.useState(!1),[o,c]=m.useState(!1),a=m.useCallback(()=>{if(!n)return;const{x:u,y:k}=P(n),I=R(u,k);A(n,I.elements)},[n]),r=m.useCallback(()=>{var u;(u=e.current)==null||u.click()},[]),l=m.useCallback(async u=>{var I;const k=(I=u.target.files)==null?void 0:I[0];if(!(!k||!n)){u.target.value="",c(!0);try{const{text:x,pageCount:y,thumbnail:S}=await J(k),{x:N,y:C}=P(n),E=z(N,C,k.name,y,x,S);A(n,E.elements)}finally{c(!1)}}},[n]),d=m.useCallback(()=>{if(!n)return;const u=n.getAppState(),k=Object.keys(u.selectedElementIds||{}),x=n.getSceneElements().filter(C=>{var E;return k.includes(C.id)&&((E=C.customData)==null?void 0:E.blockId)}).map(C=>C.customData.blockId),{x:y,y:S}=P(n),N=H(y+280,S,x,x.length?"Summary of selected blocks":"Select blocks to summarize");A(n,N.elements)},[n]),f=m.useCallback(()=>{if(!n)return;const u=n.getAppState(),k=Object.keys(u.selectedElementIds||{}),x=n.getSceneElements().filter(y=>{var S;return k.includes(y.id)&&((S=y.customData)==null?void 0:S.blockId)});if(x.length===2){const y=U(x[0].id,x[1].id);A(n,[y.element]),s(!1)}else s(!t)},[n,t]),h="flex items-center justify-center w-9 h-9 rounded-lg transition-colors text-muted-foreground hover:text-foreground hover:bg-white/10";return i.jsxs("div",{className:"canvas-block-toolbar",children:[i.jsx("button",{onClick:a,className:h,title:"Add Note",children:i.jsx($,{className:"w-4 h-4"})}),i.jsx("button",{onClick:r,className:h,title:"Add PDF",disabled:o,children:i.jsx(F,{className:`w-4 h-4 ${o?"animate-pulse":""}`})}),i.jsx("button",{onClick:d,className:h,title:"Add Summary",children:i.jsx(G,{className:"w-4 h-4"})}),i.jsx("div",{className:"w-5 border-t border-white/10 mx-auto"}),i.jsx("button",{onClick:f,className:`${h} ${t?"bg-indigo-500/20 text-indigo-400":""}`,title:"Connect Blocks (select 2)",children:i.jsx(V,{className:"w-4 h-4"})}),i.jsx("input",{ref:e,type:"file",accept:".pdf",onChange:l,className:"hidden"}),t&&i.jsx("div",{className:"absolute left-12 top-1/2 -translate-y-1/2 bg-background/90 border border-border rounded-md px-2 py-1 text-xs text-muted-foreground whitespace-nowrap",children:"Select 2 blocks, then click Connect"})]})}function v(){return window.__excalidrawAPI??null}function B(n){const e=v();if(!e)return;const t=e.getSceneElements();e.updateScene({elements:[...t,...n]})}function T(){const n=v();if(!n)return{x:100,y:100};const e=n.getAppState(),t=(-e.scrollX+e.width/2)/e.zoom.value,s=(-e.scrollY+e.height/2)/e.zoom.value;return{x:Math.round(t-120),y:Math.round(s-60)}}const b={addNote(n,e,t){const s=n!=null&&e!=null?{x:n,y:e}:T(),o=R(s.x,s.y,t);return B(o.elements),{blockId:o.blockId}},addPdf(n,e,t,s,o=0,c){const a=z(n,e,t,o,s,c);return B(a.elements),{blockId:a.blockId}},addSummary(n,e,t,s){const o=t!=null&&s!=null?{x:t,y:s}:T(),c=H(o.x,o.y,n,e);return B(c.elements),{blockId:c.blockId}},connectBlocks(n,e){const t=U(n,e);return B([t.element]),{linkId:t.linkId}},getBlocks(){const n=v();return n?n.getSceneElements().filter(e=>{var t;return((t=e.customData)==null?void 0:t.blockType)&&e.customData.blockType!=="context-link"}).map(e=>({id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,...e.customData})):[]},getConnections(){const n=v();return n?n.getSceneElements().filter(e=>{var t;return((t=e.customData)==null?void 0:t.blockType)==="context-link"}).map(e=>({id:e.id,sourceId:e.customData.sourceId,targetId:e.customData.targetId})):[]},updateBlockContent(n,e){const t=v();if(!t)return;const s=t.getSceneElements().map(o=>{var c;if(o.id===n&&o.customData)return{...o,customData:{...o.customData,content:e,generatedContent:e}};if(o.type==="text"&&((c=o.groupIds)!=null&&c.length)){const a=t.getSceneElements().find(r=>{var l;return r.id===n&&((l=r.groupIds)==null?void 0:l.some(d=>o.groupIds.includes(d)))});if(a&&o.y>a.y+28)return{...o,text:e,originalText:e}}return o});t.updateScene({elements:s})},removeBlock(n){const e=v();if(!e)return;const t=e.getSceneElements().find(c=>c.id===n);if(!t)return;const s=t.groupIds??[],o=e.getSceneElements().map(c=>{var a,r;return c.id===n||s.length&&((a=c.groupIds)!=null&&a.some(l=>s.includes(l)))?{...c,isDeleted:!0}:((r=c.customData)==null?void 0:r.blockType)==="context-link"&&(c.customData.sourceId===n||c.customData.targetId===n)?{...c,isDeleted:!0}:c});e.updateScene({elements:o})}};function X(){window.__canvasBlockAPI=b}function q(){delete window.__canvasBlockAPI}function Q(n){const{action:e,params:t}=n;switch(e){case"addNote":return b.addNote(t.x,t.y,t.content);case"addPdf":return b.addPdf(t.x,t.y,t.fileName,t.text,t.pageCount,t.thumbnail);case"addSummary":return b.addSummary(t.sourceIds,t.content,t.x,t.y);case"connectBlocks":return b.connectBlocks(t.sourceId,t.targetId);case"updateBlockContent":return b.updateBlockContent(t.blockId,t.content);case"removeBlock":return b.removeBlock(t.blockId);case"getBlocks":return b.getBlocks();case"getConnections":return b.getConnections();default:console.warn("Unknown canvas block command:",e)}}const L="upfynai-excalidraw-scene";function Z(){const[n,e]=m.useState(null),[t,s]=m.useState(null);m.useEffect(()=>{O(()=>import("./percentages-BXMCSKIN-Be6p9phi.js").then(a=>a.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(a=>{e(()=>a.Excalidraw)})},[]);const o=m.useCallback(()=>{try{const a=localStorage.getItem(L);if(a)return{elements:JSON.parse(a).elements||[],appState:{theme:"dark"}}}catch{}return{elements:[],appState:{theme:"dark"}}},[]),c=m.useCallback(a=>{try{localStorage.setItem(L,JSON.stringify({elements:a}))}catch{}},[]);return m.useEffect(()=>{if(!t)return;window.__excalidrawAPI=t,X();const a=l=>{try{const d=JSON.parse(l.data);d.type==="canvas-update"&&d.elements&&t&&t.updateScene({elements:d.elements}),d.type==="canvas-block-command"&&d.action&&Q(d)}catch{}},r=window.__upfynWs;return r&&r.addEventListener("message",a),()=>{delete window.__excalidrawAPI,q(),r&&r.removeEventListener("message",a)}},[t]),n?i.jsxs("div",{className:"excalidraw-wrapper h-full w-full relative",children:[t&&i.jsx(Y,{api:t}),i.jsx(n,{excalidrawAPI:a=>s(a),initialData:o(),onChange:c,theme:"dark",UIOptions:{welcomeScreen:!1}})]}):i.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading whiteboard..."})}const se=W.memo(Z);export{se as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.excalidraw .main-menu-trigger,.excalidraw .welcome-screen-center,.excalidraw a[href*="excalidraw.com"],.excalidraw .encrypted-icon{display:none!important}.excalidraw.theme--dark{--color-surface-lowest: #0a0a0a;--color-surface-low: #111111;--color-surface-mid: #1a1a1a;--island-bg-color: #1a1a1a}.excalidraw-wrapper{width:100%;height:100%}.excalidraw .App-menu_top .buttonList{background:#1a1a1a}.canvas-block-toolbar{position:absolute;top:50%;left:12px;transform:translateY(-50%);z-index:10;display:flex;flex-direction:column;gap:4px;padding:6px;background:#111111e6;border:1px solid rgba(255,255,255,.08);border-radius:12px;backdrop-filter:blur(8px)}.excalidraw [data-block-type=note]{filter:drop-shadow(0 0 6px rgba(59,130,246,.3))}.excalidraw [data-block-type=pdf]{filter:drop-shadow(0 0 6px rgba(239,68,68,.3))}.excalidraw [data-block-type=summary]{filter:drop-shadow(0 0 6px rgba(34,197,94,.3))}.excalidraw [data-block-type=context-link]{filter:drop-shadow(0 0 4px rgba(99,102,241,.4))}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{a as xe,r as a,j as e}from"./vendor-react-9mUTKBHH.js";import{I as he,R as me,g as pe,b as ge,c as oe}from"./index-BGmwbRlb.js";import{x as ye,a as be,b as we,c as Ne}from"./vendor-xterm-CZq1hqo1.js";import{X as je}from"./vendor-icons-Dh9m_Ydt.js";const ve=(t,r,o,h)=>{var s,y,i,p;const m=[o,{code:r,...h||{}}];if((y=(s=t==null?void 0:t.services)==null?void 0:s.logger)!=null&&y.forward)return t.services.logger.forward(m,"warn","react-i18next::",!0);W(m[0])&&(m[0]=`react-i18next:: ${m[0]}`),(p=(i=t==null?void 0:t.services)==null?void 0:i.logger)!=null&&p.warn?t.services.logger.warn(...m):console!=null&&console.warn&&console.warn(...m)},ee={},le=(t,r,o,h)=>{W(o)&&ee[o]||(W(o)&&(ee[o]=new Date),ve(t,r,o,h))},ce=(t,r)=>()=>{if(t.isInitialized)r();else{const o=()=>{setTimeout(()=>{t.off("initialized",o)},0),r()};t.on("initialized",o)}},Y=(t,r,o)=>{t.loadNamespaces(r,ce(t,o))},te=(t,r,o,h)=>{if(W(o)&&(o=[o]),t.options.preload&&t.options.preload.indexOf(r)>-1)return Y(t,o,h);o.forEach(m=>{t.options.ns.indexOf(m)<0&&t.options.ns.push(m)}),t.loadLanguages(r,ce(t,h))},ke=(t,r,o={})=>!r.languages||!r.languages.length?(le(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(t,{lng:o.lng,precheck:(h,m)=>{if(o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&h.services.backendConnector.backend&&h.isLanguageChangingTo&&!m(h.isLanguageChangingTo,t))return!1}}),W=t=>typeof t=="string",Ce=t=>typeof t=="object"&&t!==null;var V={exports:{}},X={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* use-sync-external-store-shim.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var re;function Se(){if(re)return X;re=1;var t=xe();function r(n,u){return n===u&&(n!==0||1/n===1/u)||n!==n&&u!==u}var o=typeof Object.is=="function"?Object.is:r,h=t.useState,m=t.useEffect,s=t.useLayoutEffect,y=t.useDebugValue;function i(n,u){var w=u(),N=h({inst:{value:w,getSnapshot:u}}),v=N[0].inst,L=N[1];return s(function(){v.value=w,v.getSnapshot=u,p(v)&&L({inst:v})},[n,w,u]),m(function(){return p(v)&&L({inst:v}),n(function(){p(v)&&L({inst:v})})},[n]),y(w),w}function p(n){var u=n.getSnapshot;n=n.value;try{var w=u();return!o(n,w)}catch{return!0}}function l(n,u){return u()}var j=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:i;return X.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:j,X}var ne;function Le(){return ne||(ne=1,V.exports=Se()),V.exports}var Ee=Le();const Re=(t,r)=>W(r)?r:Ce(r)&&W(r.defaultValue)?r.defaultValue:Array.isArray(t)?t[t.length-1]:t,Oe={t:Re,ready:!1},Ie=()=>()=>{},Te=(t,r={})=>{var I,U,R;const{i18n:o}=r,{i18n:h,defaultNS:m}=a.useContext(he)||{},s=o||h||ge();s&&!s.reportNamespaces&&(s.reportNamespaces=new me),s||le(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const y=a.useMemo(()=>{var d;return{...pe(),...(d=s==null?void 0:s.options)==null?void 0:d.react,...r}},[s,r]),{useSuspense:i,keyPrefix:p}=y,l=t||m||((I=s==null?void 0:s.options)==null?void 0:I.defaultNS),j=W(l)?[l]:l||["translation"],n=a.useMemo(()=>j,j);(R=(U=s==null?void 0:s.reportNamespaces)==null?void 0:U.addUsedNamespaces)==null||R.call(U,n);const u=a.useRef(0),w=a.useCallback(d=>{if(!s)return Ie;const{bindI18n:f,bindI18nStore:g}=y,x=()=>{u.current+=1,d()};return f&&s.on(f,x),g&&s.store.on(g,x),()=>{f&&f.split(" ").forEach(T=>s.off(T,x)),g&&g.split(" ").forEach(T=>s.store.off(T,x))}},[s,y]),N=a.useRef(),v=a.useCallback(()=>{if(!s)return Oe;const d=!!(s.isInitialized||s.initializedStoreOnce)&&n.every(J=>ke(J,s,y)),f=r.lng||s.language,g=u.current,x=N.current;if(x&&x.ready===d&&x.lng===f&&x.keyPrefix===p&&x.revision===g)return x;const O={t:s.getFixedT(f,y.nsMode==="fallback"?n:n[0],p),ready:d,lng:f,keyPrefix:p,revision:g};return N.current=O,O},[s,n,p,y,r.lng]),[L,F]=a.useState(0),{t:z,ready:_}=Ee.useSyncExternalStore(w,v,v);a.useEffect(()=>{if(s&&!_&&!i){const d=()=>F(f=>f+1);r.lng?te(s,r.lng,n,d):Y(s,n,d)}},[s,r.lng,n,_,i,L]);const C=s||{},E=a.useRef(null),D=a.useRef(),M=d=>{const f=Object.getOwnPropertyDescriptors(d);f.__original&&delete f.__original;const g=Object.create(Object.getPrototypeOf(d),f);if(!Object.prototype.hasOwnProperty.call(g,"__original"))try{Object.defineProperty(g,"__original",{value:d,writable:!1,enumerable:!1,configurable:!1})}catch{}return g},K=a.useMemo(()=>{const d=C,f=d==null?void 0:d.language;let g=d;d&&(E.current&&E.current.__original===d?D.current!==f?(g=M(d),E.current=g,D.current=f):g=E.current:(g=M(d),E.current=g,D.current=f));const x=[z,g,_];return x.t=z,x.i18n=g,x.ready=_,x},[z,C,_,C.resolvedLanguage,C.language,C.languages]);if(s&&i&&!_)throw new Promise(d=>{const f=()=>d();r.lng?te(s,r.lng,n,f):Y(s,n,f)});return K},De=({className:t="w-5 h-5"})=>e.jsx("img",{src:"/icons/claude-ai-icon.svg",alt:"Claude",className:t}),He=({className:t="w-5 h-5"})=>{const{isDarkMode:r}=oe();return e.jsx("img",{src:r?"/icons/cursor-white.svg":"/icons/cursor.svg",alt:"Cursor",className:t})},Fe=({className:t="w-5 h-5"})=>{const{isDarkMode:r}=oe();return e.jsx("img",{src:r?"/icons/codex-white.svg":"/icons/codex.svg",alt:"Codex",className:t})},Ae=`
|
|
10
|
-
.xterm .xterm-screen {
|
|
11
|
-
outline: none !important;
|
|
12
|
-
}
|
|
13
|
-
.xterm:focus .xterm-screen {
|
|
14
|
-
outline: none !important;
|
|
15
|
-
}
|
|
16
|
-
.xterm-screen:focus {
|
|
17
|
-
outline: none !important;
|
|
18
|
-
}
|
|
19
|
-
`;if(typeof document<"u"){const t=document.createElement("style");t.type="text/css",t.innerText=Ae,document.head.appendChild(t)}function _e(t){if(!t||typeof document>"u")return!1;const r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="fixed",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select();let o=!1;try{o=document.execCommand("copy")}catch{o=!1}finally{document.body.removeChild(r)}return o}const se="https://auth.openai.com/codex/device";function ae(t){return typeof t=="string"&&/\bcodex\s+login\b/i.test(t)}function Me({selectedProject:t,selectedSession:r,initialCommand:o,isPlainShell:h=!1,onProcessComplete:m,minimal:s=!1,autoConnect:y=!1}){const{t:i}=Te("chat"),p=a.useRef(null),l=a.useRef(null),j=a.useRef(null),n=a.useRef(null),[u,w]=a.useState(!1),[N,v]=a.useState(!1),[L,F]=a.useState(!1),[z,_]=a.useState(null),[C,E]=a.useState(!1),[D,M]=a.useState(""),[K,I]=a.useState("idle"),[U,R]=a.useState(!1),d=a.useRef(t),f=a.useRef(r),g=a.useRef(o),x=a.useRef(h),T=a.useRef(m),O=a.useRef("");a.useEffect(()=>{d.current=t,f.current=r,g.current=o,x.current=h,T.current=m});const J=a.useCallback((b=O.current)=>{if(!b)return!1;const S=window.open(b,"_blank","noopener,noreferrer");if(S){try{S.opener=null}catch{}return!0}return!1},[]),$=a.useCallback(async(b=O.current)=>{var k;if(!b)return!1;let S=!1;try{typeof navigator<"u"&&((k=navigator.clipboard)!=null&&k.writeText)&&(await navigator.clipboard.writeText(b),S=!0)}catch{S=!1}return S||(S=_e(b)),S},[]),Q=a.useCallback(async()=>{if(!(C||u))try{let b;b=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/shell`,n.current=new WebSocket(b),n.current.onopen=()=>{w(!0),E(!1),O.current="",M(""),I("idle"),R(!1),setTimeout(()=>{var k,c;j.current&&l.current&&(j.current.fit(),n.current.send(JSON.stringify({type:"init",projectPath:d.current.fullPath||d.current.path,sessionId:x.current?null:(k=f.current)==null?void 0:k.id,hasSession:x.current?!1:!!f.current,provider:x.current?"plain-shell":((c=f.current)==null?void 0:c.__provider)||"claude",cols:l.current.cols,rows:l.current.rows,initialCommand:g.current,isPlainShell:x.current})))},100)},n.current.onmessage=k=>{try{const c=JSON.parse(k.data);if(c.type==="output"){let A=c.data;if(x.current&&T.current){const B=A.replace(/\x1b\[[0-9;]*m/g,"");if(B.includes("Process exited with code 0"))T.current(0);else if(B.match(/Process exited with code (\d+)/)){const H=parseInt(B.match(/Process exited with code (\d+)/)[1]);H!==0&&T.current(H)}}l.current&&l.current.write(A)}else(c.type==="auth_url"&&c.url||c.type==="url_open"&&c.url)&&(O.current=c.url,M(c.url),I("idle"),R(!1))}catch(c){console.error("[Shell] Error handling WebSocket message:",c,k.data)}},n.current.onclose=k=>{w(!1),E(!1),I("idle"),R(!1),l.current&&(l.current.clear(),l.current.write("\x1B[2J\x1B[H"))},n.current.onerror=k=>{w(!1),E(!1)}}catch{w(!1),E(!1)}},[C,u,J]),q=a.useCallback(()=>{!N||u||C||(E(!0),Q())},[N,u,C,Q]),G=a.useCallback(()=>{n.current&&(n.current.close(),n.current=null),l.current&&(l.current.clear(),l.current.write("\x1B[2J\x1B[H")),w(!1),E(!1),O.current="",M(""),I("idle"),R(!1)},[]),P=a.useMemo(()=>r?r.__provider==="cursor"?r.name||"Untitled Session":r.summary||"New Session":null,[r]),ie=a.useMemo(()=>P?P.slice(0,30):null,[P]),ue=a.useMemo(()=>P?P.slice(0,50):null,[P]),de=()=>{F(!0),n.current&&(n.current.close(),n.current=null),l.current&&(l.current.dispose(),l.current=null,j.current=null),w(!1),v(!1),O.current="",M(""),I("idle"),R(!1),setTimeout(()=>{F(!1)},200)};if(a.useEffect(()=>{const b=(r==null?void 0:r.id)||null;z!==null&&z!==b&&N&&G(),_(b)},[r==null?void 0:r.id,N,G]),a.useEffect(()=>{if(!p.current||!t||L||l.current)return;l.current=new ye.Terminal({cursorBlink:!0,fontSize:14,fontFamily:'Menlo, Monaco, "Courier New", monospace',allowProposedApi:!0,allowTransparency:!1,convertEol:!0,scrollback:1e4,tabStopWidth:4,windowsMode:!1,macOptionIsMeta:!0,macOptionClickForcesSelection:!0,theme:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#ffffff",cursorAccent:"#1e1e1e",selection:"#264f78",selectionForeground:"#ffffff",black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",magenta:"#bc3fbc",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightMagenta:"#d670d6",brightCyan:"#29b8db",brightWhite:"#ffffff",extendedAnsi:["#000000","#800000","#008000","#808000","#000080","#800080","#008080","#c0c0c0","#808080","#ff0000","#00ff00","#ffff00","#0000ff","#ff00ff","#00ffff","#ffffff"]}}),j.current=new be.FitAddon;const b=new we.WebglAddon,S=new Ne.WebLinksAddon;l.current.loadAddon(j.current),s||l.current.loadAddon(S);try{l.current.loadAddon(b)}catch{console.warn("[Shell] WebGL renderer unavailable, using Canvas fallback")}l.current.open(p.current),l.current.attachCustomKeyEventHandler(c=>{var B,H,Z;const A=ae(g.current)?se:O.current;return c.type==="keydown"&&s&&x.current&&A&&!c.ctrlKey&&!c.metaKey&&!c.altKey&&((B=c.key)==null?void 0:B.toLowerCase())==="c"&&$(A).catch(()=>{}),c.type==="keydown"&&(c.ctrlKey||c.metaKey)&&((H=c.key)==null?void 0:H.toLowerCase())==="c"&&l.current.hasSelection()?(c.preventDefault(),c.stopPropagation(),document.execCommand("copy"),!1):c.type==="keydown"&&(c.ctrlKey||c.metaKey)&&((Z=c.key)==null?void 0:Z.toLowerCase())==="v"?(c.preventDefault(),c.stopPropagation(),navigator.clipboard.readText().then(fe=>{n.current&&n.current.readyState===WebSocket.OPEN&&n.current.send(JSON.stringify({type:"input",data:fe}))}).catch(()=>{}),!1):!0}),setTimeout(()=>{j.current&&(j.current.fit(),l.current&&n.current&&n.current.readyState===WebSocket.OPEN&&n.current.send(JSON.stringify({type:"resize",cols:l.current.cols,rows:l.current.rows})))},100),v(!0),l.current.onData(c=>{n.current&&n.current.readyState===WebSocket.OPEN&&n.current.send(JSON.stringify({type:"input",data:c}))});const k=new ResizeObserver(()=>{j.current&&l.current&&setTimeout(()=>{j.current.fit(),n.current&&n.current.readyState===WebSocket.OPEN&&n.current.send(JSON.stringify({type:"resize",cols:l.current.cols,rows:l.current.rows}))},50)});return p.current&&k.observe(p.current),()=>{k.disconnect(),n.current&&(n.current.readyState===WebSocket.OPEN||n.current.readyState===WebSocket.CONNECTING)&&n.current.close(),n.current=null,l.current&&(l.current.dispose(),l.current=null)}},[(t==null?void 0:t.path)||(t==null?void 0:t.fullPath),L,s,$]),a.useEffect(()=>{!y||!N||C||u||q()},[y,N,C,u,q]),!t)return e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gray-100 dark:bg-gray-800 rounded-full flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:i("shell.selectProject.title")}),e.jsx("p",{children:i("shell.selectProject.description")})]})});if(s){const b=ae(o)?se:D,S=!!b,k=S&&!U,c=S&&U;return e.jsxs("div",{className:"h-full w-full bg-gray-900 relative",children:[e.jsx("div",{ref:p,className:"h-full w-full focus:outline-none",style:{outline:"none"}}),k&&e.jsx("div",{className:"absolute inset-x-0 bottom-14 z-20 border-t border-gray-700/80 bg-gray-900/95 p-3 backdrop-blur-sm md:hidden",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-gray-300",children:"Open or copy the login URL:"}),e.jsx("button",{type:"button",onClick:()=>R(!0),className:"rounded bg-gray-700 px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-gray-100 hover:bg-gray-600",children:"Hide"})]}),e.jsx("input",{type:"text",value:b,readOnly:!0,onClick:A=>A.currentTarget.select(),className:"w-full rounded border border-gray-600 bg-gray-800 px-2 py-1 text-xs text-gray-100 focus:outline-none focus:ring-1 focus:ring-blue-500","aria-label":"Authentication URL"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{J(b)},className:"flex-1 rounded bg-blue-600 px-3 py-2 text-xs font-medium text-white hover:bg-blue-700",children:"Open URL"}),e.jsx("button",{type:"button",onClick:async()=>{const A=await $(b);I(A?"copied":"failed")},className:"flex-1 rounded bg-gray-700 px-3 py-2 text-xs font-medium text-white hover:bg-gray-600",children:K==="copied"?"Copied":"Copy URL"})]})]})}),c&&e.jsx("div",{className:"absolute bottom-14 right-3 z-20 md:hidden",children:e.jsx("button",{type:"button",onClick:()=>R(!1),className:"rounded bg-gray-800/95 px-3 py-2 text-xs font-medium text-gray-100 shadow-lg backdrop-blur-sm hover:bg-gray-700",children:"Show login URL"})})]})}return e.jsxs("div",{className:"h-full flex flex-col bg-gray-900 w-full",children:[e.jsx("div",{className:"flex-shrink-0 bg-gray-800 border-b border-gray-700 px-4 py-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${u?"bg-green-500":"bg-red-500"}`}),r&&e.jsxs("span",{className:"text-xs text-blue-300",children:["(",ie,"...)"]}),!r&&e.jsx("span",{className:"text-xs text-gray-400",children:i("shell.status.newSession")}),!N&&e.jsx("span",{className:"text-xs text-yellow-400",children:i("shell.status.initializing")}),L&&e.jsx("span",{className:"text-xs text-blue-400",children:i("shell.status.restarting")})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[u&&e.jsxs("button",{onClick:G,className:"px-3 py-1 text-xs bg-red-600 text-white rounded hover:bg-red-700 flex items-center space-x-1",title:i("shell.actions.disconnectTitle"),children:[e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),e.jsx("span",{children:i("shell.actions.disconnect")})]}),e.jsxs("button",{onClick:de,disabled:L||u,className:"text-xs text-gray-400 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-1",title:i("shell.actions.restartTitle"),children:[e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),e.jsx("span",{children:i("shell.actions.restart")})]})]})]})}),e.jsxs("div",{className:"flex-1 p-2 overflow-hidden relative",children:[e.jsx("div",{ref:p,className:"h-full w-full focus:outline-none",style:{outline:"none"}}),!N&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-900 bg-opacity-90",children:e.jsx("div",{className:"text-white",children:i("shell.loading")})}),N&&!u&&!C&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-900 bg-opacity-90 p-4",children:e.jsxs("div",{className:"text-center max-w-sm w-full",children:[e.jsxs("button",{onClick:q,className:"px-6 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors flex items-center justify-center space-x-2 text-base font-medium w-full sm:w-auto",title:i("shell.actions.connectTitle"),children:[e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),e.jsx("span",{children:i("shell.actions.connect")})]}),e.jsx("p",{className:"text-gray-400 text-sm mt-3 px-2",children:h?i("shell.runCommand",{command:o||i("shell.defaultCommand"),projectName:t.displayName}):r?i("shell.resumeSession",{displayName:ue}):i("shell.startSession")})]})}),C&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-900 bg-opacity-90 p-4",children:e.jsxs("div",{className:"text-center max-w-sm w-full",children:[e.jsxs("div",{className:"flex items-center justify-center space-x-3 text-yellow-400",children:[e.jsx("div",{className:"w-6 h-6 animate-spin rounded-full border-2 border-yellow-400 border-t-transparent"}),e.jsx("span",{className:"text-base font-medium",children:i("shell.connecting")})]}),e.jsx("p",{className:"text-gray-400 text-sm mt-3 px-2",children:h?i("shell.runCommand",{command:o||i("shell.defaultCommand"),projectName:t.displayName}):i("shell.startCli",{projectName:t.displayName})})]})})]})]})}function Ue({project:t,session:r=null,command:o=null,isPlainShell:h=null,autoConnect:m=!0,onComplete:s=null,onClose:y=null,title:i=null,className:p="",showHeader:l=!0,compact:j=!1,minimal:n=!1}){const[u,w]=a.useState(!1),N=h!==null?h:o!==null,v=a.useCallback(L=>{w(!0),s&&s(L)},[s]);return t?e.jsxs("div",{className:`h-full w-full flex flex-col ${p}`,children:[!n&&l&&i&&e.jsx("div",{className:"flex-shrink-0 bg-gray-800 border-b border-gray-700 px-4 py-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h3",{className:"text-sm font-medium text-gray-200",children:i}),u&&e.jsx("span",{className:"text-xs text-green-400",children:"(Completed)"})]}),y&&e.jsx("button",{onClick:y,className:"text-gray-400 hover:text-white",title:"Close",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),e.jsx("div",{className:"flex-1 w-full min-h-0",children:e.jsx(Me,{selectedProject:t,selectedSession:r,initialCommand:o,isPlainShell:N,onProcessComplete:v,minimal:n,autoConnect:n?!0:m})})]}):e.jsx("div",{className:`h-full flex items-center justify-center ${p}`,children:e.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gray-100 dark:bg-gray-800 rounded-full flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 002 2z"})})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Project Selected"}),e.jsx("p",{children:"A project is required to open a shell"})]})})}function Je({isOpen:t,onClose:r,provider:o="claude",project:h,onComplete:m,customCommand:s,isAuthenticated:y=!1,isOnboarding:i=!1}){if(!t)return null;const p=()=>{if(s)return s;switch(o){case"claude":return y?"claude setup-token --dangerously-skip-permissions":i?"claude /exit --dangerously-skip-permissions":"claude /login --dangerously-skip-permissions";case"cursor":return"cursor-agent login";case"codex":return"codex login";default:return y?"claude setup-token --dangerously-skip-permissions":i?"claude /exit --dangerously-skip-permissions":"claude /login --dangerously-skip-permissions"}},l=()=>{switch(o){case"claude":return"Claude CLI Login";case"cursor":return"Cursor CLI Login";case"codex":return"Codex CLI Login";default:return"CLI Login"}},j=n=>{m&&m(n)};return e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[9999] max-md:items-stretch max-md:justify-stretch",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-4xl h-3/4 flex flex-col md:max-w-4xl md:h-3/4 md:rounded-lg md:m-4 max-md:max-w-none max-md:h-full max-md:rounded-none max-md:m-0",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l()}),e.jsx("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors","aria-label":"Close login modal",children:e.jsx(je,{className:"w-6 h-6"})})]}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(Ue,{project:h,command:p(),onComplete:j,minimal:!0})})]})})}export{De as C,Je as L,Me as S,He as a,Fe as b,Ue as c,Le as r,Te as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./percentages-BXMCSKIN-Be6p9phi.js";import"./vendor-syntax-DnmwQQJF.js";import"./vendor-react-9mUTKBHH.js";import"./vendor-markdown-BXEi_H3G.js";import"./AppContent-DTZ2FbvM.js";import"./index-BGmwbRlb.js";import"./vendor-icons-Dh9m_Ydt.js";import"./vendor-i18n-DCFGyhQR.js";import"./LoginModal-CWoFm0au.js";import"./vendor-xterm-CZq1hqo1.js";import"./vendor-codemirror-rix45NST.js";import"./vendor-codemirror-langs-BH1ZcKHY.js";var e={paste:"Yapışdır",pasteAsPlaintext:"Düz mətn kimi yapışdırın",pasteCharts:"Diaqramları yapışdırın",selectAll:"Hamısını seç",multiSelect:"Seçimə element əlavə edin",moveCanvas:"Kanvası köçürün",cut:"Kəs",copy:"Kopyala",copyAsPng:"PNG olaraq panoya kopyala",copyAsSvg:"SVG olaraq panoya kopyala",copyText:"Mətn olaraq panoya kopyala",copySource:"",convertToCode:"",bringForward:"Önə daşı",sendToBack:"Geriyə göndərin",bringToFront:"Önə gətirin",sendBackward:"Geriyə göndərin",delete:"Sil",copyStyles:"Stilləri kopyalayın",pasteStyles:"Stilləri yapışdırın",stroke:"Strok rəngi",background:"Arxa fon",fill:"Doldur",strokeWidth:"Strok eni",strokeStyle:"Strok stili",strokeStyle_solid:"Solid",strokeStyle_dashed:"Kəsik",strokeStyle_dotted:"Nöqtəli",sloppiness:"Səliqəsizlik",opacity:"Şəffaflıq",textAlign:"Mətni uyğunlaşdır",edges:"Kənarlar",sharp:"Kəskin",round:"Dəyirmi",arrowheads:"Ox ucları",arrowhead_none:"Heç biri",arrowhead_arrow:"Ox",arrowhead_bar:"Çubuq",arrowhead_circle:"",arrowhead_circle_outline:"",arrowhead_triangle:"Üçbucaq",arrowhead_triangle_outline:"",arrowhead_diamond:"",arrowhead_diamond_outline:"",fontSize:"Şrift ölçüsü",fontFamily:"Şrift qrupu",addWatermark:'"Made with Excalidraw" əlavə et',handDrawn:"Əllə çəkilmiş",normal:"Normal",code:"Kod",small:"Kiçik",medium:"Orta",large:"Böyük",veryLarge:"Çox böyük",solid:"Solid",hachure:"Ştrix",zigzag:"Ziqzaq",crossHatch:"Çarpaz dəlik",thin:"İncə",bold:"Qalın",left:"Sol",center:"Mərkəz",right:"Sağ",extraBold:"Ekstra qalın",architect:"Memar",artist:"Rəssam",cartoonist:"Karikaturaçı",fileTitle:"Fayl adı",colorPicker:"Rəng seçən",canvasColors:"Kanvas üzərində istifadə olunur",canvasBackground:"Kanvas arxa fonu",drawingCanvas:"Kanvas çəkmək",layers:"Qatlar",actions:"Hərəkətlər",language:"Dil",liveCollaboration:"Canlı əməkdaşlıq...",duplicateSelection:"Dublikat",untitled:"Başlıqsız",name:"Ad",yourName:"Adınız",madeWithExcalidraw:"Excalidraw ilə hazırlanmışdır",group:"Qrup şəklində seçim",ungroup:"Qrupsuz seçim",collaborators:"",showGrid:"",addToLibrary:"",removeFromLibrary:"",libraryLoadingMessage:"",libraries:"",loadingScene:"",align:"",alignTop:"",alignBottom:"",alignLeft:"",alignRight:"",centerVertically:"",centerHorizontally:"",distributeHorizontally:"",distributeVertically:"",flipHorizontal:"",flipVertical:"",viewMode:"",share:"",showStroke:"",showBackground:"",toggleTheme:"",personalLib:"",excalidrawLib:"",decreaseFontSize:"",increaseFontSize:"",unbindText:"",bindText:"",createContainerFromText:"",link:{edit:"",editEmbed:"",create:"",createEmbed:"",label:"",labelEmbed:"",empty:""},lineEditor:{edit:"",exit:""},elementLock:{lock:"",unlock:"",lockAll:"",unlockAll:""},statusPublished:"",sidebarLock:"",selectAllElementsInFrame:"",removeAllElementsFromFrame:"",eyeDropper:"",textToDiagram:"",prompt:""},a={noItems:"",hint_emptyLibrary:"",hint_emptyPrivateLibrary:""},r={clearReset:"",exportJSON:"",exportImage:"",export:"",copyToClipboard:"",save:"",saveAs:"",load:"",getShareableLink:"",close:"",selectLanguage:"",scrollBackToContent:"",zoomIn:"",zoomOut:"",resetZoom:"",menu:"",done:"",edit:"",undo:"",redo:"",resetLibrary:"",createNewRoom:"",fullScreen:"",darkMode:"",lightMode:"",zenMode:"",objectsSnapMode:"",exitZenMode:"",cancel:"",clear:"",remove:"",embed:"",publishLibrary:"",submit:"",confirm:"",embeddableInteractionButton:""},o={clearReset:"",couldNotCreateShareableLink:"",couldNotCreateShareableLinkTooBig:"",couldNotLoadInvalidFile:"",importBackendFailed:"",cannotExportEmptyCanvas:"",couldNotCopyToClipboard:"",decryptFailed:"",uploadedSecurly:"",loadSceneOverridePrompt:"",collabStopOverridePrompt:"",errorAddingToLibrary:"",errorRemovingFromLibrary:"",confirmAddLibrary:"",imageDoesNotContainScene:"",cannotRestoreFromImage:"",invalidSceneUrl:"",resetLibrary:"",removeItemsFromsLibrary:"",invalidEncryptionKey:"",collabOfflineWarning:""},t={unsupportedFileType:"",imageInsertError:"",fileTooBig:"",svgImageInsertError:"",failedToFetchImage:"",invalidSVGString:"",cannotResolveCollabServer:"",importLibraryError:"",collabSaveFailed:"",collabSaveFailed_sizeExceeded:"",imageToolNotSupported:"",brave_measure_text_error:{line1:"",line2:"",line3:"",line4:""},libraryElementTypeError:{embeddable:"",iframe:"",image:""},asyncPasteFailedOnRead:"",asyncPasteFailedOnParse:"",copyToSystemClipboardFailed:""},i={selection:"",image:"",rectangle:"",diamond:"",ellipse:"",arrow:"",line:"",freedraw:"",text:"",library:"",lock:"",penMode:"",link:"",eraser:"",frame:"",magicframe:"",embeddable:"",laser:"",hand:"",extraTools:"",mermaidToExcalidraw:"",magicSettings:""},l={canvasActions:"",selectedShapeActions:"",shapes:""},n={canvasPanning:"",linearElement:"",freeDraw:"",text:"",embeddable:"",text_selected:"",text_editing:"",linearElementMulti:"",lockAngle:"",resize:"",resizeImage:"",rotate:"",lineEditor_info:"",lineEditor_pointSelected:"",lineEditor_nothingSelected:"",placeImage:"",publishLibrary:"",bindTextToElement:"",deepBoxSelect:"",eraserRevert:"",firefox_clipboard_write:"",disableSnapping:""},s={cannotShowPreview:"",canvasTooBig:"",canvasTooBigTip:""},d={headingMain:"",clearCanvasMessage:"",clearCanvasCaveat:"",trackedToSentry:"",openIssueMessage:"",sceneContent:""},u={desc_intro:"",desc_privacy:"",button_startSession:"",button_stopSession:"",desc_inProgressIntro:"",desc_shareLink:"",desc_exitSession:"",shareTitle:""},c={title:""},m={disk_title:"",disk_details:"",disk_button:"",link_title:"",link_details:"",link_button:"",excalidrawplus_description:"",excalidrawplus_button:"",excalidrawplus_exportError:""},p={blog:"",click:"",deepSelect:"",deepBoxSelect:"",curvedArrow:"",curvedLine:"",documentation:"",doubleClick:"",drag:"",editor:"",editLineArrowPoints:"",editText:"",github:"",howto:"",or:"",preventBinding:"",tools:"",shortcuts:"",textFinish:"",textNewLine:"",title:"",view:"",zoomToFit:"",zoomToSelection:"",toggleElementLock:"",movePageUpDown:"",movePageLeftRight:""},g={title:""},b={title:"",itemName:"",authorName:"",githubUsername:"",twitterUsername:"",libraryName:"",libraryDesc:"",website:"",placeholder:{authorName:"",libraryName:"",libraryDesc:"",githubHandle:"",twitterHandle:"",website:""},errors:{required:"",website:""},noteDescription:"",noteGuidelines:"",noteLicense:"",noteItems:"",atleastOneLibItem:"",republishWarning:""},y={title:"",content:""},x={resetLibrary:"",removeItemsFromLib:""},h={header:"",label:{withBackground:"",onlySelected:"",darkMode:"",embedScene:"",scale:"",padding:""},tooltip:{embedScene:""},title:{exportToPng:"",exportToSvg:"",copyPngToClipboard:""},button:{exportToPng:"",exportToSvg:"",copyPngToClipboard:""}},k={tooltip:"",link:""},S={angle:"",element:"",elements:"",height:"",scene:"",selected:"",storage:"",title:"",total:"",version:"",versionCopy:"",versionNotAvailable:"",width:""},v={addedToLibrary:"",copyStyles:"",copyToClipboard:"",copyToClipboardAsPng:"",fileSaved:"",fileSavedToFilename:"",canvas:"",selection:"",pasteAsSingleElement:"",unableToEmbed:"",unrecognizedLinkFormat:""},F={transparent:"",black:"",white:"",red:"",pink:"",grape:"",violet:"",gray:"",blue:"",cyan:"",teal:"",green:"",yellow:"",orange:"",bronze:""},w={app:{center_heading:"",center_heading_plus:"",menuHint:""},defaults:{menuHint:"",center_heading:"",toolbarHint:"",helpHint:""}},E={mostUsedCustomColors:"",colors:"",shades:"",hexCode:"",noShades:""},T={action:{exportToImage:{title:"",button:"",description:""},saveToDisk:{title:"",button:"",description:""},excalidrawPlus:{title:"",button:"",description:""}},modal:{loadFromFile:{title:"",button:"",description:""},shareableLink:{title:"",button:"",description:""}}},_={title:"",button:"",description:"",syntax:"",preview:""},H={labels:e,library:a,buttons:r,alerts:o,errors:t,toolBar:i,headings:l,hints:n,canvasError:s,errorSplash:d,roomDialog:u,errorDialog:c,exportDialog:m,helpDialog:p,clearCanvasDialog:g,publishDialog:b,publishSuccessDialog:y,confirmDialog:x,imageExportDialog:h,encrypted:k,stats:S,toast:v,colors:F,welcomeScreen:w,colorPicker:E,overwriteConfirm:T,mermaid:_};export{o as alerts,r as buttons,s as canvasError,g as clearCanvasDialog,E as colorPicker,F as colors,x as confirmDialog,H as default,k as encrypted,c as errorDialog,d as errorSplash,t as errors,m as exportDialog,l as headings,p as helpDialog,n as hints,h as imageExportDialog,e as labels,a as library,_ as mermaid,T as overwriteConfirm,b as publishDialog,y as publishSuccessDialog,u as roomDialog,S as stats,v as toast,i as toolBar,w as welcomeScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./index-BHZfFT_V.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s as A,d as S,p as G}from"./styles-9a916d00-DS4wRpL7.js";import{c as v,l as y,d as B,e as W,r as $,u as M,Y as I}from"./index-BHZfFT_V.js";import{G as Y}from"./graph-DXM7lcy1.js";import{l as O}from"./layout-B_11mCXA.js";import"./percentages-BXMCSKIN-Be6p9phi.js";import{l as P}from"./line-B-qmK_vI.js";import"./vendor-syntax-DnmwQQJF.js";import"./vendor-react-9mUTKBHH.js";import"./vendor-markdown-BXEi_H3G.js";import"./AppContent-DTZ2FbvM.js";import"./index-BGmwbRlb.js";import"./vendor-icons-Dh9m_Ydt.js";import"./vendor-i18n-DCFGyhQR.js";import"./LoginModal-CWoFm0au.js";import"./vendor-xterm-CZq1hqo1.js";import"./vendor-codemirror-rix45NST.js";import"./vendor-codemirror-langs-BH1ZcKHY.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";let H=0;const X=function(i,r,t,o,p){const g=function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}};r.points=r.points.filter(e=>!Number.isNaN(e.y));const s=r.points,c=P().x(function(e){return e.x}).y(function(e){return e.y}).curve($),n=i.append("path").attr("d",c(s)).attr("id","edge"+H).attr("class","relation");let a="";o.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+a+"#"+g(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+a+"#"+g(t.relation.type2)+"End)");let m,h;const x=r.points.length;let b=M.calcLabelPosition(r.points);m=b.x,h=b.y;let u,f,w,k;if(x%2!==0&&x>1){let e=M.calcCardinalityPosition(t.relation.type1!=="none",r.points,r.points[0]),d=M.calcCardinalityPosition(t.relation.type2!=="none",r.points,r.points[x-1]);y.debug("cardinality_1_point "+JSON.stringify(e)),y.debug("cardinality_2_point "+JSON.stringify(d)),u=e.x,f=e.y,w=d.x,k=d.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),d=e.append("text").attr("class","label").attr("x",m).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=d;const l=d.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",l.x-o.padding/2).attr("y",l.y-o.padding/2).attr("width",l.width+o.padding).attr("height",l.height+o.padding)}y.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",f).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",k).attr("fill","black").attr("font-size","6").text(t.relationTitle2),H++},J=function(i,r,t,o){y.debug("Rendering class ",r,t);const p=r.id,g={id:p,label:r.id,width:0,height:0},s=i.append("g").attr("id",o.db.lookUpDomId(p)).attr("class","classGroup");let c;r.link?c=s.append("svg:a").attr("xlink:href",r.link).attr("target",r.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;r.annotations.forEach(function(d){const l=c.append("tspan").text("«"+d+"»");n||l.attr("dy",t.textHeight),n=!1});let a=C(r);const m=c.append("tspan").text(a).attr("class","title");n||m.attr("dy",t.textHeight);const h=c.node().getBBox().height;let x,b,u;if(r.members.length>0){x=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin/2).attr("y2",t.padding+h+t.dividerMargin/2);const d=s.append("text").attr("x",t.padding).attr("y",h+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,r.members.forEach(function(l){_(d,l,n,t),n=!1}),b=d.node().getBBox()}if(r.methods.length>0){u=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin+b.height).attr("y2",t.padding+h+t.dividerMargin+b.height);const d=s.append("text").attr("x",t.padding).attr("y",h+2*t.dividerMargin+b.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,r.methods.forEach(function(l){_(d,l,n,t),n=!1})}const f=s.node().getBBox();var w=" ";r.cssClasses.length>0&&(w=w+r.cssClasses.join(" "));const e=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",f.width+2*t.padding).attr("height",f.height+t.padding+.5*t.dividerMargin).attr("class",w).node().getBBox().width;return c.node().childNodes.forEach(function(d){d.setAttribute("x",(e-d.getBBox().width)/2)}),r.tooltip&&c.insert("title").text(r.tooltip),x&&x.attr("x2",e),u&&u.attr("x2",e),g.width=e,g.height=f.height+t.padding+.5*t.dividerMargin,g},C=function(i){let r=i.id;return i.type&&(r+="<"+I(i.type)+">"),r},Z=function(i,r,t,o){y.debug("Rendering note ",r,t);const p=r.id,g={id:p,text:r.text,width:0,height:0},s=i.append("g").attr("id",p).attr("class","classGroup");let c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${r.text}"`).split(`
|
|
2
|
-
`);n.forEach(function(x){y.debug(`Adding line: ${x}`),c.append("tspan").text(x).attr("class","title").attr("dy",t.textHeight)});const a=s.node().getBBox(),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",a.width+2*t.padding).attr("height",a.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return c.node().childNodes.forEach(function(x){x.setAttribute("x",(h-x.getBBox().width)/2)}),g.width=h,g.height=a.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin,g},_=function(i,r,t,o){const{displayText:p,cssStyle:g}=r.getDisplayDetails(),s=i.append("tspan").attr("x",o.padding).text(p);g!==""&&s.attr("style",r.cssStyle),t||s.attr("dy",o.textHeight)},N={getClassTitleString:C,drawClass:J,drawEdge:X,drawNote:Z};let T={};const E=20,L=function(i){const r=Object.entries(T).find(t=>t[1].label===i);if(r)return r[0]},R=function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.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 18,7 L9,13 L14,7 L9,1 Z")},F=function(i,r,t,o){const p=v().class;T={},y.info("Rendering diagram "+i);const g=v().securityLevel;let s;g==="sandbox"&&(s=B("#i"+r));const c=g==="sandbox"?B(s.nodes()[0].contentDocument.body):B("body"),n=c.select(`[id='${r}']`);R(n);const a=new Y({multigraph:!0});a.setGraph({isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const m=o.db.getClasses(),h=Object.keys(m);for(const e of h){const d=m[e],l=N.drawClass(n,d,p,o);T[l.id]=l,a.setNode(l.id,l),y.info("Org height: "+l.height)}o.db.getRelations().forEach(function(e){y.info("tjoho"+L(e.id1)+L(e.id2)+JSON.stringify(e)),a.setEdge(L(e.id1),L(e.id2),{relation:e},e.title||"DEFAULT")}),o.db.getNotes().forEach(function(e){y.debug(`Adding note: ${JSON.stringify(e)}`);const d=N.drawNote(n,e,p,o);T[d.id]=d,a.setNode(d.id,d),e.class&&e.class in m&&a.setEdge(e.id,L(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),O(a),a.nodes().forEach(function(e){e!==void 0&&a.node(e)!==void 0&&(y.debug("Node "+e+": "+JSON.stringify(a.node(e))),c.select("#"+(o.db.lookUpDomId(e)||e)).attr("transform","translate("+(a.node(e).x-a.node(e).width/2)+","+(a.node(e).y-a.node(e).height/2)+" )"))}),a.edges().forEach(function(e){e!==void 0&&a.edge(e)!==void 0&&(y.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),N.drawEdge(n,a.edge(e),a.edge(e).relation,p,o))});const u=n.node().getBBox(),f=u.width+E*2,w=u.height+E*2;W(n,w,f,p.useMaxWidth);const k=`${u.x-E} ${u.y-E} ${f} ${w}`;y.debug(`viewBox ${k}`),n.attr("viewBox",k)},U={draw:F},ct={parser:G,db:S,renderer:U,styles:A,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,S.clear()}};export{ct as diagram};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s as M,d as _,p as R}from"./styles-9a916d00-DS4wRpL7.js";import{l as d,c,d as w,u as B,_ as G,$ as D,a0 as E,a1 as C,j as $}from"./index-BHZfFT_V.js";import{G as z}from"./graph-DXM7lcy1.js";import{r as P}from"./index-3862675e-4idOQN2N.js";import"./percentages-BXMCSKIN-Be6p9phi.js";import"./layout-B_11mCXA.js";import"./vendor-syntax-DnmwQQJF.js";import"./vendor-react-9mUTKBHH.js";import"./vendor-markdown-BXEi_H3G.js";import"./clone-BG9u7vLi.js";import"./edges-e0da2a9e-CGBBhG8k.js";import"./createText-2e5e7dd3-B8jCDmF_.js";import"./line-B-qmK_vI.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./AppContent-DTZ2FbvM.js";import"./index-BGmwbRlb.js";import"./vendor-icons-Dh9m_Ydt.js";import"./vendor-i18n-DCFGyhQR.js";import"./LoginModal-CWoFm0au.js";import"./vendor-xterm-CZq1hqo1.js";import"./vendor-codemirror-rix45NST.js";import"./vendor-codemirror-langs-BH1ZcKHY.js";const S=s=>$.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,e,y,a){const t=Object.keys(s);d.info("keys:",t),d.info(s),t.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};e.setNode(l.id,p),A(l.classes,e,y,a,l.id),d.info("setNode",p)})},A=function(s,e,y,a,t){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==t).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f=D(n.styles),m=n.label??n.id,u=0,b={labelStyle:f.labelStyle,shape:"class_box",labelText:S(m),classData:n,rx:u,ry:u,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,t)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};e.setNode(n.id,b),t&&e.setParent(n.id,t),d.info("setNode",b)})},F=function(s,e,y,a){d.info(s),s.forEach(function(t,i){var o,r;const l=t,n="",p={labelStyle:"",style:""},f=l.text,m=0,h={labelStyle:p.labelStyle,shape:"note",labelText:S(f),noteData:l,rx:m,ry:m,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(e.setNode(l.id,h),d.info("setNode",h),!l.class||!(l.class in a))return;const b=y+i,x={id:`edgeNote${b}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,C)};e.setEdge(l.id,l.class,x,b)})},H=function(s,e){const y=c().flowchart;let a=0;s.forEach(function(t){var i;a++;const o={classes:"relation",pattern:t.relation.lineType==1?"dashed":"solid",id:`id_${t.id1}_${t.id2}_${a}`,arrowhead:t.type==="arrow_open"?"none":"normal",startLabelRight:t.relationTitle1==="none"?"":t.relationTitle1,endLabelLeft:t.relationTitle2==="none"?"":t.relationTitle2,arrowTypeStart:N(t.relation.type1),arrowTypeEnd:N(t.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,C)};if(d.info(o,t),t.style!==void 0){const r=D(t.style);o.style=r.style,o.labelStyle=r.labelStyle}t.text=t.title,t.text===void 0?t.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+t.text+"</span>"):(o.labelType="text",o.label=t.text.replace($.lineBreakRegex,`
|
|
2
|
-
`),t.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),e.setEdge(t.id1,t.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,e,y,a){d.info("Drawing class - ",e);const t=c().flowchart??c().class,i=c().securityLevel;d.info("config:",t);const o=(t==null?void 0:t.nodeSpacing)??50,r=(t==null?void 0:t.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),m=a.db.getNotes();d.info(f),q(n,l,e,a),A(p,l,e,a),H(f,l),F(m,l,f.length+1,p);let u;i==="sandbox"&&(u=w("#i"+e));const h=i==="sandbox"?w(u.nodes()[0].contentDocument.body):w("body"),b=h.select(`[id="${e}"]`),x=h.select("#"+e+" g");if(await P(x,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),B.insertTitle(b,"classTitleText",(t==null?void 0:t.titleTopMargin)??5,a.db.getDiagramTitle()),G(l,b,t==null?void 0:t.diagramPadding,t==null?void 0:t.useMaxWidth),!(t!=null&&t.htmlLabels)){const T=i==="sandbox"?u.nodes()[0].contentDocument:document,I=T.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const g of I){const L=g.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),g.insertBefore(v,g.firstChild)}}};function N(s){let e;switch(s){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const J={setConf:V,draw:W},ut={parser:R,db:_,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,_.clear()}};export{ut as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./graph-DXM7lcy1.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as o,p as i}from"./flowDb-956e92f1-C-_LFz70.js";import{f as m,a as t}from"./styles-c10674c1-nKRF6NrH.js";import{y as p}from"./index-BHZfFT_V.js";import"./graph-DXM7lcy1.js";import"./layout-B_11mCXA.js";import"./percentages-BXMCSKIN-Be6p9phi.js";import"./index-3862675e-4idOQN2N.js";import"./clone-BG9u7vLi.js";import"./edges-e0da2a9e-CGBBhG8k.js";import"./createText-2e5e7dd3-B8jCDmF_.js";import"./vendor-markdown-BXEi_H3G.js";import"./vendor-react-9mUTKBHH.js";import"./line-B-qmK_vI.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-O3ovC0x9.js";import"./vendor-syntax-DnmwQQJF.js";import"./AppContent-DTZ2FbvM.js";import"./index-BGmwbRlb.js";import"./vendor-icons-Dh9m_Ydt.js";import"./vendor-i18n-DCFGyhQR.js";import"./LoginModal-CWoFm0au.js";import"./vendor-xterm-CZq1hqo1.js";import"./vendor-codemirror-rix45NST.js";import"./vendor-codemirror-langs-BH1ZcKHY.js";const j={parser:i,db:o,renderer:t,styles:m,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,p({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{j as diagram};
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import{d as Sn}from"./percentages-BXMCSKIN-Be6p9phi.js";import{ae as Qe,af as _n,ag as je,ah as $e,ai as Je,aj as ne,ak as Yn,g as Un,s as Fn,n as En,o as Ln,a as An,b as Wn,c as Dt,d as Rt,e as In,al as nt,l as $t,j as On,q as Hn,u as Nn}from"./index-BHZfFT_V.js";import{g as Te}from"./vendor-react-9mUTKBHH.js";import{b as Vn,t as Fe,c as Pn,a as zn,l as Rn}from"./linear-Ph6uuYcX.js";import{i as qn}from"./init-Gi6I4Gst.js";import"./vendor-syntax-DnmwQQJF.js";import"./vendor-markdown-BXEi_H3G.js";import"./AppContent-DTZ2FbvM.js";import"./index-BGmwbRlb.js";import"./vendor-icons-Dh9m_Ydt.js";import"./vendor-i18n-DCFGyhQR.js";import"./LoginModal-CWoFm0au.js";import"./vendor-xterm-CZq1hqo1.js";import"./vendor-codemirror-rix45NST.js";import"./vendor-codemirror-langs-BH1ZcKHY.js";function Bn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Zn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Xn(t){return t}var Bt=1,re=2,de=3,qt=4,Ee=1e-6;function Gn(t){return"translate("+t+",0)"}function Qn(t){return"translate(0,"+t+")"}function jn(t){return e=>+t(e)}function $n(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Jn(){return!this.__axis}function Ke(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=t===Bt||t===qt?-1:1,g=t===qt||t===re?"x":"y",F=t===Bt||t===de?Gn:Qn;function w(T){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),W=i??(e.tickFormat?e.tickFormat.apply(e,n):Xn),D=Math.max(s,0)+y,E=e.range(),H=+E[0]+S,L=+E[E.length-1]+S,B=(e.bandwidth?$n:jn)(e.copy(),S),j=T.selection?T.selection():T,b=j.selectAll(".domain").data([null]),I=j.selectAll(".tick").data(X,e).order(),v=I.exit(),U=I.enter().append("g").attr("class","tick"),_=I.select("line"),x=I.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(U),_=_.merge(U.append("line").attr("stroke","currentColor").attr(g+"2",p*s)),x=x.merge(U.append("text").attr("fill","currentColor").attr(g,p*D).attr("dy",t===Bt?"0em":t===de?"0.71em":"0.32em")),T!==j&&(b=b.transition(T),I=I.transition(T),_=_.transition(T),x=x.transition(T),v=v.transition(T).attr("opacity",Ee).attr("transform",function(o){return isFinite(o=B(o))?F(o+S):this.getAttribute("transform")}),U.attr("opacity",Ee).attr("transform",function(o){var f=this.parentNode.__axis;return F((f&&isFinite(f=f(o))?f:B(o))+S)})),v.remove(),b.attr("d",t===qt||t===re?a?"M"+p*a+","+H+"H"+S+"V"+L+"H"+p*a:"M"+S+","+H+"V"+L:a?"M"+H+","+p*a+"V"+S+"H"+L+"V"+p*a:"M"+H+","+S+"H"+L),I.attr("opacity",1).attr("transform",function(o){return F(B(o)+S)}),_.attr(g+"2",p*s),x.attr(g,p*D).text(W),j.filter(Jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===re?"start":t===qt?"end":"middle"),j.each(function(){this.__axis=B})}return w.scale=function(T){return arguments.length?(e=T,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(T){return arguments.length?(n=T==null?[]:Array.from(T),w):n.slice()},w.tickValues=function(T){return arguments.length?(r=T==null?null:Array.from(T),w):r&&r.slice()},w.tickFormat=function(T){return arguments.length?(i=T,w):i},w.tickSize=function(T){return arguments.length?(s=a=+T,w):s},w.tickSizeInner=function(T){return arguments.length?(s=+T,w):s},w.tickSizeOuter=function(T){return arguments.length?(a=+T,w):a},w.tickPadding=function(T){return arguments.length?(y=+T,w):y},w.offset=function(T){return arguments.length?(S=+T,w):S},w}function Kn(t){return Ke(Bt,t)}function tr(t){return Ke(de,t)}const er=Math.PI/180,nr=180/Math.PI,Jt=18,tn=.96422,en=1,nn=.82521,rn=4/29,Mt=6/29,sn=3*Mt*Mt,rr=Mt*Mt*Mt;function an(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof ft)return on(t);t instanceof Qe||(t=_n(t));var e=oe(t.r),n=oe(t.g),r=oe(t.b),i=ie((.2225045*e+.7168786*n+.0606169*r)/en),s,a;return e===n&&n===r?s=a=i:(s=ie((.4360747*e+.3850649*n+.1430804*r)/tn),a=ie((.0139322*e+.0971045*n+.7141733*r)/nn)),new st(116*i-16,500*(s-i),200*(i-a),t.opacity)}function ir(t,e,n,r){return arguments.length===1?an(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}je(st,ir,$e(Je,{brighter(t){return new st(this.l+Jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new st(this.l-Jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=tn*se(e),t=en*se(t),n=nn*se(n),new Qe(ae(3.1338561*e-1.6168667*t-.4906146*n),ae(-.9787684*e+1.9161415*t+.033454*n),ae(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ie(t){return t>rr?Math.pow(t,1/3):t/sn+rn}function se(t){return t>Mt?t*t*t:sn*(t-rn)}function ae(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function sr(t){if(t instanceof ft)return new ft(t.h,t.c,t.l,t.opacity);if(t instanceof st||(t=an(t)),t.a===0&&t.b===0)return new ft(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*nr;return new ft(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function me(t,e,n,r){return arguments.length===1?sr(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function on(t){if(isNaN(t.h))return new st(t.l,0,0,t.opacity);var e=t.h*er;return new st(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}je(ft,me,$e(Je,{brighter(t){return new ft(this.h,this.c,this.l+Jt*(t??1),this.opacity)},darker(t){return new ft(this.h,this.c,this.l-Jt*(t??1),this.opacity)},rgb(){return on(this).rgb()}}));function ar(t){return function(e,n){var r=t((e=me(e)).h,(n=me(n)).h),i=ne(e.c,n.c),s=ne(e.l,n.l),a=ne(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const or=ar(Yn);function cr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ce=new Date,le=new Date;function tt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const S=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return S;let p;do S.push(p=new Date(+s)),e(s,y),t(s);while(p<s&&s<a);return S},i.filter=s=>tt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ce.setTime(+s),le.setTime(+a),t(ce),t(le),Math.floor(n(ce,le))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const _t=tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);_t.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):_t);_t.range;const ht=1e3,rt=ht*60,dt=rt*60,mt=dt*24,ve=mt*7,Le=mt*30,ue=mt*365,kt=tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getUTCSeconds());kt.range;const At=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ht)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());At.range;const lr=tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());lr.range;const Wt=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ht-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getHours());Wt.range;const ur=tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getUTCHours());ur.range;const pt=tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/mt,t=>t.getDate()-1);pt.range;const be=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mt,t=>t.getUTCDate()-1);be.range;const fr=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mt,t=>Math.floor(t/mt));fr.range;function bt(t){return tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*rt)/ve)}const Ht=bt(0),It=bt(1),cn=bt(2),ln=bt(3),Tt=bt(4),un=bt(5),fn=bt(6);Ht.range;It.range;cn.range;ln.range;Tt.range;un.range;fn.range;function xt(t){return tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/ve)}const hn=xt(0),Kt=xt(1),hr=xt(2),dr=xt(3),Yt=xt(4),mr=xt(5),gr=xt(6);hn.range;Kt.range;hr.range;dr.range;Yt.range;mr.range;gr.range;const Ot=tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ot.range;const yr=tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());yr.range;const gt=tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());gt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});gt.range;const vt=tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());vt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});vt.range;function kr(t,e,n,r,i,s){const a=[[kt,1,ht],[kt,5,5*ht],[kt,15,15*ht],[kt,30,30*ht],[s,1,rt],[s,5,5*rt],[s,15,15*rt],[s,30,30*rt],[i,1,dt],[i,3,3*dt],[i,6,6*dt],[i,12,12*dt],[r,1,mt],[r,2,2*mt],[n,1,ve],[e,1,Le],[e,3,3*Le],[t,1,ue]];function y(p,g,F){const w=g<p;w&&([p,g]=[g,p]);const T=F&&typeof F.range=="function"?F:S(p,g,F),X=T?T.range(p,+g+1):[];return w?X.reverse():X}function S(p,g,F){const w=Math.abs(g-p)/F,T=Vn(([,,D])=>D).right(a,w);if(T===a.length)return t.every(Fe(p/ue,g/ue,F));if(T===0)return _t.every(Math.max(Fe(p,g,F),1));const[X,W]=a[w/a[T-1][2]<a[T][2]/w?T-1:T];return X.every(W)}return[y,S]}const[pr,Tr]=kr(gt,Ot,Ht,pt,Wt,At);function fe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function he(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ft(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function vr(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,S=t.shortMonths,p=Et(i),g=Lt(i),F=Et(s),w=Lt(s),T=Et(a),X=Lt(a),W=Et(y),D=Lt(y),E=Et(S),H=Lt(S),L={a:c,A:G,b:d,B:h,c:null,d:Ne,e:Ne,f:Rr,g:Kr,G:ei,H:Vr,I:Pr,j:zr,L:dn,m:qr,M:Br,p:C,q:Z,Q:ze,s:Re,S:Zr,u:Xr,U:Gr,V:Qr,w:jr,W:$r,x:null,X:null,y:Jr,Y:ti,Z:ni,"%":Pe},B={a:O,A:P,b:N,B:z,c:null,d:Ve,e:Ve,f:ai,g:yi,G:pi,H:ri,I:ii,j:si,L:gn,m:oi,M:ci,p:at,q:ot,Q:ze,s:Re,S:li,u:ui,U:fi,V:hi,w:di,W:mi,x:null,X:null,y:gi,Y:ki,Z:Ti,"%":Pe},j={a:_,A:x,b:o,B:f,c:m,d:Oe,e:Oe,f:Ir,g:Ie,G:We,H:He,I:He,j:Er,L:Wr,m:Fr,M:Lr,p:U,q:Ur,Q:Hr,s:Nr,S:Ar,u:Dr,U:Mr,V:Sr,w:Cr,W:_r,x:u,X:M,y:Ie,Y:We,Z:Yr,"%":Or};L.x=b(n,L),L.X=b(r,L),L.c=b(e,L),B.x=b(n,B),B.X=b(r,B),B.c=b(e,B);function b(k,A){return function(Y){var l=[],q=-1,V=0,Q=k.length,$,J,ct;for(Y instanceof Date||(Y=new Date(+Y));++q<Q;)k.charCodeAt(q)===37&&(l.push(k.slice(V,q)),(J=Ae[$=k.charAt(++q)])!=null?$=k.charAt(++q):J=$==="e"?" ":"0",(ct=A[$])&&($=ct(Y,J)),l.push($),V=q+1);return l.push(k.slice(V,q)),l.join("")}}function I(k,A){return function(Y){var l=Ft(1900,void 0,1),q=v(l,k,Y+="",0),V,Q;if(q!=Y.length)return null;if("Q"in l)return new Date(l.Q);if("s"in l)return new Date(l.s*1e3+("L"in l?l.L:0));if(A&&!("Z"in l)&&(l.Z=0),"p"in l&&(l.H=l.H%12+l.p*12),l.m===void 0&&(l.m="q"in l?l.q:0),"V"in l){if(l.V<1||l.V>53)return null;"w"in l||(l.w=1),"Z"in l?(V=he(Ft(l.y,0,1)),Q=V.getUTCDay(),V=Q>4||Q===0?Kt.ceil(V):Kt(V),V=be.offset(V,(l.V-1)*7),l.y=V.getUTCFullYear(),l.m=V.getUTCMonth(),l.d=V.getUTCDate()+(l.w+6)%7):(V=fe(Ft(l.y,0,1)),Q=V.getDay(),V=Q>4||Q===0?It.ceil(V):It(V),V=pt.offset(V,(l.V-1)*7),l.y=V.getFullYear(),l.m=V.getMonth(),l.d=V.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),Q="Z"in l?he(Ft(l.y,0,1)).getUTCDay():fe(Ft(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,he(l)):fe(l)}}function v(k,A,Y,l){for(var q=0,V=A.length,Q=Y.length,$,J;q<V;){if(l>=Q)return-1;if($=A.charCodeAt(q++),$===37){if($=A.charAt(q++),J=j[$ in Ae?A.charAt(q++):$],!J||(l=J(k,Y,l))<0)return-1}else if($!=Y.charCodeAt(l++))return-1}return l}function U(k,A,Y){var l=p.exec(A.slice(Y));return l?(k.p=g.get(l[0].toLowerCase()),Y+l[0].length):-1}function _(k,A,Y){var l=T.exec(A.slice(Y));return l?(k.w=X.get(l[0].toLowerCase()),Y+l[0].length):-1}function x(k,A,Y){var l=F.exec(A.slice(Y));return l?(k.w=w.get(l[0].toLowerCase()),Y+l[0].length):-1}function o(k,A,Y){var l=E.exec(A.slice(Y));return l?(k.m=H.get(l[0].toLowerCase()),Y+l[0].length):-1}function f(k,A,Y){var l=W.exec(A.slice(Y));return l?(k.m=D.get(l[0].toLowerCase()),Y+l[0].length):-1}function m(k,A,Y){return v(k,e,A,Y)}function u(k,A,Y){return v(k,n,A,Y)}function M(k,A,Y){return v(k,r,A,Y)}function c(k){return a[k.getDay()]}function G(k){return s[k.getDay()]}function d(k){return S[k.getMonth()]}function h(k){return y[k.getMonth()]}function C(k){return i[+(k.getHours()>=12)]}function Z(k){return 1+~~(k.getMonth()/3)}function O(k){return a[k.getUTCDay()]}function P(k){return s[k.getUTCDay()]}function N(k){return S[k.getUTCMonth()]}function z(k){return y[k.getUTCMonth()]}function at(k){return i[+(k.getUTCHours()>=12)]}function ot(k){return 1+~~(k.getUTCMonth()/3)}return{format:function(k){var A=b(k+="",L);return A.toString=function(){return k},A},parse:function(k){var A=I(k+="",!1);return A.toString=function(){return k},A},utcFormat:function(k){var A=b(k+="",B);return A.toString=function(){return k},A},utcParse:function(k){var A=I(k+="",!0);return A.toString=function(){return k},A}}}var Ae={"-":"",_:" ",0:"0"},et=/^\s*\d+/,br=/^%/,xr=/[\\^$*+?|[\]().{}]/g;function R(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function wr(t){return t.replace(xr,"\\$&")}function Et(t){return new RegExp("^(?:"+t.map(wr).join("|")+")","i")}function Lt(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Cr(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Sr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _r(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function We(t,e,n){var r=et.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ie(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ur(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Fr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Oe(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=et.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function He(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=et.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=et.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Or(t,e,n){var r=br.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Hr(t,e,n){var r=et.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=et.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ne(t,e){return R(t.getDate(),e,2)}function Vr(t,e){return R(t.getHours(),e,2)}function Pr(t,e){return R(t.getHours()%12||12,e,2)}function zr(t,e){return R(1+pt.count(gt(t),t),e,3)}function dn(t,e){return R(t.getMilliseconds(),e,3)}function Rr(t,e){return dn(t,e)+"000"}function qr(t,e){return R(t.getMonth()+1,e,2)}function Br(t,e){return R(t.getMinutes(),e,2)}function Zr(t,e){return R(t.getSeconds(),e,2)}function Xr(t){var e=t.getDay();return e===0?7:e}function Gr(t,e){return R(Ht.count(gt(t)-1,t),e,2)}function mn(t){var e=t.getDay();return e>=4||e===0?Tt(t):Tt.ceil(t)}function Qr(t,e){return t=mn(t),R(Tt.count(gt(t),t)+(gt(t).getDay()===4),e,2)}function jr(t){return t.getDay()}function $r(t,e){return R(It.count(gt(t)-1,t),e,2)}function Jr(t,e){return R(t.getFullYear()%100,e,2)}function Kr(t,e){return t=mn(t),R(t.getFullYear()%100,e,2)}function ti(t,e){return R(t.getFullYear()%1e4,e,4)}function ei(t,e){var n=t.getDay();return t=n>=4||n===0?Tt(t):Tt.ceil(t),R(t.getFullYear()%1e4,e,4)}function ni(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+R(e/60|0,"0",2)+R(e%60,"0",2)}function Ve(t,e){return R(t.getUTCDate(),e,2)}function ri(t,e){return R(t.getUTCHours(),e,2)}function ii(t,e){return R(t.getUTCHours()%12||12,e,2)}function si(t,e){return R(1+be.count(vt(t),t),e,3)}function gn(t,e){return R(t.getUTCMilliseconds(),e,3)}function ai(t,e){return gn(t,e)+"000"}function oi(t,e){return R(t.getUTCMonth()+1,e,2)}function ci(t,e){return R(t.getUTCMinutes(),e,2)}function li(t,e){return R(t.getUTCSeconds(),e,2)}function ui(t){var e=t.getUTCDay();return e===0?7:e}function fi(t,e){return R(hn.count(vt(t)-1,t),e,2)}function yn(t){var e=t.getUTCDay();return e>=4||e===0?Yt(t):Yt.ceil(t)}function hi(t,e){return t=yn(t),R(Yt.count(vt(t),t)+(vt(t).getUTCDay()===4),e,2)}function di(t){return t.getUTCDay()}function mi(t,e){return R(Kt.count(vt(t)-1,t),e,2)}function gi(t,e){return R(t.getUTCFullYear()%100,e,2)}function yi(t,e){return t=yn(t),R(t.getUTCFullYear()%100,e,2)}function ki(t,e){return R(t.getUTCFullYear()%1e4,e,4)}function pi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Yt(t):Yt.ceil(t),R(t.getUTCFullYear()%1e4,e,4)}function Ti(){return"+0000"}function Pe(){return"%"}function ze(t){return+t}function Re(t){return Math.floor(+t/1e3)}var Ct,te;vi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vi(t){return Ct=vr(t),te=Ct.format,Ct.parse,Ct.utcFormat,Ct.utcParse,Ct}function bi(t){return new Date(t)}function xi(t){return t instanceof Date?+t:+new Date(+t)}function kn(t,e,n,r,i,s,a,y,S,p){var g=Pn(),F=g.invert,w=g.domain,T=p(".%L"),X=p(":%S"),W=p("%I:%M"),D=p("%I %p"),E=p("%a %d"),H=p("%b %d"),L=p("%B"),B=p("%Y");function j(b){return(S(b)<b?T:y(b)<b?X:a(b)<b?W:s(b)<b?D:r(b)<b?i(b)<b?E:H:n(b)<b?L:B)(b)}return g.invert=function(b){return new Date(F(b))},g.domain=function(b){return arguments.length?w(Array.from(b,xi)):w().map(bi)},g.ticks=function(b){var I=w();return t(I[0],I[I.length-1],b??10)},g.tickFormat=function(b,I){return I==null?j:p(I)},g.nice=function(b){var I=w();return(!b||typeof b.range!="function")&&(b=e(I[0],I[I.length-1],b??10)),b?w(cr(I,b)):g},g.copy=function(){return zn(g,kn(t,e,n,r,i,s,a,y,S,p))},g}function wi(){return qn.apply(kn(pr,Tr,gt,Ot,Ht,pt,Wt,At,kt,te).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Zt={exports:{}},Ci=Zt.exports,qe;function Di(){return qe||(qe=1,(function(t,e){(function(n,r){t.exports=r()})(Ci,(function(){var n="day";return function(r,i,s){var a=function(p){return p.add(4-p.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),n);var g,F,w,T,X=a(this),W=(g=this.isoWeekYear(),F=this.$u,w=(F?s.utc:s)().year(g).startOf("year"),T=4-w.isoWeekday(),w.isoWeekday()>4&&(T+=7),w.add(T,n));return X.diff(W,"week")+1},y.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var S=y.startOf;y.startOf=function(p,g){var F=this.$utils(),w=!!F.u(g)||g;return F.p(p)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(p,g)}}}))})(Zt)),Zt.exports}var Mi=Di();const Si=Te(Mi);var Xt={exports:{}},_i=Xt.exports,Be;function Yi(){return Be||(Be=1,(function(t,e){(function(n,r){t.exports=r()})(_i,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,S={},p=function(D){return(D=+D)+(D>68?1900:2e3)},g=function(D){return function(E){this[D]=+E}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(D){(this.zone||(this.zone={})).offset=(function(E){if(!E||E==="Z")return 0;var H=E.match(/([+-]|\d\d)/g),L=60*H[1]+(+H[2]||0);return L===0?0:H[0]==="+"?-L:L})(D)}],w=function(D){var E=S[D];return E&&(E.indexOf?E:E.s.concat(E.f))},T=function(D,E){var H,L=S.meridiem;if(L){for(var B=1;B<=24;B+=1)if(D.indexOf(L(B,0,E))>-1){H=B>12;break}}else H=D===(E?"pm":"PM");return H},X={A:[y,function(D){this.afternoon=T(D,!1)}],a:[y,function(D){this.afternoon=T(D,!0)}],Q:[i,function(D){this.month=3*(D-1)+1}],S:[i,function(D){this.milliseconds=100*+D}],SS:[s,function(D){this.milliseconds=10*+D}],SSS:[/\d{3}/,function(D){this.milliseconds=+D}],s:[a,g("seconds")],ss:[a,g("seconds")],m:[a,g("minutes")],mm:[a,g("minutes")],H:[a,g("hours")],h:[a,g("hours")],HH:[a,g("hours")],hh:[a,g("hours")],D:[a,g("day")],DD:[s,g("day")],Do:[y,function(D){var E=S.ordinal,H=D.match(/\d+/);if(this.day=H[0],E)for(var L=1;L<=31;L+=1)E(L).replace(/\[|\]/g,"")===D&&(this.day=L)}],w:[a,g("week")],ww:[s,g("week")],M:[a,g("month")],MM:[s,g("month")],MMM:[y,function(D){var E=w("months"),H=(w("monthsShort")||E.map((function(L){return L.slice(0,3)}))).indexOf(D)+1;if(H<1)throw new Error;this.month=H%12||H}],MMMM:[y,function(D){var E=w("months").indexOf(D)+1;if(E<1)throw new Error;this.month=E%12||E}],Y:[/[+-]?\d+/,g("year")],YY:[s,function(D){this.year=p(D)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function W(D){var E,H;E=D,H=S&&S.formats;for(var L=(D=E.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(_,x,o){var f=o&&o.toUpperCase();return x||H[o]||n[o]||H[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,u,M){return u||M.slice(1)}))}))).match(r),B=L.length,j=0;j<B;j+=1){var b=L[j],I=X[b],v=I&&I[0],U=I&&I[1];L[j]=U?{regex:v,parser:U}:b.replace(/^\[|\]$/g,"")}return function(_){for(var x={},o=0,f=0;o<B;o+=1){var m=L[o];if(typeof m=="string")f+=m.length;else{var u=m.regex,M=m.parser,c=_.slice(f),G=u.exec(c)[0];M.call(x,G),_=_.replace(G,"")}}return(function(d){var h=d.afternoon;if(h!==void 0){var C=d.hours;h?C<12&&(d.hours+=12):C===12&&(d.hours=0),delete d.afternoon}})(x),x}}return function(D,E,H){H.p.customParseFormat=!0,D&&D.parseTwoDigitYear&&(p=D.parseTwoDigitYear);var L=E.prototype,B=L.parse;L.parse=function(j){var b=j.date,I=j.utc,v=j.args;this.$u=I;var U=v[1];if(typeof U=="string"){var _=v[2]===!0,x=v[3]===!0,o=_||x,f=v[2];x&&(f=v[2]),S=this.$locale(),!_&&f&&(S=H.Ls[f]),this.$d=(function(c,G,d,h){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*c);var C=W(G)(c),Z=C.year,O=C.month,P=C.day,N=C.hours,z=C.minutes,at=C.seconds,ot=C.milliseconds,k=C.zone,A=C.week,Y=new Date,l=P||(Z||O?1:Y.getDate()),q=Z||Y.getFullYear(),V=0;Z&&!O||(V=O>0?O-1:Y.getMonth());var Q,$=N||0,J=z||0,ct=at||0,yt=ot||0;return k?new Date(Date.UTC(q,V,l,$,J,ct,yt+60*k.offset*1e3)):d?new Date(Date.UTC(q,V,l,$,J,ct,yt)):(Q=new Date(q,V,l,$,J,ct,yt),A&&(Q=h(Q).week(A).toDate()),Q)}catch{return new Date("")}})(b,U,I,H),this.init(),f&&f!==!0&&(this.$L=this.locale(f).$L),o&&b!=this.format(U)&&(this.$d=new Date("")),S={}}else if(U instanceof Array)for(var m=U.length,u=1;u<=m;u+=1){v[1]=U[u-1];var M=H.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}u===m&&(this.$d=new Date(""))}else B.call(this,j)}}}))})(Xt)),Xt.exports}var Ui=Yi();const Fi=Te(Ui);var Gt={exports:{}},Ei=Gt.exports,Ze;function Li(){return Ze||(Ze=1,(function(t,e){(function(n,r){t.exports=r()})(Ei,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,S=this.$locale();if(!this.isValid())return s.bind(this)(a);var p=this.$utils(),g=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(F){switch(F){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return S.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return S.ordinal(y.week(),"W");case"w":case"ww":return p.s(y.week(),F==="w"?1:2,"0");case"W":case"WW":return p.s(y.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return p.s(String(y.$H===0?24:y.$H),F==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return F}}));return s.bind(this)(g)}}}))})(Gt)),Gt.exports}var Ai=Li();const Wi=Te(Ai);var ge=(function(){var t=function(x,o,f,m){for(f=f||{},m=x.length;m--;f[x[m]]=o);return f},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],r=[1,26],i=[1,27],s=[1,28],a=[1,29],y=[1,30],S=[1,31],p=[1,9],g=[1,10],F=[1,11],w=[1,12],T=[1,13],X=[1,14],W=[1,15],D=[1,16],E=[1,18],H=[1,19],L=[1,20],B=[1,21],j=[1,22],b=[1,24],I=[1,32],v={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(o,f,m,u,M,c,G){var d=c.length-1;switch(M){case 1:return c[d-1];case 2:this.$=[];break;case 3:c[d-1].push(c[d]),this.$=c[d-1];break;case 4:case 5:this.$=c[d];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setDateFormat(c[d].substr(11)),this.$=c[d].substr(11);break;case 16:u.enableInclusiveEndDates(),this.$=c[d].substr(18);break;case 17:u.TopAxis(),this.$=c[d].substr(8);break;case 18:u.setAxisFormat(c[d].substr(11)),this.$=c[d].substr(11);break;case 19:u.setTickInterval(c[d].substr(13)),this.$=c[d].substr(13);break;case 20:u.setExcludes(c[d].substr(9)),this.$=c[d].substr(9);break;case 21:u.setIncludes(c[d].substr(9)),this.$=c[d].substr(9);break;case 22:u.setTodayMarker(c[d].substr(12)),this.$=c[d].substr(12);break;case 24:u.setDiagramTitle(c[d].substr(6)),this.$=c[d].substr(6);break;case 25:this.$=c[d].trim(),u.setAccTitle(this.$);break;case 26:case 27:this.$=c[d].trim(),u.setAccDescription(this.$);break;case 28:u.addSection(c[d].substr(8)),this.$=c[d].substr(8);break;case 30:u.addTask(c[d-1],c[d]),this.$="task";break;case 31:this.$=c[d-1],u.setClickEvent(c[d-1],c[d],null);break;case 32:this.$=c[d-2],u.setClickEvent(c[d-2],c[d-1],c[d]);break;case 33:this.$=c[d-2],u.setClickEvent(c[d-2],c[d-1],null),u.setLink(c[d-2],c[d]);break;case 34:this.$=c[d-3],u.setClickEvent(c[d-3],c[d-2],c[d-1]),u.setLink(c[d-3],c[d]);break;case 35:this.$=c[d-2],u.setClickEvent(c[d-2],c[d],null),u.setLink(c[d-2],c[d-1]);break;case 36:this.$=c[d-3],u.setClickEvent(c[d-3],c[d-1],c[d]),u.setLink(c[d-3],c[d-2]);break;case 37:this.$=c[d-1],u.setLink(c[d-1],c[d]);break;case 38:case 44:this.$=c[d-1]+" "+c[d];break;case 39:case 40:case 42:this.$=c[d-2]+" "+c[d-1]+" "+c[d];break;case 41:case 43:this.$=c[d-3]+" "+c[d-2]+" "+c[d-1]+" "+c[d];break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:S,19:p,20:g,21:F,22:w,23:T,24:X,25:W,26:D,27:E,28:H,30:L,32:B,33:j,34:23,35:b,37:I},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:S,19:p,20:g,21:F,22:w,23:T,24:X,25:W,26:D,27:E,28:H,30:L,32:B,33:j,34:23,35:b,37:I},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(o,f){if(f.recoverable)this.trace(o);else{var m=new Error(o);throw m.hash=f,m}},parse:function(o){var f=this,m=[0],u=[],M=[null],c=[],G=this.table,d="",h=0,C=0,Z=2,O=1,P=c.slice.call(arguments,1),N=Object.create(this.lexer),z={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(z.yy[at]=this.yy[at]);N.setInput(o,z.yy),z.yy.lexer=N,z.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var ot=N.yylloc;c.push(ot);var k=N.options&&N.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function A(){var lt;return lt=u.pop()||N.lex()||O,typeof lt!="number"&&(lt instanceof Array&&(u=lt,lt=u.pop()),lt=f.symbols_[lt]||lt),lt}for(var Y,l,q,V,Q={},$,J,ct,yt;;){if(l=m[m.length-1],this.defaultActions[l]?q=this.defaultActions[l]:((Y===null||typeof Y>"u")&&(Y=A()),q=G[l]&&G[l][Y]),typeof q>"u"||!q.length||!q[0]){var zt="";yt=[];for($ in G[l])this.terminals_[$]&&$>Z&&yt.push("'"+this.terminals_[$]+"'");N.showPosition?zt="Parse error on line "+(h+1)+`:
|
|
2
|
-
`+N.showPosition()+`
|
|
3
|
-
Expecting `+yt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":zt="Parse error on line "+(h+1)+": Unexpected "+(Y==O?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(zt,{text:N.match,token:this.terminals_[Y]||Y,line:N.yylineno,loc:ot,expected:yt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+Y);switch(q[0]){case 1:m.push(Y),M.push(N.yytext),c.push(N.yylloc),m.push(q[1]),Y=null,C=N.yyleng,d=N.yytext,h=N.yylineno,ot=N.yylloc;break;case 2:if(J=this.productions_[q[1]][1],Q.$=M[M.length-J],Q._$={first_line:c[c.length-(J||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(J||1)].first_column,last_column:c[c.length-1].last_column},k&&(Q._$.range=[c[c.length-(J||1)].range[0],c[c.length-1].range[1]]),V=this.performAction.apply(Q,[d,C,h,z.yy,q[1],M,c].concat(P)),typeof V<"u")return V;J&&(m=m.slice(0,-1*J*2),M=M.slice(0,-1*J),c=c.slice(0,-1*J)),m.push(this.productions_[q[1]][0]),M.push(Q.$),c.push(Q._$),ct=G[m[m.length-2]][m[m.length-1]],m.push(ct);break;case 3:return!0}}return!0}},U=(function(){var x={EOF:1,parseError:function(f,m){if(this.yy.parser)this.yy.parser.parseError(f,m);else throw new Error(f)},setInput:function(o,f){return this.yy=f||this.yy||{},this._input=o,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},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var f=o.length,m=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var u=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),m.length-1&&(this.yylineno-=m.length-1);var M=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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
|
-
`+f+"^"},test_match:function(o,f){var m,u,M;if(this.options.backtrack_lexer&&(M={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&&(M.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],m=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var c in M)this[c]=M[c];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,f,m,u;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),c=0;c<M.length;c++)if(m=this._input.match(this.rules[M[c]]),m&&(!f||m[0].length>f[0].length)){if(f=m,u=c,this.options.backtrack_lexer){if(o=this.test_match(m,M[c]),o!==!1)return o;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(o=this.test_match(f,M[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var f=this.next();return f||this.lex()},begin:function(f){this.conditionStack.push(f)},popState:function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},pushState:function(f){this.begin(f)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(f,m,u,M){switch(u){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 40;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 38;case 21:this.popState();break;case 22:return 39;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 37;case 26:return 4;case 27:return 19;case 28:return 20;case 29:return 21;case 30:return 22;case 31:return 23;case 32:return 25;case 33:return 24;case 34:return 26;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return"date";case 43:return 27;case 44:return"accDescription";case 45:return 33;case 46:return 35;case 47:return 36;case 48:return":";case 49:return 6;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};return x})();v.lexer=U;function _(){this.yy={}}return _.prototype=v,v.Parser=_,new _})();ge.parser=ge;const Ii=ge;nt.extend(Si);nt.extend(Fi);nt.extend(Wi);let it="",xe="",we,Ce="",Nt=[],Vt=[],De={},Me=[],ee=[],Ut="",Se="";const pn=["active","done","crit","milestone"];let _e=[],Pt=!1,Ye=!1,Ue="sunday",ye=0;const Oi=function(){Me=[],ee=[],Ut="",_e=[],Qt=0,pe=void 0,jt=void 0,K=[],it="",xe="",Se="",we=void 0,Ce="",Nt=[],Vt=[],Pt=!1,Ye=!1,ye=0,De={},Hn(),Ue="sunday"},Hi=function(t){xe=t},Ni=function(){return xe},Vi=function(t){we=t},Pi=function(){return we},zi=function(t){Ce=t},Ri=function(){return Ce},qi=function(t){it=t},Bi=function(){Pt=!0},Zi=function(){return Pt},Xi=function(){Ye=!0},Gi=function(){return Ye},Qi=function(t){Se=t},ji=function(){return Se},$i=function(){return it},Ji=function(t){Nt=t.toLowerCase().split(/[\s,]+/)},Ki=function(){return Nt},ts=function(t){Vt=t.toLowerCase().split(/[\s,]+/)},es=function(){return Vt},ns=function(){return De},rs=function(t){Ut=t,Me.push(t)},is=function(){return Me},ss=function(){let t=Xe();const e=10;let n=0;for(;!t&&n<e;)t=Xe(),n++;return ee=K,ee},Tn=function(t,e,n,r){return r.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&n.includes("weekends")||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(t.format(e.trim()))},as=function(t){Ue=t},os=function(){return Ue},vn=function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=nt(t.startTime):i=nt(t.startTime,e,!0),i=i.add(1,"d");let s;t.endTime instanceof Date?s=nt(t.endTime):s=nt(t.endTime,e,!0);const[a,y]=cs(i,s,e,n,r);t.endTime=a.toDate(),t.renderEndTime=y},cs=function(t,e,n,r,i){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=Tn(t,n,r,i),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},ke=function(t,e,n){n=n.trim();const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let a=null;for(const S of i.groups.ids.split(" ")){let p=wt(S);p!==void 0&&(!a||p.endTime>a.endTime)&&(a=p)}if(a)return a.endTime;const y=new Date;return y.setHours(0,0,0,0),y}let s=nt(n,e.trim(),!0);if(s.isValid())return s.toDate();{$t.debug("Invalid date:"+n),$t.debug("With date format:"+e.trim());const a=new Date(n);if(a===void 0||isNaN(a.getTime())||a.getFullYear()<-1e4||a.getFullYear()>1e4)throw new Error("Invalid date:"+n);return a}},bn=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},xn=function(t,e,n,r=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let g=null;for(const w of s.groups.ids.split(" ")){let T=wt(w);T!==void 0&&(!g||T.startTime<g.startTime)&&(g=T)}if(g)return g.startTime;const F=new Date;return F.setHours(0,0,0,0),F}let a=nt(n,e.trim(),!0);if(a.isValid())return r&&(a=a.add(1,"d")),a.toDate();let y=nt(t);const[S,p]=bn(n);if(!Number.isNaN(S)){const g=y.add(S,p);g.isValid()&&(y=g)}return y.toDate()};let Qt=0;const St=function(t){return t===void 0?(Qt=Qt+1,"task"+Qt):t},ls=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Mn(r,i,pn);for(let a=0;a<r.length;a++)r[a]=r[a].trim();let s="";switch(r.length){case 1:i.id=St(),i.startTime=t.endTime,s=r[0];break;case 2:i.id=St(),i.startTime=ke(void 0,it,r[0]),s=r[1];break;case 3:i.id=St(r[0]),i.startTime=ke(void 0,it,r[1]),s=r[2];break}return s&&(i.endTime=xn(i.startTime,it,s,Pt),i.manualEndTime=nt(s,"YYYY-MM-DD",!0).isValid(),vn(i,it,Vt,Nt)),i},us=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Mn(r,i,pn);for(let s=0;s<r.length;s++)r[s]=r[s].trim();switch(r.length){case 1:i.id=St(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=St(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=St(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]};break}return i};let pe,jt,K=[];const wn={},fs=function(t,e){const n={section:Ut,type:Ut,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=us(jt,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=jt,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=ye,ye++;const i=K.push(n);jt=n.id,wn[n.id]=i-1},wt=function(t){const e=wn[t];return K[e]},hs=function(t,e){const n={section:Ut,type:Ut,description:t,task:t,classes:[]},r=ls(pe,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,pe=n,ee.push(n)},Xe=function(){const t=function(n){const r=K[n];let i="";switch(K[n].raw.startTime.type){case"prevTaskEnd":{const s=wt(r.prevTaskId);r.startTime=s.endTime;break}case"getStartDate":i=ke(void 0,it,K[n].raw.startTime.startData),i&&(K[n].startTime=i);break}return K[n].startTime&&(K[n].endTime=xn(K[n].startTime,it,K[n].raw.endTime.data,Pt),K[n].endTime&&(K[n].processed=!0,K[n].manualEndTime=nt(K[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),vn(K[n],it,Vt,Nt))),K[n].processed};let e=!0;for(const[n,r]of K.entries())t(n),e=e&&r.processed;return e},ds=function(t,e){let n=e;Dt().securityLevel!=="loose"&&(n=Sn.sanitizeUrl(e)),t.split(",").forEach(function(r){wt(r)!==void 0&&(Dn(r,()=>{window.open(n,"_self")}),De[r]=n)}),Cn(t,"clickable")},Cn=function(t,e){t.split(",").forEach(function(n){let r=wt(n);r!==void 0&&r.classes.push(e)})},ms=function(t,e,n){if(Dt().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<r.length;s++){let a=r[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),r[s]=a}}r.length===0&&r.push(t),wt(t)!==void 0&&Dn(t,()=>{Nn.runFunc(e,...r)})},Dn=function(t,e){_e.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},gs=function(t,e,n){t.split(",").forEach(function(r){ms(r,e,n)}),Cn(t,"clickable")},ys=function(t){_e.forEach(function(e){e(t)})},ks={getConfig:()=>Dt().gantt,clear:Oi,setDateFormat:qi,getDateFormat:$i,enableInclusiveEndDates:Bi,endDatesAreInclusive:Zi,enableTopAxis:Xi,topAxisEnabled:Gi,setAxisFormat:Hi,getAxisFormat:Ni,setTickInterval:Vi,getTickInterval:Pi,setTodayMarker:zi,getTodayMarker:Ri,setAccTitle:Wn,getAccTitle:An,setDiagramTitle:Ln,getDiagramTitle:En,setDisplayMode:Qi,getDisplayMode:ji,setAccDescription:Fn,getAccDescription:Un,addSection:rs,getSections:is,getTasks:ss,addTask:fs,findTaskById:wt,addTaskOrg:hs,setIncludes:Ji,getIncludes:Ki,setExcludes:ts,getExcludes:es,setClickEvent:gs,setLink:ds,getLinks:ns,bindFunctions:ys,parseDuration:bn,isInvalidDate:Tn,setWeekday:as,getWeekday:os};function Mn(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const s="^\\s*"+i+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[i]=!0,t.shift(1),r=!0)})}const ps=function(){$t.debug("Something is calling, setConf, remove the call")},Ge={monday:It,tuesday:cn,wednesday:ln,thursday:Tt,friday:un,saturday:fn,sunday:Ht},Ts=(t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((s,a)=>s.startTime-a.startTime||s.order-a.order),i=0;for(const s of r)for(let a=0;a<n.length;a++)if(s.startTime>=n[a]){n[a]=s.endTime,s.order=a+e,a>i&&(i=a);break}return i};let ut;const vs=function(t,e,n,r){const i=Dt().gantt,s=Dt().securityLevel;let a;s==="sandbox"&&(a=Rt("#i"+e));const y=s==="sandbox"?Rt(a.nodes()[0].contentDocument.body):Rt("body"),S=s==="sandbox"?a.nodes()[0].contentDocument:document,p=S.getElementById(e);ut=p.parentElement.offsetWidth,ut===void 0&&(ut=1200),i.useWidth!==void 0&&(ut=i.useWidth);const g=r.db.getTasks();let F=[];for(const v of g)F.push(v.type);F=I(F);const w={};let T=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const v={};for(const _ of g)v[_.section]===void 0?v[_.section]=[_]:v[_.section].push(_);let U=0;for(const _ of Object.keys(v)){const x=Ts(v[_],U)+1;U+=x,T+=x*(i.barHeight+i.barGap),w[_]=x}}else{T+=g.length*(i.barHeight+i.barGap);for(const v of F)w[v]=g.filter(U=>U.type===v).length}p.setAttribute("viewBox","0 0 "+ut+" "+T);const X=y.select(`[id="${e}"]`),W=wi().domain([Zn(g,function(v){return v.startTime}),Bn(g,function(v){return v.endTime})]).rangeRound([0,ut-i.leftPadding-i.rightPadding]);function D(v,U){const _=v.startTime,x=U.startTime;let o=0;return _>x?o=1:_<x&&(o=-1),o}g.sort(D),E(g,ut,T),In(X,T,ut,i.useMaxWidth),X.append("text").text(r.db.getDiagramTitle()).attr("x",ut/2).attr("y",i.titleTopMargin).attr("class","titleText");function E(v,U,_){const x=i.barHeight,o=x+i.barGap,f=i.topPadding,m=i.leftPadding,u=Rn().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(or);L(o,f,m,U,_,v,r.db.getExcludes(),r.db.getIncludes()),B(m,f,U,_),H(v,o,f,m,x,u,U),j(o,f),b(m,f,U,_)}function H(v,U,_,x,o,f,m){const M=[...new Set(v.map(h=>h.order))].map(h=>v.find(C=>C.order===h));X.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(h,C){return C=h.order,C*U+_-2}).attr("width",function(){return m-i.rightPadding/2}).attr("height",U).attr("class",function(h){for(const[C,Z]of F.entries())if(h.type===Z)return"section section"+C%i.numberSectionStyles;return"section section0"});const c=X.append("g").selectAll("rect").data(v).enter(),G=r.db.getLinks();if(c.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?W(h.startTime)+x+.5*(W(h.endTime)-W(h.startTime))-.5*o:W(h.startTime)+x}).attr("y",function(h,C){return C=h.order,C*U+_}).attr("width",function(h){return h.milestone?o:W(h.renderEndTime||h.endTime)-W(h.startTime)}).attr("height",o).attr("transform-origin",function(h,C){return C=h.order,(W(h.startTime)+x+.5*(W(h.endTime)-W(h.startTime))).toString()+"px "+(C*U+_+.5*o).toString()+"px"}).attr("class",function(h){const C="task";let Z="";h.classes.length>0&&(Z=h.classes.join(" "));let O=0;for(const[N,z]of F.entries())h.type===z&&(O=N%i.numberSectionStyles);let P="";return h.active?h.crit?P+=" activeCrit":P=" active":h.done?h.crit?P=" doneCrit":P=" done":h.crit&&(P+=" crit"),P.length===0&&(P=" task"),h.milestone&&(P=" milestone "+P),P+=O,P+=" "+Z,C+P}),c.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",i.fontSize).attr("x",function(h){let C=W(h.startTime),Z=W(h.renderEndTime||h.endTime);h.milestone&&(C+=.5*(W(h.endTime)-W(h.startTime))-.5*o),h.milestone&&(Z=C+o);const O=this.getBBox().width;return O>Z-C?Z+O+1.5*i.leftPadding>m?C+x-5:Z+x+5:(Z-C)/2+C+x}).attr("y",function(h,C){return C=h.order,C*U+i.barHeight/2+(i.fontSize/2-2)+_}).attr("text-height",o).attr("class",function(h){const C=W(h.startTime);let Z=W(h.endTime);h.milestone&&(Z=C+o);const O=this.getBBox().width;let P="";h.classes.length>0&&(P=h.classes.join(" "));let N=0;for(const[at,ot]of F.entries())h.type===ot&&(N=at%i.numberSectionStyles);let z="";return h.active&&(h.crit?z="activeCritText"+N:z="activeText"+N),h.done?h.crit?z=z+" doneCritText"+N:z=z+" doneText"+N:h.crit&&(z=z+" critText"+N),h.milestone&&(z+=" milestoneText"),O>Z-C?Z+O+1.5*i.leftPadding>m?P+" taskTextOutsideLeft taskTextOutside"+N+" "+z:P+" taskTextOutsideRight taskTextOutside"+N+" "+z+" width-"+O:P+" taskText taskText"+N+" "+z+" width-"+O}),Dt().securityLevel==="sandbox"){let h;h=Rt("#i"+e);const C=h.nodes()[0].contentDocument;c.filter(function(Z){return G[Z.id]!==void 0}).each(function(Z){var O=C.querySelector("#"+Z.id),P=C.querySelector("#"+Z.id+"-text");const N=O.parentNode;var z=C.createElement("a");z.setAttribute("xlink:href",G[Z.id]),z.setAttribute("target","_top"),N.appendChild(z),z.appendChild(O),z.appendChild(P)})}}function L(v,U,_,x,o,f,m,u){if(m.length===0&&u.length===0)return;let M,c;for(const{startTime:O,endTime:P}of f)(M===void 0||O<M)&&(M=O),(c===void 0||P>c)&&(c=P);if(!M||!c)return;if(nt(c).diff(nt(M),"year")>5){$t.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const G=r.db.getDateFormat(),d=[];let h=null,C=nt(M);for(;C.valueOf()<=c;)r.db.isInvalidDate(C,G,m,u)?h?h.end=C:h={start:C,end:C}:h&&(d.push(h),h=null),C=C.add(1,"d");X.append("g").selectAll("rect").data(d).enter().append("rect").attr("id",function(O){return"exclude-"+O.start.format("YYYY-MM-DD")}).attr("x",function(O){return W(O.start)+_}).attr("y",i.gridLineStartPadding).attr("width",function(O){const P=O.end.add(1,"day");return W(P)-W(O.start)}).attr("height",o-U-i.gridLineStartPadding).attr("transform-origin",function(O,P){return(W(O.start)+_+.5*(W(O.end)-W(O.start))).toString()+"px "+(P*v+.5*o).toString()+"px"}).attr("class","exclude-range")}function B(v,U,_,x){let o=tr(W).tickSize(-x+U+i.gridLineStartPadding).tickFormat(te(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const m=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(m!==null){const u=m[1],M=m[2],c=r.db.getWeekday()||i.weekday;switch(M){case"millisecond":o.ticks(_t.every(u));break;case"second":o.ticks(kt.every(u));break;case"minute":o.ticks(At.every(u));break;case"hour":o.ticks(Wt.every(u));break;case"day":o.ticks(pt.every(u));break;case"week":o.ticks(Ge[c].every(u));break;case"month":o.ticks(Ot.every(u));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+v+", "+(x-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let u=Kn(W).tickSize(-x+U+i.gridLineStartPadding).tickFormat(te(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(m!==null){const M=m[1],c=m[2],G=r.db.getWeekday()||i.weekday;switch(c){case"millisecond":u.ticks(_t.every(M));break;case"second":u.ticks(kt.every(M));break;case"minute":u.ticks(At.every(M));break;case"hour":u.ticks(Wt.every(M));break;case"day":u.ticks(pt.every(M));break;case"week":u.ticks(Ge[G].every(M));break;case"month":u.ticks(Ot.every(M));break}}X.append("g").attr("class","grid").attr("transform","translate("+v+", "+U+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function j(v,U){let _=0;const x=Object.keys(w).map(o=>[o,w[o]]);X.append("g").selectAll("text").data(x).enter().append(function(o){const f=o[0].split(On.lineBreakRegex),m=-(f.length-1)/2,u=S.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",m+"em");for(const[M,c]of f.entries()){const G=S.createElementNS("http://www.w3.org/2000/svg","tspan");G.setAttribute("alignment-baseline","central"),G.setAttribute("x","10"),M>0&&G.setAttribute("dy","1em"),G.textContent=c,u.appendChild(G)}return u}).attr("x",10).attr("y",function(o,f){if(f>0)for(let m=0;m<f;m++)return _+=x[f-1][1],o[1]*v/2+_*v+U;else return o[1]*v/2+U}).attr("font-size",i.sectionFontSize).attr("class",function(o){for(const[f,m]of F.entries())if(o[0]===m)return"sectionTitle sectionTitle"+f%i.numberSectionStyles;return"sectionTitle"})}function b(v,U,_,x){const o=r.db.getTodayMarker();if(o==="off")return;const f=X.append("g").attr("class","today"),m=new Date,u=f.append("line");u.attr("x1",W(m)+v).attr("x2",W(m)+v).attr("y1",i.titleTopMargin).attr("y2",x-i.titleTopMargin).attr("class","today"),o!==""&&u.attr("style",o.replace(/,/g,";"))}function I(v){const U={},_=[];for(let x=0,o=v.length;x<o;++x)Object.prototype.hasOwnProperty.call(U,v[x])||(U[v[x]]=!0,_.push(v[x]));return _}},bs={setConf:ps,draw:vs},xs=t=>`
|
|
7
|
-
.mermaid-main-font {
|
|
8
|
-
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.exclude-range {
|
|
12
|
-
fill: ${t.excludeBkgColor};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.section {
|
|
16
|
-
stroke: none;
|
|
17
|
-
opacity: 0.2;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.section0 {
|
|
21
|
-
fill: ${t.sectionBkgColor};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.section2 {
|
|
25
|
-
fill: ${t.sectionBkgColor2};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.section1,
|
|
29
|
-
.section3 {
|
|
30
|
-
fill: ${t.altSectionBkgColor};
|
|
31
|
-
opacity: 0.2;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.sectionTitle0 {
|
|
35
|
-
fill: ${t.titleColor};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.sectionTitle1 {
|
|
39
|
-
fill: ${t.titleColor};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.sectionTitle2 {
|
|
43
|
-
fill: ${t.titleColor};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.sectionTitle3 {
|
|
47
|
-
fill: ${t.titleColor};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.sectionTitle {
|
|
51
|
-
text-anchor: start;
|
|
52
|
-
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/* Grid and axis */
|
|
57
|
-
|
|
58
|
-
.grid .tick {
|
|
59
|
-
stroke: ${t.gridColor};
|
|
60
|
-
opacity: 0.8;
|
|
61
|
-
shape-rendering: crispEdges;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.grid .tick text {
|
|
65
|
-
font-family: ${t.fontFamily};
|
|
66
|
-
fill: ${t.textColor};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.grid path {
|
|
70
|
-
stroke-width: 0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* Today line */
|
|
75
|
-
|
|
76
|
-
.today {
|
|
77
|
-
fill: none;
|
|
78
|
-
stroke: ${t.todayLineColor};
|
|
79
|
-
stroke-width: 2px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/* Task styling */
|
|
84
|
-
|
|
85
|
-
/* Default task */
|
|
86
|
-
|
|
87
|
-
.task {
|
|
88
|
-
stroke-width: 2;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.taskText {
|
|
92
|
-
text-anchor: middle;
|
|
93
|
-
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.taskTextOutsideRight {
|
|
97
|
-
fill: ${t.taskTextDarkColor};
|
|
98
|
-
text-anchor: start;
|
|
99
|
-
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.taskTextOutsideLeft {
|
|
103
|
-
fill: ${t.taskTextDarkColor};
|
|
104
|
-
text-anchor: end;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/* Special case clickable */
|
|
109
|
-
|
|
110
|
-
.task.clickable {
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.taskText.clickable {
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
117
|
-
font-weight: bold;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.taskTextOutsideLeft.clickable {
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
123
|
-
font-weight: bold;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.taskTextOutsideRight.clickable {
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
129
|
-
font-weight: bold;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/* Specific task settings for the sections*/
|
|
134
|
-
|
|
135
|
-
.taskText0,
|
|
136
|
-
.taskText1,
|
|
137
|
-
.taskText2,
|
|
138
|
-
.taskText3 {
|
|
139
|
-
fill: ${t.taskTextColor};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.task0,
|
|
143
|
-
.task1,
|
|
144
|
-
.task2,
|
|
145
|
-
.task3 {
|
|
146
|
-
fill: ${t.taskBkgColor};
|
|
147
|
-
stroke: ${t.taskBorderColor};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.taskTextOutside0,
|
|
151
|
-
.taskTextOutside2
|
|
152
|
-
{
|
|
153
|
-
fill: ${t.taskTextOutsideColor};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.taskTextOutside1,
|
|
157
|
-
.taskTextOutside3 {
|
|
158
|
-
fill: ${t.taskTextOutsideColor};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
/* Active task */
|
|
163
|
-
|
|
164
|
-
.active0,
|
|
165
|
-
.active1,
|
|
166
|
-
.active2,
|
|
167
|
-
.active3 {
|
|
168
|
-
fill: ${t.activeTaskBkgColor};
|
|
169
|
-
stroke: ${t.activeTaskBorderColor};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.activeText0,
|
|
173
|
-
.activeText1,
|
|
174
|
-
.activeText2,
|
|
175
|
-
.activeText3 {
|
|
176
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
/* Completed task */
|
|
181
|
-
|
|
182
|
-
.done0,
|
|
183
|
-
.done1,
|
|
184
|
-
.done2,
|
|
185
|
-
.done3 {
|
|
186
|
-
stroke: ${t.doneTaskBorderColor};
|
|
187
|
-
fill: ${t.doneTaskBkgColor};
|
|
188
|
-
stroke-width: 2;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.doneText0,
|
|
192
|
-
.doneText1,
|
|
193
|
-
.doneText2,
|
|
194
|
-
.doneText3 {
|
|
195
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
/* Tasks on the critical line */
|
|
200
|
-
|
|
201
|
-
.crit0,
|
|
202
|
-
.crit1,
|
|
203
|
-
.crit2,
|
|
204
|
-
.crit3 {
|
|
205
|
-
stroke: ${t.critBorderColor};
|
|
206
|
-
fill: ${t.critBkgColor};
|
|
207
|
-
stroke-width: 2;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.activeCrit0,
|
|
211
|
-
.activeCrit1,
|
|
212
|
-
.activeCrit2,
|
|
213
|
-
.activeCrit3 {
|
|
214
|
-
stroke: ${t.critBorderColor};
|
|
215
|
-
fill: ${t.activeTaskBkgColor};
|
|
216
|
-
stroke-width: 2;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.doneCrit0,
|
|
220
|
-
.doneCrit1,
|
|
221
|
-
.doneCrit2,
|
|
222
|
-
.doneCrit3 {
|
|
223
|
-
stroke: ${t.critBorderColor};
|
|
224
|
-
fill: ${t.doneTaskBkgColor};
|
|
225
|
-
stroke-width: 2;
|
|
226
|
-
cursor: pointer;
|
|
227
|
-
shape-rendering: crispEdges;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.milestone {
|
|
231
|
-
transform: rotate(45deg) scale(0.8,0.8);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.milestoneText {
|
|
235
|
-
font-style: italic;
|
|
236
|
-
}
|
|
237
|
-
.doneCritText0,
|
|
238
|
-
.doneCritText1,
|
|
239
|
-
.doneCritText2,
|
|
240
|
-
.doneCritText3 {
|
|
241
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.activeCritText0,
|
|
245
|
-
.activeCritText1,
|
|
246
|
-
.activeCritText2,
|
|
247
|
-
.activeCritText3 {
|
|
248
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.titleText {
|
|
252
|
-
text-anchor: middle;
|
|
253
|
-
font-size: 18px;
|
|
254
|
-
fill: ${t.titleColor||t.textColor};
|
|
255
|
-
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
256
|
-
}
|
|
257
|
-
`,ws=xs,Ns={parser:Ii,db:ks,renderer:bs,styles:ws};export{Ns as diagram};
|