From fe36dbe515e3557458aed22cd1b4a8235155c0b3 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 28 Dec 2024 20:35:26 -0700 Subject: [PATCH 1/3] d2sequence: fix notes with self messages --- d2layouts/d2sequence/sequence_diagram.go | 7 +- .../txtar/note-overlap/dagre/board.exp.json | 481 ++++++++++++++++++ .../txtar/note-overlap/dagre/sketch.exp.svg | 108 ++++ .../txtar/note-overlap/elk/board.exp.json | 481 ++++++++++++++++++ .../txtar/note-overlap/elk/sketch.exp.svg | 108 ++++ e2etests/txtar.txt | 9 + 6 files changed, 1193 insertions(+), 1 deletion(-) create mode 100644 e2etests/testdata/txtar/note-overlap/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/note-overlap/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/note-overlap/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/note-overlap/elk/sketch.exp.svg diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index 69eb199854..8943bfce6d 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -466,7 +466,12 @@ func (sd *sequenceDiagram) placeNotes() { for _, msg := range sd.messages { if sd.verticalIndices[msg.AbsID()] < verticalIndex { - y += sd.yStep + float64(msg.LabelDimensions.Height) + if msg.Src == msg.Dst { + // For self-messages, account for the full vertical space they occupy + y += sd.yStep + math.Max(float64(msg.LabelDimensions.Height), MIN_MESSAGE_DISTANCE)*1.5 + } else { + y += sd.yStep + float64(msg.LabelDimensions.Height) + } } } for _, otherNote := range sd.notes { diff --git a/e2etests/testdata/txtar/note-overlap/dagre/board.exp.json b/e2etests/testdata/txtar/note-overlap/dagre/board.exp.json new file mode 100644 index 0000000000..62cfc035ac --- /dev/null +++ b/e2etests/testdata/txtar/note-overlap/dagre/board.exp.json @@ -0,0 +1,481 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "alice", + "type": "rectangle", + "pos": { + "x": 12, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "alice", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 32, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "bob", + "type": "rectangle", + "pos": { + "x": 162, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "bob", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 26, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "bob.\"In the eyes of my dog, I'm a man.\"", + "type": "page", + "pos": { + "x": 81, + "y": 718 + }, + "width": 261, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "In the eyes of my dog, I'm a man.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 216, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 5, + "level": 2 + } + ], + "connections": [ + { + "id": "(alice -> bob)[0]", + "src": "alice", + "srcArrow": "none", + "dst": "bob", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 188 + }, + { + "x": 212, + "y": 188 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[0]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 258 + }, + { + "x": 142, + "y": 258 + }, + { + "x": 142, + "y": 303 + }, + { + "x": 62, + "y": 303 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[1]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 373 + }, + { + "x": 142, + "y": 373 + }, + { + "x": 142, + "y": 418 + }, + { + "x": 62, + "y": 418 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[2]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 488 + }, + { + "x": 142, + "y": 488 + }, + { + "x": 142, + "y": 533 + }, + { + "x": 62, + "y": 533 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[3]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 603 + }, + { + "x": 142, + "y": 603 + }, + { + "x": 142, + "y": 648 + }, + { + "x": 62, + "y": 648 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -- )[0]", + "src": "alice", + "srcArrow": "none", + "dst": "alice-lifeline-end-3851299086", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 118 + }, + { + "x": 62, + "y": 854 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + }, + { + "id": "(bob -- )[0]", + "src": "bob", + "srcArrow": "none", + "dst": "bob-lifeline-end-3036726343", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 212, + "y": 118 + }, + { + "x": 212, + "y": 854 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/note-overlap/dagre/sketch.exp.svg b/e2etests/testdata/txtar/note-overlap/dagre/sketch.exp.svg new file mode 100644 index 0000000000..306fa47306 --- /dev/null +++ b/e2etests/testdata/txtar/note-overlap/dagre/sketch.exp.svg @@ -0,0 +1,108 @@ +alicebob Self-messagesSelf-messagesSelf-messagesSelf-messagesIn the eyes of my dog, I'm a man. + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/note-overlap/elk/board.exp.json b/e2etests/testdata/txtar/note-overlap/elk/board.exp.json new file mode 100644 index 0000000000..62cfc035ac --- /dev/null +++ b/e2etests/testdata/txtar/note-overlap/elk/board.exp.json @@ -0,0 +1,481 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "alice", + "type": "rectangle", + "pos": { + "x": 12, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "alice", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 32, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "bob", + "type": "rectangle", + "pos": { + "x": 162, + "y": 52 + }, + "width": 100, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "bob", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 26, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "bob.\"In the eyes of my dog, I'm a man.\"", + "type": "page", + "pos": { + "x": 81, + "y": 718 + }, + "width": 261, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "In the eyes of my dog, I'm a man.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 216, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 5, + "level": 2 + } + ], + "connections": [ + { + "id": "(alice -> bob)[0]", + "src": "alice", + "srcArrow": "none", + "dst": "bob", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 188 + }, + { + "x": 212, + "y": 188 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[0]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 258 + }, + { + "x": 142, + "y": 258 + }, + { + "x": 142, + "y": 303 + }, + { + "x": 62, + "y": 303 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[1]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 373 + }, + { + "x": 142, + "y": 373 + }, + { + "x": 142, + "y": 418 + }, + { + "x": 62, + "y": 418 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[2]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 488 + }, + { + "x": 142, + "y": 488 + }, + { + "x": 142, + "y": 533 + }, + { + "x": 62, + "y": 533 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -> alice)[3]", + "src": "alice", + "srcArrow": "none", + "dst": "alice", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "Self-messages", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 95, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 603 + }, + { + "x": 142, + "y": 603 + }, + { + "x": 142, + "y": 648 + }, + { + "x": 62, + "y": 648 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(alice -- )[0]", + "src": "alice", + "srcArrow": "none", + "dst": "alice-lifeline-end-3851299086", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 62, + "y": 118 + }, + { + "x": 62, + "y": 854 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + }, + { + "id": "(bob -- )[0]", + "src": "bob", + "srcArrow": "none", + "dst": "bob-lifeline-end-3036726343", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 6, + "strokeWidth": 2, + "stroke": "B2", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 212, + "y": 118 + }, + { + "x": 212, + "y": 854 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 1 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/note-overlap/elk/sketch.exp.svg b/e2etests/testdata/txtar/note-overlap/elk/sketch.exp.svg new file mode 100644 index 0000000000..306fa47306 --- /dev/null +++ b/e2etests/testdata/txtar/note-overlap/elk/sketch.exp.svg @@ -0,0 +1,108 @@ +alicebob Self-messagesSelf-messagesSelf-messagesSelf-messagesIn the eyes of my dog, I'm a man. + + + + + + + + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index 004b0eae7e..a93f6518d1 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -738,3 +738,12 @@ logs: {shape: page; style.multiple: true} network.data processor -> api server +-- note-overlap -- +shape: sequence_diagram +alice -> bob +alice -> alice: "Self-messages" +alice -> alice: "Self-messages" +alice -> alice: "Self-messages" +alice -> alice: "Self-messages" + +bob."In the eyes of my dog, I'm a man." From 5a6e80aefbbe4dc5d524abc2350737f0f15a11da Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 28 Dec 2024 20:38:12 -0700 Subject: [PATCH 2/3] ta --- .../diagram_wider_than_tooltip/sketch.exp.svg | 160 +++++++++--------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg index 5f20e45e55..607ec2fbbb 100644 --- a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg +++ b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg @@ -1,19 +1,19 @@ -customerissuerstoreLike starbucks or somethingacquirerI'm not sure what this isnetworkcustomer bankstore bankinitial transactionpayment processor behind the scenessimplified 1 banana please$10 dollarsthinking: wow, inflationchecks bank accountSavings: $11I can do that, here's my cardRun this cardProcess to card issuerProcess this payment$10 debit$10 creditAn error in judgement is about to occurLike starbucks or something1I'm not sure what this is2 + .d2-4183732618 .fill-N1{fill:#0A0F25;} + .d2-4183732618 .fill-N2{fill:#676C7E;} + .d2-4183732618 .fill-N3{fill:#9499AB;} + .d2-4183732618 .fill-N4{fill:#CFD2DD;} + .d2-4183732618 .fill-N5{fill:#DEE1EB;} + .d2-4183732618 .fill-N6{fill:#EEF1F8;} + .d2-4183732618 .fill-N7{fill:#FFFFFF;} + .d2-4183732618 .fill-B1{fill:#0D32B2;} + .d2-4183732618 .fill-B2{fill:#0D32B2;} + .d2-4183732618 .fill-B3{fill:#E3E9FD;} + .d2-4183732618 .fill-B4{fill:#E3E9FD;} + .d2-4183732618 .fill-B5{fill:#EDF0FD;} + .d2-4183732618 .fill-B6{fill:#F7F8FE;} + .d2-4183732618 .fill-AA2{fill:#4A6FF3;} + .d2-4183732618 .fill-AA4{fill:#EDF0FD;} + .d2-4183732618 .fill-AA5{fill:#F7F8FE;} + .d2-4183732618 .fill-AB4{fill:#EDF0FD;} + .d2-4183732618 .fill-AB5{fill:#F7F8FE;} + .d2-4183732618 .stroke-N1{stroke:#0A0F25;} + .d2-4183732618 .stroke-N2{stroke:#676C7E;} + .d2-4183732618 .stroke-N3{stroke:#9499AB;} + .d2-4183732618 .stroke-N4{stroke:#CFD2DD;} + .d2-4183732618 .stroke-N5{stroke:#DEE1EB;} + .d2-4183732618 .stroke-N6{stroke:#EEF1F8;} + .d2-4183732618 .stroke-N7{stroke:#FFFFFF;} + .d2-4183732618 .stroke-B1{stroke:#0D32B2;} + .d2-4183732618 .stroke-B2{stroke:#0D32B2;} + .d2-4183732618 .stroke-B3{stroke:#E3E9FD;} + .d2-4183732618 .stroke-B4{stroke:#E3E9FD;} + .d2-4183732618 .stroke-B5{stroke:#EDF0FD;} + .d2-4183732618 .stroke-B6{stroke:#F7F8FE;} + .d2-4183732618 .stroke-AA2{stroke:#4A6FF3;} + .d2-4183732618 .stroke-AA4{stroke:#EDF0FD;} + .d2-4183732618 .stroke-AA5{stroke:#F7F8FE;} + .d2-4183732618 .stroke-AB4{stroke:#EDF0FD;} + .d2-4183732618 .stroke-AB5{stroke:#F7F8FE;} + .d2-4183732618 .background-color-N1{background-color:#0A0F25;} + .d2-4183732618 .background-color-N2{background-color:#676C7E;} + .d2-4183732618 .background-color-N3{background-color:#9499AB;} + .d2-4183732618 .background-color-N4{background-color:#CFD2DD;} + .d2-4183732618 .background-color-N5{background-color:#DEE1EB;} + .d2-4183732618 .background-color-N6{background-color:#EEF1F8;} + .d2-4183732618 .background-color-N7{background-color:#FFFFFF;} + .d2-4183732618 .background-color-B1{background-color:#0D32B2;} + .d2-4183732618 .background-color-B2{background-color:#0D32B2;} + .d2-4183732618 .background-color-B3{background-color:#E3E9FD;} + .d2-4183732618 .background-color-B4{background-color:#E3E9FD;} + .d2-4183732618 .background-color-B5{background-color:#EDF0FD;} + .d2-4183732618 .background-color-B6{background-color:#F7F8FE;} + .d2-4183732618 .background-color-AA2{background-color:#4A6FF3;} + .d2-4183732618 .background-color-AA4{background-color:#EDF0FD;} + .d2-4183732618 .background-color-AA5{background-color:#F7F8FE;} + .d2-4183732618 .background-color-AB4{background-color:#EDF0FD;} + .d2-4183732618 .background-color-AB5{background-color:#F7F8FE;} + .d2-4183732618 .color-N1{color:#0A0F25;} + .d2-4183732618 .color-N2{color:#676C7E;} + .d2-4183732618 .color-N3{color:#9499AB;} + .d2-4183732618 .color-N4{color:#CFD2DD;} + .d2-4183732618 .color-N5{color:#DEE1EB;} + .d2-4183732618 .color-N6{color:#EEF1F8;} + .d2-4183732618 .color-N7{color:#FFFFFF;} + .d2-4183732618 .color-B1{color:#0D32B2;} + .d2-4183732618 .color-B2{color:#0D32B2;} + .d2-4183732618 .color-B3{color:#E3E9FD;} + .d2-4183732618 .color-B4{color:#E3E9FD;} + .d2-4183732618 .color-B5{color:#EDF0FD;} + .d2-4183732618 .color-B6{color:#F7F8FE;} + .d2-4183732618 .color-AA2{color:#4A6FF3;} + .d2-4183732618 .color-AA4{color:#EDF0FD;} + .d2-4183732618 .color-AA5{color:#F7F8FE;} + .d2-4183732618 .color-AB4{color:#EDF0FD;} + .d2-4183732618 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>customerissuerstoreLike starbucks or somethingacquirerI'm not sure what this isnetworkcustomer bankstore bankinitial transactionpayment processor behind the scenessimplified 1 banana please$10 dollarsthinking: wow, inflationchecks bank accountSavings: $11I can do that, here's my cardRun this cardProcess to card issuerProcess this payment$10 debit$10 creditAn error in judgement is about to occurLike starbucks or something1I'm not sure what this is2 @@ -122,7 +122,7 @@ - + 1Like starbucks or something 2I'm not sure what this is