/*!
 * Tiptap Diagrams — part of Tiptap Pro.
 *
 * This file is part of Tiptap Pro and is licensed under the Tiptap Pro License:
 * https://tiptap.dev/pro-license
 *
 * Unauthorized copying, modification, distribution, or use of this file, in whole or in
 * part, is strictly prohibited without a valid license.
 *
 * The use of this software for the purpose of training, fine-tuning, or improving
 * machine learning or AI models is prohibited.
 *
 * Code from other packages in this file keeps the license it came with, including the
 * freely licensed Tiptap extensions and the chart libraries bundled with it. Those
 * licenses are listed in third-party-licenses.txt, published with this build.
 */
:root{--demo-bg: #f7f7f8;--demo-surface: #ffffff;--demo-text: #1d1d1f;--demo-muted: #6b6b75;--demo-border: #dedee3;--demo-accent: #6a4cff;--demo-accent-text: #ffffff;color-scheme:light}:root[data-demo-theme=dark]{--demo-bg: #141418;--demo-surface: #1d1d23;--demo-text: #ececf1;--demo-muted: #9a9aa6;--demo-border: #33333d;--demo-accent: #9b87ff;--demo-accent-text: #141418;color-scheme:dark}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--demo-bg);color:var(--demo-text);font:15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}#app{max-width:1280px;margin:0 auto;padding:16px 24px}.demo-status[hidden]{display:none}.demo-group,.demo-row{display:flex;gap:4px;align-items:center}.demo-group>input[type=number]{flex:1;min-width:0}.demo-row{gap:12px;flex-wrap:wrap}.demo-button,select,input,textarea{font:inherit;font-size:13px;color:var(--demo-text);background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:6px;padding:4px 10px}.demo-button{cursor:pointer}.demo-button:hover:not(:disabled){border-color:var(--demo-accent)}.demo-button:disabled{opacity:.4;cursor:default}.demo-primary{background:var(--demo-accent);border-color:var(--demo-accent);color:var(--demo-accent-text)}.demo-status[data-tone=info]{background:var(--demo-surface);color:var(--demo-text);border:1px solid var(--demo-border);box-shadow:0 8px 24px #00000029}.demo-status{cursor:pointer;position:fixed;left:24px;bottom:24px;z-index:10;max-width:480px;margin:0;white-space:pre-wrap;padding:6px 10px;border-radius:6px;background:#ffe3e3;color:#8a1c1c}.demo-main{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start}.demo-editor{background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:10px;padding:24px 32px;min-height:60vh}.demo-editor .tiptap{outline:none}.tiptap table{border-collapse:collapse;margin:12px 0}.tiptap td,.tiptap th{border:1px solid var(--demo-border);padding:4px 8px;min-width:60px;vertical-align:top}.tiptap td p,.tiptap th p{margin:0}.tiptap th{background:color-mix(in srgb,var(--demo-border) 40%,transparent);text-align:left}.tiptap .selectedCell{background:color-mix(in srgb,var(--demo-accent) 15%,transparent)}.tiptap img{max-width:100%;height:auto}.tiptap img.ProseMirror-selectednode{outline:2px solid var(--demo-accent)}.tiptap table[data-tt-chart-input]{outline:2px dashed var(--demo-accent);outline-offset:2px}.tiptap{--tt-chart-selected-outline: 2px solid var(--demo-accent);--tt-chart-input-delimiter-color: var(--demo-accent);--tt-flow-diagram-selected-outline: 2px solid var(--demo-accent)}.demo-panel{position:sticky;top:16px;display:flex;flex-direction:column;width:400px;height:calc(100vh - 32px);background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:10px;overflow:hidden}@media(max-width:760px){#app{padding:8px}.demo-main{grid-template-columns:minmax(0,1fr)}.demo-editor{padding:16px;padding-bottom:calc(45vh + 16px)}.demo-panel{position:fixed;inset:auto 0 0;z-index:20;width:auto;height:45vh;border-radius:12px 12px 0 0;box-shadow:0 -4px 16px #0000001f}}.demo-panel-header{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid var(--demo-border)}.demo-panel-header h2{margin:0}.demo-panel-body{flex:1;min-height:0;overflow:auto;padding:0 16px}.demo-panel-foot:empty{display:none}.demo-panel-footer{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-top:1px solid var(--demo-border)}.demo-panel-footer h3{margin:0;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--demo-muted)}.demo-editor-frame{position:relative}.demo-zoom-overlay{position:absolute;z-index:3;transform:translate(-50%);white-space:nowrap;padding:4px;background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:8px;box-shadow:0 4px 16px #0000001f}.demo-zoom-overlay-maximized{position:fixed;z-index:61}.demo-zoom-backdrop{position:fixed;inset:0;z-index:55;background:#0f0f1473}.demo-zoom-backdrop[hidden]{display:none}.demo-modal-open{overflow:hidden}.tiptap{--tt-chart-maximized-background: var(--demo-surface)}.demo-editor-frame .tiptap-chart[data-tt-chart-maximized],.demo-editor-frame .tiptap-flow-diagram[data-tt-flow-diagram-maximized]{border:1px solid var(--demo-border);box-shadow:0 12px 40px #0000002e}.demo-zoom-overlay[hidden]{display:none}.demo-zoom-overlay .demo-button{padding:2px 8px}.demo-check{display:flex;gap:6px;align-items:center;font-size:13px}.demo-panel h2,.demo-modal h2{font-size:15px;margin:0 0 8px}.demo-tabs{display:flex;gap:4px;margin-bottom:12px}.demo-section{display:flex;flex-direction:column;gap:10px;padding:12px 0}.demo-section+.demo-section{border-top:1px solid var(--demo-border)}.demo-section h3{margin:0;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--demo-muted)}.demo-subsection{display:flex;flex-direction:column;gap:8px;margin-top:4px}.demo-subsection h4{margin:0;font-size:12px;font-weight:600}.demo-explained{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.demo-segmented,.demo-tabs{gap:2px;padding:2px;background:var(--demo-bg);border:1px solid var(--demo-border);border-radius:8px}.demo-segmented .demo-button,.demo-tabs .demo-button{flex:1;color:var(--demo-muted);background:transparent;border-color:transparent}.demo-segmented .demo-button:hover:not(:disabled),.demo-tabs .demo-button:hover:not(:disabled){color:var(--demo-text);border-color:transparent}.demo-segmented .demo-button[aria-pressed=true],.demo-tabs .demo-button[aria-pressed=true]{color:var(--demo-text);background:var(--demo-surface);border-color:var(--demo-border);box-shadow:0 1px 2px #00000014}.demo-align .demo-button{display:inline-grid;place-items:center}.demo-between{justify-content:space-between}.demo-wrap{flex-wrap:wrap}.demo-zoom-level{min-width:56px;font-size:13px;text-align:center;font-variant-numeric:tabular-nums}.demo-field{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--demo-muted)}.demo-field input[type=checkbox]{align-self:flex-start}.demo-help-list{margin:0;padding:8px 10px 8px 24px;background:var(--demo-bg);border-radius:8px;font-size:12px;line-height:1.6}.demo-help-list code{padding:0 4px;border-radius:4px;background:var(--demo-surface);font-size:11px}.demo-hint{margin:0;font-size:12px;color:var(--demo-muted)}.demo-hint[data-tone=error]{color:#c92a2a}.demo-error{color:#c92a2a;font-size:13px}.demo-source{width:100%;box-sizing:border-box;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:12px;line-height:1.5;resize:vertical;tab-size:2}.demo-grid{overflow:auto;max-height:360px}.demo-grid table{border-collapse:collapse}.demo-grid td{padding:0}.demo-grid input{width:84px;border-radius:0;margin:-1px 0 0 -1px;padding:3px 6px}.demo-grid-header input,.demo-grid td:first-child input{font-weight:600}.demo-grid-ghost input,.demo-grid-ghost-cell{opacity:.55}.demo-modal{width:min(720px,92vw);border:1px solid var(--demo-border);border-radius:12px;background:var(--demo-surface);color:var(--demo-text);padding:16px 20px}.demo-drawio{width:96vw;max-width:none;height:92vh;max-height:none;padding:0;overflow:hidden}.demo-drawio-frame{display:block;width:100%;height:100%;border:0}.demo-bpmn{width:92vw;max-width:none;height:88vh;max-height:none}.demo-bpmn[open]{display:flex;flex-direction:column;gap:.75rem}.demo-bpmn-frame{flex:1;width:100%;border:1px solid var(--demo-border);border-radius:6px;background:#fff}.demo-bpmn .demo-modal-footer .demo-hint{margin:0 auto 0 0}.demo-modal::backdrop{background:#00000059}.demo-code-modal{width:min(1200px,94vw);max-width:none}.demo-code-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;height:min(70vh,640px)}.demo-code-text{height:100%;resize:none;font-family:ui-monospace,SF Mono,Menlo,monospace}.demo-code-preview{display:flex;align-items:center;justify-content:center;overflow:auto;border:1px solid var(--demo-border);border-radius:8px;background:var(--demo-bg, transparent)}.demo-code-picture{max-width:100%;max-height:100%}.demo-modal-body{display:flex;flex-direction:column;gap:8px;min-height:220px}.demo-shorthand{width:100%;font-family:ui-monospace,SF Mono,Menlo,monospace}.demo-modal footer{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.demo-json-wrap{margin-top:16px}.demo-json{max-height:420px;overflow:auto;font-size:12px;background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:8px;padding:12px}.demo-switch{display:inline-flex;gap:6px;align-items:center;padding:0;font:inherit;font-size:12px;color:var(--demo-muted);background:none;border:0;cursor:pointer}.demo-switch-knob{width:28px;height:16px;border-radius:999px;background:var(--demo-border);position:relative;transition:background .15s}.demo-switch-knob:after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--demo-surface);transition:transform .15s}.demo-switch[aria-checked=true] .demo-switch-knob{background:var(--demo-accent)}.demo-switch[aria-checked=true] .demo-switch-knob:after{transform:translate(12px)}.demo-table-toolbar{position:absolute;z-index:3;display:flex;gap:4px;padding:4px;background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:8px;box-shadow:0 4px 16px #0000001f}.demo-table-toolbar .demo-button{padding:2px 8px}.demo-button.demo-small{padding:2px 8px;font-size:12px}.demo-sample{display:flex;flex-direction:column;gap:4px}.demo-sample h4{margin:0;font-size:12px;font-weight:600}.demo-sample pre{margin:0;padding:6px 8px;font-size:11px;line-height:1.4;background:var(--demo-bg);border-radius:6px;overflow:auto}.demo-follower{font-size:13px}.tiptap pre{padding:8px 12px;border-radius:6px;background:var(--demo-bg)}.demo-inactive{opacity:.35;pointer-events:none;user-select:none}.demo-style-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.5rem,1fr));gap:.375rem}.demo-style-swatch{display:grid;gap:.25rem;padding:.375rem;border:1px solid var(--demo-border);border-radius:.375rem;background:none;color:inherit;font:inherit;font-size:.75rem;text-align:left;cursor:pointer}.demo-style-swatch[aria-pressed=true]{border-color:var(--demo-accent);box-shadow:0 0 0 1px var(--demo-accent)}.demo-style-colors{display:flex;height:.75rem;border-radius:.125rem;overflow:hidden}.demo-style-colors>span{flex:1}.demo-series-line{display:grid;grid-template-columns:minmax(4rem,1fr) 5.25rem 3.5rem 2.75rem 4rem;gap:.375rem;align-items:center;margin-block:.25rem}.demo-series-line>select,.demo-series-line>input[type=color]{width:100%}.demo-reference>input[type=text]{min-width:0;width:100%}.demo-reference>input[type=number]{width:100%;appearance:textfield}.demo-reference>input[type=number]::-webkit-inner-spin-button{appearance:none}.demo-grid-every>.demo-series-name{grid-column:1 / 3;padding-inline-start:.75rem}.demo-grid-every>input{grid-column:3;width:100%}.demo-look{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:.375rem;align-items:center;margin-block:.25rem}.demo-grid-every>select{grid-column:3 / 5;width:100%}.demo-grid-every>.demo-hint{grid-column:4 / -1;margin:0}.demo-series-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.demo-chat-scroll{padding:12px 16px}.demo-chat{display:flex;flex-direction:column;gap:12px}.demo-chat-hint{margin:0 0 8px;font-size:12px;color:var(--demo-muted)}.demo-chat-cards{display:grid;gap:8px}.demo-chat-card{display:flex;flex-direction:column;gap:2px;padding:10px 12px;font:inherit;font-size:13px;text-align:left;color:var(--demo-text);background:var(--demo-bg);border:1px solid var(--demo-border);border-radius:8px;cursor:pointer}.demo-chat-card span{color:var(--demo-muted);font-size:12px}.demo-chat-card:hover:not(:disabled){border-color:var(--demo-accent)}.demo-chat-card:disabled{opacity:.5;cursor:default}.demo-chat-transcript{display:flex;flex-direction:column;gap:12px}.demo-chat-transcript:empty{display:none}.demo-chat-message{display:flex;flex-direction:column;gap:8px;font-size:13px}.demo-chat-message[data-role=user]{align-items:flex-end}.demo-chat-bubble{max-width:85%;padding:8px 12px;color:var(--demo-accent-text);background:var(--demo-accent);border-radius:14px 14px 4px}.demo-chat-bubble>:first-child,.demo-chat-text>:first-child{margin-top:0}.demo-chat-bubble>:last-child,.demo-chat-text>:last-child{margin-bottom:0}.demo-chat-bubble p,.demo-chat-text p{margin:6px 0}.demo-chat-bubble ul,.demo-chat-bubble ol,.demo-chat-text ul,.demo-chat-text ol{margin:6px 0;padding-left:20px}.demo-chat-bubble code{padding:0 4px;background:#fff3;border-radius:4px}.demo-chat-text code,.demo-chat-input code{padding:0 4px;font-size:12px;background:color-mix(in srgb,var(--demo-border) 50%,transparent);border-radius:4px}.demo-chat-tool{display:flex;flex-direction:column;gap:6px;padding:8px 10px;background:var(--demo-bg);border:1px solid var(--demo-border);border-left:3px solid var(--demo-muted);border-radius:6px}.demo-chat-tool[data-state=ok]{border-left-color:#1f9d55}.demo-chat-tool[data-state=error]{border-left-color:#d64545}.demo-chat-tool-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.demo-chat-tool-name{font-size:12px;font-weight:600}.demo-chat-tool-status{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--demo-muted)}.demo-chat-tool-status[data-state=ok]{color:#1f9d55}.demo-chat-tool-status[data-state=error]{color:#d64545}:root[data-demo-theme=dark] .demo-chat-tool[data-state=ok]{border-left-color:#4ade80}:root[data-demo-theme=dark] .demo-chat-tool-status[data-state=ok]{color:#4ade80}:root[data-demo-theme=dark] .demo-chat-tool[data-state=error]{border-left-color:#f87171}:root[data-demo-theme=dark] .demo-chat-tool-status[data-state=error],:root[data-demo-theme=dark] .demo-chat-error{color:#f87171}.demo-chat-tool-details summary{font-size:12px;color:var(--demo-muted);cursor:pointer}.demo-chat-tool-input,.demo-chat-tool-output{margin:4px 0 0;max-height:180px;overflow:auto;padding:6px 8px;font-size:11px;white-space:pre-wrap;word-break:break-word;background:var(--demo-surface);border-radius:4px}.demo-chat-tool-actions:empty{display:none}.demo-chat-tool-gone,.demo-chat-meta{font-size:12px;color:var(--demo-muted)}.demo-chat-error{margin:0;color:#d64545}.demo-chat-loading{display:flex;gap:4px;padding:4px 0}.demo-chat-loading span{width:6px;height:6px;background:var(--demo-muted);border-radius:50%;animation:demo-chat-pulse 1s infinite ease-in-out}.demo-chat-loading span:nth-child(2){animation-delay:.15s}.demo-chat-loading span:nth-child(3){animation-delay:.3s}@keyframes demo-chat-pulse{0%,to{opacity:.25}50%{opacity:1}}.demo-chat-foot{padding:10px 12px 12px;border-top:1px solid var(--demo-border)}.demo-chat-composer{display:flex;flex-direction:column;gap:6px}.demo-chat-input .tiptap{position:relative;min-height:40px;max-height:160px;overflow:auto;padding:2px 4px;font-size:13px;line-height:1.5;outline:none}.demo-chat-input .tiptap p{margin:0}.demo-chat-input .tiptap ul,.demo-chat-input .tiptap ol{margin:0;padding-left:20px}.demo-chat-input[data-empty] .tiptap:before,.demo-chat-input[data-empty] .tiptap:after{position:absolute;left:4px;color:var(--demo-muted);pointer-events:none}.demo-chat-input[data-empty] .tiptap:before{content:attr(data-placeholder);top:2px}.demo-chat-input[data-empty] .tiptap:after{content:attr(data-hint);top:23px;font-size:11px;opacity:.8}.demo-chat-composer-bar{display:flex;justify-content:space-between;align-items:center}.demo-chat-format{display:inline-grid;place-items:center;min-width:26px;min-height:24px;padding:2px 6px;font:inherit;font-size:12px;color:var(--demo-muted);background:transparent;border:1px solid transparent;border-radius:4px;cursor:pointer}.demo-chat-format[data-format=bold]{font-weight:700}.demo-chat-format[data-format=italic]{font-style:italic}.demo-chat-format:hover,.demo-chat-format[aria-pressed=true]{color:var(--demo-text);background:var(--demo-bg);border-color:var(--demo-border)}.demo-chat-send{position:relative;display:flex}.demo-chat-send-main,.demo-chat-send-more{font:inherit;font-size:13px;color:var(--demo-accent-text);background:var(--demo-accent);border:0;cursor:pointer}.demo-chat-send-main{padding:4px 12px;border-radius:6px 0 0 6px}.demo-chat-send-more{display:grid;place-items:center;padding:0 6px;border-left:1px solid rgb(255 255 255 / .35);border-radius:0 6px 6px 0}.demo-chat-send-main:disabled{cursor:default;opacity:.45}.demo-chat-send-main:disabled+.demo-chat-send-more:not(:hover,:focus-visible,[aria-expanded=true]){opacity:.45}.demo-chat-send-main:hover:not(:disabled),.demo-chat-send-more:hover,.demo-chat-send-more[aria-expanded=true]{filter:brightness(1.08)}.demo-chat-menu{position:absolute;right:0;bottom:calc(100% + 6px);z-index:10;min-width:170px;padding:4px;background:var(--demo-surface);border:1px solid var(--demo-border);border-radius:8px;box-shadow:0 6px 20px #0000001f}.demo-chat-menu-item{display:block;width:100%;padding:6px 8px;font:inherit;font-size:13px;color:var(--demo-text);text-align:left;cursor:pointer;background:transparent;border:0;border-radius:4px}.demo-chat-menu-item:disabled{cursor:default;opacity:.4}.demo-chat-menu-item:hover:not(:disabled),.demo-chat-menu-item:focus-visible{background:var(--demo-bg);outline:none}
