@gpdoc/cli 1.3.0 → 1.4.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.
@@ -0,0 +1,219 @@
1
+ <!doctype html><html lang="en" data-gpdoc-cli-editor><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="gpdoc-editor-engine" content="GpdocEditor"><style>.gpdoc-editor-root{--gpdoc-bg: var(--gpdoc-editor-background, var(--gpdoc-color-background, var(--theme-background, var(--vscode-editor-background, #ffffff))));--gpdoc-text: var(--gpdoc-editor-text, var(--gpdoc-color-text, var(--theme-primary-text, var(--vscode-editor-foreground, #1a1a2e))));--gpdoc-border: var(--gpdoc-editor-border, var(--gpdoc-color-border, var(--theme-borders, var(--vscode-panel-border, #e2e8f0))));--gpdoc-gutter-bg: var(--gpdoc-editor-gutter-background, var(--gpdoc-editor-surface, var(--gpdoc-color-surface, var(--theme-surface, var(--vscode-editorWidget-background, #f8fafc)))));--gpdoc-gutter-divider: var(--gpdoc-editor-gutter-divider, var(--gpdoc-editor-border, var(--gpdoc-color-border, var(--theme-borders, var(--vscode-panel-border, #d8e1ec)))));--gpdoc-gutter-text: var(--gpdoc-editor-subtext, var(--gpdoc-color-subtext, var(--theme-secondary-text, var(--vscode-descriptionForeground, #94a3b8))));--gpdoc-gutter-width: 3.5rem;--gpdoc-gutter-font-size: 12px;--gpdoc-comment-open: #0369a1;--gpdoc-comment-resolved: #047857;--gpdoc-comment-open-bg: #f0f9ff;--gpdoc-comment-resolved-bg: #ecfdf5;--gpdoc-suggestion-added: var(--vscode-gitDecoration-addedResourceForeground, #22c55e);--gpdoc-suggestion-modified: var(--vscode-gitDecoration-modifiedResourceForeground, #eab308);--gpdoc-suggestion-deleted: var(--vscode-gitDecoration-deletedResourceForeground, #ef4444);--gpdoc-suggestion-added-bg: rgba(34, 197, 94, .12);--gpdoc-suggestion-modified-bg: rgba(234, 179, 8, .14);--gpdoc-suggestion-deleted-bg: rgba(239, 68, 68, .12);--gpdoc-accent: var(--gpdoc-editor-accent, var(--gpdoc-color-accent, var(--theme-accent, var(--vscode-textLink-foreground, #3b82f6))));--gpdoc-document-accent: var(--gpdoc-accent);--gpdoc-accent-hover: var(--gpdoc-editor-accent-hover, var(--gpdoc-accent));--gpdoc-surface: var(--gpdoc-editor-surface, var(--gpdoc-color-surface, var(--theme-surface, var(--vscode-editorWidget-background, #f1f5f9))));--gpdoc-code-bg: var(--gpdoc-editor-code-bg, var(--gpdoc-color-code-bg, var(--theme-code-bg, var(--vscode-textCodeBlock-background, #0f172a))));--gpdoc-code-text: var(--gpdoc-editor-code-text, var(--gpdoc-color-code-text, var(--theme-code-text, var(--vscode-editor-foreground, #e2e8f0))));--gpdoc-toolbar-bg: var(--gpdoc-editor-toolbar-bg, color-mix(in srgb, var(--gpdoc-surface) 92%, var(--gpdoc-bg)));--gpdoc-toolbar-text: var(--gpdoc-editor-toolbar-text, var(--gpdoc-text));--gpdoc-toolbar-hover: var(--gpdoc-editor-toolbar-hover, color-mix(in srgb, var(--gpdoc-accent) 16%, var(--gpdoc-surface)));--gpdoc-toolbar-active: var(--gpdoc-editor-toolbar-active, var(--gpdoc-accent));--gpdoc-editor-font-body: var(--gpdoc-font-body, var(--theme-body-font, var(--vscode-font-family, system-ui, -apple-system, "Segoe UI", sans-serif)));--gpdoc-editor-font-heading: var(--gpdoc-font-heading, var(--gpdoc-editor-font-body));--gpdoc-editor-font-code: var(--gpdoc-font-code, var(--theme-code-font, "JetBrains Mono", "Fira Code", Monaco, Consolas, monospace));--gpdoc-editor-font-size: var(--gpdoc-font-size, var(--theme-font-size, 16px));--gpdoc-editor-line-height: var(--gpdoc-line-height, var(--theme-line-height, 1.6));--gpdoc-pane-padding: 16px;--gpdoc-content-padding: 24px;--gpdoc-content-max-width: var(--theme-content-width, 800px);--gpdoc-heading-font-weight: 700;--gpdoc-paragraph-spacing: .75rem;--gpdoc-list-indent: 1.5rem;--gpdoc-shell-border-width: 1px;--gpdoc-shell-radius: .5rem;position:relative;display:flex;flex-direction:column;width:100%;height:100%;background:var(--gpdoc-bg);color:var(--gpdoc-text);font-family:var(--gpdoc-editor-font-body);font-size:var(--gpdoc-editor-font-size);line-height:var(--gpdoc-editor-line-height);border:var(--gpdoc-shell-border-width) solid var(--gpdoc-border);border-radius:var(--gpdoc-shell-radius);box-sizing:border-box;overflow:hidden}.gpdoc-editor-root.gpdoc-dark{--gpdoc-comment-open: #7dd3fc;--gpdoc-comment-resolved: #6ee7b7;--gpdoc-comment-open-bg: #0c4a6e;--gpdoc-comment-resolved-bg: #064e3b}.gpdoc-editor-root.gpdoc-pageless{--gpdoc-shell-border-width: 0px;--gpdoc-shell-radius: 0px;background:transparent;overflow:visible}.gpdoc-web-editor-shell{position:relative;display:flex;align-items:flex-start;justify-content:center;width:100%;height:auto;max-width:100%;min-height:100%}.gpdoc-web-editor-shell.is-resizing,.gpdoc-web-editor-shell.is-resizing *{cursor:ew-resize!important;user-select:none}.gpdoc-web-editor.gpdoc-editor-root{width:100%;max-width:100%;align-self:flex-start;flex:0 0 auto;height:auto;min-height:100%;margin-inline:auto;transition:border-color .12s ease,box-shadow .12s ease,background-color .12s ease}.gpdoc-web-editor.gpdoc-page-frame-visible{--gpdoc-shell-border-width: 1px;--gpdoc-shell-radius: 1rem;border:1px solid color-mix(in srgb,var(--gpdoc-border) 88%,transparent);border-radius:1rem;background:var(--gpdoc-editor-page-background, var(--gpdoc-bg));box-shadow:none;overflow:hidden}.gpdoc-web-editor.gpdoc-page-frame-visible .tiptap{background:var(--gpdoc-editor-page-background, var(--gpdoc-bg))}.gpdoc-web-editor.gpdoc-page-frame-hidden{--gpdoc-shell-border-width: 0px;--gpdoc-shell-radius: 0px;border:none;border-radius:0;background:transparent;overflow:visible}.gpdoc-web-editor-width-handle{position:absolute;top:1rem;bottom:1rem;width:24px;border:none;padding:0;background:transparent;cursor:ew-resize;opacity:.82;z-index:12;transition:opacity .12s ease,transform .12s ease}.gpdoc-web-editor-width-handle-pill{position:absolute;top:50%;left:50%;display:flex;align-items:center;justify-content:center;width:14px;height:88px;border-radius:999px;transform:translate(-50%,-50%);background:color-mix(in srgb,var(--gpdoc-toolbar-bg) 94%,transparent);border:1px solid color-mix(in srgb,var(--gpdoc-border) 80%,transparent);box-shadow:none}.gpdoc-web-editor-width-handle-grip{width:4px;height:42px;border-radius:999px;background:repeating-linear-gradient(to bottom,color-mix(in srgb,var(--gpdoc-accent) 86%,white) 0 4px,transparent 4px 8px)}.gpdoc-web-editor-width-handle-left{left:0;transform:translate(-50%)}.gpdoc-web-editor-width-handle-right{right:0;transform:translate(50%)}.gpdoc-web-editor-width-handle:hover .gpdoc-web-editor-width-handle-pill,.gpdoc-web-editor-width-handle:focus-visible .gpdoc-web-editor-width-handle-pill,.gpdoc-web-editor-shell.is-resizing .gpdoc-web-editor-width-handle-pill{background:color-mix(in srgb,var(--gpdoc-toolbar-bg) 98%,var(--gpdoc-surface));border-color:color-mix(in srgb,var(--gpdoc-accent) 55%,var(--gpdoc-border));box-shadow:none}.gpdoc-web-editor-width-handle:hover .gpdoc-web-editor-width-handle-grip,.gpdoc-web-editor-width-handle:focus-visible .gpdoc-web-editor-width-handle-grip,.gpdoc-web-editor-shell.is-resizing .gpdoc-web-editor-width-handle-grip{background:repeating-linear-gradient(to bottom,color-mix(in srgb,var(--gpdoc-accent) 96%,white) 0 4px,transparent 4px 8px)}.gpdoc-web-editor-width-handle:focus-visible{opacity:1;outline:none}.gpdoc-web-editor-shell:hover .gpdoc-web-editor-width-handle,.gpdoc-web-editor-shell.is-resizing .gpdoc-web-editor-width-handle{opacity:1}.gpdoc-web-editor-width-hint{position:absolute;top:.85rem;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;gap:.55rem;padding:.38rem .7rem;border:1px solid color-mix(in srgb,var(--gpdoc-border) 82%,transparent);border-radius:999px;background:color-mix(in srgb,var(--gpdoc-toolbar-bg) 95%,var(--gpdoc-bg));color:var(--gpdoc-toolbar-text);font-size:.72rem;line-height:1;white-space:nowrap;pointer-events:none;opacity:.9;box-shadow:none;z-index:13;transition:opacity .12s ease,box-shadow .12s ease,transform .12s ease}.gpdoc-web-editor-width-hint-text{color:color-mix(in srgb,var(--gpdoc-toolbar-text) 88%,var(--gpdoc-border))}.gpdoc-web-editor-width-hint-value{font-family:var(--gpdoc-editor-font-code);font-size:.7rem;color:var(--gpdoc-toolbar-text)}.gpdoc-web-editor-shell:hover .gpdoc-web-editor-width-hint,.gpdoc-web-editor-shell:focus-within .gpdoc-web-editor-width-hint,.gpdoc-web-editor-shell.is-resizing .gpdoc-web-editor-width-hint{opacity:1;box-shadow:none}.gpdoc-web-editor-width-readout{position:absolute;top:0;left:50%;transform:translate(-50%,calc(-100% - .35rem));padding:.3rem .55rem;border:1px solid color-mix(in srgb,var(--gpdoc-border) 88%,transparent);border-radius:999px;background:color-mix(in srgb,var(--gpdoc-toolbar-bg) 96%,var(--gpdoc-bg));color:var(--gpdoc-toolbar-text);font-family:var(--gpdoc-editor-font-code);font-size:.75rem;line-height:1;pointer-events:none;z-index:13}.gpdoc-comment-markers{position:absolute;inset:0;pointer-events:none;z-index:35}.gpdoc-comment-marker-btn{position:absolute;right:.65rem;display:inline-flex;align-items:center;justify-content:center;gap:.2rem;min-width:2rem;height:2rem;padding:0 .45rem;border:1px solid color-mix(in srgb,var(--gpdoc-comment-open) 70%,var(--gpdoc-border));border-radius:999px;background:var(--gpdoc-comment-open-bg);color:var(--gpdoc-comment-open);font-family:var(--gpdoc-editor-font-body);font-size:.72rem;font-weight:700;line-height:1;box-shadow:none;cursor:pointer;pointer-events:auto;transform:translateY(-50%);transition:background-color .12s ease,border-color .12s ease,color .12s ease}.gpdoc-comment-marker-btn:hover,.gpdoc-comment-marker-btn-active{border-color:var(--gpdoc-comment-open);background:color-mix(in srgb,var(--gpdoc-comment-open-bg) 86%,var(--gpdoc-bg));color:var(--gpdoc-comment-open)}.gpdoc-comment-marker-btn:focus-visible{border-color:var(--gpdoc-comment-open);outline:2px solid var(--gpdoc-accent);outline-offset:2px}.gpdoc-comment-marker-btn[data-resolved=true]{border-color:color-mix(in srgb,var(--gpdoc-comment-resolved) 58%,var(--gpdoc-border));background:var(--gpdoc-comment-resolved-bg);color:var(--gpdoc-comment-resolved)}.gpdoc-comment-marker-dot{width:.45rem;height:.45rem;border-radius:999px;background:currentColor;flex:0 0 auto}.gpdoc-comment-marker-count{min-width:.5rem;text-align:center}@media (max-width: 640px){.gpdoc-comment-marker-btn{right:.25rem;min-width:1.8rem;height:1.8rem;padding:0 .35rem}}.gpdoc-editor-root>.tiptap-container,.gpdoc-editor-root>div:last-child{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;min-height:0;overscroll-behavior-y:contain}.gpdoc-editor-root.gpdoc-pageless>.tiptap-container,.gpdoc-editor-root.gpdoc-pageless>div:last-child{overflow:visible}.gpdoc-editor-root .tiptap{outline:none;flex:1 0 auto;overflow:visible;width:100%;max-width:none;margin:0;padding:var(--gpdoc-pane-padding) var(--gpdoc-content-padding) calc(var(--gpdoc-pane-padding) + 2rem);min-height:100%;box-sizing:border-box;cursor:text;position:relative;z-index:1;background:var(--gpdoc-bg);color:var(--gpdoc-text);caret-color:var(--gpdoc-text);overflow-wrap:anywhere;word-break:normal}.gpdoc-editor-root .tiptap p,.gpdoc-editor-root .tiptap li,.gpdoc-editor-root .tiptap blockquote,.gpdoc-editor-root .tiptap h1,.gpdoc-editor-root .tiptap h2,.gpdoc-editor-root .tiptap h3,.gpdoc-editor-root .tiptap h4,.gpdoc-editor-root .tiptap h5,.gpdoc-editor-root .tiptap h6{overflow-wrap:anywhere;word-break:normal}.gpdoc-editor-root.gpdoc-pageless .tiptap{width:100%;max-width:none;margin-left:0;margin-right:0;box-sizing:border-box;overscroll-behavior-y:auto}.gpdoc-editor-root.gpdoc-pageless.gpdoc-page-frame-hidden .tiptap{background-color:transparent}.gpdoc-editor-root.gpdoc-pageless .tiptap>*{width:100%;max-width:none;margin-left:0;margin-right:0;box-sizing:border-box}.gpdoc-editor-root.gpdoc-gutter-visible .tiptap{padding-left:calc(var(--gpdoc-gutter-width) + var(--gpdoc-content-padding));background-image:linear-gradient(to right,var(--gpdoc-gutter-bg) 0,var(--gpdoc-gutter-bg) var(--gpdoc-gutter-width),var(--gpdoc-gutter-divider) var(--gpdoc-gutter-width),var(--gpdoc-gutter-divider) calc(var(--gpdoc-gutter-width) + 1px),transparent calc(var(--gpdoc-gutter-width) + 1px));background-repeat:no-repeat;background-size:100% 100%}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row{position:relative;width:100%;max-width:var(--gpdoc-content-max-width);box-sizing:border-box}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row:before{content:attr(data-gpdoc-line);position:absolute;top:0;left:calc(-1 * var(--gpdoc-gutter-width) - var(--gpdoc-content-padding));width:var(--gpdoc-gutter-width);text-align:right;padding-right:.75rem;padding-top:1px;color:var(--gpdoc-gutter-text);font-family:var(--gpdoc-editor-font-code);font-size:var(--gpdoc-gutter-font-size);line-height:1.2;white-space:nowrap;user-select:none;pointer-events:auto;cursor:pointer;box-sizing:border-box;z-index:2}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-line,.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-resolved-line,.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-suggestion-line{border-radius:.25rem}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-suggestion-added-line{--gpdoc-row-suggestion-color: var(--gpdoc-suggestion-added);--gpdoc-row-suggestion-bg: var(--gpdoc-suggestion-added-bg)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-suggestion-modified-line{--gpdoc-row-suggestion-color: var(--gpdoc-suggestion-modified);--gpdoc-row-suggestion-bg: var(--gpdoc-suggestion-modified-bg)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-suggestion-deleted-line{--gpdoc-row-suggestion-color: var(--gpdoc-suggestion-deleted);--gpdoc-row-suggestion-bg: var(--gpdoc-suggestion-deleted-bg)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-suggestion-line{background:var(--gpdoc-row-suggestion-bg, transparent);box-shadow:inset 3px 0 0 0 var(--gpdoc-row-suggestion-color, transparent)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-suggestion-line:not(.gpdoc-comment-line):not(.gpdoc-comment-resolved-line):before{color:var(--gpdoc-row-suggestion-color, var(--gpdoc-gutter-text));font-weight:600}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-line{background:var(--gpdoc-comment-open-bg);box-shadow:inset 3px 0 0 0 var(--gpdoc-comment-open)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-resolved-line{background:var(--gpdoc-comment-resolved-bg);box-shadow:inset 3px 0 0 0 var(--gpdoc-comment-resolved)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-line.gpdoc-suggestion-line{box-shadow:inset 3px 0 0 0 var(--gpdoc-comment-open),inset -3px 0 0 0 var(--gpdoc-row-suggestion-color, transparent)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-resolved-line.gpdoc-suggestion-line{box-shadow:inset 3px 0 0 0 var(--gpdoc-comment-resolved),inset -3px 0 0 0 var(--gpdoc-row-suggestion-color, transparent)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-line:before{color:var(--gpdoc-comment-open);font-weight:600}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-resolved-line:before{color:var(--gpdoc-comment-resolved);font-weight:600}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-line:after,.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-resolved-line:after{content:"";position:absolute;left:calc(-1 * var(--gpdoc-gutter-width) - var(--gpdoc-content-padding) + .35rem);top:.45rem;width:.6rem;height:.6rem;border-radius:999px;pointer-events:none;z-index:3}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-line:after{background:var(--gpdoc-comment-open);box-shadow:0 0 0 2px color-mix(in srgb,var(--gpdoc-bg) 65%,transparent)}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-gutter-row.gpdoc-comment-resolved-line:after{background:var(--gpdoc-comment-resolved);box-shadow:0 0 0 2px color-mix(in srgb,var(--gpdoc-bg) 65%,transparent)}.gpdoc-editor-root .tiptap p{margin:0 0 var(--gpdoc-paragraph-spacing)}.gpdoc-editor-root .tiptap h1,.gpdoc-editor-root .tiptap h2,.gpdoc-editor-root .tiptap h3,.gpdoc-editor-root .tiptap h4,.gpdoc-editor-root .tiptap h5,.gpdoc-editor-root .tiptap h6{font-family:var(--gpdoc-editor-font-heading)}.gpdoc-editor-root .tiptap h1{font-size:2em;font-weight:var(--gpdoc-heading-font-weight);margin:24px 0 16px;line-height:1.25;border-bottom:1px solid var(--gpdoc-border);padding-bottom:8px}.gpdoc-editor-root .tiptap h2{font-size:1.5em;font-weight:var(--gpdoc-heading-font-weight);margin:24px 0 16px;line-height:1.25;border-bottom:1px solid var(--gpdoc-border);padding-bottom:6px}.gpdoc-editor-root .tiptap h3{font-size:1.25em;font-weight:var(--gpdoc-heading-font-weight);margin:24px 0 16px;line-height:1.25}.gpdoc-editor-root .tiptap h4,.gpdoc-editor-root .tiptap h5,.gpdoc-editor-root .tiptap h6{font-size:1.1em;font-weight:var(--gpdoc-heading-font-weight);margin:24px 0 16px;line-height:1.25}.gpdoc-editor-root .tiptap ul,.gpdoc-editor-root .tiptap ol{padding-left:var(--gpdoc-list-indent);margin:0 0 16px}.gpdoc-editor-root .tiptap li,.gpdoc-editor-root .tiptap li p{margin:0 0 8px}.gpdoc-editor-root .tiptap ul[data-type=taskList]{list-style:none;padding-left:0}.gpdoc-editor-root .tiptap ul[data-type=taskList] li{display:flex;align-items:flex-start;gap:.5rem}.gpdoc-editor-root .tiptap ul[data-type=taskList] li label{flex-shrink:0;margin-top:.25rem}.gpdoc-editor-root .tiptap blockquote{margin:16px 0;padding:.5rem 1rem;border-left:3px solid var(--gpdoc-document-accent);background:var(--gpdoc-surface);border-radius:0 .375rem .375rem 0}.gpdoc-editor-root .tiptap code{background:var(--gpdoc-surface);padding:.125rem .375rem;border-radius:.25rem;font-family:var(--gpdoc-editor-font-code);font-size:.9em;white-space:normal;overflow-wrap:anywhere;word-break:normal}.gpdoc-editor-root .tiptap pre{background:var(--gpdoc-code-bg);color:var(--gpdoc-code-text);padding:1rem;border-radius:.5rem;overflow-x:auto;margin:16px 0;font-family:var(--gpdoc-editor-font-code);font-size:.9em;line-height:1.6;white-space:pre;overflow-wrap:normal;word-break:normal}.gpdoc-editor-root .tiptap .gpdoc-render-preview{position:relative;display:block;width:100%;max-width:var(--gpdoc-content-max-width);box-sizing:border-box;margin:16px 0;padding:.75rem 1rem;border:1px solid var(--gpdoc-border);border-radius:.5rem;background:var(--gpdoc-surface);color:var(--gpdoc-text);overflow:visible}.gpdoc-editor-root .tiptap .gpdoc-render-preview.gpdoc-render-preview-plain{margin:0;padding:0;border:none;border-radius:0;background:transparent;max-width:none;overflow:visible}.gpdoc-editor-root .tiptap pre.gpdoc-mermaid-source-hidden,.gpdoc-editor-root .tiptap p.gpdoc-formula-source-hidden,.gpdoc-editor-root .tiptap .gpdoc-embed-source-hidden,.gpdoc-editor-root .tiptap .gpdoc-formula-inline-source-hidden,.gpdoc-editor-root .tiptap .gpdoc-variable-inline-source-hidden{display:none!important}.gpdoc-editor-root .tiptap .gpdoc-render-preview .gpdoc-preview-placeholder{color:var(--gpdoc-gutter-text)}.gpdoc-editor-root .tiptap .gpdoc-render-preview .gpdoc-preview-content{max-width:100%;box-sizing:border-box;overflow-x:auto;overflow-y:hidden}.gpdoc-editor-root .tiptap .gpdoc-embed-preview-host{display:block;width:100%;margin:16px 0}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-embed-preview-host{position:relative}.gpdoc-editor-root.gpdoc-gutter-visible .gpdoc-embed-preview-host:before{content:attr(data-gpdoc-embed-cue);position:absolute;top:.55rem;left:calc(-1 * var(--gpdoc-gutter-width) - var(--gpdoc-content-padding) + .25rem);min-width:calc(var(--gpdoc-gutter-width) - .85rem);padding:.2rem .35rem;border:1px solid color-mix(in srgb,var(--gpdoc-accent) 40%,var(--gpdoc-border));border-radius:999px;background:color-mix(in srgb,var(--gpdoc-accent) 12%,var(--gpdoc-bg));color:var(--gpdoc-accent);font-family:var(--gpdoc-editor-font-code);font-size:10px;font-weight:700;line-height:1;letter-spacing:.08em;text-align:center;text-transform:uppercase;box-sizing:border-box;pointer-events:none;z-index:4}.gpdoc-editor-root .tiptap .gpdoc-embed{margin:0;color:var(--gpdoc-text)}.gpdoc-editor-root .tiptap .gpdoc-embed.gpdoc-embed-frame-enabled{border:1px solid var(--gpdoc-border);border-radius:.75rem;background:var(--gpdoc-bg);overflow:hidden;box-shadow:none}.gpdoc-editor-root .tiptap .gpdoc-embed-frame-wrapper{width:100%;background:var(--gpdoc-bg);overflow-y:auto;overflow-x:hidden;box-sizing:border-box}.gpdoc-editor-root .tiptap .gpdoc-embed-frame{width:100%;min-height:100%;border:none;background:transparent;box-sizing:border-box}.gpdoc-editor-root .tiptap .gpdoc-embed-frame>:first-child{margin-top:0}.gpdoc-editor-root .tiptap .gpdoc-embed-frame>:last-child{margin-bottom:0}.gpdoc-editor-root .tiptap .gpdoc-embed-footer{padding:10px 16px;background:var(--gpdoc-surface);border-top:1px solid var(--gpdoc-border);text-align:right;font-weight:600;color:var(--gpdoc-accent)}.gpdoc-editor-root .tiptap .gpdoc-embed.gpdoc-embed-frame-disabled{border:none;border-radius:0;background:transparent;box-shadow:none;overflow:visible}.gpdoc-editor-root .tiptap .gpdoc-embed.gpdoc-embed-frame-disabled .gpdoc-embed-frame-wrapper{background:transparent}.gpdoc-editor-root .tiptap .gpdoc-embed.gpdoc-embed-frame-disabled .gpdoc-embed-frame{padding:0;overflow:visible;height:auto}.gpdoc-editor-root .tiptap .gpdoc-preview-actions{position:absolute;top:2.55rem;right:.5rem;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.35rem;z-index:5;max-width:min(100% - 1rem,38rem);opacity:0;pointer-events:none;transition:opacity .12s ease,visibility .12s ease;visibility:hidden}.gpdoc-editor-root .tiptap .gpdoc-preview-controls-toggle{position:absolute;top:.5rem;right:.5rem;z-index:6;border:1px solid var(--gpdoc-border);border-radius:.35rem;padding:.2rem .55rem;background:var(--gpdoc-bg);color:var(--gpdoc-text);cursor:pointer;font-size:.72rem;line-height:1.2;transition:background-color .12s ease,opacity .12s ease}.gpdoc-editor-root .tiptap .gpdoc-preview-controls-toggle[data-control-state=closed]{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0}.gpdoc-editor-root .tiptap .gpdoc-preview-controls-icon{display:block;width:1rem;height:1rem;pointer-events:none}.gpdoc-editor-root .tiptap .gpdoc-preview-action-btn{border:1px solid var(--gpdoc-border);border-radius:.35rem;padding:.2rem .55rem;font-size:.72rem;line-height:1.2;background:var(--gpdoc-bg);color:var(--gpdoc-text);cursor:pointer;transition:opacity .12s ease,background-color .12s ease}.gpdoc-editor-root .tiptap .gpdoc-preview-remove-btn{color:#b91c1c;border-color:color-mix(in srgb,#b91c1c 28%,var(--gpdoc-border))}.gpdoc-editor-root .tiptap .gpdoc-render-preview.gpdoc-controls-visible .gpdoc-preview-actions,.gpdoc-editor-root .tiptap .gpdoc-preview-actions:focus-within{opacity:1;pointer-events:auto;visibility:visible}.gpdoc-editor-root .tiptap .gpdoc-preview-controls-toggle:hover,.gpdoc-editor-root .tiptap .gpdoc-preview-action-btn:hover{background:var(--gpdoc-surface)}.gpdoc-editor-root .tiptap .gpdoc-preview-download-group{position:relative;display:inline-flex}.gpdoc-editor-root .tiptap .gpdoc-preview-download-menu{position:absolute;top:calc(100% + .3rem);right:0;z-index:20;display:none;min-width:8.5rem;padding:.25rem;border:1px solid var(--gpdoc-border);border-radius:.35rem;background:var(--gpdoc-bg);box-shadow:0 .4rem 1rem #0f172a29;gap:.2rem}.gpdoc-editor-root .tiptap .gpdoc-preview-download-group.is-open .gpdoc-preview-download-menu{display:grid}.gpdoc-editor-root .tiptap .gpdoc-preview-download-option{border:0;border-radius:.25rem;padding:.25rem .45rem;background:transparent;color:var(--gpdoc-text);cursor:pointer;font-size:.72rem;line-height:1.2;text-align:left;white-space:nowrap}.gpdoc-editor-root .tiptap .gpdoc-preview-download-option:hover,.gpdoc-editor-root .tiptap .gpdoc-preview-download-option:focus{background:var(--gpdoc-surface)}.gpdoc-editor-root .tiptap .gpdoc-mermaid-preview svg{display:block;max-width:100%;height:auto;margin:0 auto}.gpdoc-editor-root .tiptap .gpdoc-mermaid-preview .gpdoc-preview-content{width:100%;overflow-x:auto;overflow-y:hidden}.gpdoc-editor-root .tiptap .gpdoc-katex-preview.block .katex-display{margin:0}.gpdoc-mermaid-modal-backdrop{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:2rem;background:#0f172a52}.gpdoc-mermaid-modal{position:relative;width:min(96vw,1440px);height:min(86vh,920px);overflow:hidden;border:2px solid var(--gpdoc-accent, #0969da);border-radius:.35rem;background:var(--gpdoc-bg, #ffffff);box-shadow:0 1rem 3rem #0f172a3d}.gpdoc-mermaid-modal-close{position:absolute;top:.75rem;right:.75rem;z-index:4;width:2.2rem;height:2.2rem;border:1px solid var(--gpdoc-border, #d0d7de);border-radius:.35rem;background:var(--gpdoc-bg, #ffffff);color:var(--gpdoc-text, #24292f);cursor:pointer;font-size:1.35rem;line-height:1}.gpdoc-mermaid-modal-viewport{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:grab}.gpdoc-mermaid-modal-viewport.is-dragging{cursor:grabbing}.gpdoc-mermaid-modal-canvas{transform-origin:center center;transition:transform .08s ease;will-change:transform}.gpdoc-mermaid-modal-canvas svg{display:block;max-width:none;height:auto}.gpdoc-mermaid-viewer-controls{position:absolute;right:1.5rem;bottom:1.5rem;z-index:4;display:grid;grid-template-columns:repeat(3,2.35rem);gap:.25rem}.gpdoc-mermaid-viewer-control-btn{width:2.35rem;height:2.35rem;border:1px solid var(--gpdoc-border, #d0d7de);border-radius:.35rem;background:color-mix(in srgb,var(--gpdoc-bg, #ffffff) 92%,transparent);color:var(--gpdoc-text, #24292f);cursor:pointer;font:inherit;font-size:1.05rem;font-weight:700;line-height:1;box-shadow:0 .2rem .75rem #0f172a1a}.gpdoc-mermaid-modal-close:hover,.gpdoc-mermaid-viewer-control-btn:hover{background:var(--gpdoc-surface, #f6f8fa)}.gpdoc-editor-root .tiptap .gpdoc-katex-preview.inline{display:inline-block;margin:.25rem 0 .5rem}.gpdoc-editor-root .tiptap .gpdoc-inline-katex-preview{display:inline-flex;align-items:baseline;vertical-align:baseline;margin:0 .08em;max-width:100%;overflow-x:auto}.gpdoc-editor-root .tiptap .gpdoc-inline-katex-preview[data-gpdoc-inline-editable=true]{cursor:pointer;border-radius:.35rem;padding:.04rem .18rem;transition:background-color .12s ease,box-shadow .12s ease}.gpdoc-editor-root .tiptap .gpdoc-inline-katex-preview[data-gpdoc-inline-editable=true]:hover,.gpdoc-editor-root .tiptap .gpdoc-inline-katex-preview[data-gpdoc-inline-editable=true]:focus-visible{background:var(--gpdoc-surface);box-shadow:0 0 0 1px var(--gpdoc-border);outline:none}.gpdoc-editor-root .tiptap .gpdoc-inline-katex-preview .katex{font-size:1em;pointer-events:none}.gpdoc-editor-root .tiptap .gpdoc-inline-variable-preview{display:inline;vertical-align:baseline;margin:0 .08em;padding:0 .18rem;border-radius:.28rem;background:color-mix(in srgb,var(--gpdoc-accent) 8%,transparent);color:var(--gpdoc-text);cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-decoration-color:color-mix(in srgb,var(--gpdoc-accent) 70%,transparent);text-underline-offset:.12em;transition:background-color .12s ease,box-shadow .12s ease,text-decoration-color .12s ease}.gpdoc-editor-root .tiptap .gpdoc-inline-variable-preview:hover,.gpdoc-editor-root .tiptap .gpdoc-inline-variable-preview:focus-visible{background:color-mix(in srgb,var(--gpdoc-accent) 14%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--gpdoc-accent) 38%,transparent);text-decoration-color:var(--gpdoc-accent);outline:none}.gpdoc-editor-root .tiptap .gpdoc-inline-variable-preview-unresolved{background:color-mix(in srgb,var(--gpdoc-surface) 84%,var(--gpdoc-bg));color:var(--gpdoc-gutter-text)}.gpdoc-editor-root .tiptap .gpdoc-preview-error{color:var(--vscode-errorForeground, #ef4444);font-family:var(--gpdoc-editor-font-code);font-size:.85em;white-space:pre-wrap}.gpdoc-editor-root .tiptap pre code{background:none;padding:0;border-radius:0;color:inherit;font-size:inherit;white-space:inherit;overflow-wrap:inherit;word-break:inherit}.gpdoc-editor-root .tiptap a{color:var(--gpdoc-document-accent);text-decoration:underline;text-decoration-color:var(--gpdoc-document-accent);text-underline-offset:2px;cursor:pointer}.gpdoc-editor-root .tiptap hr{border:none;border-top:1px solid var(--gpdoc-border);margin:1.5rem 0}.gpdoc-editor-root .tiptap .gpdoc-page-break{display:block;width:100%;max-width:var(--gpdoc-content-max-width);height:0;margin:2rem 0;border:none;border-top:1px dashed var(--gpdoc-border);position:relative;color:var(--gpdoc-gutter-text);-webkit-user-select:none;user-select:none}.gpdoc-editor-root .tiptap .gpdoc-page-break:after{content:"Page break";position:absolute;left:50%;top:0;transform:translate(-50%,-50%);padding:.1rem .45rem;border:1px solid var(--gpdoc-border);border-radius:999px;background:var(--gpdoc-bg);color:var(--gpdoc-gutter-text);font-family:var(--gpdoc-editor-font-code);font-size:.72rem;line-height:1.3;white-space:nowrap}@media print{.gpdoc-editor-root .tiptap .gpdoc-page-break{margin:0;border:0;break-after:page;page-break-after:always}.gpdoc-editor-root .tiptap .gpdoc-page-break:after{display:none}}.gpdoc-editor-root .tiptap .tableWrapper{width:100%;max-width:100%;margin:16px 0;overflow-x:auto;overflow-y:hidden}.gpdoc-editor-root .tiptap table{border-collapse:collapse;table-layout:fixed;width:100%;margin:16px 0;border:none;overflow:hidden}.gpdoc-editor-root .tiptap .tableWrapper table{margin:0}.gpdoc-editor-root .tiptap th,.gpdoc-editor-root .tiptap td{border:none;padding:.5rem .75rem;text-align:left;background:transparent;vertical-align:top;line-height:1.35;box-sizing:border-box;min-width:80px;position:relative}.gpdoc-editor-root .tiptap th{border-bottom:1px solid var(--gpdoc-border);font-weight:700}.gpdoc-editor-root .tiptap th p,.gpdoc-editor-root .tiptap td p,.gpdoc-editor-root .tiptap th>*,.gpdoc-editor-root .tiptap td>*{margin:0}.gpdoc-editor-root .tiptap th,.gpdoc-editor-root .tiptap th p,.gpdoc-editor-root .tiptap th *{font-weight:700}.gpdoc-editor-root .tiptap tbody tr,.gpdoc-editor-root .tiptap thead tr,.gpdoc-editor-root .tiptap tfoot tr{background:transparent}.gpdoc-editor-root .tiptap table[data-gpdoc-table-align=left] th,.gpdoc-editor-root .tiptap table[data-gpdoc-table-align=left] td{text-align:left}.gpdoc-editor-root .tiptap table[data-gpdoc-table-align=center] th,.gpdoc-editor-root .tiptap table[data-gpdoc-table-align=center] td{text-align:center}.gpdoc-editor-root .tiptap table[data-gpdoc-table-align=right] th,.gpdoc-editor-root .tiptap table[data-gpdoc-table-align=right] td{text-align:right}.gpdoc-editor-root .tiptap table[data-gpdoc-bold-headings=false] thead th{font-weight:400}.gpdoc-editor-root .tiptap table[data-gpdoc-cell-borders=true] th,.gpdoc-editor-root .tiptap table[data-gpdoc-cell-borders=true] td,.gpdoc-editor-root .tiptap table[data-gpdoc-table-bordered=true]{border:1px solid var(--gpdoc-border)}.gpdoc-editor-root .tiptap table[data-gpdoc-table-striping=true] tbody tr:nth-child(odd){background:color-mix(in srgb,var(--gpdoc-border) 24%,transparent)}.gpdoc-editor-root .tiptap .column-resize-handle{position:absolute;top:0;right:-3px;bottom:0;width:6px;z-index:20;background:color-mix(in srgb,var(--gpdoc-accent) 72%,transparent);border-radius:999px;pointer-events:none}.gpdoc-editor-root .tiptap.resize-cursor,.gpdoc-editor-root .tiptap.resize-cursor *{cursor:col-resize!important}.gpdoc-editor-root .tiptap .selectedCell:after{content:"";position:absolute;inset:0;z-index:2;background:color-mix(in srgb,var(--gpdoc-accent) 18%,transparent);pointer-events:none}.gpdoc-table-action-group{position:absolute;z-index:30;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.45rem;max-width:calc(100vw - 2rem)}.gpdoc-table-action-btn{border:1px solid rgba(148,163,184,.28);border-radius:.625rem;background:#fffffff0;color:var(--gpdoc-text);padding:.45rem .7rem;font:inherit;font-size:.95rem;font-weight:500;line-height:1;cursor:pointer;box-shadow:none;pointer-events:auto}.gpdoc-table-action-toggle-btn-icon{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0}.gpdoc-table-action-toggle-icon{display:block;width:1rem;height:1rem;pointer-events:none}.gpdoc-table-action-btn-danger{color:#b91c1c;border-color:#b91c1c47}.gpdoc-dark .gpdoc-table-action-btn,body.vscode-dark .gpdoc-table-action-btn,body.vscode-high-contrast .gpdoc-table-action-btn{background:#1e293bf0;border-color:#94a3b838}.gpdoc-dark .gpdoc-table-action-btn-danger,body.vscode-dark .gpdoc-table-action-btn-danger,body.vscode-high-contrast .gpdoc-table-action-btn-danger{border-color:#f8717157}.gpdoc-table-action-btn:hover{background:var(--gpdoc-surface)}.gpdoc-editor-root .tiptap img{max-width:100%;border-radius:.5rem;margin:.5rem 0}.gpdoc-editor-root .tiptap ::selection{background:#3b82f640}.gpdoc-editor-root .tiptap .gpdoc-search-match{background:#f59e0b57;color:inherit;border-radius:2px}.gpdoc-editor-root .tiptap .gpdoc-search-match-current{background:#fb71857a;outline:1px solid rgba(251,113,133,.7)}.gpdoc-editor-root .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--gpdoc-gutter-text);pointer-events:none;float:left;height:0}.gpdoc-bubble-toolbar{background:var(--gpdoc-toolbar-bg);border-radius:.5rem;padding:.25rem;box-shadow:none;border:1px solid color-mix(in srgb,var(--gpdoc-border) 82%,transparent);z-index:50;pointer-events:none;-webkit-user-select:none;user-select:none}.gpdoc-bubble-toolbar-content{display:flex;align-items:center;gap:2px;pointer-events:none}.gpdoc-bubble-toolbar .gpdoc-tb-btn{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;color:var(--gpdoc-toolbar-text);border-radius:.375rem;cursor:pointer;font-size:.85rem;font-weight:600;transition:background .15s;padding:0;font-family:var(--gpdoc-editor-font-body);pointer-events:auto}.gpdoc-bubble-toolbar .gpdoc-tb-btn.gpdoc-tb-btn-wide{width:auto;min-width:3.25rem;padding:0 .55rem}.gpdoc-bubble-toolbar .gpdoc-tb-btn:hover{background:var(--gpdoc-toolbar-hover)}.gpdoc-bubble-toolbar .gpdoc-tb-btn.active{background:var(--gpdoc-toolbar-active);color:#fff}.gpdoc-bubble-toolbar .gpdoc-tb-btn-comment:focus-visible{outline:2px solid var(--gpdoc-accent);outline-offset:2px}.gpdoc-bubble-toolbar .gpdoc-tb-btn-comment svg{width:1rem;height:1rem}@media (pointer: coarse){.gpdoc-bubble-toolbar .gpdoc-tb-btn-comment{min-width:44px;min-height:44px}}.gpdoc-bubble-toolbar .gpdoc-tb-sep{width:1px;height:1.25rem;background:#ffffff1f;margin:0 .125rem}.gpdoc-floating-menu-anchor{display:block;width:100%;margin-top:.85rem;padding-bottom:.35rem;pointer-events:none;-webkit-user-select:none;user-select:none}.gpdoc-floating-menu{display:block;background:transparent;border:none;border-radius:0;padding:0;box-shadow:none;width:100%;max-width:100%;box-sizing:border-box;overflow:visible;pointer-events:auto;-webkit-user-select:none;user-select:none}.gpdoc-floating-menu *{-webkit-user-select:none;user-select:none}.gpdoc-floating-menu-content{display:flex;align-items:stretch;gap:.35rem;flex-wrap:wrap;width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:.55rem;border:1px solid var(--gpdoc-menu-border, var(--gpdoc-border));border-radius:.9rem;background:var(--gpdoc-menu-bg, var(--gpdoc-toolbar-bg));color:var(--gpdoc-menu-text, var(--gpdoc-toolbar-text));box-shadow:none;overflow:visible;backdrop-filter:none;pointer-events:auto}[data-tippy-root]{z-index:240!important;pointer-events:none}[data-tippy-root] .tippy-box,[data-tippy-root] .tippy-content{pointer-events:none}.gpdoc-floating-menu .gpdoc-fm-btn{display:flex;align-items:center;gap:.375rem;border:none;background:transparent;color:inherit;border-radius:.375rem;cursor:pointer;padding:.375rem .625rem;font-size:.8rem;transition:background .15s;font-family:var(--gpdoc-editor-font-body);white-space:nowrap;min-height:2.1rem;flex:0 1 auto;max-width:100%;pointer-events:auto}.gpdoc-floating-menu .gpdoc-fm-btn:hover{background:var(--gpdoc-menu-hover, var(--gpdoc-toolbar-hover))}.gpdoc-floating-menu .gpdoc-fm-icon{display:inline-flex;align-items:center;justify-content:center;min-width:1.1rem;font-size:.95rem;line-height:1;opacity:.82;flex-shrink:0}.gpdoc-floating-menu .gpdoc-fm-glyph{display:inline-flex;align-items:center;justify-content:center;min-width:1.1rem}.gpdoc-floating-menu .gpdoc-fm-glyph-heading{font-weight:700}.gpdoc-floating-menu .gpdoc-fm-glyph-numbered,.gpdoc-floating-menu .gpdoc-fm-glyph-code{font-size:.82rem;font-family:var(--gpdoc-editor-font-code)}.gpdoc-live-selection{border-radius:.15rem}.gpdoc-live-cursor{position:relative;display:inline-block;width:0;height:1.15em;border-left:2px solid var(--gpdoc-live-color, #2563eb);vertical-align:text-bottom;pointer-events:none;z-index:20}.gpdoc-live-cursor-label{position:absolute;left:-1px;bottom:100%;display:inline-flex;align-items:center;max-width:12rem;min-height:1.2rem;padding:.1rem .35rem;border-radius:.25rem;background:var(--gpdoc-live-color, #2563eb);color:#fff;font-size:.68rem;font-weight:600;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translateY(-.1rem);box-shadow:0 2px 6px #0f172a38}.gpdoc-suggestion{border-radius:.125rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}.gpdoc-suggestion-old{background:color-mix(in srgb,#dc2626 14%,transparent);color:inherit;text-decoration:line-through;text-decoration-color:#dc2626}.gpdoc-suggestion-new{background:color-mix(in srgb,#15803d 16%,transparent);color:inherit;text-decoration:underline;text-decoration-color:#15803d;text-underline-offset:.18em}.gpdoc-suggestion-widget{display:inline;margin-inline:.2rem;padding:.08rem .18rem;pointer-events:none;white-space:pre-wrap}.gpdoc-suggestion-widget.gpdoc-suggestion-added,.gpdoc-suggestion-widget.gpdoc-suggestion-deleted{display:inline-block;max-width:100%;overflow-wrap:anywhere}:root{color-scheme:light dark;--shell: #e8edf4;--canvas: #ffffff;--ink: #172334;--muted: #66758a;--line: #cbd5e2;--brand: #165dcc;--brand-strong: #0d46a0;--warning: #a14b13;--warning-soft: #fff1e7;--success: #13765a;--shadow: 0 18px 55px rgba(32, 52, 80, .14);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:root[data-theme=dark]{--shell: #111722;--canvas: #182130;--ink: #eef4fb;--muted: #9aabc0;--line: #344257;--brand: #78a9ff;--brand-strong: #a8c7ff;--warning: #ffb078;--warning-soft: #3d281d;--success: #63d1ad;--shadow: 0 22px 70px rgba(0, 0, 0, .28)}*{box-sizing:border-box}html,body,#root{width:100%;min-width:0;height:100%;min-height:480px;margin:0;overflow:hidden;background:var(--shell);color:var(--ink)}button,a{font:inherit}button{color:inherit}button:focus-visible,a:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 65%,transparent);outline-offset:2px}.agent-editor-shell{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);width:100%;height:100%;min-height:0;background:linear-gradient(90deg,color-mix(in srgb,var(--brand) 8%,transparent),transparent 18%),var(--shell)}.agent-editor-shell.is-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--muted)}.loading-mark,.gpdoc-mark{display:inline-grid;place-items:center;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:11px;font-weight:800;letter-spacing:-.05em;color:#fff;background:var(--brand)}.loading-mark{width:52px;height:52px;border-radius:14px 14px 14px 4px;box-shadow:var(--shadow)}.file-bar{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:18px;align-items:center;min-height:68px;padding:10px 16px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--canvas) 94%,transparent);backdrop-filter:blur(18px)}.file-identity,.file-status,.file-actions,.panel-actions{display:flex;align-items:center}.file-identity{min-width:0;gap:10px}.gpdoc-mark{flex:0 0 auto;width:34px;height:34px;border-radius:9px 9px 9px 3px}.file-copy{display:grid;min-width:0}.file-copy strong,.file-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-copy strong{font-size:14px}.file-copy small{margin-top:3px;color:var(--muted);font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:10px}.file-status{gap:8px;color:var(--muted);font-size:12px;white-space:nowrap}.revision-rail{width:42px;height:4px;overflow:hidden;border-radius:999px;background:var(--line)}.revision-rail:after{display:block;width:100%;height:100%;content:"";background:var(--success);transform-origin:left center}[data-state=dirty] .revision-rail:after,[data-state=conflict] .revision-rail:after,[data-state=error] .revision-rail:after{background:var(--warning);transform:scaleX(.54)}[data-state=saving] .revision-rail:after,[data-state=loading] .revision-rail:after{background:var(--brand);animation:rail-pulse .85s ease-in-out infinite alternate}[data-state=shared] .revision-rail:after{background:var(--brand)}.file-actions{gap:7px}.file-actions button,.conflict-banner button,.panel-actions button,.panel-actions a,.share-panel a{min-height:34px;border:1px solid var(--line);border-radius:8px;padding:0 11px;text-decoration:none;cursor:pointer}.quiet-action{background:transparent}.primary-action{border-color:var(--brand)!important;color:#fff;background:var(--brand)}:root[data-theme=dark] .primary-action{color:#0a1930}.share-action{color:var(--brand-strong);background:color-mix(in srgb,var(--brand) 10%,var(--canvas))}button:disabled{cursor:not-allowed;opacity:.45}.conflict-banner,.auth-panel,.share-panel{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:11px 18px;border-bottom:1px solid var(--line)}.conflict-banner{color:var(--warning);background:var(--warning-soft)}.conflict-banner div,.auth-panel div:first-child,.share-panel div{display:grid;gap:2px}.conflict-banner span,.auth-panel span,.share-panel span{font-size:12px}.conflict-banner button,.panel-actions button,.panel-actions a,.share-panel a{display:inline-flex;align-items:center;justify-content:center;color:inherit;background:var(--canvas)}.auth-panel{background:color-mix(in srgb,var(--brand) 8%,var(--canvas))}.share-panel{color:var(--success);background:color-mix(in srgb,var(--success) 8%,var(--canvas))}.panel-label{color:var(--muted);font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:9px!important;letter-spacing:.08em;text-transform:uppercase}.panel-actions{gap:8px}.editor-stage{min-width:0;min-height:0;padding:14px;overflow:hidden}.agent-gpdoc-editor{height:100%;min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--canvas);box-shadow:var(--shadow)}@keyframes rail-pulse{0%{transform:scaleX(.18)}to{transform:scaleX(.92)}}@media (max-width: 760px){.file-bar{grid-template-columns:minmax(0,1fr) auto;gap:8px}.file-status{grid-column:1 / -1;grid-row:2}.file-actions{flex-wrap:wrap;justify-content:flex-end}.quiet-action{display:none}.conflict-banner,.auth-panel,.share-panel{align-items:stretch;flex-direction:column;gap:8px}.editor-stage{padding:7px}.agent-gpdoc-editor{border-radius:8px}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:1ms!important;animation-iteration-count:1!important;transition-duration:1ms!important}}</style></head><body><div id="root"></div><script>"use strict";(()=>{var gN=Object.create;var _h=Object.defineProperty;var bN=Object.getOwnPropertyDescriptor;var xN=Object.getOwnPropertyNames;var yN=Object.getPrototypeOf,wN=Object.prototype.hasOwnProperty;var Yn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oc=(e,t)=>{for(var n in t)_h(e,n,{get:t[n],enumerable:!0})},vN=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of xN(t))!wN.call(e,o)&&o!==n&&_h(e,o,{get:()=>t[o],enumerable:!(r=bN(t,o))||r.enumerable});return e};var Ee=(e,t,n)=>(n=e!=null?gN(yN(e)):{},vN(t||!e||!e.__esModule?_h(n,"default",{value:e,enumerable:!0}):n,e));var yw=Yn(we=>{"use strict";var js=Symbol.for("react.element"),SN=Symbol.for("react.portal"),kN=Symbol.for("react.fragment"),CN=Symbol.for("react.strict_mode"),EN=Symbol.for("react.profiler"),LN=Symbol.for("react.provider"),IN=Symbol.for("react.context"),MN=Symbol.for("react.forward_ref"),_N=Symbol.for("react.suspense"),TN=Symbol.for("react.memo"),AN=Symbol.for("react.lazy"),lw=Symbol.iterator;function DN(e){return e===null||typeof e!="object"?null:(e=lw&&e[lw]||e["@@iterator"],typeof e=="function"?e:null)}var dw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fw=Object.assign,pw={};function ki(e,t,n){this.props=e,this.context=t,this.refs=pw,this.updater=n||dw}ki.prototype.isReactComponent={};ki.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ki.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hw(){}hw.prototype=ki.prototype;function Ah(e,t,n){this.props=e,this.context=t,this.refs=pw,this.updater=n||dw}var Dh=Ah.prototype=new hw;Dh.constructor=Ah;fw(Dh,ki.prototype);Dh.isPureReactComponent=!0;var uw=Array.isArray,mw=Object.prototype.hasOwnProperty,Nh={current:null},gw={key:!0,ref:!0,__self:!0,__source:!0};function bw(e,t,n){var r,o={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)mw.call(t,r)&&!gw.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:js,type:e,key:a,ref:i,props:o,_owner:Nh.current}}function NN(e,t){return{$$typeof:js,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Oh(e){return typeof e=="object"&&e!==null&&e.$$typeof===js}function ON(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var cw=/\/+/g;function Th(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ON(""+e.key):t.toString(36)}function ic(e,t,n,r,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case js:case SN:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Th(i,0):r,uw(o)?(n="",e!=null&&(n=e.replace(cw,"$&/")+"/"),ic(o,t,n,"",function(u){return u})):o!=null&&(Oh(o)&&(o=NN(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(cw,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",uw(e))for(var s=0;s<e.length;s++){a=e[s];var l=r+Th(a,s);i+=ic(a,t,n,l,o)}else if(l=DN(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=r+Th(a,s++),i+=ic(a,t,n,l,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ac(e,t,n){if(e==null)return e;var r=[],o=0;return ic(e,r,"","",function(a){return t.call(n,a,o++)}),r}function RN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Zt={current:null},sc={transition:null},PN={ReactCurrentDispatcher:Zt,ReactCurrentBatchConfig:sc,ReactCurrentOwner:Nh};function xw(){throw Error("act(...) is not supported in production builds of React.")}we.Children={map:ac,forEach:function(e,t,n){ac(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ac(e,function(){t++}),t},toArray:function(e){return ac(e,function(t){return t})||[]},only:function(e){if(!Oh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=ki;we.Fragment=kN;we.Profiler=EN;we.PureComponent=Ah;we.StrictMode=CN;we.Suspense=_N;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PN;we.act=xw;we.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=fw({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Nh.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)mw.call(t,l)&&!gw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:js,type:e.type,key:o,ref:a,props:r,_owner:i}};we.createContext=function(e){return e={$$typeof:IN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:LN,_context:e},e.Consumer=e};we.createElement=bw;we.createFactory=function(e){var t=bw.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:MN,render:e}};we.isValidElement=Oh;we.lazy=function(e){return{$$typeof:AN,_payload:{_status:-1,_result:e},_init:RN}};we.memo=function(e,t){return{$$typeof:TN,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=sc.transition;sc.transition={};try{e()}finally{sc.transition=t}};we.unstable_act=xw;we.useCallback=function(e,t){return Zt.current.useCallback(e,t)};we.useContext=function(e){return Zt.current.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e){return Zt.current.useDeferredValue(e)};we.useEffect=function(e,t){return Zt.current.useEffect(e,t)};we.useId=function(){return Zt.current.useId()};we.useImperativeHandle=function(e,t,n){return Zt.current.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return Zt.current.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Zt.current.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Zt.current.useMemo(e,t)};we.useReducer=function(e,t,n){return Zt.current.useReducer(e,t,n)};we.useRef=function(e){return Zt.current.useRef(e)};we.useState=function(e){return Zt.current.useState(e)};we.useSyncExternalStore=function(e,t,n){return Zt.current.useSyncExternalStore(e,t,n)};we.useTransition=function(){return Zt.current.useTransition()};we.version="18.3.1"});var Bt=Yn((jV,ww)=>{"use strict";ww.exports=yw()});var Tw=Yn(qe=>{"use strict";function Fh(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<lc(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Zn(e){return e.length===0?null:e[0]}function cc(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var i=2*(r+1)-1,s=e[i],l=i+1,u=e[l];if(0>lc(s,n))l<o&&0>lc(u,s)?(e[r]=u,e[l]=n,r=l):(e[r]=s,e[i]=n,r=i);else if(l<o&&0>lc(u,n))e[r]=u,e[l]=n,r=l;else break e}}return t}function lc(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(vw=performance,qe.unstable_now=function(){return vw.now()}):(Rh=Date,Sw=Rh.now(),qe.unstable_now=function(){return Rh.now()-Sw});var vw,Rh,Sw,xr=[],Co=[],BN=1,Tn=null,Ft=3,dc=!1,xa=!1,Ys=!1,Ew=typeof setTimeout=="function"?setTimeout:null,Lw=typeof clearTimeout=="function"?clearTimeout:null,kw=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function zh(e){for(var t=Zn(Co);t!==null;){if(t.callback===null)cc(Co);else if(t.startTime<=e)cc(Co),t.sortIndex=t.expirationTime,Fh(xr,t);else break;t=Zn(Co)}}function Hh(e){if(Ys=!1,zh(e),!xa)if(Zn(xr)!==null)xa=!0,$h(Uh);else{var t=Zn(Co);t!==null&&qh(Hh,t.startTime-e)}}function Uh(e,t){xa=!1,Ys&&(Ys=!1,Lw(Zs),Zs=-1),dc=!0;var n=Ft;try{for(zh(t),Tn=Zn(xr);Tn!==null&&(!(Tn.expirationTime>t)||e&&!_w());){var r=Tn.callback;if(typeof r=="function"){Tn.callback=null,Ft=Tn.priorityLevel;var o=r(Tn.expirationTime<=t);t=qe.unstable_now(),typeof o=="function"?Tn.callback=o:Tn===Zn(xr)&&cc(xr),zh(t)}else cc(xr);Tn=Zn(xr)}if(Tn!==null)var a=!0;else{var i=Zn(Co);i!==null&&qh(Hh,i.startTime-t),a=!1}return a}finally{Tn=null,Ft=n,dc=!1}}var fc=!1,uc=null,Zs=-1,Iw=5,Mw=-1;function _w(){return!(qe.unstable_now()-Mw<Iw)}function Ph(){if(uc!==null){var e=qe.unstable_now();Mw=e;var t=!0;try{t=uc(!0,e)}finally{t?Xs():(fc=!1,uc=null)}}else fc=!1}var Xs;typeof kw=="function"?Xs=function(){kw(Ph)}:typeof MessageChannel<"u"?(Bh=new MessageChannel,Cw=Bh.port2,Bh.port1.onmessage=Ph,Xs=function(){Cw.postMessage(null)}):Xs=function(){Ew(Ph,0)};var Bh,Cw;function $h(e){uc=e,fc||(fc=!0,Xs())}function qh(e,t){Zs=Ew(function(){e(qe.unstable_now())},t)}qe.unstable_IdlePriority=5;qe.unstable_ImmediatePriority=1;qe.unstable_LowPriority=4;qe.unstable_NormalPriority=3;qe.unstable_Profiling=null;qe.unstable_UserBlockingPriority=2;qe.unstable_cancelCallback=function(e){e.callback=null};qe.unstable_continueExecution=function(){xa||dc||(xa=!0,$h(Uh))};qe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Iw=0<e?Math.floor(1e3/e):5};qe.unstable_getCurrentPriorityLevel=function(){return Ft};qe.unstable_getFirstCallbackNode=function(){return Zn(xr)};qe.unstable_next=function(e){switch(Ft){case 1:case 2:case 3:var t=3;break;default:t=Ft}var n=Ft;Ft=t;try{return e()}finally{Ft=n}};qe.unstable_pauseExecution=function(){};qe.unstable_requestPaint=function(){};qe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ft;Ft=e;try{return t()}finally{Ft=n}};qe.unstable_scheduleCallback=function(e,t,n){var r=qe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:BN++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Fh(Co,e),Zn(xr)===null&&e===Zn(Co)&&(Ys?(Lw(Zs),Zs=-1):Ys=!0,qh(Hh,n-r))):(e.sortIndex=o,Fh(xr,e),xa||dc||(xa=!0,$h(Uh))),e};qe.unstable_shouldYield=_w;qe.unstable_wrapCallback=function(e){var t=Ft;return function(){var n=Ft;Ft=t;try{return e.apply(this,arguments)}finally{Ft=n}}}});var Dw=Yn((YV,Aw)=>{"use strict";Aw.exports=Tw()});var Pk=Yn(vn=>{"use strict";var FN=Bt(),yn=Dw();function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var zv=new Set,yl={};function Aa(e,t){Vi(e,t),Vi(e+"Capture",t)}function Vi(e,t){for(yl[e]=t,e=0;e<t.length;e++)zv.add(t[e])}var Yr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fm=Object.prototype.hasOwnProperty,zN=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nw={},Ow={};function HN(e){return fm.call(Ow,e)?!0:fm.call(Nw,e)?!1:zN.test(e)?Ow[e]=!0:(Nw[e]=!0,!1)}function UN(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $N(e,t,n,r){if(t===null||typeof t>"u"||UN(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function en(e,t,n,r,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var At={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){At[e]=new en(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];At[t]=new en(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){At[e]=new en(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){At[e]=new en(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){At[e]=new en(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){At[e]=new en(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){At[e]=new en(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){At[e]=new en(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){At[e]=new en(e,5,!1,e.toLowerCase(),null,!1,!1)});var og=/[\-:]([a-z])/g;function ag(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(og,ag);At[t]=new en(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(og,ag);At[t]=new en(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(og,ag);At[t]=new en(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){At[e]=new en(e,1,!1,e.toLowerCase(),null,!1,!1)});At.xlinkHref=new en("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){At[e]=new en(e,1,!1,e.toLowerCase(),null,!0,!0)});function ig(e,t,n,r){var o=At.hasOwnProperty(t)?At[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($N(t,n,o,r)&&(n=null),r||o===null?HN(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var eo=FN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pc=Symbol.for("react.element"),Li=Symbol.for("react.portal"),Ii=Symbol.for("react.fragment"),sg=Symbol.for("react.strict_mode"),pm=Symbol.for("react.profiler"),Hv=Symbol.for("react.provider"),Uv=Symbol.for("react.context"),lg=Symbol.for("react.forward_ref"),hm=Symbol.for("react.suspense"),mm=Symbol.for("react.suspense_list"),ug=Symbol.for("react.memo"),Lo=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var $v=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Rw=Symbol.iterator;function Js(e){return e===null||typeof e!="object"?null:(e=Rw&&e[Rw]||e["@@iterator"],typeof e=="function"?e:null)}var Qe=Object.assign,Vh;function il(e){if(Vh===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vh=t&&t[1]||""}return`
2
+ `+Vh+e}var Wh=!1;function Gh(e,t){if(!e||Wh)return"";Wh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
3
+ `),a=r.stack.split(`
4
+ `),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||o[i]!==a[s]){var l=`
5
+ `+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{Wh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?il(e):""}function qN(e){switch(e.tag){case 5:return il(e.type);case 16:return il("Lazy");case 13:return il("Suspense");case 19:return il("SuspenseList");case 0:case 2:case 15:return e=Gh(e.type,!1),e;case 11:return e=Gh(e.type.render,!1),e;case 1:return e=Gh(e.type,!0),e;default:return""}}function gm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ii:return"Fragment";case Li:return"Portal";case pm:return"Profiler";case sg:return"StrictMode";case hm:return"Suspense";case mm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uv:return(e.displayName||"Context")+".Consumer";case Hv:return(e._context.displayName||"Context")+".Provider";case lg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ug:return t=e.displayName||null,t!==null?t:gm(e.type)||"Memo";case Lo:t=e._payload,e=e._init;try{return gm(e(t))}catch{}}return null}function VN(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gm(t);case 8:return t===sg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ho(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WN(e){var t=qv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hc(e){e._valueTracker||(e._valueTracker=WN(e))}function Vv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $c(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bm(e,t){var n=t.checked;return Qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ho(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Wv(e,t){t=t.checked,t!=null&&ig(e,"checked",t,!1)}function xm(e,t){Wv(e,t);var n=Ho(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ym(e,t.type,n):t.hasOwnProperty("defaultValue")&&ym(e,t.type,Ho(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ym(e,t,n){(t!=="number"||$c(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sl=Array.isArray;function Fi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ho(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function wm(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return Qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(sl(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ho(n)}}function Gv(e,t){var n=Ho(t.value),r=Ho(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function zw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vm(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var mc,jv=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(mc=mc||document.createElement("div"),mc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=mc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},GN=["Webkit","ms","Moz","O"];Object.keys(cl).forEach(function(e){GN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cl[t]=cl[e]})});function Xv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cl.hasOwnProperty(e)&&cl[e]?(""+t).trim():t+"px"}function Yv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Xv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var KN=Qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sm(e,t){if(t){if(KN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function km(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cm=null;function cg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Em=null,zi=null,Hi=null;function Hw(e){if(e=Fl(e)){if(typeof Em!="function")throw Error(O(280));var t=e.stateNode;t&&(t=gd(t),Em(e.stateNode,e.type,t))}}function Zv(e){zi?Hi?Hi.push(e):Hi=[e]:zi=e}function Jv(){if(zi){var e=zi,t=Hi;if(Hi=zi=null,Hw(e),t)for(e=0;e<t.length;e++)Hw(t[e])}}function Qv(e,t){return e(t)}function eS(){}var Kh=!1;function tS(e,t,n){if(Kh)return e(t,n);Kh=!0;try{return Qv(e,t,n)}finally{Kh=!1,(zi!==null||Hi!==null)&&(eS(),Jv())}}function vl(e,t){var n=e.stateNode;if(n===null)return null;var r=gd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var Lm=!1;if(Yr)try{Ci={},Object.defineProperty(Ci,"passive",{get:function(){Lm=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{Lm=!1}var Ci;function jN(e,t,n,r,o,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var dl=!1,qc=null,Vc=!1,Im=null,XN={onError:function(e){dl=!0,qc=e}};function YN(e,t,n,r,o,a,i,s,l){dl=!1,qc=null,jN.apply(XN,arguments)}function ZN(e,t,n,r,o,a,i,s,l){if(YN.apply(this,arguments),dl){if(dl){var u=qc;dl=!1,qc=null}else throw Error(O(198));Vc||(Vc=!0,Im=u)}}function Da(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function nS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Uw(e){if(Da(e)!==e)throw Error(O(188))}function JN(e){var t=e.alternate;if(!t){if(t=Da(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var a=o.alternate;if(a===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Uw(o),e;if(a===r)return Uw(o),t;a=a.sibling}throw Error(O(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,s=o.child;s;){if(s===n){i=!0,n=o,r=a;break}if(s===r){i=!0,r=o,n=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===n){i=!0,n=a,r=o;break}if(s===r){i=!0,r=a,n=o;break}s=s.sibling}if(!i)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function rS(e){return e=JN(e),e!==null?oS(e):null}function oS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oS(e);if(t!==null)return t;e=e.sibling}return null}var aS=yn.unstable_scheduleCallback,$w=yn.unstable_cancelCallback,QN=yn.unstable_shouldYield,eO=yn.unstable_requestPaint,at=yn.unstable_now,tO=yn.unstable_getCurrentPriorityLevel,dg=yn.unstable_ImmediatePriority,iS=yn.unstable_UserBlockingPriority,Wc=yn.unstable_NormalPriority,nO=yn.unstable_LowPriority,sS=yn.unstable_IdlePriority,fd=null,Sr=null;function rO(e){if(Sr&&typeof Sr.onCommitFiberRoot=="function")try{Sr.onCommitFiberRoot(fd,e,void 0,(e.current.flags&128)===128)}catch{}}var nr=Math.clz32?Math.clz32:iO,oO=Math.log,aO=Math.LN2;function iO(e){return e>>>=0,e===0?32:31-(oO(e)/aO|0)|0}var gc=64,bc=4194304;function ll(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~o;s!==0?r=ll(s):(a&=i,a!==0&&(r=ll(a)))}else i=n&~o,i!==0?r=ll(i):a!==0&&(r=ll(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-nr(t),o=1<<n,r|=e[n],t&=~o;return r}function sO(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lO(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-nr(a),s=1<<i,l=o[i];l===-1?((s&n)===0||(s&r)!==0)&&(o[i]=sO(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function Mm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function lS(){var e=gc;return gc<<=1,(gc&4194240)===0&&(gc=64),e}function jh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nr(t),e[t]=n}function uO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-nr(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}function fg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Pe=0;function uS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var cS,pg,dS,fS,pS,_m=!1,xc=[],Do=null,No=null,Oo=null,Sl=new Map,kl=new Map,Mo=[],cO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qw(e,t){switch(e){case"focusin":case"focusout":Do=null;break;case"dragenter":case"dragleave":No=null;break;case"mouseover":case"mouseout":Oo=null;break;case"pointerover":case"pointerout":Sl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Qs(e,t,n,r,o,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},t!==null&&(t=Fl(t),t!==null&&pg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function dO(e,t,n,r,o){switch(t){case"focusin":return Do=Qs(Do,e,t,n,r,o),!0;case"dragenter":return No=Qs(No,e,t,n,r,o),!0;case"mouseover":return Oo=Qs(Oo,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Sl.set(a,Qs(Sl.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,kl.set(a,Qs(kl.get(a)||null,e,t,n,r,o)),!0}return!1}function hS(e){var t=va(e.target);if(t!==null){var n=Da(t);if(n!==null){if(t=n.tag,t===13){if(t=nS(n),t!==null){e.blockedOn=t,pS(e.priority,function(){dS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Cm=r,n.target.dispatchEvent(r),Cm=null}else return t=Fl(n),t!==null&&pg(t),e.blockedOn=n,!1;t.shift()}return!0}function Vw(e,t,n){Dc(e)&&n.delete(t)}function fO(){_m=!1,Do!==null&&Dc(Do)&&(Do=null),No!==null&&Dc(No)&&(No=null),Oo!==null&&Dc(Oo)&&(Oo=null),Sl.forEach(Vw),kl.forEach(Vw)}function el(e,t){e.blockedOn===t&&(e.blockedOn=null,_m||(_m=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,fO)))}function Cl(e){function t(o){return el(o,e)}if(0<xc.length){el(xc[0],e);for(var n=1;n<xc.length;n++){var r=xc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Do!==null&&el(Do,e),No!==null&&el(No,e),Oo!==null&&el(Oo,e),Sl.forEach(t),kl.forEach(t),n=0;n<Mo.length;n++)r=Mo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mo.length&&(n=Mo[0],n.blockedOn===null);)hS(n),n.blockedOn===null&&Mo.shift()}var Ui=eo.ReactCurrentBatchConfig,Kc=!0;function pO(e,t,n,r){var o=Pe,a=Ui.transition;Ui.transition=null;try{Pe=1,hg(e,t,n,r)}finally{Pe=o,Ui.transition=a}}function hO(e,t,n,r){var o=Pe,a=Ui.transition;Ui.transition=null;try{Pe=4,hg(e,t,n,r)}finally{Pe=o,Ui.transition=a}}function hg(e,t,n,r){if(Kc){var o=Tm(e,t,n,r);if(o===null)tm(e,t,r,jc,n),qw(e,r);else if(dO(o,e,t,n,r))r.stopPropagation();else if(qw(e,r),t&4&&-1<cO.indexOf(e)){for(;o!==null;){var a=Fl(o);if(a!==null&&cS(a),a=Tm(e,t,n,r),a===null&&tm(e,t,r,jc,n),a===o)break;o=a}o!==null&&r.stopPropagation()}else tm(e,t,r,null,n)}}var jc=null;function Tm(e,t,n,r){if(jc=null,e=cg(r),e=va(e),e!==null)if(t=Da(e),t===null)e=null;else if(n=t.tag,n===13){if(e=nS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jc=e,null}function mS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(tO()){case dg:return 1;case iS:return 4;case Wc:case nO:return 16;case sS:return 536870912;default:return 16}default:return 16}}var To=null,mg=null,Nc=null;function gS(){if(Nc)return Nc;var e,t=mg,n=t.length,r,o="value"in To?To.value:To.textContent,a=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[a-r];r++);return Nc=o.slice(e,1<r?1-r:void 0)}function Oc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yc(){return!0}function Ww(){return!1}function wn(e){function t(n,r,o,a,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?yc:Ww,this.isPropagationStopped=Ww,this}return Qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yc)},persist:function(){},isPersistent:yc}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gg=wn(Zi),Bl=Qe({},Zi,{view:0,detail:0}),mO=wn(Bl),Xh,Yh,tl,pd=Qe({},Bl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tl&&(tl&&e.type==="mousemove"?(Xh=e.screenX-tl.screenX,Yh=e.screenY-tl.screenY):Yh=Xh=0,tl=e),Xh)},movementY:function(e){return"movementY"in e?e.movementY:Yh}}),Gw=wn(pd),gO=Qe({},pd,{dataTransfer:0}),bO=wn(gO),xO=Qe({},Bl,{relatedTarget:0}),Zh=wn(xO),yO=Qe({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),wO=wn(yO),vO=Qe({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),SO=wn(vO),kO=Qe({},Zi,{data:0}),Kw=wn(kO),CO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EO={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},LO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=LO[e])?!!t[e]:!1}function bg(){return IO}var MO=Qe({},Bl,{key:function(e){if(e.key){var t=CO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?EO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bg,charCode:function(e){return e.type==="keypress"?Oc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_O=wn(MO),TO=Qe({},pd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jw=wn(TO),AO=Qe({},Bl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bg}),DO=wn(AO),NO=Qe({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),OO=wn(NO),RO=Qe({},pd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),PO=wn(RO),BO=[9,13,27,32],xg=Yr&&"CompositionEvent"in window,fl=null;Yr&&"documentMode"in document&&(fl=document.documentMode);var FO=Yr&&"TextEvent"in window&&!fl,bS=Yr&&(!xg||fl&&8<fl&&11>=fl),Xw=" ",Yw=!1;function xS(e,t){switch(e){case"keyup":return BO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mi=!1;function zO(e,t){switch(e){case"compositionend":return yS(t);case"keypress":return t.which!==32?null:(Yw=!0,Xw);case"textInput":return e=t.data,e===Xw&&Yw?null:e;default:return null}}function HO(e,t){if(Mi)return e==="compositionend"||!xg&&xS(e,t)?(e=gS(),Nc=mg=To=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bS&&t.locale!=="ko"?null:t.data;default:return null}}var UO={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UO[e.type]:t==="textarea"}function wS(e,t,n,r){Zv(r),t=Xc(t,"onChange"),0<t.length&&(n=new gg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var pl=null,El=null;function $O(e){AS(e,0)}function hd(e){var t=Ai(e);if(Vv(t))return e}function qO(e,t){if(e==="change")return t}var vS=!1;Yr&&(Yr?(vc="oninput"in document,vc||(Jh=document.createElement("div"),Jh.setAttribute("oninput","return;"),vc=typeof Jh.oninput=="function"),wc=vc):wc=!1,vS=wc&&(!document.documentMode||9<document.documentMode));var wc,vc,Jh;function Jw(){pl&&(pl.detachEvent("onpropertychange",SS),El=pl=null)}function SS(e){if(e.propertyName==="value"&&hd(El)){var t=[];wS(t,El,e,cg(e)),tS($O,t)}}function VO(e,t,n){e==="focusin"?(Jw(),pl=t,El=n,pl.attachEvent("onpropertychange",SS)):e==="focusout"&&Jw()}function WO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hd(El)}function GO(e,t){if(e==="click")return hd(t)}function KO(e,t){if(e==="input"||e==="change")return hd(t)}function jO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var or=typeof Object.is=="function"?Object.is:jO;function Ll(e,t){if(or(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!fm.call(t,o)||!or(e[o],t[o]))return!1}return!0}function Qw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ev(e,t){var n=Qw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qw(n)}}function kS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function CS(){for(var e=window,t=$c();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$c(e.document)}return t}function yg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function XO(e){var t=CS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&kS(n.ownerDocument.documentElement,n)){if(r!==null&&yg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=r.end===void 0?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ev(n,a);var i=ev(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var YO=Yr&&"documentMode"in document&&11>=document.documentMode,_i=null,Am=null,hl=null,Dm=!1;function tv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dm||_i==null||_i!==$c(r)||(r=_i,"selectionStart"in r&&yg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),hl&&Ll(hl,r)||(hl=r,r=Xc(Am,"onSelect"),0<r.length&&(t=new gg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_i)))}function Sc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ti={animationend:Sc("Animation","AnimationEnd"),animationiteration:Sc("Animation","AnimationIteration"),animationstart:Sc("Animation","AnimationStart"),transitionend:Sc("Transition","TransitionEnd")},Qh={},ES={};Yr&&(ES=document.createElement("div").style,"AnimationEvent"in window||(delete Ti.animationend.animation,delete Ti.animationiteration.animation,delete Ti.animationstart.animation),"TransitionEvent"in window||delete Ti.transitionend.transition);function md(e){if(Qh[e])return Qh[e];if(!Ti[e])return e;var t=Ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ES)return Qh[e]=t[n];return e}var LS=md("animationend"),IS=md("animationiteration"),MS=md("animationstart"),_S=md("transitionend"),TS=new Map,nv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $o(e,t){TS.set(e,t),Aa(t,[e])}for(kc=0;kc<nv.length;kc++)Cc=nv[kc],rv=Cc.toLowerCase(),ov=Cc[0].toUpperCase()+Cc.slice(1),$o(rv,"on"+ov);var Cc,rv,ov,kc;$o(LS,"onAnimationEnd");$o(IS,"onAnimationIteration");$o(MS,"onAnimationStart");$o("dblclick","onDoubleClick");$o("focusin","onFocus");$o("focusout","onBlur");$o(_S,"onTransitionEnd");Vi("onMouseEnter",["mouseout","mouseover"]);Vi("onMouseLeave",["mouseout","mouseover"]);Vi("onPointerEnter",["pointerout","pointerover"]);Vi("onPointerLeave",["pointerout","pointerover"]);Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ZO=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function av(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ZN(r,t,void 0,e),e.currentTarget=null}function AS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;av(o,s,u),a=l}else for(i=0;i<r.length;i++){if(s=r[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;av(o,s,u),a=l}}}if(Vc)throw e=Im,Vc=!1,Im=null,e}function We(e,t){var n=t[Bm];n===void 0&&(n=t[Bm]=new Set);var r=e+"__bubble";n.has(r)||(DS(t,e,2,!1),n.add(r))}function em(e,t,n){var r=0;t&&(r|=4),DS(n,e,r,t)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Il(e){if(!e[Ec]){e[Ec]=!0,zv.forEach(function(n){n!=="selectionchange"&&(ZO.has(n)||em(n,!1,e),em(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ec]||(t[Ec]=!0,em("selectionchange",!1,t))}}function DS(e,t,n,r){switch(mS(t)){case 1:var o=pO;break;case 4:o=hO;break;default:o=hg}n=o.bind(null,t,n,e),o=void 0,!Lm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function tm(e,t,n,r,o){var a=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;s!==null;){if(i=va(s),i===null)return;if(l=i.tag,l===5||l===6){r=a=i;continue e}s=s.parentNode}}r=r.return}tS(function(){var u=a,c=cg(n),d=[];e:{var f=TS.get(e);if(f!==void 0){var p=gg,h=e;switch(e){case"keypress":if(Oc(n)===0)break e;case"keydown":case"keyup":p=_O;break;case"focusin":h="focus",p=Zh;break;case"focusout":h="blur",p=Zh;break;case"beforeblur":case"afterblur":p=Zh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=bO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=DO;break;case LS:case IS:case MS:p=wO;break;case _S:p=OO;break;case"scroll":p=mO;break;case"wheel":p=PO;break;case"copy":case"cut":case"paste":p=SO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=jw}var m=(t&4)!==0,b=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var y=u,w;y!==null;){w=y;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,g!==null&&(x=vl(y,g),x!=null&&m.push(Ml(y,x,w)))),b)break;y=y.return}0<m.length&&(f=new p(f,h,null,n,c),d.push({event:f,listeners:m}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Cm&&(h=n.relatedTarget||n.fromElement)&&(va(h)||h[Zr]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?va(h):null,h!==null&&(b=Da(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(m=Gw,x="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=jw,x="onPointerLeave",g="onPointerEnter",y="pointer"),b=p==null?f:Ai(p),w=h==null?f:Ai(h),f=new m(x,y+"leave",p,n,c),f.target=b,f.relatedTarget=w,x=null,va(c)===u&&(m=new m(g,y+"enter",h,n,c),m.target=w,m.relatedTarget=b,x=m),b=x,p&&h)t:{for(m=p,g=h,y=0,w=m;w;w=Ei(w))y++;for(w=0,x=g;x;x=Ei(x))w++;for(;0<y-w;)m=Ei(m),y--;for(;0<w-y;)g=Ei(g),w--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=Ei(m),g=Ei(g)}m=null}else m=null;p!==null&&iv(d,f,p,m,!1),h!==null&&b!==null&&iv(d,b,h,m,!0)}}e:{if(f=u?Ai(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=qO;else if(Zw(f))if(vS)S=KO;else{S=WO;var v=VO}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=GO);if(S&&(S=S(e,u))){wS(d,S,n,c);break e}v&&v(e,f,u),e==="focusout"&&(v=f._wrapperState)&&v.controlled&&f.type==="number"&&ym(f,"number",f.value)}switch(v=u?Ai(u):window,e){case"focusin":(Zw(v)||v.contentEditable==="true")&&(_i=v,Am=u,hl=null);break;case"focusout":hl=Am=_i=null;break;case"mousedown":Dm=!0;break;case"contextmenu":case"mouseup":case"dragend":Dm=!1,tv(d,n,c);break;case"selectionchange":if(YO)break;case"keydown":case"keyup":tv(d,n,c)}var C;if(xg)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Mi?xS(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(bS&&n.locale!=="ko"&&(Mi||E!=="onCompositionStart"?E==="onCompositionEnd"&&Mi&&(C=gS()):(To=c,mg="value"in To?To.value:To.textContent,Mi=!0)),v=Xc(u,E),0<v.length&&(E=new Kw(E,e,null,n,c),d.push({event:E,listeners:v}),C?E.data=C:(C=yS(n),C!==null&&(E.data=C)))),(C=FO?zO(e,n):HO(e,n))&&(u=Xc(u,"onBeforeInput"),0<u.length&&(c=new Kw("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}AS(d,t)})}function Ml(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xc(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=vl(e,n),a!=null&&r.unshift(Ml(e,a,o)),a=vl(e,t),a!=null&&r.push(Ml(e,a,o))),e=e.return}return r}function Ei(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function iv(e,t,n,r,o){for(var a=t._reactName,i=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,o?(l=vl(n,a),l!=null&&i.unshift(Ml(n,l,s))):o||(l=vl(n,a),l!=null&&i.push(Ml(n,l,s)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var JO=/\r\n?/g,QO=/\u0000|\uFFFD/g;function sv(e){return(typeof e=="string"?e:""+e).replace(JO,`
6
+ `).replace(QO,"")}function Lc(e,t,n){if(t=sv(t),sv(e)!==t&&n)throw Error(O(425))}function Yc(){}var Nm=null,Om=null;function Rm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pm=typeof setTimeout=="function"?setTimeout:void 0,e3=typeof clearTimeout=="function"?clearTimeout:void 0,lv=typeof Promise=="function"?Promise:void 0,t3=typeof queueMicrotask=="function"?queueMicrotask:typeof lv<"u"?function(e){return lv.resolve(null).then(e).catch(n3)}:Pm;function n3(e){setTimeout(function(){throw e})}function nm(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Cl(t)}function Ro(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ji=Math.random().toString(36).slice(2),vr="__reactFiber$"+Ji,_l="__reactProps$"+Ji,Zr="__reactContainer$"+Ji,Bm="__reactEvents$"+Ji,r3="__reactListeners$"+Ji,o3="__reactHandles$"+Ji;function va(e){var t=e[vr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zr]||n[vr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uv(e);e!==null;){if(n=e[vr])return n;e=uv(e)}return t}e=n,n=e.parentNode}return null}function Fl(e){return e=e[vr]||e[Zr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ai(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function gd(e){return e[_l]||null}var Fm=[],Di=-1;function qo(e){return{current:e}}function Ge(e){0>Di||(e.current=Fm[Di],Fm[Di]=null,Di--)}function Ve(e,t){Di++,Fm[Di]=e.current,e.current=t}var Uo={},$t=qo(Uo),cn=qo(!1),La=Uo;function Wi(e,t){var n=e.type.contextTypes;if(!n)return Uo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in n)o[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dn(e){return e=e.childContextTypes,e!=null}function Zc(){Ge(cn),Ge($t)}function cv(e,t,n){if($t.current!==Uo)throw Error(O(168));Ve($t,t),Ve(cn,n)}function NS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,VN(e)||"Unknown",o));return Qe({},n,r)}function Jc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Uo,La=$t.current,Ve($t,e),Ve(cn,cn.current),!0}function dv(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=NS(e,t,La),r.__reactInternalMemoizedMergedChildContext=e,Ge(cn),Ge($t),Ve($t,e)):Ge(cn),Ve(cn,n)}var Gr=null,bd=!1,rm=!1;function OS(e){Gr===null?Gr=[e]:Gr.push(e)}function a3(e){bd=!0,OS(e)}function Vo(){if(!rm&&Gr!==null){rm=!0;var e=0,t=Pe;try{var n=Gr;for(Pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gr=null,bd=!1}catch(o){throw Gr!==null&&(Gr=Gr.slice(e+1)),aS(dg,Vo),o}finally{Pe=t,rm=!1}}return null}var Ni=[],Oi=0,Qc=null,ed=0,An=[],Dn=0,Ia=null,Kr=1,jr="";function ya(e,t){Ni[Oi++]=ed,Ni[Oi++]=Qc,Qc=e,ed=t}function RS(e,t,n){An[Dn++]=Kr,An[Dn++]=jr,An[Dn++]=Ia,Ia=e;var r=Kr;e=jr;var o=32-nr(r)-1;r&=~(1<<o),n+=1;var a=32-nr(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Kr=1<<32-nr(t)+o|n<<o|r,jr=a+e}else Kr=1<<a|n<<o|r,jr=e}function wg(e){e.return!==null&&(ya(e,1),RS(e,1,0))}function vg(e){for(;e===Qc;)Qc=Ni[--Oi],Ni[Oi]=null,ed=Ni[--Oi],Ni[Oi]=null;for(;e===Ia;)Ia=An[--Dn],An[Dn]=null,jr=An[--Dn],An[Dn]=null,Kr=An[--Dn],An[Dn]=null}var xn=null,bn=null,Xe=!1,tr=null;function PS(e,t){var n=Nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function fv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,xn=e,bn=Ro(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,xn=e,bn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ia!==null?{id:Kr,overflow:jr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,xn=e,bn=null,!0):!1;default:return!1}}function zm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hm(e){if(Xe){var t=bn;if(t){var n=t;if(!fv(e,t)){if(zm(e))throw Error(O(418));t=Ro(n.nextSibling);var r=xn;t&&fv(e,t)?PS(r,n):(e.flags=e.flags&-4097|2,Xe=!1,xn=e)}}else{if(zm(e))throw Error(O(418));e.flags=e.flags&-4097|2,Xe=!1,xn=e}}}function pv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xn=e}function Ic(e){if(e!==xn)return!1;if(!Xe)return pv(e),Xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Rm(e.type,e.memoizedProps)),t&&(t=bn)){if(zm(e))throw BS(),Error(O(418));for(;t;)PS(e,t),t=Ro(t.nextSibling)}if(pv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){bn=Ro(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}bn=null}}else bn=xn?Ro(e.stateNode.nextSibling):null;return!0}function BS(){for(var e=bn;e;)e=Ro(e.nextSibling)}function Gi(){bn=xn=null,Xe=!1}function Sg(e){tr===null?tr=[e]:tr.push(e)}var i3=eo.ReactCurrentBatchConfig;function nl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var o=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=o.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Mc(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hv(e){var t=e._init;return t(e._payload)}function FS(e){function t(g,y){if(e){var w=g.deletions;w===null?(g.deletions=[y],g.flags|=16):w.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function o(g,y){return g=zo(g,y),g.index=0,g.sibling=null,g}function a(g,y,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<y?(g.flags|=2,y):w):(g.flags|=2,y)):(g.flags|=1048576,y)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,y,w,x){return y===null||y.tag!==6?(y=cm(w,g.mode,x),y.return=g,y):(y=o(y,w),y.return=g,y)}function l(g,y,w,x){var S=w.type;return S===Ii?c(g,y,w.props.children,x,w.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Lo&&hv(S)===y.type)?(x=o(y,w.props),x.ref=nl(g,y,w),x.return=g,x):(x=Uc(w.type,w.key,w.props,null,g.mode,x),x.ref=nl(g,y,w),x.return=g,x)}function u(g,y,w,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=dm(w,g.mode,x),y.return=g,y):(y=o(y,w.children||[]),y.return=g,y)}function c(g,y,w,x,S){return y===null||y.tag!==7?(y=Ea(w,g.mode,x,S),y.return=g,y):(y=o(y,w),y.return=g,y)}function d(g,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=cm(""+y,g.mode,w),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case pc:return w=Uc(y.type,y.key,y.props,null,g.mode,w),w.ref=nl(g,null,y),w.return=g,w;case Li:return y=dm(y,g.mode,w),y.return=g,y;case Lo:var x=y._init;return d(g,x(y._payload),w)}if(sl(y)||Js(y))return y=Ea(y,g.mode,w,null),y.return=g,y;Mc(g,y)}return null}function f(g,y,w,x){var S=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:s(g,y,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case pc:return w.key===S?l(g,y,w,x):null;case Li:return w.key===S?u(g,y,w,x):null;case Lo:return S=w._init,f(g,y,S(w._payload),x)}if(sl(w)||Js(w))return S!==null?null:c(g,y,w,x,null);Mc(g,w)}return null}function p(g,y,w,x,S){if(typeof x=="string"&&x!==""||typeof x=="number")return g=g.get(w)||null,s(y,g,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case pc:return g=g.get(x.key===null?w:x.key)||null,l(y,g,x,S);case Li:return g=g.get(x.key===null?w:x.key)||null,u(y,g,x,S);case Lo:var v=x._init;return p(g,y,w,v(x._payload),S)}if(sl(x)||Js(x))return g=g.get(w)||null,c(y,g,x,S,null);Mc(y,x)}return null}function h(g,y,w,x){for(var S=null,v=null,C=y,E=y=0,T=null;C!==null&&E<w.length;E++){C.index>E?(T=C,C=null):T=C.sibling;var I=f(g,C,w[E],x);if(I===null){C===null&&(C=T);break}e&&C&&I.alternate===null&&t(g,C),y=a(I,y,E),v===null?S=I:v.sibling=I,v=I,C=T}if(E===w.length)return n(g,C),Xe&&ya(g,E),S;if(C===null){for(;E<w.length;E++)C=d(g,w[E],x),C!==null&&(y=a(C,y,E),v===null?S=C:v.sibling=C,v=C);return Xe&&ya(g,E),S}for(C=r(g,C);E<w.length;E++)T=p(C,g,E,w[E],x),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?E:T.key),y=a(T,y,E),v===null?S=T:v.sibling=T,v=T);return e&&C.forEach(function(W){return t(g,W)}),Xe&&ya(g,E),S}function m(g,y,w,x){var S=Js(w);if(typeof S!="function")throw Error(O(150));if(w=S.call(w),w==null)throw Error(O(151));for(var v=S=null,C=y,E=y=0,T=null,I=w.next();C!==null&&!I.done;E++,I=w.next()){C.index>E?(T=C,C=null):T=C.sibling;var W=f(g,C,I.value,x);if(W===null){C===null&&(C=T);break}e&&C&&W.alternate===null&&t(g,C),y=a(W,y,E),v===null?S=W:v.sibling=W,v=W,C=T}if(I.done)return n(g,C),Xe&&ya(g,E),S;if(C===null){for(;!I.done;E++,I=w.next())I=d(g,I.value,x),I!==null&&(y=a(I,y,E),v===null?S=I:v.sibling=I,v=I);return Xe&&ya(g,E),S}for(C=r(g,C);!I.done;E++,I=w.next())I=p(C,g,E,I.value,x),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?E:I.key),y=a(I,y,E),v===null?S=I:v.sibling=I,v=I);return e&&C.forEach(function(te){return t(g,te)}),Xe&&ya(g,E),S}function b(g,y,w,x){if(typeof w=="object"&&w!==null&&w.type===Ii&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case pc:e:{for(var S=w.key,v=y;v!==null;){if(v.key===S){if(S=w.type,S===Ii){if(v.tag===7){n(g,v.sibling),y=o(v,w.props.children),y.return=g,g=y;break e}}else if(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Lo&&hv(S)===v.type){n(g,v.sibling),y=o(v,w.props),y.ref=nl(g,v,w),y.return=g,g=y;break e}n(g,v);break}else t(g,v);v=v.sibling}w.type===Ii?(y=Ea(w.props.children,g.mode,x,w.key),y.return=g,g=y):(x=Uc(w.type,w.key,w.props,null,g.mode,x),x.ref=nl(g,y,w),x.return=g,g=x)}return i(g);case Li:e:{for(v=w.key;y!==null;){if(y.key===v)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),y=o(y,w.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=dm(w,g.mode,x),y.return=g,g=y}return i(g);case Lo:return v=w._init,b(g,y,v(w._payload),x)}if(sl(w))return h(g,y,w,x);if(Js(w))return m(g,y,w,x);Mc(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,w),y.return=g,g=y):(n(g,y),y=cm(w,g.mode,x),y.return=g,g=y),i(g)):n(g,y)}return b}var Ki=FS(!0),zS=FS(!1),td=qo(null),nd=null,Ri=null,kg=null;function Cg(){kg=Ri=nd=null}function Eg(e){var t=td.current;Ge(td),e._currentValue=t}function Um(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $i(e,t){nd=e,kg=Ri=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(un=!0),e.firstContext=null)}function Rn(e){var t=e._currentValue;if(kg!==e)if(e={context:e,memoizedValue:t,next:null},Ri===null){if(nd===null)throw Error(O(308));Ri=e,nd.dependencies={lanes:0,firstContext:e}}else Ri=Ri.next=e;return t}var Sa=null;function Lg(e){Sa===null?Sa=[e]:Sa.push(e)}function HS(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Lg(t)):(n.next=o.next,o.next=n),t.interleaved=n,Jr(e,r)}function Jr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Io=!1;function Ig(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function US(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Me&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Jr(e,n)}return o=r.interleaved,o===null?(t.next=t,Lg(r)):(t.next=o.next,o.next=t),r.interleaved=t,Jr(e,n)}function Rc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,fg(e,n)}}function mv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?o=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?o=a=t:a=a.next=t}else o=a=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function rd(e,t,n,r){var o=e.updateQueue;Io=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=o.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=Qe({},d,f);break e;case 2:Io=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);_a|=i,e.lanes=i,e.memoizedState=d}}function gv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(O(191,o));o.call(r)}}}var zl={},kr=qo(zl),Tl=qo(zl),Al=qo(zl);function ka(e){if(e===zl)throw Error(O(174));return e}function Mg(e,t){switch(Ve(Al,t),Ve(Tl,e),Ve(kr,zl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vm(t,e)}Ge(kr),Ve(kr,t)}function ji(){Ge(kr),Ge(Tl),Ge(Al)}function $S(e){ka(Al.current);var t=ka(kr.current),n=vm(t,e.type);t!==n&&(Ve(Tl,e),Ve(kr,n))}function _g(e){Tl.current===e&&(Ge(kr),Ge(Tl))}var Ze=qo(0);function od(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var om=[];function Tg(){for(var e=0;e<om.length;e++)om[e]._workInProgressVersionPrimary=null;om.length=0}var Pc=eo.ReactCurrentDispatcher,am=eo.ReactCurrentBatchConfig,Ma=0,Je=null,ht=null,wt=null,ad=!1,ml=!1,Dl=0,s3=0;function zt(){throw Error(O(321))}function Ag(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function Dg(e,t,n,r,o,a){if(Ma=a,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pc.current=e===null||e.memoizedState===null?d3:f3,e=n(r,o),ml){a=0;do{if(ml=!1,Dl=0,25<=a)throw Error(O(301));a+=1,wt=ht=null,t.updateQueue=null,Pc.current=p3,e=n(r,o)}while(ml)}if(Pc.current=id,t=ht!==null&&ht.next!==null,Ma=0,wt=ht=Je=null,ad=!1,t)throw Error(O(300));return e}function Ng(){var e=Dl!==0;return Dl=0,e}function wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Je.memoizedState=wt=e:wt=wt.next=e,wt}function Pn(){if(ht===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=ht.next;var t=wt===null?Je.memoizedState:wt.next;if(t!==null)wt=t,ht=e;else{if(e===null)throw Error(O(310));ht=e,e={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},wt===null?Je.memoizedState=wt=e:wt=wt.next=e}return wt}function Nl(e,t){return typeof t=="function"?t(e):t}function im(e){var t=Pn(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=ht,o=r.baseQueue,a=n.pending;if(a!==null){if(o!==null){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(o!==null){a=o.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((Ma&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=r):l=l.next=d,Je.lanes|=c,_a|=c}u=u.next}while(u!==null&&u!==a);l===null?i=r:l.next=s,or(r,t.memoizedState)||(un=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do a=o.lane,Je.lanes|=a,_a|=a,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sm(e){var t=Pn(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do a=e(a,i.action),i=i.next;while(i!==o);or(a,t.memoizedState)||(un=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function qS(){}function VS(e,t){var n=Je,r=Pn(),o=t(),a=!or(r.memoizedState,o);if(a&&(r.memoizedState=o,un=!0),r=r.queue,Og(KS.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||wt!==null&&wt.memoizedState.tag&1){if(n.flags|=2048,Ol(9,GS.bind(null,n,r,o,t),void 0,null),vt===null)throw Error(O(349));(Ma&30)!==0||WS(n,t,o)}return o}function WS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function GS(e,t,n,r){t.value=n,t.getSnapshot=r,jS(t)&&XS(e)}function KS(e,t,n){return n(function(){jS(t)&&XS(e)})}function jS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch{return!0}}function XS(e){var t=Jr(e,1);t!==null&&rr(t,e,1,-1)}function bv(e){var t=wr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Nl,lastRenderedState:e},t.queue=e,e=e.dispatch=c3.bind(null,Je,e),[t.memoizedState,e]}function Ol(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function YS(){return Pn().memoizedState}function Bc(e,t,n,r){var o=wr();Je.flags|=e,o.memoizedState=Ol(1|t,n,void 0,r===void 0?null:r)}function xd(e,t,n,r){var o=Pn();r=r===void 0?null:r;var a=void 0;if(ht!==null){var i=ht.memoizedState;if(a=i.destroy,r!==null&&Ag(r,i.deps)){o.memoizedState=Ol(t,n,a,r);return}}Je.flags|=e,o.memoizedState=Ol(1|t,n,a,r)}function xv(e,t){return Bc(8390656,8,e,t)}function Og(e,t){return xd(2048,8,e,t)}function ZS(e,t){return xd(4,2,e,t)}function JS(e,t){return xd(4,4,e,t)}function QS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ek(e,t,n){return n=n!=null?n.concat([e]):null,xd(4,4,QS.bind(null,t,e),n)}function Rg(){}function tk(e,t){var n=Pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ag(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nk(e,t){var n=Pn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ag(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rk(e,t,n){return(Ma&21)===0?(e.baseState&&(e.baseState=!1,un=!0),e.memoizedState=n):(or(n,t)||(n=lS(),Je.lanes|=n,_a|=n,e.baseState=!0),t)}function l3(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var r=am.transition;am.transition={};try{e(!1),t()}finally{Pe=n,am.transition=r}}function ok(){return Pn().memoizedState}function u3(e,t,n){var r=Fo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ak(e))ik(t,n);else if(n=HS(e,t,n,r),n!==null){var o=Qt();rr(n,e,r,o),sk(n,t,r)}}function c3(e,t,n){var r=Fo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ak(e))ik(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,or(s,i)){var l=t.interleaved;l===null?(o.next=o,Lg(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=HS(e,t,o,r),n!==null&&(o=Qt(),rr(n,e,r,o),sk(n,t,r))}}function ak(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function ik(e,t){ml=ad=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sk(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,fg(e,n)}}var id={readContext:Rn,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},d3={readContext:Rn,useCallback:function(e,t){return wr().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:xv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Bc(4194308,4,QS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bc(4,2,e,t)},useMemo:function(e,t){var n=wr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=u3.bind(null,Je,e),[r.memoizedState,e]},useRef:function(e){var t=wr();return e={current:e},t.memoizedState=e},useState:bv,useDebugValue:Rg,useDeferredValue:function(e){return wr().memoizedState=e},useTransition:function(){var e=bv(!1),t=e[0];return e=l3.bind(null,e[1]),wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Je,o=wr();if(Xe){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),vt===null)throw Error(O(349));(Ma&30)!==0||WS(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,xv(KS.bind(null,r,a,e),[e]),r.flags|=2048,Ol(9,GS.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=wr(),t=vt.identifierPrefix;if(Xe){var n=jr,r=Kr;n=(r&~(1<<32-nr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Dl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=s3++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},f3={readContext:Rn,useCallback:tk,useContext:Rn,useEffect:Og,useImperativeHandle:ek,useInsertionEffect:ZS,useLayoutEffect:JS,useMemo:nk,useReducer:im,useRef:YS,useState:function(){return im(Nl)},useDebugValue:Rg,useDeferredValue:function(e){var t=Pn();return rk(t,ht.memoizedState,e)},useTransition:function(){var e=im(Nl)[0],t=Pn().memoizedState;return[e,t]},useMutableSource:qS,useSyncExternalStore:VS,useId:ok,unstable_isNewReconciler:!1},p3={readContext:Rn,useCallback:tk,useContext:Rn,useEffect:Og,useImperativeHandle:ek,useInsertionEffect:ZS,useLayoutEffect:JS,useMemo:nk,useReducer:sm,useRef:YS,useState:function(){return sm(Nl)},useDebugValue:Rg,useDeferredValue:function(e){var t=Pn();return ht===null?t.memoizedState=e:rk(t,ht.memoizedState,e)},useTransition:function(){var e=sm(Nl)[0],t=Pn().memoizedState;return[e,t]},useMutableSource:qS,useSyncExternalStore:VS,useId:ok,unstable_isNewReconciler:!1};function Qn(e,t){if(e&&e.defaultProps){t=Qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function $m(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yd={isMounted:function(e){return(e=e._reactInternals)?Da(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qt(),o=Fo(e),a=Xr(r,o);a.payload=t,n!=null&&(a.callback=n),t=Po(e,a,o),t!==null&&(rr(t,e,o,r),Rc(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qt(),o=Fo(e),a=Xr(r,o);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Po(e,a,o),t!==null&&(rr(t,e,o,r),Rc(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qt(),r=Fo(e),o=Xr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Po(e,o,r),t!==null&&(rr(t,e,r,n),Rc(t,e,r))}};function yv(e,t,n,r,o,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,i):t.prototype&&t.prototype.isPureReactComponent?!Ll(n,r)||!Ll(o,a):!0}function lk(e,t,n){var r=!1,o=Uo,a=t.contextType;return typeof a=="object"&&a!==null?a=Rn(a):(o=dn(t)?La:$t.current,r=t.contextTypes,a=(r=r!=null)?Wi(e,o):Uo),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function wv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yd.enqueueReplaceState(t,t.state,null)}function qm(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ig(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=Rn(a):(a=dn(t)?La:$t.current,o.context=Wi(e,a)),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&($m(e,t,a,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&yd.enqueueReplaceState(o,o.state,null),rd(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Xi(e,t){try{var n="",r=t;do n+=qN(r),r=r.return;while(r);var o=n}catch(a){o=`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}return{value:e,source:t,stack:o,digest:null}}function lm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var h3=typeof WeakMap=="function"?WeakMap:Map;function uk(e,t,n){n=Xr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ld||(ld=!0,eg=r),Vm(e,t)},n}function ck(e,t,n){n=Xr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Vm(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Vm(e,t),typeof r!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function vv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new h3;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=M3.bind(null,e,t,n),t.then(e,e))}function Sv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kv(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xr(-1,1),t.tag=2,Po(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var m3=eo.ReactCurrentOwner,un=!1;function Jt(e,t,n,r){t.child=e===null?zS(t,null,n,r):Ki(t,e.child,n,r)}function Cv(e,t,n,r,o){n=n.render;var a=t.ref;return $i(t,o),r=Dg(e,t,n,r,a,o),n=Ng(),e!==null&&!un?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qr(e,t,o)):(Xe&&n&&wg(t),t.flags|=1,Jt(e,t,r,o),t.child)}function Ev(e,t,n,r,o){if(e===null){var a=n.type;return typeof a=="function"&&!qg(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,dk(e,t,a,r,o)):(e=Uc(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&o)===0){var i=a.memoizedProps;if(n=n.compare,n=n!==null?n:Ll,n(i,r)&&e.ref===t.ref)return Qr(e,t,o)}return t.flags|=1,e=zo(a,r),e.ref=t.ref,e.return=t,t.child=e}function dk(e,t,n,r,o){if(e!==null){var a=e.memoizedProps;if(Ll(a,r)&&e.ref===t.ref)if(un=!1,t.pendingProps=r=a,(e.lanes&o)!==0)(e.flags&131072)!==0&&(un=!0);else return t.lanes=e.lanes,Qr(e,t,o)}return Wm(e,t,n,r,o)}function fk(e,t,n){var r=t.pendingProps,o=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ve(Bi,gn),gn|=n;else{if((n&1073741824)===0)return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ve(Bi,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Ve(Bi,gn),gn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ve(Bi,gn),gn|=r;return Jt(e,t,o,n),t.child}function pk(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wm(e,t,n,r,o){var a=dn(n)?La:$t.current;return a=Wi(t,a),$i(t,o),n=Dg(e,t,n,r,a,o),r=Ng(),e!==null&&!un?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qr(e,t,o)):(Xe&&r&&wg(t),t.flags|=1,Jt(e,t,n,o),t.child)}function Lv(e,t,n,r,o){if(dn(n)){var a=!0;Jc(t)}else a=!1;if($i(t,o),t.stateNode===null)Fc(e,t),lk(t,n,r),qm(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Rn(u):(u=dn(n)?La:$t.current,u=Wi(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||l!==u)&&wv(t,i,r,u),Io=!1;var f=t.memoizedState;i.state=f,rd(t,r,i,o),l=t.memoizedState,s!==r||f!==l||cn.current||Io?(typeof c=="function"&&($m(t,n,c,r),l=t.memoizedState),(s=Io||yv(t,n,s,r,f,l,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,US(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Qn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Rn(l):(l=dn(n)?La:$t.current,l=Wi(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&wv(t,i,r,l),Io=!1,f=t.memoizedState,i.state=f,rd(t,r,i,o);var h=t.memoizedState;s!==d||f!==h||cn.current||Io?(typeof p=="function"&&($m(t,n,p,r),h=t.memoizedState),(u=Io||yv(t,n,u,r,f,h,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,h,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,h,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Gm(e,t,n,r,a,o)}function Gm(e,t,n,r,o,a){pk(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&dv(t,n,!1),Qr(e,t,a);r=t.stateNode,m3.current=t;var s=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Ki(t,e.child,null,a),t.child=Ki(t,null,s,a)):Jt(e,t,s,a),t.memoizedState=r.state,o&&dv(t,n,!0),t.child}function hk(e){var t=e.stateNode;t.pendingContext?cv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cv(e,t.context,!1),Mg(e,t.containerInfo)}function Iv(e,t,n,r,o){return Gi(),Sg(o),t.flags|=256,Jt(e,t,n,r),t.child}var Km={dehydrated:null,treeContext:null,retryLane:0};function jm(e){return{baseLanes:e,cachePool:null,transitions:null}}function mk(e,t,n){var r=t.pendingProps,o=Ze.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ve(Ze,o&1),e===null)return Hm(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,a?(r=t.mode,a=t.child,i={mode:"hidden",children:i},(r&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=i):a=Sd(i,r,0,null),e=Ea(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=jm(n),t.memoizedState=Km,e):Pg(t,i));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return g3(e,t,i,r,s,o,n);if(a){a=r.fallback,i=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=zo(o,l),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?a=zo(s,a):(a=Ea(a,i,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,i=e.child.memoizedState,i=i===null?jm(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~n,t.memoizedState=Km,r}return a=e.child,e=a.sibling,r=zo(a,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Pg(e,t){return t=Sd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _c(e,t,n,r){return r!==null&&Sg(r),Ki(t,e.child,null,n),e=Pg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function g3(e,t,n,r,o,a,i){if(n)return t.flags&256?(t.flags&=-257,r=lm(Error(O(422))),_c(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Sd({mode:"visible",children:r.children},o,0,null),a=Ea(a,o,i,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,(t.mode&1)!==0&&Ki(t,e.child,null,i),t.child.memoizedState=jm(i),t.memoizedState=Km,a);if((t.mode&1)===0)return _c(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(O(419)),r=lm(a,r,void 0),_c(e,t,i,r)}if(s=(i&e.childLanes)!==0,un||s){if(r=vt,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|i))!==0?0:o,o!==0&&o!==a.retryLane&&(a.retryLane=o,Jr(e,o),rr(r,e,o,-1))}return $g(),r=lm(Error(O(421))),_c(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=_3.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,bn=Ro(o.nextSibling),xn=t,Xe=!0,tr=null,e!==null&&(An[Dn++]=Kr,An[Dn++]=jr,An[Dn++]=Ia,Kr=e.id,jr=e.overflow,Ia=t),t=Pg(t,r.children),t.flags|=4096,t)}function Mv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Um(e.return,t,n)}function um(e,t,n,r,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function gk(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(Jt(e,t,r.children,n),r=Ze.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mv(e,n,t);else if(e.tag===19)Mv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ve(Ze,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&od(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),um(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&od(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}um(t,!0,n,null,a);break;case"together":um(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fc(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_a|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=zo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function b3(e,t,n){switch(t.tag){case 3:hk(t),Gi();break;case 5:$S(t);break;case 1:dn(t.type)&&Jc(t);break;case 4:Mg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ve(td,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ve(Ze,Ze.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?mk(e,t,n):(Ve(Ze,Ze.current&1),e=Qr(e,t,n),e!==null?e.sibling:null);Ve(Ze,Ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return gk(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ve(Ze,Ze.current),r)break;return null;case 22:case 23:return t.lanes=0,fk(e,t,n)}return Qr(e,t,n)}var bk,Xm,xk,yk;bk=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xm=function(){};xk=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ka(kr.current);var a=null;switch(n){case"input":o=bm(e,o),r=bm(e,r),a=[];break;case"select":o=Qe({},o,{value:void 0}),r=Qe({},r,{value:void 0}),a=[];break;case"textarea":o=wm(e,o),r=wm(e,r),a=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Yc)}Sm(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(yl.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=o?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(yl.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&We("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};yk=function(e,t,n,r){n!==r&&(t.flags|=4)};function rl(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function x3(e,t,n){var r=t.pendingProps;switch(vg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(t),null;case 1:return dn(t.type)&&Zc(),Ht(t),null;case 3:return r=t.stateNode,ji(),Ge(cn),Ge($t),Tg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ic(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,tr!==null&&(rg(tr),tr=null))),Xm(e,t),Ht(t),null;case 5:_g(t);var o=ka(Al.current);if(n=t.type,e!==null&&t.stateNode!=null)xk(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ht(t),null}if(e=ka(kr.current),Ic(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[vr]=t,r[_l]=a,e=(t.mode&1)!==0,n){case"dialog":We("cancel",r),We("close",r);break;case"iframe":case"object":case"embed":We("load",r);break;case"video":case"audio":for(o=0;o<ul.length;o++)We(ul[o],r);break;case"source":We("error",r);break;case"img":case"image":case"link":We("error",r),We("load",r);break;case"details":We("toggle",r);break;case"input":Pw(r,a),We("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},We("invalid",r);break;case"textarea":Fw(r,a),We("invalid",r)}Sm(n,a),o=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Lc(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Lc(r.textContent,s,e),o=["children",""+s]):yl.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&We("scroll",r)}switch(n){case"input":hc(r),Bw(r,a,!0);break;case"textarea":hc(r),zw(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Yc)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kv(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[vr]=t,e[_l]=r,bk(e,t,!1,!1),t.stateNode=e;e:{switch(i=km(n,r),n){case"dialog":We("cancel",e),We("close",e),o=r;break;case"iframe":case"object":case"embed":We("load",e),o=r;break;case"video":case"audio":for(o=0;o<ul.length;o++)We(ul[o],e);o=r;break;case"source":We("error",e),o=r;break;case"img":case"image":case"link":We("error",e),We("load",e),o=r;break;case"details":We("toggle",e),o=r;break;case"input":Pw(e,r),o=bm(e,r),We("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Qe({},r,{value:void 0}),We("invalid",e);break;case"textarea":Fw(e,r),o=wm(e,r),We("invalid",e);break;default:o=r}Sm(n,o),s=o;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?Yv(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jv(e,l)):a==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&wl(e,l):typeof l=="number"&&wl(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(yl.hasOwnProperty(a)?l!=null&&a==="onScroll"&&We("scroll",e):l!=null&&ig(e,a,l,i))}switch(n){case"input":hc(e),Bw(e,r,!1);break;case"textarea":hc(e),zw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ho(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Fi(e,!!r.multiple,a,!1):r.defaultValue!=null&&Fi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Yc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ht(t),null;case 6:if(e&&t.stateNode!=null)yk(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=ka(Al.current),ka(kr.current),Ic(t)){if(r=t.stateNode,n=t.memoizedProps,r[vr]=t,(a=r.nodeValue!==n)&&(e=xn,e!==null))switch(e.tag){case 3:Lc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Lc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[vr]=t,t.stateNode=r}return Ht(t),null;case 13:if(Ge(Ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Xe&&bn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)BS(),Gi(),t.flags|=98560,a=!1;else if(a=Ic(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(O(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(O(317));a[vr]=t}else Gi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ht(t),a=!1}else tr!==null&&(rg(tr),tr=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ze.current&1)!==0?mt===0&&(mt=3):$g())),t.updateQueue!==null&&(t.flags|=4),Ht(t),null);case 4:return ji(),Xm(e,t),e===null&&Il(t.stateNode.containerInfo),Ht(t),null;case 10:return Eg(t.type._context),Ht(t),null;case 17:return dn(t.type)&&Zc(),Ht(t),null;case 19:if(Ge(Ze),a=t.memoizedState,a===null)return Ht(t),null;if(r=(t.flags&128)!==0,i=a.rendering,i===null)if(r)rl(a,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=od(e),i!==null){for(t.flags|=128,rl(a,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ve(Ze,Ze.current&1|2),t.child}e=e.sibling}a.tail!==null&&at()>Yi&&(t.flags|=128,r=!0,rl(a,!1),t.lanes=4194304)}else{if(!r)if(e=od(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Xe)return Ht(t),null}else 2*at()-a.renderingStartTime>Yi&&n!==1073741824&&(t.flags|=128,r=!0,rl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=at(),t.sibling=null,n=Ze.current,Ve(Ze,r?n&1|2:n&1),t):(Ht(t),null);case 22:case 23:return Ug(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(gn&1073741824)!==0&&(Ht(t),t.subtreeFlags&6&&(t.flags|=8192)):Ht(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function y3(e,t){switch(vg(t),t.tag){case 1:return dn(t.type)&&Zc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ji(),Ge(cn),Ge($t),Tg(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return _g(t),null;case 13:if(Ge(Ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Ze),null;case 4:return ji(),null;case 10:return Eg(t.type._context),null;case 22:case 23:return Ug(),null;case 24:return null;default:return null}}var Tc=!1,Ut=!1,w3=typeof WeakSet=="function"?WeakSet:Set,q=null;function Pi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){et(e,t,r)}else n.current=null}function Ym(e,t,n){try{n()}catch(r){et(e,t,r)}}var _v=!1;function v3(e,t){if(Nm=Kc,e=CS(),yg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=i+o),d!==a||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=i),f===a&&++c===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Om={focusedElem:e,selectionRange:n},Kc=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,b=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Qn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(x){et(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return h=_v,_v=!1,h}function gl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&Ym(t,n,a)}o=o.next}while(o!==r)}}function wd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wk(e){var t=e.alternate;t!==null&&(e.alternate=null,wk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vr],delete t[_l],delete t[Bm],delete t[r3],delete t[o3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vk(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yc));else if(r!==4&&(e=e.child,e!==null))for(Jm(e,t,n),e=e.sibling;e!==null;)Jm(e,t,n),e=e.sibling}function Qm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qm(e,t,n),e=e.sibling;e!==null;)Qm(e,t,n),e=e.sibling}var _t=null,er=!1;function Eo(e,t,n){for(n=n.child;n!==null;)Sk(e,t,n),n=n.sibling}function Sk(e,t,n){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(fd,n)}catch{}switch(n.tag){case 5:Ut||Pi(n,t);case 6:var r=_t,o=er;_t=null,Eo(e,t,n),_t=r,er=o,_t!==null&&(er?(e=_t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_t.removeChild(n.stateNode));break;case 18:_t!==null&&(er?(e=_t,n=n.stateNode,e.nodeType===8?nm(e.parentNode,n):e.nodeType===1&&nm(e,n),Cl(e)):nm(_t,n.stateNode));break;case 4:r=_t,o=er,_t=n.stateNode.containerInfo,er=!0,Eo(e,t,n),_t=r,er=o;break;case 0:case 11:case 14:case 15:if(!Ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&((a&2)!==0||(a&4)!==0)&&Ym(n,t,i),o=o.next}while(o!==r)}Eo(e,t,n);break;case 1:if(!Ut&&(Pi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){et(n,t,s)}Eo(e,t,n);break;case 21:Eo(e,t,n);break;case 22:n.mode&1?(Ut=(r=Ut)||n.memoizedState!==null,Eo(e,t,n),Ut=r):Eo(e,t,n);break;default:Eo(e,t,n)}}function Av(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new w3),t.forEach(function(r){var o=T3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Jn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:_t=s.stateNode,er=!1;break e;case 3:_t=s.stateNode.containerInfo,er=!0;break e;case 4:_t=s.stateNode.containerInfo,er=!0;break e}s=s.return}if(_t===null)throw Error(O(160));Sk(a,i,o),_t=null,er=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){et(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)kk(t,e),t=t.sibling}function kk(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Jn(t,e),yr(e),r&4){try{gl(3,e,e.return),wd(3,e)}catch(m){et(e,e.return,m)}try{gl(5,e,e.return)}catch(m){et(e,e.return,m)}}break;case 1:Jn(t,e),yr(e),r&512&&n!==null&&Pi(n,n.return);break;case 5:if(Jn(t,e),yr(e),r&512&&n!==null&&Pi(n,n.return),e.flags&32){var o=e.stateNode;try{wl(o,"")}catch(m){et(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var a=e.memoizedProps,i=n!==null?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&Wv(o,a),km(s,i);var u=km(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?Yv(o,d):c==="dangerouslySetInnerHTML"?jv(o,d):c==="children"?wl(o,d):ig(o,c,d,u)}switch(s){case"input":xm(o,a);break;case"textarea":Gv(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Fi(o,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Fi(o,!!a.multiple,a.defaultValue,!0):Fi(o,!!a.multiple,a.multiple?[]:"",!1))}o[_l]=a}catch(m){et(e,e.return,m)}}break;case 6:if(Jn(t,e),yr(e),r&4){if(e.stateNode===null)throw Error(O(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){et(e,e.return,m)}}break;case 3:if(Jn(t,e),yr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(m){et(e,e.return,m)}break;case 4:Jn(t,e),yr(e);break;case 13:Jn(t,e),yr(e),o=e.child,o.flags&8192&&(a=o.memoizedState!==null,o.stateNode.isHidden=a,!a||o.alternate!==null&&o.alternate.memoizedState!==null||(zg=at())),r&4&&Av(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ut=(u=Ut)||c,Jn(t,e),Ut=u):Jn(t,e),yr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&(e.mode&1)!==0)for(q=e,c=e.child;c!==null;){for(d=q=c;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:gl(4,f,f.return);break;case 1:Pi(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){et(r,n,m)}}break;case 5:Pi(f,f.return);break;case 22:if(f.memoizedState!==null){Nv(d);continue}}p!==null?(p.return=f,q=p):Nv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=Xv("display",i))}catch(m){et(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){et(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Jn(t,e),yr(e),r&4&&Av(e);break;case 21:break;default:Jn(t,e),yr(e)}}function yr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(vk(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(wl(o,""),r.flags&=-33);var a=Tv(e);Qm(e,a,o);break;case 3:case 4:var i=r.stateNode.containerInfo,s=Tv(e);Jm(e,s,i);break;default:throw Error(O(161))}}catch(l){et(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function S3(e,t,n){q=e,Ck(e,t,n)}function Ck(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,a=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Tc;if(!i){var s=o.alternate,l=s!==null&&s.memoizedState!==null||Ut;s=Tc;var u=Ut;if(Tc=i,(Ut=l)&&!u)for(q=o;q!==null;)i=q,l=i.child,i.tag===22&&i.memoizedState!==null?Ov(o):l!==null?(l.return=i,q=l):Ov(o);for(;a!==null;)q=a,Ck(a,t,n),a=a.sibling;q=o,Tc=s,Ut=u}Dv(e,t,n)}else(o.subtreeFlags&8772)!==0&&a!==null?(a.return=o,q=a):Dv(e,t,n)}}function Dv(e){for(;q!==null;){var t=q;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ut||wd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ut)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Qn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&gv(t,a,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}gv(t,i,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Cl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ut||t.flags&512&&Zm(t)}catch(f){et(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function Nv(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function Ov(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wd(4,t)}catch(l){et(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){et(t,o,l)}}var a=t.return;try{Zm(t)}catch(l){et(t,a,l)}break;case 5:var i=t.return;try{Zm(t)}catch(l){et(t,i,l)}}}catch(l){et(t,t.return,l)}if(t===e){q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,q=s;break}q=t.return}}var k3=Math.ceil,sd=eo.ReactCurrentDispatcher,Bg=eo.ReactCurrentOwner,On=eo.ReactCurrentBatchConfig,Me=0,vt=null,ut=null,Tt=0,gn=0,Bi=qo(0),mt=0,Rl=null,_a=0,vd=0,Fg=0,bl=null,ln=null,zg=0,Yi=1/0,Wr=null,ld=!1,eg=null,Bo=null,Ac=!1,Ao=null,ud=0,xl=0,tg=null,zc=-1,Hc=0;function Qt(){return(Me&6)!==0?at():zc!==-1?zc:zc=at()}function Fo(e){return(e.mode&1)===0?1:(Me&2)!==0&&Tt!==0?Tt&-Tt:i3.transition!==null?(Hc===0&&(Hc=lS()),Hc):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:mS(e.type)),e)}function rr(e,t,n,r){if(50<xl)throw xl=0,tg=null,Error(O(185));Pl(e,n,r),((Me&2)===0||e!==vt)&&(e===vt&&((Me&2)===0&&(vd|=n),mt===4&&_o(e,Tt)),fn(e,r),n===1&&Me===0&&(t.mode&1)===0&&(Yi=at()+500,bd&&Vo()))}function fn(e,t){var n=e.callbackNode;lO(e,t);var r=Gc(e,e===vt?Tt:0);if(r===0)n!==null&&$w(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$w(n),t===1)e.tag===0?a3(Rv.bind(null,e)):OS(Rv.bind(null,e)),t3(function(){(Me&6)===0&&Vo()}),n=null;else{switch(uS(r)){case 1:n=dg;break;case 4:n=iS;break;case 16:n=Wc;break;case 536870912:n=sS;break;default:n=Wc}n=Dk(n,Ek.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ek(e,t){if(zc=-1,Hc=0,(Me&6)!==0)throw Error(O(327));var n=e.callbackNode;if(qi()&&e.callbackNode!==n)return null;var r=Gc(e,e===vt?Tt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=cd(e,r);else{t=r;var o=Me;Me|=2;var a=Ik();(vt!==e||Tt!==t)&&(Wr=null,Yi=at()+500,Ca(e,t));do try{L3();break}catch(s){Lk(e,s)}while(!0);Cg(),sd.current=a,Me=o,ut!==null?t=0:(vt=null,Tt=0,t=mt)}if(t!==0){if(t===2&&(o=Mm(e),o!==0&&(r=o,t=ng(e,o))),t===1)throw n=Rl,Ca(e,0),_o(e,r),fn(e,at()),n;if(t===6)_o(e,r);else{if(o=e.current.alternate,(r&30)===0&&!C3(o)&&(t=cd(e,r),t===2&&(a=Mm(e),a!==0&&(r=a,t=ng(e,a))),t===1))throw n=Rl,Ca(e,0),_o(e,r),fn(e,at()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:wa(e,ln,Wr);break;case 3:if(_o(e,r),(r&130023424)===r&&(t=zg+500-at(),10<t)){if(Gc(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Qt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Pm(wa.bind(null,e,ln,Wr),t);break}wa(e,ln,Wr);break;case 4:if(_o(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-nr(r);a=1<<i,i=t[i],i>o&&(o=i),r&=~a}if(r=o,r=at()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*k3(r/1960))-r,10<r){e.timeoutHandle=Pm(wa.bind(null,e,ln,Wr),r);break}wa(e,ln,Wr);break;case 5:wa(e,ln,Wr);break;default:throw Error(O(329))}}}return fn(e,at()),e.callbackNode===n?Ek.bind(null,e):null}function ng(e,t){var n=bl;return e.current.memoizedState.isDehydrated&&(Ca(e,t).flags|=256),e=cd(e,t),e!==2&&(t=ln,ln=n,t!==null&&rg(t)),e}function rg(e){ln===null?ln=e:ln.push.apply(ln,e)}function C3(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!or(a(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _o(e,t){for(t&=~Fg,t&=~vd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nr(t),r=1<<n;e[n]=-1,t&=~r}}function Rv(e){if((Me&6)!==0)throw Error(O(327));qi();var t=Gc(e,0);if((t&1)===0)return fn(e,at()),null;var n=cd(e,t);if(e.tag!==0&&n===2){var r=Mm(e);r!==0&&(t=r,n=ng(e,r))}if(n===1)throw n=Rl,Ca(e,0),_o(e,t),fn(e,at()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wa(e,ln,Wr),fn(e,at()),null}function Hg(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(Yi=at()+500,bd&&Vo())}}function Ta(e){Ao!==null&&Ao.tag===0&&(Me&6)===0&&qi();var t=Me;Me|=1;var n=On.transition,r=Pe;try{if(On.transition=null,Pe=1,e)return e()}finally{Pe=r,On.transition=n,Me=t,(Me&6)===0&&Vo()}}function Ug(){gn=Bi.current,Ge(Bi)}function Ca(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,e3(n)),ut!==null)for(n=ut.return;n!==null;){var r=n;switch(vg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zc();break;case 3:ji(),Ge(cn),Ge($t),Tg();break;case 5:_g(r);break;case 4:ji();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:Eg(r.type._context);break;case 22:case 23:Ug()}n=n.return}if(vt=e,ut=e=zo(e.current,null),Tt=gn=t,mt=0,Rl=null,Fg=vd=_a=0,ln=bl=null,Sa!==null){for(t=0;t<Sa.length;t++)if(n=Sa[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,a=n.pending;if(a!==null){var i=a.next;a.next=o,r.next=i}n.pending=r}Sa=null}return e}function Lk(e,t){do{var n=ut;try{if(Cg(),Pc.current=id,ad){for(var r=Je.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ad=!1}if(Ma=0,wt=ht=Je=null,ml=!1,Dl=0,Bg.current=null,n===null||n.return===null){mt=1,Rl=t,ut=null;break}e:{var a=e,i=n.return,s=n,l=t;if(t=Tt,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if((c.mode&1)===0&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Sv(i);if(p!==null){p.flags&=-257,kv(p,i,s,a,t),p.mode&1&&vv(a,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if((t&1)===0){vv(a,u,t),$g();break e}l=Error(O(426))}}else if(Xe&&s.mode&1){var b=Sv(i);if(b!==null){(b.flags&65536)===0&&(b.flags|=256),kv(b,i,s,a,t),Sg(Xi(l,s));break e}}a=l=Xi(l,s),mt!==4&&(mt=2),bl===null?bl=[a]:bl.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=uk(a,l,t);mv(a,g);break e;case 1:s=l;var y=a.type,w=a.stateNode;if((a.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Bo===null||!Bo.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var x=ck(a,s,t);mv(a,x);break e}}a=a.return}while(a!==null)}_k(n)}catch(S){t=S,ut===n&&n!==null&&(ut=n=n.return);continue}break}while(!0)}function Ik(){var e=sd.current;return sd.current=id,e===null?id:e}function $g(){(mt===0||mt===3||mt===2)&&(mt=4),vt===null||(_a&268435455)===0&&(vd&268435455)===0||_o(vt,Tt)}function cd(e,t){var n=Me;Me|=2;var r=Ik();(vt!==e||Tt!==t)&&(Wr=null,Ca(e,t));do try{E3();break}catch(o){Lk(e,o)}while(!0);if(Cg(),Me=n,sd.current=r,ut!==null)throw Error(O(261));return vt=null,Tt=0,mt}function E3(){for(;ut!==null;)Mk(ut)}function L3(){for(;ut!==null&&!QN();)Mk(ut)}function Mk(e){var t=Ak(e.alternate,e,gn);e.memoizedProps=e.pendingProps,t===null?_k(e):ut=t,Bg.current=null}function _k(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=x3(n,t,gn),n!==null){ut=n;return}}else{if(n=y3(n,t),n!==null){n.flags&=32767,ut=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{mt=6,ut=null;return}}if(t=t.sibling,t!==null){ut=t;return}ut=t=e}while(t!==null);mt===0&&(mt=5)}function wa(e,t,n){var r=Pe,o=On.transition;try{On.transition=null,Pe=1,I3(e,t,n,r)}finally{On.transition=o,Pe=r}return null}function I3(e,t,n,r){do qi();while(Ao!==null);if((Me&6)!==0)throw Error(O(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(uO(e,a),e===vt&&(ut=vt=null,Tt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ac||(Ac=!0,Dk(Wc,function(){return qi(),null})),a=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||a){a=On.transition,On.transition=null;var i=Pe;Pe=1;var s=Me;Me|=4,Bg.current=null,v3(e,n),kk(n,e),XO(Om),Kc=!!Nm,Om=Nm=null,e.current=n,S3(n,e,o),eO(),Me=s,Pe=i,On.transition=a}else e.current=n;if(Ac&&(Ac=!1,Ao=e,ud=o),a=e.pendingLanes,a===0&&(Bo=null),rO(n.stateNode,r),fn(e,at()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ld)throw ld=!1,e=eg,eg=null,e;return(ud&1)!==0&&e.tag!==0&&qi(),a=e.pendingLanes,(a&1)!==0?e===tg?xl++:(xl=0,tg=e):xl=0,Vo(),null}function qi(){if(Ao!==null){var e=uS(ud),t=On.transition,n=Pe;try{if(On.transition=null,Pe=16>e?16:e,Ao===null)var r=!1;else{if(e=Ao,Ao=null,ud=0,(Me&6)!==0)throw Error(O(331));var o=Me;for(Me|=4,q=e.current;q!==null;){var a=q,i=a.child;if((q.flags&16)!==0){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(q=u;q!==null;){var c=q;switch(c.tag){case 0:case 11:case 15:gl(8,c,a)}var d=c.child;if(d!==null)d.return=c,q=d;else for(;q!==null;){c=q;var f=c.sibling,p=c.return;if(wk(c),c===u){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var h=a.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}q=a}}if((a.subtreeFlags&2064)!==0&&i!==null)i.return=a,q=i;else e:for(;q!==null;){if(a=q,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:gl(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,q=g;break e}q=a.return}}var y=e.current;for(q=y;q!==null;){i=q;var w=i.child;if((i.subtreeFlags&2064)!==0&&w!==null)w.return=i,q=w;else e:for(i=y;q!==null;){if(s=q,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:wd(9,s)}}catch(S){et(s,s.return,S)}if(s===i){q=null;break e}var x=s.sibling;if(x!==null){x.return=s.return,q=x;break e}q=s.return}}if(Me=o,Vo(),Sr&&typeof Sr.onPostCommitFiberRoot=="function")try{Sr.onPostCommitFiberRoot(fd,e)}catch{}r=!0}return r}finally{Pe=n,On.transition=t}}return!1}function Pv(e,t,n){t=Xi(n,t),t=uk(e,t,1),e=Po(e,t,1),t=Qt(),e!==null&&(Pl(e,1,t),fn(e,t))}function et(e,t,n){if(e.tag===3)Pv(e,e,n);else for(;t!==null;){if(t.tag===3){Pv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bo===null||!Bo.has(r))){e=Xi(n,e),e=ck(t,e,1),t=Po(t,e,1),e=Qt(),t!==null&&(Pl(t,1,e),fn(t,e));break}}t=t.return}}function M3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qt(),e.pingedLanes|=e.suspendedLanes&n,vt===e&&(Tt&n)===n&&(mt===4||mt===3&&(Tt&130023424)===Tt&&500>at()-zg?Ca(e,0):Fg|=n),fn(e,t)}function Tk(e,t){t===0&&((e.mode&1)===0?t=1:(t=bc,bc<<=1,(bc&130023424)===0&&(bc=4194304)));var n=Qt();e=Jr(e,t),e!==null&&(Pl(e,t,n),fn(e,n))}function _3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tk(e,n)}function T3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Tk(e,n)}var Ak;Ak=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||cn.current)un=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return un=!1,b3(e,t,n);un=(e.flags&131072)!==0}else un=!1,Xe&&(t.flags&1048576)!==0&&RS(t,ed,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fc(e,t),e=t.pendingProps;var o=Wi(t,$t.current);$i(t,n),o=Dg(null,t,r,e,o,n);var a=Ng();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dn(r)?(a=!0,Jc(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ig(t),o.updater=yd,t.stateNode=o,o._reactInternals=t,qm(t,r,e,n),t=Gm(null,t,r,!0,a,n)):(t.tag=0,Xe&&a&&wg(t),Jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=D3(r),e=Qn(r,e),o){case 0:t=Wm(null,t,r,e,n);break e;case 1:t=Lv(null,t,r,e,n);break e;case 11:t=Cv(null,t,r,e,n);break e;case 14:t=Ev(null,t,r,Qn(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),Wm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),Lv(e,t,r,o,n);case 3:e:{if(hk(t),e===null)throw Error(O(387));r=t.pendingProps,a=t.memoizedState,o=a.element,US(e,t),rd(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Xi(Error(O(423)),t),t=Iv(e,t,r,n,o);break e}else if(r!==o){o=Xi(Error(O(424)),t),t=Iv(e,t,r,n,o);break e}else for(bn=Ro(t.stateNode.containerInfo.firstChild),xn=t,Xe=!0,tr=null,n=zS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gi(),r===o){t=Qr(e,t,n);break e}Jt(e,t,r,n)}t=t.child}return t;case 5:return $S(t),e===null&&Hm(t),r=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,Rm(r,o)?i=null:a!==null&&Rm(r,a)&&(t.flags|=32),pk(e,t),Jt(e,t,i,n),t.child;case 6:return e===null&&Hm(t),null;case 13:return mk(e,t,n);case 4:return Mg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ki(t,null,r,n):Jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),Cv(e,t,r,o,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ve(td,r._currentValue),r._currentValue=i,a!==null)if(or(a.value,i)){if(a.children===o.children&&!cn.current){t=Qr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Xr(-1,n&-n),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Um(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(O(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Um(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,$i(t,n),o=Rn(o),r=r(o),t.flags|=1,Jt(e,t,r,n),t.child;case 14:return r=t.type,o=Qn(r,t.pendingProps),o=Qn(r.type,o),Ev(e,t,r,o,n);case 15:return dk(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qn(r,o),Fc(e,t),t.tag=1,dn(r)?(e=!0,Jc(t)):e=!1,$i(t,n),lk(t,r,o),qm(t,r,o,n),Gm(null,t,r,!0,e,n);case 19:return gk(e,t,n);case 22:return fk(e,t,n)}throw Error(O(156,t.tag))};function Dk(e,t){return aS(e,t)}function A3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nn(e,t,n,r){return new A3(e,t,n,r)}function qg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function D3(e){if(typeof e=="function")return qg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lg)return 11;if(e===ug)return 14}return 2}function zo(e,t){var n=e.alternate;return n===null?(n=Nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uc(e,t,n,r,o,a){var i=2;if(r=e,typeof e=="function")qg(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ii:return Ea(n.children,o,a,t);case sg:i=8,o|=8;break;case pm:return e=Nn(12,n,t,o|2),e.elementType=pm,e.lanes=a,e;case hm:return e=Nn(13,n,t,o),e.elementType=hm,e.lanes=a,e;case mm:return e=Nn(19,n,t,o),e.elementType=mm,e.lanes=a,e;case $v:return Sd(n,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hv:i=10;break e;case Uv:i=9;break e;case lg:i=11;break e;case ug:i=14;break e;case Lo:i=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=Nn(i,n,t,o),t.elementType=e,t.type=r,t.lanes=a,t}function Ea(e,t,n,r){return e=Nn(7,e,r,t),e.lanes=n,e}function Sd(e,t,n,r){return e=Nn(22,e,r,t),e.elementType=$v,e.lanes=n,e.stateNode={isHidden:!1},e}function cm(e,t,n){return e=Nn(6,e,null,t),e.lanes=n,e}function dm(e,t,n){return t=Nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function N3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jh(0),this.expirationTimes=jh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jh(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vg(e,t,n,r,o,a,i,s,l){return e=new N3(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Nn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ig(a),e}function O3(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Li,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Nk(e){if(!e)return Uo;e=e._reactInternals;e:{if(Da(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(dn(n))return NS(e,n,t)}return t}function Ok(e,t,n,r,o,a,i,s,l){return e=Vg(n,r,!0,e,o,a,i,s,l),e.context=Nk(null),n=e.current,r=Qt(),o=Fo(n),a=Xr(r,o),a.callback=t??null,Po(n,a,o),e.current.lanes=o,Pl(e,o,r),fn(e,r),e}function kd(e,t,n,r){var o=t.current,a=Qt(),i=Fo(o);return n=Nk(n),t.context===null?t.context=n:t.pendingContext=n,t=Xr(a,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Po(o,t,i),e!==null&&(rr(e,o,i,a),Rc(e,o,i)),i}function dd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wg(e,t){Bv(e,t),(e=e.alternate)&&Bv(e,t)}function R3(){return null}var Rk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gg(e){this._internalRoot=e}Cd.prototype.render=Gg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));kd(e,t,null,null)};Cd.prototype.unmount=Gg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ta(function(){kd(null,e,null,null)}),t[Zr]=null}};function Cd(e){this._internalRoot=e}Cd.prototype.unstable_scheduleHydration=function(e){if(e){var t=fS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mo.length&&t!==0&&t<Mo[n].priority;n++);Mo.splice(n,0,e),n===0&&hS(e)}};function Kg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ed(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Fv(){}function P3(e,t,n,r,o){if(o){if(typeof r=="function"){var a=r;r=function(){var u=dd(i);a.call(u)}}var i=Ok(t,r,e,0,null,!1,!1,"",Fv);return e._reactRootContainer=i,e[Zr]=i.current,Il(e.nodeType===8?e.parentNode:e),Ta(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=dd(l);s.call(u)}}var l=Vg(e,0,!1,null,null,!1,!1,"",Fv);return e._reactRootContainer=l,e[Zr]=l.current,Il(e.nodeType===8?e.parentNode:e),Ta(function(){kd(t,l,n,r)}),l}function Ld(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if(typeof o=="function"){var s=o;o=function(){var l=dd(i);s.call(l)}}kd(t,i,e,o)}else i=P3(n,t,e,o,r);return dd(i)}cS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ll(t.pendingLanes);n!==0&&(fg(t,n|1),fn(t,at()),(Me&6)===0&&(Yi=at()+500,Vo()))}break;case 13:Ta(function(){var r=Jr(e,1);if(r!==null){var o=Qt();rr(r,e,1,o)}}),Wg(e,1)}};pg=function(e){if(e.tag===13){var t=Jr(e,134217728);if(t!==null){var n=Qt();rr(t,e,134217728,n)}Wg(e,134217728)}};dS=function(e){if(e.tag===13){var t=Fo(e),n=Jr(e,t);if(n!==null){var r=Qt();rr(n,e,t,r)}Wg(e,t)}};fS=function(){return Pe};pS=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}};Em=function(e,t,n){switch(t){case"input":if(xm(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=gd(r);if(!o)throw Error(O(90));Vv(r),xm(r,o)}}}break;case"textarea":Gv(e,n);break;case"select":t=n.value,t!=null&&Fi(e,!!n.multiple,t,!1)}};Qv=Hg;eS=Ta;var B3={usingClientEntryPoint:!1,Events:[Fl,Ai,gd,Zv,Jv,Hg]},ol={findFiberByHostInstance:va,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F3={bundleType:ol.bundleType,version:ol.version,rendererPackageName:ol.rendererPackageName,rendererConfig:ol.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:eo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rS(e),e===null?null:e.stateNode},findFiberByHostInstance:ol.findFiberByHostInstance||R3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(al=__REACT_DEVTOOLS_GLOBAL_HOOK__,!al.isDisabled&&al.supportsFiber))try{fd=al.inject(F3),Sr=al}catch{}var al;vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B3;vn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Kg(t))throw Error(O(200));return O3(e,t,null,n)};vn.createRoot=function(e,t){if(!Kg(e))throw Error(O(299));var n=!1,r="",o=Rk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Vg(e,1,!1,null,null,n,!1,r,o),e[Zr]=t.current,Il(e.nodeType===8?e.parentNode:e),new Gg(t)};vn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=rS(t),e=e===null?null:e.stateNode,e};vn.flushSync=function(e){return Ta(e)};vn.hydrate=function(e,t,n){if(!Ed(t))throw Error(O(200));return Ld(null,e,t,!0,n)};vn.hydrateRoot=function(e,t,n){if(!Kg(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,o=!1,a="",i=Rk;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Ok(t,null,e,1,n??null,o,!1,a,i),e[Zr]=t.current,Il(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Cd(t)};vn.render=function(e,t,n){if(!Ed(t))throw Error(O(200));return Ld(null,e,t,!1,n)};vn.unmountComponentAtNode=function(e){if(!Ed(e))throw Error(O(40));return e._reactRootContainer?(Ta(function(){Ld(null,null,e,!1,function(){e._reactRootContainer=null,e[Zr]=null})}),!0):!1};vn.unstable_batchedUpdates=Hg;vn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ed(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return Ld(e,t,n,!1,r)};vn.version="18.3.1-next-f1338f8080-20240426"});var Na=Yn((JV,Fk)=>{"use strict";function Bk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bk)}catch(e){console.error(e)}}Bk(),Fk.exports=Pk()});var Hk=Yn(jg=>{"use strict";var zk=Na();jg.createRoot=zk.createRoot,jg.hydrateRoot=zk.hydrateRoot;var QV});var F_=Yn((Jte,B_)=>{var ay=!0,R_=!1,P_=!1;B_.exports=function(e,t){t&&(ay=!t.enabled,R_=!!t.label,P_=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var r=n.tokens,o=2;o<r.length;o++)Jz(r,o)&&(Qz(r[o],n.Token),O_(r[o-2],"class","task-list-item"+(ay?"":" enabled")),O_(r[Zz(r,o-2)],"class","contains-task-list"))})};function O_(e,t,n){var r=e.attrIndex(t),o=[t,n];r<0?e.attrPush(o):e.attrs[r]=o}function Zz(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return-1}function Jz(e,t){return oH(e[t])&&aH(e[t-1])&&iH(e[t-2])&&sH(e[t])}function Qz(e,t){if(e.children.unshift(eH(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),R_)if(P_){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(rH(e.content,n,t))}else e.children.unshift(tH(t)),e.children.push(nH(t))}function eH(e,t){var n=new t("html_inline","",0),r=ay?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='<input class="task-list-item-checkbox"'+r+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content='<input class="task-list-item-checkbox" checked=""'+r+'type="checkbox">'),n}function tH(e){var t=new e("html_inline","",0);return t.content="<label>",t}function nH(e){var t=new e("html_inline","",0);return t.content="</label>",t}function rH(e,t,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[{for:t}],r}function oH(e){return e.type==="inline"}function aH(e){return e.type==="paragraph_open"}function iH(e){return e.type==="list_item_open"}function sH(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var xA=Yn((Lre,bA)=>{function aA(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&aA(n)}),e}var eh=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function iA(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ca(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var $U="</span>",QT=e=>!!e.scope,qU=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},gy=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=iA(t)}openNode(t){if(!QT(t))return;let n=qU(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){QT(t)&&(this.buffer+=$U)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},eA=(e={})=>{let t={children:[]};return Object.assign(t,e),t},by=class e{constructor(){this.rootNode=eA(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=eA({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},xy=class extends by{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new gy(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Uu(e){return e?typeof e=="string"?e:e.source:null}function sA(e){return xi("(?=",e,")")}function VU(e){return xi("(?:",e,")*")}function WU(e){return xi("(?:",e,")?")}function xi(...e){return e.map(n=>Uu(n)).join("")}function GU(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function wy(...e){return"("+(GU(e).capture?"":"?:")+e.map(r=>Uu(r)).join("|")+")"}function lA(e){return new RegExp(e.toString()+"|").exec("").length-1}function KU(e,t){let n=e&&e.exec(t);return n&&n.index===0}var jU=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function vy(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,a=Uu(r),i="";for(;a.length>0;){let s=jU.exec(a);if(!s){i+=a;break}i+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?i+="\\"+String(Number(s[1])+o):(i+=s[0],s[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(t)}var XU=/\b\B/,uA="[a-zA-Z]\\w*",Sy="[a-zA-Z_]\\w*",cA="\\b\\d+(\\.\\d+)?",dA="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",fA="\\b(0b[01]+)",YU="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ZU=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=xi(t,/.*\b/,e.binary,/\b.*/)),ca({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},$u={begin:"\\\\[\\s\\S]",relevance:0},JU={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[$u]},QU={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[$u]},e7={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},nh=function(e,t,n={}){let r=ca({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=wy("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:xi(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},t7=nh("//","$"),n7=nh("/\\*","\\*/"),r7=nh("#","$"),o7={scope:"number",begin:cA,relevance:0},a7={scope:"number",begin:dA,relevance:0},i7={scope:"number",begin:fA,relevance:0},s7={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[$u,{begin:/\[/,end:/\]/,relevance:0,contains:[$u]}]},l7={scope:"title",begin:uA,relevance:0},u7={scope:"title",begin:Sy,relevance:0},c7={begin:"\\.\\s*"+Sy,relevance:0},d7=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},Qp=Object.freeze({__proto__:null,APOS_STRING_MODE:JU,BACKSLASH_ESCAPE:$u,BINARY_NUMBER_MODE:i7,BINARY_NUMBER_RE:fA,COMMENT:nh,C_BLOCK_COMMENT_MODE:n7,C_LINE_COMMENT_MODE:t7,C_NUMBER_MODE:a7,C_NUMBER_RE:dA,END_SAME_AS_BEGIN:d7,HASH_COMMENT_MODE:r7,IDENT_RE:uA,MATCH_NOTHING_RE:XU,METHOD_GUARD:c7,NUMBER_MODE:o7,NUMBER_RE:cA,PHRASAL_WORDS_MODE:e7,QUOTE_STRING_MODE:QU,REGEXP_MODE:s7,RE_STARTERS_RE:YU,SHEBANG:ZU,TITLE_MODE:l7,UNDERSCORE_IDENT_RE:Sy,UNDERSCORE_TITLE_MODE:u7});function f7(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function p7(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function h7(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=f7,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function m7(e,t){Array.isArray(e.illegal)&&(e.illegal=wy(...e.illegal))}function g7(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function b7(e,t){e.relevance===void 0&&(e.relevance=1)}var x7=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=xi(n.beforeMatch,sA(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},y7=["of","and","for","in","not","or","if","then","parent","list","value"],w7="keyword";function pA(e,t,n=w7){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(a){Object.assign(r,pA(e[a],t,a))}),r;function o(a,i){t&&(i=i.map(s=>s.toLowerCase())),i.forEach(function(s){let l=s.split("|");r[l[0]]=[a,v7(l[0],l[1])]})}}function v7(e,t){return t?Number(t):S7(e)?0:1}function S7(e){return y7.includes(e.toLowerCase())}var tA={},bi=e=>{console.error(e)},nA=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Fs=(e,t)=>{tA[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),tA[`${e}/${t}`]=!0)},th=new Error;function hA(e,t,{key:n}){let r=0,o=e[n],a={},i={};for(let s=1;s<=t.length;s++)i[s+r]=o[s],a[s+r]=!0,r+=lA(t[s-1]);e[n]=i,e[n]._emit=a,e[n]._multi=!0}function k7(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw bi("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),th;if(typeof e.beginScope!="object"||e.beginScope===null)throw bi("beginScope must be object"),th;hA(e,e.begin,{key:"beginScope"}),e.begin=vy(e.begin,{joinWith:""})}}function C7(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw bi("skip, excludeEnd, returnEnd not compatible with endScope: {}"),th;if(typeof e.endScope!="object"||e.endScope===null)throw bi("endScope must be object"),th;hA(e,e.end,{key:"endScope"}),e.end=vy(e.end,{joinWith:""})}}function E7(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function L7(e){E7(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),k7(e),C7(e)}function I7(e){function t(i,s){return new RegExp(Uu(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=lA(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let s=this.regexes.map(l=>l[1]);this.matcherRe=t(vy(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(s);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];let l=new n;return this.rules.slice(s).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(s);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(i){let s=new r;return i.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),i.terminatorEnd&&s.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&s.addRule(i.illegal,{type:"illegal"}),s}function a(i,s){let l=i;if(i.isCompiled)return l;[p7,g7,L7,x7].forEach(c=>c(i,s)),e.compilerExtensions.forEach(c=>c(i,s)),i.__beforeBegin=null,[h7,m7,b7].forEach(c=>c(i,s)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=pA(i.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),s&&(i.begin||(i.begin=/\B|\b/),l.beginRe=t(l.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(l.endRe=t(l.end)),l.terminatorEnd=Uu(l.end)||"",i.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+s.terminatorEnd)),i.illegal&&(l.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(c){return M7(c==="self"?i:c)})),i.contains.forEach(function(c){a(c,l)}),i.starts&&a(i.starts,s),l.matcher=o(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ca(e.classNameAliases||{}),a(e)}function mA(e){return e?e.endsWithParent||mA(e.starts):!1}function M7(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return ca(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:mA(e)?ca(e,{starts:e.starts?ca(e.starts):null}):Object.isFrozen(e)?ca(e):e}var _7="11.11.1",yy=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},my=iA,rA=ca,oA=Symbol("nomatch"),T7=7,gA=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,a="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]},s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:xy};function l(_){return s.noHighlightRe.test(_)}function u(_){let k=_.className+" ";k+=_.parentNode?_.parentNode.className:"";let L=s.languageDetectRe.exec(k);if(L){let P=E(L[1]);return P||(nA(a.replace("{}",L[1])),nA("Falling back to no-highlight mode for this block.",_)),P?L[1]:"no-highlight"}return k.split(/\s+/).find(P=>l(P)||E(P))}function c(_,k,L){let P="",H="";typeof k=="object"?(P=_,L=k.ignoreIllegals,H=k.language):(Fs("10.7.0","highlight(lang, code, ...args) has been deprecated."),Fs("10.7.0",`Please use highlight(code, options) instead.
9
+ https://github.com/highlightjs/highlight.js/issues/2277`),H=_,P=k),L===void 0&&(L=!0);let X={code:P,language:H};oe("before:highlight",X);let ae=X.result?X.result:d(X.language,X.code,L);return ae.code=X.code,oe("after:highlight",ae),ae}function d(_,k,L,P){let H=Object.create(null);function X(F,M){return F.keywords[M]}function ae(){if(!G.keywords){Oe.addText(ne);return}let F=0;G.keywordPatternRe.lastIndex=0;let M=G.keywordPatternRe.exec(ne),N="";for(;M;){N+=ne.substring(F,M.index);let U=$e.case_insensitive?M[0].toLowerCase():M[0],ue=X(G,U);if(ue){let[ze,mn]=ue;if(Oe.addText(N),N="",H[U]=(H[U]||0)+1,H[U]<=T7&&(Se+=mn),ze.startsWith("_"))N+=M[0];else{let Ks=$e.classNameAliases[ze]||ze;ge(M[0],Ks)}}else N+=M[0];F=G.keywordPatternRe.lastIndex,M=G.keywordPatternRe.exec(ne)}N+=ne.substring(F),Oe.addText(N)}function Ne(){if(ne==="")return;let F=null;if(typeof G.subLanguage=="string"){if(!t[G.subLanguage]){Oe.addText(ne);return}F=d(G.subLanguage,ne,!0,ee[G.subLanguage]),ee[G.subLanguage]=F._top}else F=p(ne,G.subLanguage.length?G.subLanguage:null);G.relevance>0&&(Se+=F.relevance),Oe.__addSublanguage(F._emitter,F.language)}function Le(){G.subLanguage!=null?Ne():ae(),ne=""}function ge(F,M){F!==""&&(Oe.startScope(M),Oe.addText(F),Oe.endScope())}function Te(F,M){let N=1,U=M.length-1;for(;N<=U;){if(!F._emit[N]){N++;continue}let ue=$e.classNameAliases[F[N]]||F[N],ze=M[N];ue?ge(ze,ue):(ne=ze,ae(),ne=""),N++}}function Pt(F,M){return F.scope&&typeof F.scope=="string"&&Oe.openNode($e.classNameAliases[F.scope]||F.scope),F.beginScope&&(F.beginScope._wrap?(ge(ne,$e.classNameAliases[F.beginScope._wrap]||F.beginScope._wrap),ne=""):F.beginScope._multi&&(Te(F.beginScope,M),ne="")),G=Object.create(F,{parent:{value:G}}),G}function st(F,M,N){let U=KU(F.endRe,N);if(U){if(F["on:end"]){let ue=new eh(F);F["on:end"](M,ue),ue.isMatchIgnored&&(U=!1)}if(U){for(;F.endsParent&&F.parent;)F=F.parent;return F}}if(F.endsWithParent)return st(F.parent,M,N)}function z(F){return G.matcher.regexIndex===0?(ne+=F[0],1):(Mn=!0,0)}function Q(F){let M=F[0],N=F.rule,U=new eh(N),ue=[N.__beforeBegin,N["on:begin"]];for(let ze of ue)if(ze&&(ze(F,U),U.isMatchIgnored))return z(M);return N.skip?ne+=M:(N.excludeBegin&&(ne+=M),Le(),!N.returnBegin&&!N.excludeBegin&&(ne=M)),Pt(N,F),N.returnBegin?0:M.length}function Ae(F){let M=F[0],N=k.substring(F.index),U=st(G,F,N);if(!U)return oA;let ue=G;G.endScope&&G.endScope._wrap?(Le(),ge(M,G.endScope._wrap)):G.endScope&&G.endScope._multi?(Le(),Te(G.endScope,F)):ue.skip?ne+=M:(ue.returnEnd||ue.excludeEnd||(ne+=M),Le(),ue.excludeEnd&&(ne=M));do G.scope&&Oe.closeNode(),!G.skip&&!G.subLanguage&&(Se+=G.relevance),G=G.parent;while(G!==U.parent);return U.starts&&Pt(U.starts,F),ue.returnEnd?0:M.length}function De(){let F=[];for(let M=G;M!==$e;M=M.parent)M.scope&&F.unshift(M.scope);F.forEach(M=>Oe.openNode(M))}let Fe={};function je(F,M){let N=M&&M[0];if(ne+=F,N==null)return Le(),0;if(Fe.type==="begin"&&M.type==="end"&&Fe.index===M.index&&N===""){if(ne+=k.slice(M.index,M.index+1),!o){let U=new Error(`0 width match regex (${_})`);throw U.languageName=_,U.badRule=Fe.rule,U}return 1}if(Fe=M,M.type==="begin")return Q(M);if(M.type==="illegal"&&!L){let U=new Error('Illegal lexeme "'+N+'" for mode "'+(G.scope||"<unnamed>")+'"');throw U.mode=G,U}else if(M.type==="end"){let U=Ae(M);if(U!==oA)return U}if(M.type==="illegal"&&N==="")return ne+=`
10
+ `,1;if(Mt>1e5&&Mt>M.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ne+=N,N.length}let $e=E(_);if(!$e)throw bi(a.replace("{}",_)),new Error('Unknown language: "'+_+'"');let le=I7($e),yt="",G=P||le,ee={},Oe=new s.__emitter(s);De();let ne="",Se=0,lt=0,Mt=0,Mn=!1;try{if($e.__emitTokens)$e.__emitTokens(k,Oe);else{for(G.matcher.considerAll();;){Mt++,Mn?Mn=!1:G.matcher.considerAll(),G.matcher.lastIndex=lt;let F=G.matcher.exec(k);if(!F)break;let M=k.substring(lt,F.index),N=je(M,F);lt=F.index+N}je(k.substring(lt))}return Oe.finalize(),yt=Oe.toHTML(),{language:_,value:yt,relevance:Se,illegal:!1,_emitter:Oe,_top:G}}catch(F){if(F.message&&F.message.includes("Illegal"))return{language:_,value:my(k),illegal:!0,relevance:0,_illegalBy:{message:F.message,index:lt,context:k.slice(lt-100,lt+100),mode:F.mode,resultSoFar:yt},_emitter:Oe};if(o)return{language:_,value:my(k),illegal:!1,relevance:0,errorRaised:F,_emitter:Oe,_top:G};throw F}}function f(_){let k={value:my(_),illegal:!1,relevance:0,_top:i,_emitter:new s.__emitter(s)};return k._emitter.addText(_),k}function p(_,k){k=k||s.languages||Object.keys(t);let L=f(_),P=k.filter(E).filter(I).map(Le=>d(Le,_,!1));P.unshift(L);let H=P.sort((Le,ge)=>{if(Le.relevance!==ge.relevance)return ge.relevance-Le.relevance;if(Le.language&&ge.language){if(E(Le.language).supersetOf===ge.language)return 1;if(E(ge.language).supersetOf===Le.language)return-1}return 0}),[X,ae]=H,Ne=X;return Ne.secondBest=ae,Ne}function h(_,k,L){let P=k&&n[k]||L;_.classList.add("hljs"),_.classList.add(`language-${P}`)}function m(_){let k=null,L=u(_);if(l(L))return;if(oe("before:highlightElement",{el:_,language:L}),_.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",_);return}if(_.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(_)),s.throwUnescapedHTML))throw new yy("One of your code blocks includes unescaped HTML.",_.innerHTML);k=_;let P=k.textContent,H=L?c(P,{language:L,ignoreIllegals:!0}):p(P);_.innerHTML=H.value,_.dataset.highlighted="yes",h(_,L,H.language),_.result={language:H.language,re:H.relevance,relevance:H.relevance},H.secondBest&&(_.secondBest={language:H.secondBest.language,relevance:H.secondBest.relevance}),oe("after:highlightElement",{el:_,result:H,text:P})}function b(_){s=rA(s,_)}let g=()=>{x(),Fs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){x(),Fs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function x(){function _(){x()}if(document.readyState==="loading"){w||window.addEventListener("DOMContentLoaded",_,!1),w=!0;return}document.querySelectorAll(s.cssSelector).forEach(m)}function S(_,k){let L=null;try{L=k(e)}catch(P){if(bi("Language definition for '{}' could not be registered.".replace("{}",_)),o)bi(P);else throw P;L=i}L.name||(L.name=_),t[_]=L,L.rawDefinition=k.bind(null,e),L.aliases&&T(L.aliases,{languageName:_})}function v(_){delete t[_];for(let k of Object.keys(n))n[k]===_&&delete n[k]}function C(){return Object.keys(t)}function E(_){return _=(_||"").toLowerCase(),t[_]||t[n[_]]}function T(_,{languageName:k}){typeof _=="string"&&(_=[_]),_.forEach(L=>{n[L.toLowerCase()]=k})}function I(_){let k=E(_);return k&&!k.disableAutodetect}function W(_){_["before:highlightBlock"]&&!_["before:highlightElement"]&&(_["before:highlightElement"]=k=>{_["before:highlightBlock"](Object.assign({block:k.el},k))}),_["after:highlightBlock"]&&!_["after:highlightElement"]&&(_["after:highlightElement"]=k=>{_["after:highlightBlock"](Object.assign({block:k.el},k))})}function te(_){W(_),r.push(_)}function fe(_){let k=r.indexOf(_);k!==-1&&r.splice(k,1)}function oe(_,k){let L=_;r.forEach(function(P){P[L]&&P[L](k)})}function Z(_){return Fs("10.7.0","highlightBlock will be removed entirely in v12.0"),Fs("10.7.0","Please use highlightElement now."),m(_)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:x,highlightElement:m,highlightBlock:Z,configure:b,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:S,unregisterLanguage:v,listLanguages:C,getLanguage:E,registerAliases:T,autoDetection:I,inherit:rA,addPlugin:te,removePlugin:fe}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=_7,e.regex={concat:xi,lookahead:sA,either:wy,optional:WU,anyNumberOfTimes:VU};for(let _ in Qp)typeof Qp[_]=="object"&&aA(Qp[_]);return Object.assign(e,Qp),e},zs=gA({});zs.newInstance=()=>gA({});bA.exports=zs;zs.HighlightJS=zs;zs.default=zs});var VD=Yn(yh=>{"use strict";var Yq=Bt(),Zq=Symbol.for("react.element"),Jq=Symbol.for("react.fragment"),Qq=Object.prototype.hasOwnProperty,eV=Yq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tV={key:!0,ref:!0,__self:!0,__source:!0};function qD(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Qq.call(t,r)&&!tV.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Zq,type:e,key:a,ref:i,props:o,_owner:eV.current}}yh.Fragment=Jq;yh.jsx=qD;yh.jsxs=qD});var sn=Yn((joe,WD)=>{"use strict";WD.exports=VD()});var Lh=Ee(Bt(),1),pN=Ee(Hk(),1);var re=Ee(Bt(),1);var _e=Ee(Bt(),1);function qt(e){this.content=e}qt.prototype={constructor:qt,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),a=r.content.slice();return o==-1?a.push(n||e,t):(a[o+1]=t,n&&(a[o]=n)),new qt(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new qt(n)},addToStart:function(e,t){return new qt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new qt(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),a=r.find(e);return o.splice(a==-1?o.length:a,0,t,n),new qt(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=qt.from(e),e.size?new qt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=qt.from(e),e.size?new qt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=qt.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};qt.from=function(e){if(e instanceof qt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new qt(t)};var Xg=qt;function Yk(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o==a){n+=o.nodeSize;continue}if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let i=0;o.text[i]==a.text[i];i++)n++;return n}if(o.content.size||a.content.size){let i=Yk(o.content,a.content,n+1);if(i!=null)return i}n+=o.nodeSize}}function Zk(e,t,n,r){for(let o=e.childCount,a=t.childCount;;){if(o==0||a==0)return o==a?null:{a:n,b:r};let i=e.child(--o),s=t.child(--a),l=i.nodeSize;if(i==s){n-=l,r-=l;continue}if(!i.sameMarkup(s))return{a:n,b:r};if(i.isText&&i.text!=s.text){let u=0,c=Math.min(i.text.length,s.text.length);for(;u<c&&i.text[i.text.length-u-1]==s.text[s.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(i.content.size||s.content.size){let u=Zk(i.content,s.content,n-1,r-1);if(u)return u}n-=l,r-=l}}var D=class e{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,o=0,a){for(let i=0,s=0;s<n;i++){let l=this.content[i],u=s+l.nodeSize;if(u>t&&r(l,o+s,a||null,i)!==!1&&l.content.size){let c=s+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,o+c)}s=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let a="",i=!0;return this.nodesBetween(t,n,(s,l)=>{let u=s.isText?s.text.slice(Math.max(t,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&r&&(i?i=!1:a+=r),a+=u},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)o.push(t.content[a]);return new e(o,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],o=0;if(n>t)for(let a=0,i=0;i<n;a++){let s=this.content[a],l=i+s.nodeSize;l>t&&((i<t||l>n)&&(s.isText?s=s.cut(Math.max(0,t-i),Math.min(s.text.length,n-i)):s=s.cut(Math.max(0,t-i-1),Math.min(s.content.size,n-i-1))),r.push(s),o+=s.nodeSize),i=l}return new e(r,o)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];t(o,r,n),r+=o.nodeSize}}findDiffStart(t,n=0){return Yk(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return Zk(this,t,n,r)}findIndex(t){if(t==0)return Id(0,t);if(t==this.size)return Id(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),a=r+o.nodeSize;if(a>=t)return a==t?Id(n+1,a):Id(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let o=0;o<t.length;o++){let a=t[o];r+=a.nodeSize,o&&a.isText&&t[o-1].sameMarkup(a)?(n||(n=t.slice(0,o)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};D.empty=new D([],0);var Yg={index:0,offset:0};function Id(e,t){return Yg.index=e,Yg.offset=t,Yg}function _d(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!_d(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!_d(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}var ke=class e{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let o=0;o<t.length;o++){let a=t[o];if(this.eq(a))return t;if(this.type.excludes(a.type))n||(n=t.slice(0,o));else{if(a.type.excludes(this.type))return t;!r&&a.type.rank>this.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&_d(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};ke.none=[];var Pa=class extends Error{},B=class e{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Qk(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Jk(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(D.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}};B.empty=new B(D.empty,0,0);function Jk(e,t,n){let{index:r,offset:o}=e.findIndex(t),a=e.maybeChild(r),{index:i,offset:s}=e.findIndex(n);if(o==t||a.isText){if(s!=n&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(Jk(a.content,t-o-1,n-o-1)))}function Qk(e,t,n,r){let{index:o,offset:a}=e.findIndex(t),i=e.maybeChild(o);if(a==t||i.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=Qk(i.content,t-a-1,n,i);return s&&e.replaceChild(o,i.copy(s))}function z3(e,t,n){if(n.openStart>e.depth)throw new Pa("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Pa("Inconsistent open depths");return eC(e,t,n,0)}function eC(e,t,n,r){let o=e.index(r),a=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let i=eC(e,t,n,r+1);return a.copy(a.content.replaceChild(o,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let i=e.parent,s=i.content;return Ra(i,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:i,end:s}=H3(n,e);return Ra(a,nC(e,i,s,t,r))}else return Ra(a,Td(e,t,r))}function tC(e,t){if(!t.type.compatibleContent(e.type))throw new Pa("Cannot join "+t.type.name+" onto "+e.type.name)}function Jg(e,t,n){let r=e.node(n);return tC(r,t.node(n)),r}function Oa(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Hl(e,t,n,r){let o=(t||e).node(n),a=0,i=t?t.index(n):o.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Oa(e.nodeAfter,r),a++));for(let s=a;s<i;s++)Oa(o.child(s),r);t&&t.depth==n&&t.textOffset&&Oa(t.nodeBefore,r)}function Ra(e,t){return e.type.checkContent(t),e.copy(t)}function nC(e,t,n,r,o){let a=e.depth>o&&Jg(e,t,o+1),i=r.depth>o&&Jg(n,r,o+1),s=[];return Hl(null,e,o,s),a&&i&&t.index(o)==n.index(o)?(tC(a,i),Oa(Ra(a,nC(e,t,n,r,o+1)),s)):(a&&Oa(Ra(a,Td(e,t,o+1)),s),Hl(t,n,o,s),i&&Oa(Ra(i,Td(n,r,o+1)),s)),Hl(r,null,o,s),new D(s)}function Td(e,t,n){let r=[];if(Hl(null,e,n,r),e.depth>n){let o=Jg(e,t,n+1);Oa(Ra(o,Td(e,t,n+1)),r)}return Hl(t,null,n,r),new D(r)}function H3(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)o=t.node(a).copy(D.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}var Ad=class e{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let a=0;a<t;a++)o+=r.child(a).nodeSize;return o}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ke.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),o=t.maybeChild(n);if(!r){let s=r;r=o,o=s}let a=r.marks;for(var i=0;i<a.length;i++)a[i].type.spec.inclusive===!1&&(!o||!a[i].isInSet(o.marks))&&(a=a[i--].removeFromSet(a));return a}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=t.parent.maybeChild(t.index());for(var a=0;a<r.length;a++)r[a].type.spec.inclusive===!1&&(!o||!r[a].isInSet(o.marks))&&(r=r[a--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ba(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,a=n;for(let i=t;;){let{index:s,offset:l}=i.content.findIndex(a),u=a-l;if(r.push(i,s,o+l),!u||(i=i.child(s),i.isText))break;a=u-1,o+=l+1}return new e(n,r,a)}static resolveCached(t,n){let r=Uk.get(t);if(r)for(let a=0;a<r.elts.length;a++){let i=r.elts[a];if(i.pos==n)return i}else Uk.set(t,r=new Qg);let o=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%U3,o}},Qg=class{constructor(){this.elts=[],this.i=0}},U3=12,Uk=new WeakMap,Ba=class{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},$3=Object.create(null),Bn=class e{constructor(t,n,r,o=ke.none){this.type=t,this.attrs=n,this.marks=o,this.content=r||D.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,o=0){this.content.nodesBetween(t,n,r,o,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,o){return this.content.textBetween(t,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&_d(this.attrs,n||t.defaultAttrs||$3)&&ke.sameSet(this.marks,r||ke.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return B.empty;let o=this.resolve(t),a=this.resolve(n),i=r?0:o.sharedDepth(n),s=o.start(i),u=o.node(i).content.cut(o.pos-s,a.pos-s);return new B(u,o.depth-i,a.depth-i)}replace(t,n,r){return z3(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(o==t||n.isText)return n;t-=o+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(t){return Ad.resolveCached(this,t)}resolveNoCache(t){return Ad.resolve(this,t)}rangeHasMark(t,n,r){let o=!1;return n>t&&this.nodesBetween(t,n,a=>(r.isInSet(a.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),rC(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=D.empty,o=0,a=r.childCount){let i=this.contentMatchAt(t).matchFragment(r,o,a),s=i&&i.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;l<a;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let a=this.contentMatchAt(t).matchType(r),i=a&&a.matchFragment(this.content,n);return i?i.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ke.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!ke.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=D.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,o,r);return a.type.checkAttrs(a.attrs),a}};Bn.prototype.text=void 0;var e0=class e extends Bn{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):rC(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function rC(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Fa=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new t0(t,n);if(r.next==null)return e.empty;let o=oC(r);r.next&&r.err("Unexpected trailing text");let a=X3(j3(o));return Y3(a,r),a}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let o=this;for(let a=n;o&&a<r;a++)o=o.matchType(t.child(a).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let o=[this];function a(i,s){let l=i.matchFragment(t,r);if(l&&(!n||l.validEnd))return D.from(s.map(u=>u.createAndFill()));for(let u=0;u<i.next.length;u++){let{type:c,next:d}=i.next[u];if(!(c.isText||c.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=a(d,s.concat(c));if(f)return f}}return null}return a(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),a=o.match;if(a.matchType(t)){let i=[];for(let s=o;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<a.next.length;i++){let{type:s,next:l}=a.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o<r.next.length;o++)t.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),t.map((r,o)=>{let a=o+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)a+=(i?", ":"")+r.next[i].type.name+"->"+t.indexOf(r.next[i].next);return a}).join(`
11
+ `)}};Fa.empty=new Fa(!0);var t0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function oC(e){let t=[];do t.push(q3(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function q3(e){let t=[];do t.push(V3(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function V3(e){let t=K3(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=W3(e,t);else break;return t}function $k(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function W3(e,t){let n=$k(e),r=n;return e.eat(",")&&(e.next!="}"?r=$k(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function G3(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let a in n){let i=n[a];i.isInGroup(t)&&o.push(i)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function K3(e){if(e.eat("(")){let t=oC(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=G3(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function j3(e){let t=[[]];return o(a(e,0),n()),t;function n(){return t.push([])-1}function r(i,s,l){let u={term:l,to:s};return t[i].push(u),u}function o(i,s){i.forEach(l=>l.to=s)}function a(i,s){if(i.type=="choice")return i.exprs.reduce((l,u)=>l.concat(a(u,s)),[]);if(i.type=="seq")for(let l=0;;l++){let u=a(i.exprs[l],s);if(l==i.exprs.length-1)return u;o(u,s=n())}else if(i.type=="star"){let l=n();return r(s,l),o(a(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return o(a(i.expr,s),l),o(a(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(s)].concat(a(i.expr,s));if(i.type=="range"){let l=s;for(let u=0;u<i.min;u++){let c=n();o(a(i.expr,l),c),l=c}if(i.max==-1)o(a(i.expr,l),l);else for(let u=i.min;u<i.max;u++){let c=n();r(l,c),o(a(i.expr,l),c),l=c}return[r(l)]}else{if(i.type=="name")return[r(s,void 0,i.value)];throw new Error("Unknown expr type")}}}}function aC(e,t){return t-e}function qk(e,t){let n=[];return r(t),n.sort(aC);function r(o){let a=e[o];if(a.length==1&&!a[0].term)return r(a[0].to);n.push(o);for(let i=0;i<a.length;i++){let{term:s,to:l}=a[i];!s&&n.indexOf(l)==-1&&r(l)}}}function X3(e){let t=Object.create(null);return n(qk(e,0));function n(r){let o=[];r.forEach(i=>{e[i].forEach(({term:s,to:l})=>{if(!s)return;let u;for(let c=0;c<o.length;c++)o[c][0]==s&&(u=o[c][1]);qk(e,l).forEach(c=>{u||o.push([s,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=t[r.join(",")]=new Fa(r.indexOf(e.length-1)>-1);for(let i=0;i<o.length;i++){let s=o[i][1].sort(aC);a.next.push({type:o[i][0],next:t[s.join(",")]||n(s)})}return a}}function Y3(e,t){for(let n=0,r=[e];n<r.length;n++){let o=r[n],a=!o.validEnd,i=[];for(let s=0;s<o.next.length;s++){let{type:l,next:u}=o.next[s];i.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),r.indexOf(u)==-1&&r.push(u)}a&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function iC(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function sC(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(o===void 0){let a=e[r];if(a.hasDefault)o=a.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function lC(e,t,n,r){for(let o in t)if(!(o in e))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in e){let a=e[o];a.validate&&a.validate(t[o])}}function uC(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new n0(e,r,t[r]);return n}var Dd=class e{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=uC(t,r.attrs),this.defaultAttrs=iC(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Fa.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:sC(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bn(this,this.computeAttrs(t),D.from(n),ke.setFrom(r))}createChecked(t=null,n,r){return n=D.from(n),this.checkContent(n),new Bn(this,this.computeAttrs(t),n,ke.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=D.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let o=this.contentMatch.matchFragment(n),a=o&&o.fillBefore(D.empty,!0);return a?new Bn(this,t,n.append(a),ke.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){lC(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:ke.none:t}static compile(t,n){let r=Object.create(null);t.forEach((a,i)=>r[a]=new e(a,n,i));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let a in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Z3(e,t,n){let r=n.split("|");return o=>{let a=o===null?"null":typeof o;if(r.indexOf(a)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${a}`)}}var n0=class{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Z3(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},$l=class e{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=uC(t,o.attrs),this.excluded=null;let a=iC(this.attrs);this.instance=a?new ke(this,a):null}create(t=null){return!t&&this.instance?this.instance:new ke(this,sC(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((a,i)=>r[a]=new e(a,o++,n,i)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){lC(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}},za=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Xg.from(t.nodes),n.marks=Xg.from(t.marks||{}),this.nodes=Dd.compile(this.spec.nodes,this),this.marks=$l.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let a=this.nodes[o],i=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=r[i]||(r[i]=Fa.parse(i,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?Vk(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let o in this.marks){let a=this.marks[o],i=a.spec.excludes;a.excluded=i==null?[a]:i==""?[]:Vk(this,i.split(" "))}this.nodeFromJSON=o=>Bn.fromJSON(this,o),this.markFromJSON=o=>ke.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Dd){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new e0(r,r.defaultAttrs,t,ke.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Vk(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],a=e.marks[o],i=a;if(a)n.push(a);else for(let s in e.marks){let l=e.marks[s];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function J3(e){return e.tag!=null}function Q3(e){return e.style!=null}var ar=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(J3(o))this.tags.push(o);else if(Q3(o)){let a=/[^=]*/.exec(o.style)[0];r.indexOf(a)<0&&r.push(a),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let a=t.nodes[o.node];return a.contentMatch.matchType(a)})}parse(t,n={}){let r=new Nd(this,n,!1);return r.addAll(t,ke.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Nd(this,n,!0);return r.addAll(t,ke.none,n.from,n.to),B.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let a=this.tags[o];if(nR(t,a.tag)&&(a.namespace===void 0||t.namespaceURI==a.namespace)&&(!a.context||n.matchesContext(a.context))){if(a.getAttrs){let i=a.getAttrs(t);if(i===!1)continue;a.attrs=i||void 0}return a}}}matchStyle(t,n,r,o){for(let a=o?this.styles.indexOf(o)+1:0;a<this.styles.length;a++){let i=this.styles[a],s=i.style;if(!(s.indexOf(t)!=0||i.context&&!r.matchesContext(i.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(t){let n=[];function r(o){let a=o.priority==null?50:o.priority,i=0;for(;i<n.length;i++){let s=n[i];if((s.priority==null?50:s.priority)<a)break}n.splice(i,0,o)}for(let o in t.marks){let a=t.marks[o].spec.parseDOM;a&&a.forEach(i=>{r(i=Gk(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in t.nodes){let a=t.nodes[o].spec.parseDOM;a&&a.forEach(i=>{r(i=Gk(i)),i.node||i.ignore||i.mark||(i.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},cC={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},eR={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},dC={ol:!0,ul:!0},ql=1,r0=2,Ul=4;function Wk(e,t,n){return t!=null?(t?ql:0)|(t==="full"?r0:0):e&&e.whitespace=="pre"?ql|r0:n&~Ul}var Qi=class{constructor(t,n,r,o,a,i){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=ke.none,this.match=a||(i&Ul?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(D.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ql)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let a=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-o[0].length))}}let n=D.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(D.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!cC.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Nd=class{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,a,i=Wk(null,n.preserveWhitespace,0)|(r?Ul:0);o?a=new Qi(o.type,o.attrs,ke.none,!0,n.topMatch||o.type.contentMatch,i):r?a=new Qi(null,null,ke.none,!0,null,i):a=new Qi(t.schema.topNodeType,null,ke.none,!0,null,i),this.nodes=[a],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,a=o.options&r0?"full":this.localPreserveWS||(o.options&ql)>0;if(a==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(a)a!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
12
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let i=o.content[o.content.length-1],s=t.previousSibling;(!i||s&&s.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let o=this.localPreserveWS,a=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let i=t.nodeName.toLowerCase(),s;dC.hasOwnProperty(i)&&this.parser.normalizeLists&&tR(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));e:if(l?l.ignore:eR.hasOwnProperty(i))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,c=this.needsBlock;if(cC.hasOwnProperty(i))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),u=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),u&&this.sync(a),this.needsBlock=c}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=o}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
13
+ `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let a=this.parser.matchedStyles[o],i=r.getPropertyValue(a);if(i)for(let s=void 0;;){let l=this.parser.matchStyle(a,i,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(t,n,r,o){let a,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(i,n.attrs||null,r,n.preserveWhitespace);l&&(a=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}a&&this.sync(s)&&this.open--}addAll(t,n,r,o){let a=r||0;for(let i=r?t.childNodes[r]:t.firstChild,s=o==null?null:t.childNodes[o];i!=s;i=i.nextSibling,++a)this.findAtPoint(t,a),this.addDOM(i,n);this.findAtPoint(t,a)}findPlace(t,n,r){let o,a;for(let i=this.open,s=0;i>=0;i--){let l=this.nodes[i],u=l.findWrapping(t);if(u&&(!o||o.length>u.length+s)&&(o=u,a=l,!u.length))break;if(l.solid){if(r)break;s+=2}}if(!o)return null;this.sync(a);for(let i=0;i<o.length;i++)n=this.enterInner(o[i],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(n=this.enterInner(a,null,n))}let o=this.findPlace(t,n,r);if(o){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(t.type));let i=ke.none;for(let s of o.concat(t.marks))(a.type?a.type.allowsMarkType(s.type):Kk(s.type,t.type))&&(i=s.addToSet(i));return a.content.push(t.mark(i)),!0}return!1}enter(t,n,r,o){let a=this.findPlace(t.create(n),r,!1);return a&&(a=this.enterInner(t,n,r,!0,o)),a}enterInner(t,n,r,o=!1,a){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(t);let s=Wk(t,a,i.options);i.options&Ul&&i.content.length==0&&(s|=Ul);let l=ke.none;return r=r.filter(u=>(i.type?i.type.allowsMarkType(u.type):Kk(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Qi(t,n,l,o,null,s)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ql)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&t.nodeType==1&&t.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),a=-(r?r.depth+1:0)+(o?0:1),i=(s,l)=>{for(;s>=0;s--){let u=n[s];if(u==""){if(s==n.length-1||s==0)continue;for(;l>=a;l--)if(i(s-1,l))return!0;return!1}else{let c=l>0||l==0&&o?this.nodes[l].type:r&&l>=a?r.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function tR(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&dC.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function nR(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Gk(e){let t={};for(let n in e)t[n]=e[n];return t}function Kk(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let a=[],i=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:u,next:c}=s.edge(l);if(u==t||a.indexOf(c)<0&&i(c))return!0}};if(i(o.contentMatch))return!0}}var to=class e{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Zg(n).createDocumentFragment());let o=r,a=[];return t.forEach(i=>{if(a.length||i.marks.length){let s=0,l=0;for(;s<a.length&&l<i.marks.length;){let u=i.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(a[s][0])||u.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)o=a.pop()[1];for(;l<i.marks.length;){let u=i.marks[l++],c=this.serializeMark(u,i.isInline,n);c&&(a.push([u,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(this.serializeNodeInner(i,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:o}=Md(Zg(n),this.nodes[t.type.name](t),null,t.attrs);if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,o)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let o=t.marks.length-1;o>=0;o--){let a=this.serializeMark(t.marks[o],t.isInline,n);a&&((a.contentDOM||a.dom).appendChild(r),r=a.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Md(Zg(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Md(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=jk(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return jk(t.marks)}};function jk(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Zg(e){return e.document||window.document}var Xk=new WeakMap;function rR(e){let t=Xk.get(e);return t===void 0&&Xk.set(e,t=oR(e)),t}function oR(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(e),t}function Md(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],a;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(a=rR(r))&&a.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s,l=n?e.createElementNS(n,o):e.createElement(o),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=Md(e,f,n,r);if(l.appendChild(p),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:l,contentDOM:s}}var hC=65535,mC=Math.pow(2,16);function aR(e,t){return e+t*mC}function fC(e){return e&hC}function iR(e){return(e-(e&hC))/mC}var gC=1,bC=2,Od=4,xC=8,Gl=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&xC)>0}get deletedBefore(){return(this.delInfo&(gC|Od))>0}get deletedAfter(){return(this.delInfo&(bC|Od))>0}get deletedAcross(){return(this.delInfo&Od)>0}},no=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,r=fC(t);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+iR(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let o=0,a=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?o:0);if(l>t)break;let u=this.ranges[s+a],c=this.ranges[s+i],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+o+(f<0?0:c);if(r)return p;let h=t==(n<0?l:d)?null:aR(s/3,t-l),m=t==l?bC:t==d?gC:Od;return(n<0?t!=l:t!=d)&&(m|=xC),new Gl(p,m,h)}o+=c-u}return r?t+o:new Gl(t+o,0,null)}touches(t,n){let r=0,o=fC(n),a=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>t)break;let u=this.ranges[s+a],c=l+u;if(t<=c&&s==o*3)return!0;r+=this.ranges[s+i]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,a=0;o<this.ranges.length;o+=3){let i=this.ranges[o],s=i-(this.inverted?a:0),l=i+(this.inverted?0:a),u=this.ranges[o+n],c=this.ranges[o+r];t(s,s+u,l,l+c),a+=c-u}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};no.empty=new no([]);var Kl=class e{constructor(t,n,r=0,o=t?t.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let o=t.getMirror(n);this.appendMap(t._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let o=0;for(let a=this.from;a<this.to;a++){let i=this._maps[a],s=i.mapResult(t,n);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,t=this._maps[l].recover(s.recover);continue}}o|=s.delInfo,t=s.pos}return r?t:new Gl(t,o,null)}},o0=Object.create(null),St=class{getMap(){return no.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=o0[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in o0)throw new RangeError("Duplicate use of step JSON ID "+t);return o0[t]=n,n.prototype.jsonID=t,n}},Dt=class e{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(a){if(a instanceof Pa)return e.fail(a.message);throw a}}};function u0(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let a=e.child(o);a.content.size&&(a=a.copy(u0(a.content,t,a))),a.isInline&&(a=t(a,n,o)),r.push(a)}return D.fromArray(r)}var jl=class e extends St{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),a=new B(u0(n.content,(i,s)=>!i.isAtom||!s.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),n.openStart,n.openEnd);return Dt.fromReplace(t,this.from,this.to,a)}invert(){return new Ha(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};St.jsonID("addMark",jl);var Ha=class e extends St{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new B(u0(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return Dt.fromReplace(t,this.from,this.to,r)}invert(){return new jl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};St.jsonID("removeMark",Ha);var Xl=class e extends St{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Dt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Dt.fromReplace(t,this.pos,this.pos+1,new B(D.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new e(this.pos,n.marks[o]);return new e(this.pos,this.mark)}}return new es(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};St.jsonID("addNodeMark",Xl);var es=class e extends St{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Dt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Dt.fromReplace(t,this.pos,this.pos+1,new B(D.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Xl(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};St.jsonID("removeNodeMark",es);var Vt=class e extends St{constructor(t,n,r,o=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=o}apply(t){return this.structure&&s0(t,this.from,this.to)?Dt.fail("Structure replace would overwrite content"):Dt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new no([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,B.fromJSON(t,n.slice),!!n.structure)}};St.jsonID("replace",Vt);var ct=class e extends St{constructor(t,n,r,o,a,i,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=a,this.insert=i,this.structure=s}apply(t){if(this.structure&&(s0(t,this.from,this.gapFrom)||s0(t,this.gapTo,this.to)))return Dt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Dt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Dt.fromReplace(t,this.from,this.to,r):Dt.fail("Content does not fit in gap")}getMap(){return new no([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||a>r.pos?null:new e(n.pos,r.pos,o,a,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};St.jsonID("replaceAround",ct);function s0(e,t,n){let r=e.resolve(t),o=n-t,a=r.depth;for(;o>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,o--;if(o>0){let i=r.node(a).maybeChild(r.indexAfter(a));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function sR(e,t,n,r){let o=[],a=[],i,s;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(i&&i.to==f&&i.mark.eq(d[m])?i.to=p:o.push(i=new Ha(f,p,d[m])));s&&s.to==f?s.to=p:a.push(s=new jl(f,p,r))}}),o.forEach(l=>e.step(l)),a.forEach(l=>e.step(l))}function lR(e,t,n,r){let o=[],a=0;e.doc.nodesBetween(t,n,(i,s)=>{if(!i.isInline)return;a++;let l=null;if(r instanceof $l){let u=i.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let u=Math.min(s+i.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let p=0;p<o.length;p++){let h=o[p];h.step==a-1&&d.eq(o[p].style)&&(f=h)}f?(f.to=u,f.step=a):o.push({style:d,from:Math.max(s,t),to:u,step:a})}}}),o.forEach(i=>e.step(new Ha(i.from,i.to,i.style)))}function c0(e,t,n,r=n.contentMatch,o=!0){let a=e.doc.nodeAt(t),i=[],s=t+1;for(let l=0;l<a.childCount;l++){let u=a.child(l),c=s+u.nodeSize,d=r.matchType(u.type);if(!d)i.push(new Vt(s,c,B.empty));else{r=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new Ha(s,c,u.marks[f]));if(o&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new B(D.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),i.push(new Vt(s+f.index,s+f.index+f[0].length,h))}}s=c}if(!r.validEnd){let l=r.fillBefore(D.empty,!0);e.replace(s,s,new B(l,0,0))}for(let l=i.length-1;l>=0;l--)e.step(i[l])}function uR(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ro(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),a=e.$from.index(r),i=e.$to.indexAfter(r);if(r<e.depth&&o.canReplace(a,i,n))return r;if(r==0||o.type.spec.isolating||!uR(o,a,i))break}return null}function cR(e,t,n){let{$from:r,$to:o,depth:a}=t,i=r.before(a+1),s=o.after(a+1),l=i,u=s,c=D.empty,d=0;for(let h=a,m=!1;h>n;h--)m||r.index(h)>0?(m=!0,c=D.from(r.node(h).copy(c)),d++):l--;let f=D.empty,p=0;for(let h=a,m=!1;h>n;h--)m||o.after(h+1)<o.end(h)?(m=!0,f=D.from(o.node(h).copy(f)),p++):u++;e.step(new ct(l,u,i,s,new B(c.append(f),d,p),c.size-d,!0))}function ns(e,t,n=null,r=e){let o=dR(e,t),a=o&&fR(r,t);return a?o.map(pC).concat({type:t,attrs:n}).concat(a.map(pC)):null}function pC(e){return{type:e,attrs:null}}function dR(e,t){let{parent:n,startIndex:r,endIndex:o}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let i=a.length?a[0]:t;return n.canReplaceWith(r,o,i)?a:null}function fR(e,t){let{parent:n,startIndex:r,endIndex:o}=e,a=n.child(r),i=t.contentMatch.findWrapping(a.type);if(!i)return null;let l=(i.length?i[i.length-1]:t).contentMatch;for(let u=r;l&&u<o;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:i}function pR(e,t,n){let r=D.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let s=n[i].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=D.from(n[i].type.create(n[i].attrs,r))}let o=t.start,a=t.end;e.step(new ct(o,a,o,a,new B(r,0,0),n.length,!0))}function hR(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,(i,s)=>{let l=typeof o=="function"?o(i):o;if(i.isTextblock&&!i.hasMarkup(r,l)&&mR(e.doc,e.mapping.slice(a).map(s),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&wC(e,i,s,a),c0(e,e.mapping.slice(a).map(s,1),r,void 0,u===null);let c=e.mapping.slice(a),d=c.map(s,1),f=c.map(s+i.nodeSize,1);return e.step(new ct(d,f,d+1,f-1,new B(D.from(r.create(l,null,i.marks)),0,0),1,!0)),u===!0&&yC(e,i,s,a),!1}})}function yC(e,t,n,r){t.forEach((o,a)=>{if(o.isText){let i,s=/\r?\n|\r/g;for(;i=s.exec(o.text);){let l=e.mapping.slice(r).map(n+1+a+i.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function wC(e,t,n,r){t.forEach((o,a)=>{if(o.type==o.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
14
+ `))}})}function mR(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function gR(e,t,n,r,o){let a=e.doc.nodeAt(t);if(!a)throw new RangeError("No node at given position");n||(n=a.type);let i=n.create(r,null,o||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,i);if(!n.validContent(a.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new ct(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new B(D.from(i),0,0),1,!0))}function Fn(e,t,n=1,r){let o=e.resolve(t),a=o.depth-n,i=r&&r[r.length-1]||o.parent;if(a<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>a;u--,c--){let d=o.node(u),f=o.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let s=o.indexAfter(a),l=r&&r[0];return o.node(a).canReplaceWith(s,s,l?l.type:o.node(a+1).type)}function bR(e,t,n=1,r){let o=e.doc.resolve(t),a=D.empty,i=D.empty;for(let s=o.depth,l=o.depth-n,u=n-1;s>l;s--,u--){a=D.from(o.node(s).copy(a));let c=r&&r[u];i=D.from(c?c.type.create(c.attrs,i):o.node(s).copy(i))}e.step(new Vt(t,t,new B(a.append(i),n,n),!0))}function ir(e,t){let n=e.resolve(t),r=n.index();return vC(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function xR(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o<t.childCount;o++){let a=t.child(o),i=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(i),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function vC(e,t){return!!(e&&t&&!e.isLeaf&&xR(e,t))}function rs(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let a,i,s=r.index(o);if(o==r.depth?(a=r.nodeBefore,i=r.nodeAfter):n>0?(a=r.node(o+1),s++,i=r.node(o).maybeChild(s)):(a=r.node(o).maybeChild(s-1),i=r.node(o+1)),a&&!a.isTextblock&&vC(a,i)&&r.node(o).canReplace(s,s+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function yR(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,a=e.doc.resolve(t-n),i=a.node().type;if(o&&i.inlineContent){let c=i.whitespace=="pre",d=!!i.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let s=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);wC(e,c.node(),c.before(),s)}i.inlineContent&&c0(e,t+n-1,i,a.node().contentMatchAt(a.index()),r==null);let l=e.mapping.slice(s),u=l.map(t-n);if(e.step(new Vt(u,l.map(t+n,-1),B.empty,!0)),r===!0){let c=e.doc.resolve(u);yC(e,c.node(),c.before(),e.steps.length)}return e}function wR(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let a=r.index(o);if(r.node(o).canReplaceWith(a,a,n))return r.before(o+1);if(a>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let a=r.indexAfter(o);if(r.node(o).canReplaceWith(a,a,n))return r.after(o+1);if(a<r.node(o).childCount)return null}return null}function Bd(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let a=0;a<n.openStart;a++)o=o.firstChild.content;for(let a=1;a<=(n.openStart==0&&n.size?2:1);a++)for(let i=r.depth;i>=0;i--){let s=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,l=r.index(i)+(s>0?1:0),u=r.node(i),c=!1;if(a==1)c=u.canReplace(l,l,o);else{let d=u.contentMatchAt(l).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return s==0?r.pos:s<0?r.before(i+1):r.after(i+1)}return null}function Yl(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),a=e.resolve(n);return SC(o,a,r)?new Vt(t,n,r):new l0(o,a,r).fit()}function SC(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var l0=class{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=D.empty;for(let o=0;o<=t.depth;o++){let a=t.node(o);this.frontier.push({type:a.type,match:a.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=D.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let a=this.placed,i=r.depth,s=o.depth;for(;i&&s&&a.childCount==1;)a=a.firstChild.content,i--,s--;let l=new B(a,i,s);return t>-1?new ct(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Vt(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<t;r++){let a=n.firstChild;if(n.childCount>1&&(o=0),a.type.spec.isolating&&o<=r){t=r;break}n=a.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,a=null;r?(a=a0(this.unplaced.content,r-1).firstChild,o=a.content):o=this.unplaced.content;let i=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:u}=this.frontier[s],c,d=null;if(n==1&&(i?u.matchType(i.type)||(d=u.fillBefore(D.from(i),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:r,frontierDepth:s,parent:a,inject:d};if(n==2&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:s,parent:a,wrap:c};if(a&&u.matchType(a.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=a0(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=a0(t,n);if(o.childCount<=1&&n>0){let a=t.size-n<=n+o.size;this.unplaced=new B(Vl(t,n-1,1),n-1,a?n-1:r)}else this.unplaced=new B(Vl(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:a}){for(;this.depth>n;)this.closeFrontierNode();if(a)for(let m=0;m<a.length;m++)this.openFrontierNode(a[m]);let i=this.unplaced,s=r?r.content:i.content,l=i.openStart-t,u=0,c=[],{match:d,type:f}=this.frontier[n];if(o){for(let m=0;m<o.childCount;m++)c.push(o.child(m));d=d.matchFragment(o)}let p=s.size+t-(i.content.size-i.openEnd);for(;u<s.childCount;){let m=s.child(u),b=d.matchType(m.type);if(!b)break;u++,(u>1||l==0||m.content.size)&&(d=b,c.push(kC(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==s.childCount?p:-1)))}let h=u==s.childCount;h||(p=-1),this.placed=Wl(this.placed,n,D.from(c)),this.frontier[n].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=s;m<p;m++){let g=b.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),b=g.content}this.unplaced=h?t==0?B.empty:new B(Vl(i.content,t-1,1),t-1,p<0?i.openEnd:t-1):new B(Vl(i.content,t,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!i0(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],a=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),i=i0(t,n,o,r,a);if(i){for(let s=n-1;s>=0;s--){let{match:l,type:u}=this.frontier[s],c=i0(t,s,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:i,move:a?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Wl(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),a=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,a)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Wl(this.placed,this.depth,D.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(D.empty,!0);n.childCount&&(this.placed=Wl(this.placed,this.frontier.length,n))}};function Vl(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Vl(e.firstChild.content,t-1,n)))}function Wl(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Wl(e.lastChild.content,t-1,n)))}function a0(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function kC(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,kC(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(D.empty,!0)))),e.copy(r)}function i0(e,t,n,r,o){let a=e.node(t),i=o?e.indexAfter(t):e.index(t);if(i==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,i);return s&&!vR(n,a.content,i)?s:null}function vR(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function SR(e){return e.spec.defining||e.spec.definingForContent}function kR(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),a=e.doc.resolve(n);if(SC(o,a,r))return e.step(new Vt(t,n,r));let i=EC(o,e.doc.resolve(n));i[i.length-1]==0&&i.pop();let s=-(o.depth+1);i.unshift(s);for(let f=o.depth,p=o.pos-1;f>0;f--,p--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;i.indexOf(f)>-1?s=f:o.before(f)==p&&i.splice(1,0,-f)}let l=i.indexOf(s),u=[],c=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==r.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=SR(p.type);if(h&&!p.sameMarkup(o.node(Math.abs(s)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),h=u[p];if(h)for(let m=0;m<i.length;m++){let b=i[(m+l)%i.length],g=!0;b<0&&(g=!1,b=-b);let y=o.node(b-1),w=o.index(b-1);if(y.canReplaceWith(w,w,h.type,h.marks))return e.replace(o.before(b),g?a.after(b):n,new B(CC(r.content,0,r.openStart,p),p,r.openEnd))}}let d=e.steps.length;for(let f=i.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=i[f];p<0||(t=o.before(p),n=a.after(p))}}function CC(e,t,n,r,o){if(t<n){let a=e.firstChild;e=e.replaceChild(0,a.copy(CC(a.content,t+1,n,r,a)))}if(t>r){let a=o.contentMatchAt(0),i=a.fillBefore(e).append(e);e=i.append(a.matchFragment(i).fillBefore(D.empty,!0))}return e}function CR(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=wR(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new B(D.from(r),0,0))}function ER(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),a=EC(r,o);for(let i=0;i<a.length;i++){let s=a[i],l=i==a.length-1;if(l&&s==0||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return e.delete(r.before(i),n);e.delete(t,n)}function EC(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let a=e.start(o);if(a<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(a==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==a-1)&&n.push(o)}return n}var Rd=class e extends St{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Dt.fail("No node at attribute step's position");let r=Object.create(null);for(let a in n.attrs)r[a]=n.attrs[a];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Dt.fromReplace(t,this.pos,this.pos+1,new B(D.from(o),0,n.isLeaf?0:1))}getMap(){return no.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};St.jsonID("attr",Rd);var Pd=class e extends St{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Dt.ok(r)}getMap(){return no.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};St.jsonID("docAttr",Pd);var ts=class extends Error{};ts=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};ts.prototype=Object.create(Error.prototype);ts.prototype.constructor=ts;ts.prototype.name="TransformError";var Wo=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Kl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new ts(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=B.empty){let o=Yl(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new B(D.from(r),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return kR(this,t,n,r),this}replaceRangeWith(t,n,r){return CR(this,t,n,r),this}deleteRange(t,n){return ER(this,t,n),this}lift(t,n){return cR(this,t,n),this}join(t,n=1){return yR(this,t,n),this}wrap(t,n){return pR(this,t,n),this}setBlockType(t,n=t,r,o=null){return hR(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return gR(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Rd(t,n,r)),this}setDocAttribute(t,n){return this.step(new Pd(t,n)),this}addNodeMark(t,n){return this.step(new Xl(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ke)n.isInSet(r.marks)&&this.step(new es(t,n));else{let o=r.marks,a,i=[];for(;a=n.isInSet(o);)i.push(new es(t,a)),o=a.removeFromSet(o);for(let s=i.length-1;s>=0;s--)this.step(i[s])}return this}split(t,n=1,r){return bR(this,t,n,r),this}addMark(t,n,r){return sR(this,t,n,r),this}removeMark(t,n,r){return lR(this,t,n,r),this}clearIncompatible(t,n,r){return c0(this,t,n,r),this}};var d0=Object.create(null),K=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new is(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=B.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let a=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:l,$to:u}=i[s],c=t.mapping.slice(a);t.replaceRange(c.map(l.pos),c.map(u.pos),s?B.empty:n),s==0&&MC(t,a,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:i,$to:s}=o[a],l=t.mapping.slice(r),u=l.map(i.pos),c=l.map(s.pos);a?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),MC(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let o=t.parent.inlineContent?new $(t):as(t.node(0),t.parent,t.pos,t.index(),n,r);if(o)return o;for(let a=t.depth-1;a>=0;a--){let i=n<0?as(t.node(0),t.node(a),t.before(a+1),t.index(a),n,r):as(t.node(0),t.node(a),t.after(a+1),t.index(a)+1,n,r);if(i)return i}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new gt(t.node(0))}static atStart(t){return as(t,t,0,0,1)||new gt(t)}static atEnd(t){return as(t,t,t.content.size,t.childCount,-1)||new gt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=d0[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in d0)throw new RangeError("Duplicate use of selection JSON ID "+t);return d0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return $.between(this.$anchor,this.$head).getBookmark()}};K.prototype.visible=!0;var is=class{constructor(t,n){this.$from=t,this.$to=n}},LC=!1;function IC(e){!LC&&!e.parent.inlineContent&&(LC=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var $=class e extends K{constructor(t,n=t){IC(t),IC(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return K.near(r);let o=t.resolve(n.map(this.anchor));return new e(o.parent.inlineContent?o:r,r)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new zd(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let a=K.findFrom(n,r,!0)||K.findFrom(n,-r,!0);if(a)n=a.$head;else return K.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(K.findFrom(t,-r,!0)||K.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=o<0&&(t=n))),new e(t,n)}};K.jsonID("text",$);var zd=class e{constructor(t,n){this.anchor=t,this.head=n}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){return $.between(t.resolve(this.anchor),t.resolve(this.head))}},Y=class e extends K{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),a=t.resolve(o);return r?K.near(a):new e(a)}content(){return new B(D.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p0(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}};Y.prototype.visible=!1;K.jsonID("node",Y);var p0=class e{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new zd(r,r):new e(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&Y.isSelectable(r)?new Y(n):K.near(n)}},gt=class e extends K{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=B.empty){if(n==B.empty){t.delete(0,t.doc.content.size);let r=K.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return LR}};K.jsonID("all",gt);var LR={map(){return this},resolve(e){return new gt(e)}};function as(e,t,n,r,o,a=!1){if(t.inlineContent)return $.create(e,n);for(let i=r-(o>0?0:1);o>0?i<t.childCount:i>=0;i+=o){let s=t.child(i);if(s.isAtom){if(!a&&Y.isSelectable(s))return Y.create(e,n-(o<0?s.nodeSize:0))}else{let l=as(e,s,n+o,o<0?s.childCount:0,o,a);if(l)return l}n+=s.nodeSize*o}return null}function MC(e,t,n){let r=e.steps.length-1;if(r<t)return;let o=e.steps[r];if(!(o instanceof Vt||o instanceof ct))return;let a=e.mapping.maps[r],i;a.forEach((s,l,u,c)=>{i==null&&(i=c)}),e.setSelection(K.near(e.doc.resolve(i),n))}var _C=1,Fd=2,TC=4,h0=class extends Wo{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|_C)&~Fd,this.storedMarks=null,this}get selectionSet(){return(this.updated&_C)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Fd,this}ensureMarks(t){return ke.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Fd)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Fd,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ke.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let a=this.storedMarks;if(!a){let i=this.doc.resolve(n);a=r==n?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,a)),this.selection.empty||this.setSelection(K.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=TC,this}get scrolledIntoView(){return(this.updated&TC)>0}};function AC(e,t){return!t||!e?e:e.bind(t)}var Ua=class{constructor(t,n,r){this.name=t,this.init=AC(n.init,r),this.apply=AC(n.apply,r)}},IR=[new Ua("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Ua("selection",{init(e,t){return e.selection||K.atStart(t.doc)},apply(e){return e.selection}}),new Ua("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Ua("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Zl=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=IR.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ua(r.key,r.spec.state,r))})}},Hd=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),o=null;for(;;){let a=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let l=o?o[i].n:0,u=o?o[i].state:this,c=l<n.length&&s.spec.appendTransaction.call(s,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",t),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<i?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),a=!0}o&&(o[i]={state:r,n:n.length})}}if(!a)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new e(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let a=r[o];n[a.name]=a.apply(t,this[a.name],this,n)}return n}get tr(){return new h0(this)}static create(t){let n=new Zl(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}reconfigure(t){let n=new Zl(this.schema,t.plugins),r=n.fields,o=new e(n);for(let a=0;a<r.length;a++){let i=r[a].name;o[i]=this.hasOwnProperty(i)?this[i]:r[a].init(t,o)}return o}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],a=o.spec.state;a&&a.toJSON&&(n[r]=a.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Zl(t.schema,t.plugins),a=new e(o);return o.fields.forEach(i=>{if(i.name=="doc")a.doc=Bn.fromJSON(t.schema,n.doc);else if(i.name=="selection")a.selection=K.fromJSON(a.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],u=l.spec.state;if(l.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){a[i.name]=u.fromJSON.call(l,t,n[s],a);return}}a[i.name]=i.init(t,a)}}),a}};function DC(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=DC(o,t,{})),n[r]=o}return n}var ie=class{constructor(t){this.spec=t,this.props={},t.props&&DC(t.props,this,this.props),this.key=t.key?t.key.key:NC("plugin")}getState(t){return t[this.key]}},f0=Object.create(null);function NC(e){return e in f0?e+"$"+ ++f0[e]:(f0[e]=0,e+"$")}var de=class{constructor(t="key"){this.key=NC(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var Nt=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},ds=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},w0=null,ao=function(e,t,n){let r=w0||(w0=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},MR=function(){w0=null},ja=function(e,t,n,r){return n&&(OC(e,t,n,r,-1)||OC(e,t,n,r,1))},_R=/^(img|br|input|textarea|hr)$/i;function OC(e,t,n,r,o){for(var a;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Hn(e))){let i=e.parentNode;if(!i||i.nodeType!=1||au(e)||_R.test(e.nodeName)||e.contentEditable=="false")return!1;t=Nt(e)+(o<0?0:1),e=i}else if(e.nodeType==1){let i=e.childNodes[t+(o<0?-1:0)];if(i.nodeType==1&&i.contentEditable=="false")if(!((a=i.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)t+=o;else return!1;else e=i,t=o<0?Hn(e):0}else return!1}}function Hn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function TR(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Hn(e)}else if(e.parentNode&&!au(e))t=Nt(e),e=e.parentNode;else return null}}function AR(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!au(e))t=Nt(e)+1,e=e.parentNode;else return null}}function DR(e,t,n){for(let r=t==0,o=t==Hn(e);r||o;){if(e==n)return!0;let a=Nt(e);if(e=e.parentNode,!e)return!1;r=r&&a==0,o=o&&a==Hn(e)}}function au(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Zd=function(e){return e.focusNode&&ja(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function $a(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function NR(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function OR(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Hn(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Hn(r.startContainer),r.startOffset)}}}var Cr=typeof navigator<"u"?navigator:null,RC=typeof document<"u"?document:null,Zo=Cr&&Cr.userAgent||"",v0=/Edge\/(\d+)/.exec(Zo),pE=/MSIE \d/.exec(Zo),S0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zo),pn=!!(pE||S0||v0),Xo=pE?document.documentMode:S0?+S0[1]:v0?+v0[1]:0,Un=!pn&&/gecko\/(\d+)/i.test(Zo);Un&&+(/Firefox\/(\d+)/.exec(Zo)||[0,0])[1];var k0=!pn&&/Chrome\/(\d+)/.exec(Zo),Gt=!!k0,hE=k0?+k0[1]:0,tn=!pn&&!!Cr&&/Apple Computer/.test(Cr.vendor),fs=tn&&(/Mobile\/\w+/.test(Zo)||!!Cr&&Cr.maxTouchPoints>2),zn=fs||(Cr?/Mac/.test(Cr.platform):!1),RR=Cr?/Win/.test(Cr.platform):!1,io=/Android \d/.test(Zo),iu=!!RC&&"webkitFontSmoothing"in RC.documentElement.style,PR=iu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function BR(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function oo(e,t){return typeof e=="number"?e:e[t]}function FR(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function PC(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,a=e.dom.ownerDocument;for(let i=n||e.dom;i;){if(i.nodeType!=1){i=ds(i);continue}let s=i,l=s==a.body,u=l?BR(a):FR(s),c=0,d=0;if(t.top<u.top+oo(r,"top")?d=-(u.top-t.top+oo(o,"top")):t.bottom>u.bottom-oo(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+oo(o,"top")-u.top:t.bottom-u.bottom+oo(o,"bottom")),t.left<u.left+oo(r,"left")?c=-(u.left-t.left+oo(o,"left")):t.right>u.right-oo(r,"right")&&(c=t.right-u.right+oo(o,"right")),c||d)if(l)a.defaultView.scrollBy(c,d);else{let p=s.scrollLeft,h=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);let m=s.scrollLeft-p,b=s.scrollTop-h;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let f=l?"fixed":getComputedStyle(i).position;if(/^(fixed|sticky)$/.test(f))break;i=f=="absolute"?i.offsetParent:ds(i)}}function zR(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let a=(t.left+t.right)/2,i=n+1;i<Math.min(innerHeight,t.bottom);i+=5){let s=e.root.elementFromPoint(a,i);if(!s||s==e.dom||!e.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=n-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:mE(e.dom)}}function mE(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=ds(r));return t}function HR({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;gE(n,r==0?0:r-t)}function gE(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:a}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var ss=null;function UR(e){if(e.setActive)return e.setActive();if(ss)return e.focus(ss);let t=mE(e);e.focus(ss==null?{get preventScroll(){return ss={preventScroll:!0},!0}}:void 0),ss||(ss=!1,gE(t,0))}function bE(e,t){let n,r=2e8,o,a=0,i=t.top,s=t.top,l,u;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=ao(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=i&&h.bottom>=s){i=Math.max(h.bottom,i),s=Math.min(h.top,s);let m=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(m<r){n=c,r=m,o=m&&n.nodeType==3?{left:h.right<t.left?h.right:h.left,top:t.top}:t,c.nodeType==1&&m&&(a=d+(t.left>=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(a=d+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?$R(n,o):!n||r&&n.nodeType==1?{node:e,offset:a}:bE(n,o)}function $R(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let a=Go(r,1);if(a.top!=a.bottom&&F0(t,a))return{node:e,offset:o+(t.left>=(a.left+a.right)/2?1:0)}}return{node:e,offset:0}}function F0(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function qR(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function VR(e,t,n){let{node:r,offset:o}=bE(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let i=r.getBoundingClientRect();a=i.left!=i.right&&n.left>(i.left+i.right)/2?1:-1}return e.docView.posFromDOM(r,o,a)}function WR(e,t,n,r){let o=-1;for(let a=t,i=!1;a!=e.dom;){let s=e.docView.nearestDesc(a,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!i&&l.left>r.left||l.top>r.top?o=s.posBefore:(!i&&l.right<r.left||l.bottom<r.top)&&(o=s.posAfter),i=!0),!s.contentDOM&&o<0&&!s.node.isText))return(s.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;a=s.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}function xE(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=o;;){let i=e.childNodes[a];if(i.nodeType==1){let s=i.getClientRects();for(let l=0;l<s.length;l++){let u=s[l];if(F0(t,u))return xE(i,t,u)}}if((a=(a+1)%r)==o)break}return e}function GR(e,t){let n=e.dom.ownerDocument,r,o=0,a=OR(n,t.left,t.top);a&&({node:r,offset:o}=a);let i=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!i||!e.dom.contains(i.nodeType!=1?i.parentNode:i)){let u=e.dom.getBoundingClientRect();if(!F0(t,u)||(i=xE(e.dom,t,u),!i))return null}if(tn)for(let u=i;r&&u;u=ds(u))u.draggable&&(r=void 0);if(i=qR(i,t),r){if(Un&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let c=r.childNodes[o],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}let u;iu&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=WR(e,r,o,t))}s==null&&(s=VR(e,i,t));let l=e.docView.nearestDesc(i,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function BC(e){return e.top<e.bottom||e.left<e.right}function Go(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(BC(r))return r}return Array.prototype.find.call(n,BC)||e.getBoundingClientRect()}var KR=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function yE(e,t,n){let{node:r,offset:o,atom:a}=e.docView.domFromPos(t,n<0?-1:1),i=iu||Un;if(r.nodeType==3)if(i&&(KR.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Go(ao(r,o,o),n);if(Un&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=Go(ao(r,o-1,o-1),-1);if(u.top==l.top){let c=Go(ao(r,o,o+1),-1);if(c.top!=l.top)return Jl(c,c.left<u.left)}}return l}else{let l=o,u=o,c=n<0?1:-1;return n<0&&!o?(u++,c=-1):n>=0&&o==r.nodeValue.length?(l--,c=1):n<0?l--:u++,Jl(Go(ao(r,l,u),c),c<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&o&&(n<0||o==Hn(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return m0(l.getBoundingClientRect(),!1)}if(a==null&&o<Hn(r)){let l=r.childNodes[o];if(l.nodeType==1)return m0(l.getBoundingClientRect(),!0)}return m0(r.getBoundingClientRect(),n>=0)}if(a==null&&o&&(n<0||o==Hn(r))){let l=r.childNodes[o-1],u=l.nodeType==3?ao(l,Hn(l)-(i?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Jl(Go(u,1),!1)}if(a==null&&o<Hn(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?ao(l,0,i?0:1):l.nodeType==1?l:null:null;if(u)return Jl(Go(u,-1),!0)}return Jl(Go(r.nodeType==3?ao(r):r,-n),n>=0)}function Jl(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function m0(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function wE(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function jR(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return wE(e,t,()=>{let{node:a}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(a,!0);if(!s)break;if(s.node.isBlock){a=s.contentDOM||s.dom;break}a=s.dom.parentNode}let i=yE(e,o.pos,1);for(let s=a.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=ao(s,0,s.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(n=="up"?i.top-c.top>(c.bottom-i.top)*2:c.bottom-i.bottom>(i.bottom-c.top)*2))return!1}}return!0})}var XR=/[\u0590-\u08ac]/;function YR(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,a=!o,i=o==r.parent.content.size,s=e.domSelection();return s?!XR.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?a:i:wE(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),b=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{s.collapse(c,d),l&&(l!=c||u!=d)&&s.extend&&s.extend(l,u)}catch{}return f!=null&&(s.caretBidiLevel=f),b}):r.pos==r.start()||r.pos==r.end()}var FC=null,zC=null,HC=!1;function ZR(e,t,n){return FC==t&&zC==n?HC:(FC=t,zC=n,HC=n=="up"||n=="down"?jR(e,t,n):YR(e,t,n))}var $n=0,UC=1,qa=2,Er=3,Xa=class{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=$n,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==t)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let a,i;if(t==this.contentDOM)a=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;a=t.previousSibling}for(;a&&!((i=a.pmViewDesc)&&i.parent==this);)a=a.previousSibling;return a?this.posBeforeChild(i)+i.size:this.posAtStart}else{let a,i;if(t==this.contentDOM)a=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;a=t.nextSibling}for(;a&&!((i=a.pmViewDesc)&&i.parent==this);)a=a.nextSibling;return a?this.posBeforeChild(i):this.posAtEnd}let o;if(t==this.dom&&this.contentDOM)o=n>Nt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let a=t;;a=a.parentNode){if(a==this.dom){o=!1;break}if(a.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let a=t;;a=a.parentNode){if(a==this.dom){o=!0;break}if(a.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let a=this.getDesc(o),i;if(a&&(!n||a.node))if(r&&(i=a.nodeDOM)&&!(i.nodeType==1?i.contains(t.nodeType==1?t:t.parentNode):i==t))r=!1;else return a}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let a=this.getDesc(o);if(a)return a.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],a=r+o.size;if(r==t&&a!=r){for(;!o.border&&o.children.length;)for(let i=0;i<o.children.length;i++){let s=o.children[i];if(s.size){o=s;break}}return o}if(t<a)return o.descAt(t-r-o.border);r=a}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,o=0;for(let a=0;r<this.children.length;r++){let i=this.children[r],s=a+i.size;if(s>t||i instanceof qd){o=t-a;break}a=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let a;r&&!(a=this.children[r-1]).size&&a instanceof Ud&&a.side>=0;r--);if(n<=0){let a,i=!0;for(;a=r?this.children[r-1]:null,!(!a||a.dom.parentNode==this.contentDOM);r--,i=!1);return a&&n&&i&&!a.border&&!a.domAtom?a.domFromPos(a.size,n):{node:this.contentDOM,offset:a?Nt(a.dom)+1:0}}else{let a,i=!0;for(;a=r<this.children.length?this.children[r]:null,!(!a||a.dom.parentNode==this.contentDOM);r++,i=!1);return a&&i&&!a.border&&!a.domAtom?a.domFromPos(0,n):{node:this.contentDOM,offset:a?Nt(a.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,a=-1;for(let i=r,s=0;;s++){let l=this.children[s],u=i+l.size;if(o==-1&&t<=u){let c=i+l.border;if(t>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=i;for(let d=s;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=Nt(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(u>n||s==this.children.length-1)){n=u;for(let c=s+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){a=Nt(d.dom);break}n+=d.size}a==-1&&(a=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:t,to:n,fromOffset:o,toOffset:a}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,o=!1){let a=Math.min(t,n),i=Math.max(t,n);for(let p=0,h=0;p<this.children.length;p++){let m=this.children[p],b=h+m.size;if(a>h&&i<b)return m.setSelection(t-h-m.border,n-h-m.border,r,o);h=b}let s=this.domFromPos(t,t?-1:1),l=n==t?s:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Un||tn)&&t==n){let{node:p,offset:h}=s;if(p.nodeType==3){if(d=!!(h&&p.nodeValue[h-1]==`
15
+ `),d&&h==p.nodeValue.length)for(let m=p,b;m;m=m.parentNode){if(b=m.nextSibling){b.nodeName=="BR"&&(s=l={node:b.parentNode,offset:Nt(b)+1});break}let g=m.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let m=p.childNodes[h-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Un&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||d&&tn)&&ja(s.node,s.offset,c.anchorNode,c.anchorOffset)&&ja(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||t==n)&&!(d&&Un)){u.collapse(s.node,s.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let h=s;s=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(s.node,s.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o<this.children.length;o++){let a=this.children[o],i=r+a.size;if(r==i?t<=i&&n>=r:t<i&&n>r){let s=r+a.border,l=i-a.border;if(t>=s&&n<=l){this.dirty=t==r||n==i?qa:UC,t==s&&n==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=Er:a.markDirty(t-s,n-s);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?qa:Er}r=i}this.dirty=qa}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?qa:UC;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},Ud=class extends Xa{constructor(t,n,r,o){let a,i=n.type.toDOM;if(typeof i=="function"&&(i=i(r,()=>{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)})),!n.type.spec.raw){if(i.nodeType!=1){let s=document.createElement("span");s.appendChild(i),i=s}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=n,this.widget=n,a=this}matchesWidget(t){return this.dirty==$n&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},C0=class extends Xa{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},ps=class e extends Xa{constructor(t,n,r,o,a){super(t,[],r,o),this.mark=n,this.spec=a}static create(t,n,r,o){let a=o.nodeViews[n.type.name],i=a&&a(n,o,r);return(!i||!i.dom)&&(i=to.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,i.dom,i.contentDOM||i.dom,i)}parseRule(){return this.dirty&Er||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Er&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=$n){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=$n}}slice(t,n,r){let o=e.create(this.parent,this.mark,!0,r),a=this.children,i=this.size;n<i&&(a=M0(a,n,i,r)),t>0&&(a=M0(a,0,t,r));for(let s=0;s<a.length;s++)a[s].parent=o;return o.children=a,o}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Yo=class e extends Xa{constructor(t,n,r,o,a,i,s,l,u){super(t,[],a,i),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(t,n,r,o,a,i){let s=a.nodeViews[n.type.name],l,u=s&&s(n,a,()=>{if(!l)return i;if(l.parent)return l.parent.posBeforeChild(l)},r,o),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=to.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=kE(c,r,n),u?l=new E0(t,n,r,o,c,d||null,f,u,a,i+1):n.isText?new $d(t,n,r,o,c,f,a):new e(t,n,r,o,c,d||null,f,a,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>D.empty)}return t}matchesNode(t,n,r){return this.dirty==$n&&t.eq(this.node)&&Vd(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,a=t.composing?this.localCompositionInfo(t,n):null,i=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new I0(this,i&&i.node,t);tP(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?ke.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,o)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,t);let p;l.findNodeMatch(u,c,d,f)||s&&t.state.selection.from>o&&t.state.selection.to<o+u.nodeSize&&(p=l.findIndexWithChild(a.node))>-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,o)||l.addNode(u,c,d,t,o),o+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==qa)&&(i&&this.protectLocalComposition(t,i),vE(this.contentDOM,this.children,t),fs&&nP(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof $)||r<n||o>n+this.node.content.size)return null;let a=t.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let i=a.nodeValue,s=rP(this.node.content,i,r-n,o-n);return s<0?null:{node:a,pos:s,text:i}}else return{node:a,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let a=n;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let i=new C0(this,a,n,o);t.input.compositionNodes.push(i),this.children=M0(this.children,r,r+o.length,t,i)}update(t,n,r,o){return this.dirty==Er||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=$n}updateOuterDeco(t){if(Vd(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=SE(this.dom,this.nodeDOM,L0(this.outerDeco,this.node,n),L0(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function $C(e,t,n,r,o){kE(r,t,e);let a=new Yo(void 0,e,t,n,r,r,r,o,0);return a.contentDOM&&a.updateChildren(o,0),a}var $d=class e extends Yo{constructor(t,n,r,o,a,i,s){super(t,n,r,o,a,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Er||this.dirty!=$n&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=$n||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=$n,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),a=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,a,a,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Er)}get domAtom(){return!1}isText(t){return this.node.text==t}},qd=class extends Xa{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==$n&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},E0=class extends Yo{constructor(t,n,r,o,a,i,s,l,u,c){super(t,n,r,o,a,i,s,u,c),this.spec=l}update(t,n,r,o){if(this.dirty==Er)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let a=this.spec.update(t,n,r);return a&&this.updateInner(t,n,r,o),a}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function vE(e,t,n){let r=e.firstChild,o=!1;for(let a=0;a<t.length;a++){let i=t[a],s=i.dom;if(s.parentNode==e){for(;s!=r;)r=qC(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(i instanceof ps){let l=r?r.previousSibling:e.lastChild;vE(i.contentDOM,i.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=qC(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var Ql=function(e){e&&(this.nodeName=e)};Ql.prototype=Object.create(null);var Va=[new Ql];function L0(e,t,n){if(e.length==0)return Va;let r=n?Va[0]:new Ql,o=[r];for(let a=0;a<e.length;a++){let i=e[a].type.attrs;if(i){i.nodeName&&o.push(r=new Ql(i.nodeName));for(let s in i){let l=i[s];l!=null&&(n&&o.length==1&&o.push(r=new Ql(t.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+l:s=="style"?r.style=(r.style?r.style+";":"")+l:s!="nodeName"&&(r[s]=l))}}}return o}function SE(e,t,n,r){if(n==Va&&r==Va)return t;let o=t;for(let a=0;a<r.length;a++){let i=r[a],s=n[a];if(a){let l;s&&s.nodeName==i.nodeName&&o!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==i.nodeName||(l=document.createElement(i.nodeName),l.pmIsDeco=!0,l.appendChild(o),s=Va[0]),o=l}JR(o,s||Va[0],i)}return o}function JR(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let a=0;a<r.length;a++)o.indexOf(r[a])==-1&&e.classList.remove(r[a]);for(let a=0;a<o.length;a++)r.indexOf(o[a])==-1&&e.classList.add(o[a]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(t.style);)e.style.removeProperty(o[1])}n.style&&(e.style.cssText+=n.style)}}function kE(e,t,n){return SE(e,e,Va,L0(t,n,e.nodeType!=1))}function Vd(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function qC(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var I0=class{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=QR(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let o=0,a=this.stack.length>>1,i=Math.min(a,t.length);for(;o<i&&(o==a-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<a;)this.destroyRest(),this.top.dirty=$n,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<t.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(t[a])&&!this.isLocked(u.dom)){s=l;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=ps.create(this.top,t[a],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,a++}}findNodeMatch(t,n,r,o){let a=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(t,n,r))a=this.top.children.indexOf(i,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let u=this.top.children[s];if(u.matchesNode(t,n,r)&&!this.preMatch.matched.has(u)){a=s;break}}return a<0?!1:(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(t,n,r,o,a){let i=this.top.children[o];return i.dirty==Er&&i.dom==i.contentDOM&&(i.dirty=qa),i.update(t,n,r,a)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}t=n}}updateNextNode(t,n,r,o,a,i){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof Yo){let u=this.preMatch.matched.get(l);if(u!=null&&u!=a)return!1;let c=l.dom,d,f=this.isLocked(c)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=Er&&Vd(n,l.outerDeco));if(!f&&l.update(t,n,r,o))return this.destroyBetween(this.index,s),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,t,n,r,o,i)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=qa,d.updateChildren(o,i+1),d.dirty=$n),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,o,a,i){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Vd(r,t.outerDeco)||!o.eq(t.innerDeco))return null;let s=Yo.create(this.top,n,r,o,a,i);if(s.contentDOM){s.children=t.children,t.children=[];for(let l of s.children)l.parent=s}return t.destroy(),s}addNode(t,n,r,o,a){let i=Yo.create(this.top,t,n,r,o,a);i.contentDOM&&i.updateChildren(o,a+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(t,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(t)&&(t==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let a=new Ud(this.top,t,n,r);this.top.children.splice(this.index++,0,a),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof ps;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof $d)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((tn||Gt)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new qd(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}};function QR(e,t){let n=t,r=n.children.length,o=e.childCount,a=new Map,i=[];e:for(;o>0;){let s;for(;;)if(r){let u=n.children[r-1];if(u instanceof ps)n=u,r=u.children.length;else{s=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,a.set(s,o),i.push(s)}}return{index:o,matched:a,matches:i.reverse()}}function eP(e,t){return e.type.side-t.type.side}function tP(e,t,n,r){let o=t.locals(e),a=0;if(o.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);r(c,o,t.forChild(a,c),u),a+=c.nodeSize}return}let i=0,s=[],l=null;for(let u=0;;){let c,d;for(;i<o.length&&o[i].to==a;){let b=o[i++];b.widget&&(c?(d||(d=[c])).push(b):c=b)}if(c)if(d){d.sort(eP);for(let b=0;b<d.length;b++)n(d[b],u,!!l)}else n(c,u,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(u<e.childCount)p=u,f=e.child(u++);else break;for(let b=0;b<s.length;b++)s[b].to<=a&&s.splice(b--,1);for(;i<o.length&&o[i].from<=a&&o[i].to>a;)s.push(o[i++]);let h=a+f.nodeSize;if(f.isText){let b=h;i<o.length&&o[i].from<b&&(b=o[i].from);for(let g=0;g<s.length;g++)s[g].to<b&&(b=s[g].to);b<h&&(l=f.cut(b-a),f=f.cut(0,b-a),h=b,p=-1)}else for(;i<o.length&&o[i].to<h;)i++;let m=f.isInline&&!f.isLeaf?s.filter(b=>!b.inline):s.slice();r(f,m,t.forChild(a,f),p),a=h}}function nP(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function rP(e,t,n,r){for(let o=0,a=0;o<e.childCount&&a<=r;){let i=e.child(o++),s=a;if(a+=i.nodeSize,!i.isText)continue;let l=i.text;for(;o<e.childCount;){let u=e.child(o++);if(a+=u.nodeSize,!u.isText)break;l+=u.text}if(a>=n){if(a>=r&&l.slice(r-t.length-s,r-s)==t)return r-t.length;let u=s<r?l.lastIndexOf(t,r-s-1):-1;if(u>=0&&u+t.length+s>=n)return s+u;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function M0(e,t,n,r,o){let a=[];for(let i=0,s=0;i<e.length;i++){let l=e[i],u=s,c=s+=l.size;u>=n||c<=t?a.push(l):(u<t&&a.push(l.slice(0,t-u,r)),o&&(a.push(o),o=void 0),c>n&&a.push(l.slice(n-u,l.size,r)))}return a}function z0(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&o.size==0,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let s=r.resolve(i),l,u;if(Zd(n)){for(l=i;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&Y.isSelectable(d)&&o.parent&&!(d.isInline&&DR(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;u=new Y(i==f?s:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=i,f=i;for(let p=0;p<n.rangeCount;p++){let h=n.getRangeAt(p);d=Math.min(d,e.docView.posFromDOM(h.startContainer,h.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(d<0)return null;[l,i]=f==e.state.selection.anchor?[f,d]:[d,f],s=r.resolve(i)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=r.resolve(l);if(!u){let d=t=="pointer"||e.state.selection.head<s.pos&&!a?1:-1;u=H0(e,c,s,d)}return u}function CE(e){return e.editable?e.hasFocus():LE(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function so(e,t=!1){let n=e.state.selection;if(EE(e,n),!!CE(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Gt){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&ja(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)aP(e);else{let{anchor:r,head:o}=n,a,i;VC&&!(n instanceof $)&&(n.$from.parent.inlineContent||(a=WC(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=WC(e,n.to))),e.docView.setSelection(r,o,e,t),VC&&(a&&GC(a),i&&GC(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&oP(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var VC=tn||Gt&&hE<63;function WC(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(tn&&o&&o.contentEditable=="false")return g0(o);if((!o||o.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(o)return g0(o);if(a)return g0(a)}}function g0(e){return e.contentEditable="true",tn&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function GC(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function oP(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!CE(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function aP(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,Nt(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&pn&&Xo<=11&&(n.disabled=!0,n.disabled=!1)}function EE(e,t){if(t instanceof Y){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(KC(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else KC(e)}function KC(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function H0(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||$.between(t,n,r)}function jC(e){return e.editable&&!e.hasFocus()?!1:LE(e)}function LE(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function iP(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return ja(t.node,t.offset,n.anchorNode,n.anchorOffset)}function _0(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&K.findFrom(a,t)}function Ko(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function XC(e,t,n){let r=e.state.selection;if(r instanceof $)if(n.indexOf("s")>-1){let{$head:o}=r,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let i=e.state.doc.resolve(o.pos+a.nodeSize*(t<0?-1:1));return Ko(e,new $(r.$anchor,i))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=_0(e.state,t);return o&&o instanceof Y?Ko(e,o):!1}else if(!(zn&&n.indexOf("m")>-1)){let o=r.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,i;if(!a||a.isText)return!1;let s=t<0?o.pos-a.nodeSize:o.pos;return a.isAtom||(i=e.docView.descAt(s))&&!i.contentDOM?Y.isSelectable(a)?Ko(e,new Y(t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):iu?Ko(e,new $(e.state.doc.resolve(t<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Y&&r.node.isInline)return Ko(e,new $(t>0?r.$to:r.$from));{let o=_0(e.state,t);return o?Ko(e,o):!1}}}function Wd(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function eu(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ls(e,t){return t<0?sP(e):lP(e)}function sP(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=!1;for(Un&&n.nodeType==1&&r<Wd(n)&&eu(n.childNodes[r],-1)&&(i=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(eu(s,-1))o=n,a=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(IE(n))break;{let s=n.previousSibling;for(;s&&eu(s,-1);)o=n.parentNode,a=Nt(s),s=s.previousSibling;if(s)n=s,r=Wd(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}i?T0(e,n,r):o&&T0(e,o,a)}function lP(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Wd(n),a,i;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(eu(s,1))a=n,i=++r;else break}else{if(IE(n))break;{let s=n.nextSibling;for(;s&&eu(s,1);)a=s.parentNode,i=Nt(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=Wd(n);else{if(n=n.parentNode,n==e.dom)break;r=o=0}}}a&&T0(e,a,i)}function IE(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function uP(e,t){for(;e&&t==e.childNodes.length&&!au(e);)t=Nt(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function cP(e,t){for(;e&&!t&&!au(e);)t=Nt(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function T0(e,t,n){if(t.nodeType!=3){let a,i;(i=uP(t,n))?(t=i,n=0):(a=cP(t,n))&&(t=a,n=a.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Zd(r)){let a=document.createRange();a.setEnd(t,n),a.setStart(t,n),r.removeAllRanges(),r.addRange(a)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&so(e)},50)}function YC(e,t){let n=e.state.doc.resolve(t);if(!(Gt||RR)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let a=e.coordsAtPos(t-1),i=(a.top+a.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(a.left-o.left)>1)return a.left<o.left?"ltr":"rtl"}if(t<n.end()){let a=e.coordsAtPos(t+1),i=(a.top+a.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(a.left-o.left)>1)return a.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function ZC(e,t,n){let r=e.state.selection;if(r instanceof $&&!r.empty||n.indexOf("s")>-1||zn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let i=_0(e.state,t);if(i&&i instanceof Y)return Ko(e,i)}if(!o.parent.inlineContent){let i=t<0?o:a,s=r instanceof gt?K.near(i,t):K.findFrom(i,t);return s?Ko(e,s):!1}return!1}function JC(e,t){if(!(e.state.selection instanceof $))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let i=e.state.tr;return t<0?i.delete(n.pos-a.nodeSize,n.pos):i.delete(n.pos,n.pos+a.nodeSize),e.dispatch(i),!0}return!1}function QC(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function dP(e){if(!tn||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;QC(e,r,"true"),setTimeout(()=>QC(e,r,"false"),20)}return!1}function fP(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function pP(e,t){let n=t.keyCode,r=fP(t);if(n==8||zn&&n==72&&r=="c")return JC(e,-1)||ls(e,-1);if(n==46&&!t.shiftKey||zn&&n==68&&r=="c")return JC(e,1)||ls(e,1);if(n==13||n==27)return!0;if(n==37||zn&&n==66&&r=="c"){let o=n==37?YC(e,e.state.selection.from)=="ltr"?-1:1:-1;return XC(e,o,r)||ls(e,o)}else if(n==39||zn&&n==70&&r=="c"){let o=n==39?YC(e,e.state.selection.from)=="ltr"?1:-1:1;return XC(e,o,r)||ls(e,o)}else{if(n==38||zn&&n==80&&r=="c")return ZC(e,-1,r)||ls(e,-1);if(n==40||zn&&n==78&&r=="c")return dP(e)||ZC(e,1,r)||ls(e,1);if(r==(zn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function U0(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:o,openEnd:a}=t;for(;o>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,a--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let i=e.someProp("clipboardSerializer")||to.fromSchema(e.state.schema),s=NE(),l=s.createElement("div");l.appendChild(i.serializeFragment(r,{document:s}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=DE[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=s.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${a}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
16
+
17
+ `);return{dom:l,text:f,slice:t}}function ME(e,t,n,r,o){let a=o.parent.type.spec.code,i,s;if(!n&&!t)return null;let l=!!t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,a||r,e)}),a)return s=new B(D.from(e.state.schema.text(t.replace(/\r\n?/g,`
18
+ `))),0,0),e.someProp("transformPasted",f=>{s=f(s,e,!0)}),s;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)s=d;else{let f=o.marks(),{schema:p}=e.state,h=to.fromSchema(p);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=i.appendChild(document.createElement("p"));m&&b.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),i=bP(n),iu&&xP(i);let u=i&&i.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||ar.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||c),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!hP.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)s=yP(eE(s,+c[1],+c[2]),c[4]);else if(s=B.maxOpen(mP(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;f<s.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);s=eE(s,d,f)}return e.someProp("transformPasted",d=>{s=d(s,e,l)}),s}var hP=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function mP(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),a,i=[];if(e.forEach(s=>{if(!i)return;let l=o.findWrapping(s.type),u;if(!l)return i=null;if(u=i.length&&a.length&&TE(l,a,s,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=AE(i[i.length-1],a.length));let c=_E(s,l);i.push(c),o=o.matchType(c.type),a=l}}),i)return D.from(i)}return e}function _E(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,D.from(e));return e}function TE(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let a=TE(e,t,n,r.lastChild,o+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(D.from(_E(n,e,o+1))))}}function AE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,AE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(D.empty,!0);return e.copy(n.append(r))}function A0(e,t,n,r,o,a){let i=t<0?e.firstChild:e.lastChild,s=i.content;return e.childCount>1&&(a=0),o<r-1&&(s=A0(s,t,n,r,o+1,a)),o>=n&&(s=t<0?i.contentMatchAt(0).fillBefore(s,a<=o).append(s):s.append(i.contentMatchAt(i.childCount).fillBefore(D.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(s))}function eE(e,t,n){return t<e.openStart&&(e=new B(A0(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new B(A0(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var DE={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},tE=null;function NE(){return tE||(tE=document.implementation.createHTMLDocument("title"))}var b0=null;function gP(e){let t=window.trustedTypes;return t?(b0||(b0=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),b0.createHTML(e)):e}function bP(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=NE().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&DE[r[1].toLowerCase()])&&(e=o.map(a=>"<"+a+">").join("")+e+o.map(a=>"</"+a+">").reverse().join("")),n.innerHTML=gP(e),o)for(let a=0;a<o.length;a++)n=n.querySelector(o[a])||n;return n}function xP(e){let t=e.querySelectorAll(Gt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function yP(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:o,openStart:a,openEnd:i}=e;for(let s=r.length-2;s>=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=D.from(l.create(r[s+1],o)),a++,i++}return new B(o,a,i)}var nn={},rn={},wP={touchstart:!0,touchmove:!0},D0=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function vP(e){for(let t in nn){let n=nn[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{kP(e,r)&&!$0(e,r)&&(e.editable||!(r.type in rn))&&n(e,r)},wP[t]?{passive:!0}:void 0)}tn&&e.dom.addEventListener("input",()=>null),N0(e)}function jo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function SP(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function N0(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>$0(e,r))})}function $0(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function kP(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function CP(e,t){!$0(e,t)&&nn[t.type]&&(e.editable||!(t.type in rn))&&nn[t.type](e,t)}rn.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!RE(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(io&&Gt&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),fs&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,$a(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||pP(e,n)?n.preventDefault():jo(e,"key")};rn.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};rn.keypress=(e,t)=>{let n=t;if(RE(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||zn&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof $)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),a=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o,a))&&e.dispatch(a()),n.preventDefault()}};function Jd(e){return{left:e.clientX,top:e.clientY}}function EP(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function q0(e,t,n,r,o){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let i=a.depth+1;i>0;i--)if(e.someProp(t,s=>i>a.depth?s(e,n,a.nodeAfter,a.before(i),o,!0):s(e,n,a.node(i),a.before(i),o,!1)))return!0;return!1}function cs(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function LP(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Y.isSelectable(r)?(cs(e,new Y(n),"pointer"),!0):!1}function IP(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Y&&(r=n.node);let a=e.state.doc.resolve(t);for(let i=a.depth+1;i>0;i--){let s=i>a.depth?a.nodeAfter:a.node(i);if(Y.isSelectable(s)){r&&n.$from.depth>0&&i>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?o=a.before(n.$from.depth):o=a.before(i);break}}return o!=null?(cs(e,Y.create(e.state.doc,o),"pointer"),!0):!1}function MP(e,t,n,r,o){return q0(e,"handleClickOn",t,n,r)||e.someProp("handleClick",a=>a(e,t,r))||(o?IP(e,n):LP(e,n))}function _P(e,t,n,r){return q0(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function TP(e,t,n,r){return q0(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||AP(e,n,r)}function AP(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(cs(e,$.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let a=o.depth+1;a>0;a--){let i=a>o.depth?o.nodeAfter:o.node(a),s=o.before(a);if(i.inlineContent)cs(e,$.create(r,s+1,s+1+i.content.size),"pointer");else if(Y.isSelectable(i))cs(e,Y.create(r,s),"pointer");else continue;return!0}}function V0(e){return Gd(e)}var OE=zn?"metaKey":"ctrlKey";nn.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=V0(e),o=Date.now(),a="singleClick";o-e.input.lastClick.time<500&&EP(n,e.input.lastClick)&&!n[OE]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?a="doubleClick":e.input.lastClick.type=="doubleClick"&&(a="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:a,button:n.button};let i=e.posAtCoords(Jd(n));i&&(a=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new O0(e,i,n,!!r)):(a=="doubleClick"?_P:TP)(e,i.pos,i.inside,n)?n.preventDefault():jo(e,"pointer"))};var O0=class{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[OE],this.allowDefault=r.shiftKey;let a,i;if(n.inside>-1)a=t.state.doc.nodeAt(n.inside),i=n.inside;else{let c=t.state.doc.resolve(n.pos);a=c.parent,i=c.depth?c.before():0}let s=o?null:r.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||u instanceof Y&&u.from<=i&&u.to>i)&&(this.mightDrag={node:a,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Un&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),jo(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>so(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Jd(t))),this.updateAllowDefault(t),this.allowDefault||!n?jo(this.view,"pointer"):MP(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||tn&&this.mightDrag&&!this.mightDrag.node.isAtom||Gt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(cs(this.view,K.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):jo(this.view,"pointer")}move(t){this.updateAllowDefault(t),jo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};nn.touchstart=e=>{e.input.lastTouch=Date.now(),V0(e),jo(e,"pointer")};nn.touchmove=e=>{e.input.lastTouch=Date.now(),jo(e,"pointer")};nn.contextmenu=e=>V0(e);function RE(e,t){return e.composing?!0:tn&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var DP=io?5e3:-1;rn.compositionstart=rn.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof $&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Gd(e,!0),e.markCursor=null;else if(Gd(e,!t.selection.empty),Un&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,a=r.focusOffset;o&&o.nodeType==1&&a!=0;){let i=a<0?o.lastChild:o.childNodes[a-1];if(!i)break;if(i.nodeType==3){let s=e.domSelection();s&&s.collapse(i,i.nodeValue.length);break}else o=i,a=-1}}e.input.composing=!0}PE(e,DP)};rn.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,PE(e,20))};function PE(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Gd(e),t))}function BE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=OP());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function NP(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=TR(t.focusNode,t.focusOffset),r=AR(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,a=e.domObserver.lastChangedTextNode;if(n==a||r==a)return a;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let i=n.pmViewDesc;if(!(!i||!i.isText(n.nodeValue)))return r}}return n||r}function OP(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Gd(e,t=!1){if(!(io&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),BE(e),t||e.docView&&e.docView.dirty){let n=z0(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function RP(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var tu=pn&&Xo<15||fs&&PR<604;nn.copy=rn.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let a=tu?null:n.clipboardData,i=r.content(),{dom:s,text:l}=U0(e,i);a?(n.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):RP(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function PP(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function BP(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?nu(e,r.value,null,o,t):nu(e,r.textContent,r.innerHTML,o,t)},50)}function nu(e,t,n,r,o){let a=ME(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,a||B.empty)))return!0;if(!a)return!1;let i=PP(a),s=i?e.state.tr.replaceSelectionWith(i,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function FE(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}rn.paste=(e,t)=>{let n=t;if(e.composing&&!io)return;let r=tu?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&nu(e,FE(r),r.getData("text/html"),o,n)?n.preventDefault():BP(e,n)};var Kd=class{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}},FP=zn?"altKey":"ctrlKey";function zE(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[FP]}nn.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,a=o.empty?null:e.posAtCoords(Jd(n)),i;if(!(a&&a.pos>=o.from&&a.pos<=(o instanceof Y?o.to-1:o.to))){if(r&&r.mightDrag)i=Y.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(i=Y.create(e.state.doc,d.posBefore))}}let s=(i||e.state.selection).content(),{dom:l,text:u,slice:c}=U0(e,s);(!n.dataTransfer.files.length||!Gt||hE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(tu?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",tu||n.dataTransfer.setData("text/plain",u),e.dragging=new Kd(c,zE(e,n),i)};nn.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};rn.dragover=rn.dragenter=(e,t)=>t.preventDefault();rn.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Jd(n));if(!o)return;let a=e.state.doc.resolve(o.pos),i=r&&r.slice;i?e.someProp("transformPasted",h=>{i=h(i,e,!1)}):i=ME(e,FE(n.dataTransfer),tu?null:n.dataTransfer.getData("text/html"),!1,a);let s=!!(r&&zE(e,n));if(e.someProp("handleDrop",h=>h(e,n,i||B.empty,s))){n.preventDefault();return}if(!i)return;n.preventDefault();let l=i?Bd(e.state.doc,a.pos,i):a.pos;l==null&&(l=a.pos);let u=e.state.tr;if(s){let{node:h}=r;h?h.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=u.doc;if(d?u.replaceRangeWith(c,c,i.content.firstChild):u.replaceRange(c,c,i),u.doc.eq(f))return;let p=u.doc.resolve(c);if(d&&Y.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new Y(p));else{let h=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,b,g,y)=>h=y),u.setSelection(H0(e,p,u.doc.resolve(h)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};nn.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&so(e)},20))};nn.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};nn.beforeinput=(e,t)=>{if(Gt&&io&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",a=>a(e,$a(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in rn)nn[e]=rn[e];function ru(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var jd=class e{constructor(t,n){this.toDOM=t,this.spec=n||Ga,this.side=this.spec.side||0}map(t,n,r,o){let{pos:a,deleted:i}=t.mapResult(n.from+o,this.side<0?-1:1);return i?null:new ye(a-r,a-r,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ru(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},Wa=class e{constructor(t,n){this.attrs=t,this.spec=n||Ga}map(t,n,r,o){let a=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,i=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return a>=i?null:new ye(a,i,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof e&&ru(this.attrs,t.attrs)&&ru(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},R0=class e{constructor(t,n){this.attrs=t,this.spec=n||Ga}map(t,n,r,o){let a=t.mapResult(n.from+o,1);if(a.deleted)return null;let i=t.mapResult(n.to+o,-1);return i.deleted||i.pos<=a.pos?null:new ye(a.pos-r,i.pos-r,this)}valid(t,n){let{index:r,offset:o}=t.content.findIndex(n.from),a;return o==n.from&&!(a=t.child(r)).isText&&o+a.nodeSize==n.to}eq(t){return this==t||t instanceof e&&ru(this.attrs,t.attrs)&&ru(this.spec,t.spec)}destroy(){}},ye=class e{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new e(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new e(t,t,new jd(n,r))}static inline(t,n,r,o){return new e(t,n,new Wa(r,o))}static node(t,n,r,o){return new e(t,n,new R0(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Wa}get widget(){return this.type instanceof jd}},us=[],Ga={},be=class e{constructor(t,n){this.local=t.length?t:us,this.children=n.length?n:us}static create(t,n){return n.length?Yd(n,t,0,Ga):Wt}find(t,n,r){let o=[];return this.findInner(t??0,n??1e9,o,0,r),o}findInner(t,n,r,o,a){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=n&&s.to>=t&&(!a||a(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>t){let s=this.children[i]+1;this.children[i+2].findInner(t-s,n-s,r,o+s,a)}}map(t,n,r){return this==Wt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Ga)}mapInner(t,n,r,o,a){let i;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(i||(i=[])).push(l):a.onRemove&&a.onRemove(this.local[s].spec)}return this.children.length?zP(this.children,i||[],t,n,r,o,a):i?new e(i.sort(Ka),us):Wt}add(t,n){return n.length?this==Wt?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let o,a=0;t.forEach((s,l)=>{let u=l+r,c;if(c=UE(n,s,u)){for(o||(o=this.children.slice());a<o.length&&o[a]<l;)a+=3;o[a]==l?o[a+2]=o[a+2].addInner(s,c,u+1):o.splice(a,0,l,l+s.nodeSize,Yd(c,s,u+1,Ga)),a+=3}});let i=HE(a?$E(n):n,-r);for(let s=0;s<i.length;s++)i[s].type.valid(t,i[s])||i.splice(s--,1);return new e(i.length?this.local.concat(i).sort(Ka):this.local,o||this.children)}remove(t){return t.length==0||this==Wt?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,o=this.local;for(let a=0;a<r.length;a+=3){let i,s=r[a]+n,l=r[a+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>s&&d.to<l&&(t[c]=null,(i||(i=[])).push(d));if(!i)continue;r==this.children&&(r=this.children.slice());let u=r[a+2].removeInner(i,s+1);u!=Wt?r[a+2]=u:(r.splice(a,3),a-=3)}if(o.length){for(let a=0,i;a<t.length;a++)if(i=t[a])for(let s=0;s<o.length;s++)o[s].eq(i,n)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):Wt}forChild(t,n){if(this==Wt)return this;if(n.isLeaf)return e.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(r=this.children[s+2]);break}let a=t+1,i=a+n.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<i&&l.to>a&&l.type instanceof Wa){let u=Math.max(a,l.from)-a,c=Math.min(i,l.to)-a;u<c&&(o||(o=[])).push(l.copy(u,c))}}if(o){let s=new e(o.sort(Ka),us);return r?new Xd([s,r]):s}return r||Wt}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return W0(this.localsInner(t))}localsInner(t){if(this==Wt)return us;if(t.inlineContent||!this.local.some(Wa.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Wa||n.push(this.local[r]);return n}forEachSet(t){t(this)}};be.empty=new be([],[]);be.removeOverlap=W0;var Wt=be.empty,Xd=class e{constructor(t){this.members=t}map(t,n){let r=this.members.map(o=>o.map(t,n,Ga));return e.from(r)}forChild(t,n){if(n.isLeaf)return be.empty;let r=[];for(let o=0;o<this.members.length;o++){let a=this.members[o].forChild(t,n);a!=Wt&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let o=0;o<this.members.length;o++){let a=this.members[o].localsInner(t);if(a.length)if(!n)n=a;else{r&&(n=n.slice(),r=!1);for(let i=0;i<a.length;i++)n.push(a[i])}}return n?W0(r?n:n.sort(Ka)):us}static from(t){switch(t.length){case 0:return Wt;case 1:return t[0];default:return new e(t.every(n=>n instanceof be)?t:t.reduce((n,r)=>n.concat(r instanceof be?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}};function zP(e,t,n,r,o,a,i){let s=e.slice();for(let u=0,c=a;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,p,h,m)=>{let b=m-h-(p-f);for(let g=0;g<s.length;g+=3){let y=s[g+1];if(y<0||f>y+c-d)continue;let w=s[g]+c-d;p>=w?s[g+1]=f<=w?-2:-1:f>=c&&b&&(s[g]+=b,s[g+1]+=b)}d+=b}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u<s.length;u+=3)if(s[u+1]<0){if(s[u+1]==-2){l=!0,s[u+1]=-1;continue}let c=n.map(e[u]+a),d=c-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(e[u+1]+a,-1),p=f-o,{index:h,offset:m}=r.content.findIndex(d),b=r.maybeChild(h);if(b&&m==d&&m+b.nodeSize==p){let g=s[u+2].mapInner(n,b,c+1,e[u]+a+1,i);g!=Wt?(s[u]=d,s[u+1]=p,s[u+2]=g):(s[u+1]=-2,l=!0)}else l=!0}if(l){let u=HP(s,e,t,n,o,a,i),c=Yd(u,r,0,i);t=c.local;for(let d=0;d<s.length;d+=3)s[d+1]<0&&(s.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<s.length&&s[f]<p;)f+=3;s.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new be(t.sort(Ka),s)}function HE(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new ye(o.from+t,o.to+t,o.type))}return n}function HP(e,t,n,r,o,a,i){function s(l,u){for(let c=0;c<l.local.length;c++){let d=l.local[c].map(r,o,u);d?n.push(d):i.onRemove&&i.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)s(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&s(e[l+2],t[l]+a+1);return n}function UE(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let a=0,i;a<e.length;a++)(i=e[a])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),e[a]=null);return o}function $E(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Yd(e,t,n,r){let o=[],a=!1;t.forEach((s,l)=>{let u=UE(e,s,l+n);if(u){a=!0;let c=Yd(u,s,n+l+1,r);c!=Wt&&o.push(l,l+s.nodeSize,c)}});let i=HE(a?$E(e):e,-n).sort(Ka);for(let s=0;s<i.length;s++)i[s].type.valid(t,i[s])||(r.onRemove&&r.onRemove(i[s].spec),i.splice(s--,1));return i.length||o.length?new be(i,o):Wt}function Ka(e,t){return e.from-t.from||e.to-t.to}function W0(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let a=t[o];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[o]=a.copy(a.from,r.to),nE(t,o+1,a.copy(r.to,a.to)));continue}else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),nE(t,o,r.copy(a.from,r.to)));break}}}return t}function nE(e,t,n){for(;t<e.length&&Ka(n,e[t])>0;)t++;e.splice(t,0,n)}function x0(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Wt&&t.push(r)}),e.cursorWrapper&&t.push(be.create(e.state.doc,[e.cursorWrapper.deco])),Xd.from(t)}var UP={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},$P=pn&&Xo<=11,P0=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},B0=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new P0,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);pn&&Xo<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),$P&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,UP)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(jC(this.view)){if(this.suppressingSelectionUpdates)return so(this.view);if(pn&&Xo<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&ja(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let a=t.focusNode;a;a=ds(a))n.add(a);for(let a=t.anchorNode;a;a=ds(a))if(n.has(a)){r=a;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&jC(t)&&!this.ignoreSelectionChange(r),a=-1,i=-1,s=!1,l=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(a=a<0?d.from:Math.min(d.from,a),i=i<0?d.to:Math.max(d.to,i),d.typeOver&&(s=!0))}if(Un&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||WP(t,d)!=p)&&f.remove()}}}let u=null;a<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Zd(r)&&(u=z0(t))&&u.eq(K.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,so(t),this.currentSelection.set(r),t.scrollToSelection()):(a>-1||o)&&(a>-1&&(t.docView.markDirty(a,i),qP(t)),this.handleDOMChange(a,i,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||so(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let o=t.previousSibling,a=t.nextSibling;if(pn&&Xo<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(a=f)}let i=o&&o.parentNode==t.target?Nt(o)+1:0,s=r.localPosFromDOM(t.target,i,-1),l=a&&a.parentNode==t.target?Nt(a):t.target.childNodes.length,u=r.localPosFromDOM(t.target,l,1);return{from:s,to:u}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}},rE=new WeakMap,oE=!1;function qP(e){if(!rE.has(e)&&(rE.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Un,oE)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),oE=!0}}function aE(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset,i=e.domAtPos(e.state.selection.anchor);return ja(i.node,i.offset,o,a)&&([n,r,o,a]=[o,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:a}}function VP(e,t){if(t.getComposedRanges){let o=t.getComposedRanges(e.root)[0];if(o)return aE(e,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?aE(e,n):null}function WP(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function GP(e,t,n){let{node:r,fromOffset:o,toOffset:a,from:i,to:s}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,c=l.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:l.anchorOffset}],Zd(l)||u.push({node:l.focusNode,offset:l.focusOffset})),Gt&&e.input.lastKeyCode===8)for(let b=a;b>o;b--){let g=r.childNodes[b-1],y=g.pmViewDesc;if(g.nodeName=="BR"&&!y){a=b;break}if(!y||y.size)break}let d=e.state.doc,f=e.someProp("domParser")||ar.fromSchema(e.state.schema),p=d.resolve(i),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:a,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:KP,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=b),h={anchor:b+i,head:g+i}}return{doc:m,sel:h,from:i,to:s}}function KP(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(tn&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||tn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}var jP=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function XP(e,t,n,r,o){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let E=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,T=z0(e,E);if(T&&!e.state.selection.eq(T)){if(Gt&&io&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",W=>W(e,$a(13,"Enter"))))return;let I=e.state.tr.setSelection(T);E=="pointer"?I.setMeta("pointer",!0):E=="key"&&I.scrollIntoView(),a&&I.setMeta("composition",a),e.dispatch(I)}return}let i=e.state.doc.resolve(t),s=i.sharedDepth(n);t=i.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l=e.state.selection,u=GP(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let h=JP(d.content,u.doc.content,u.from,f,p);if(h&&e.input.domChangeCount++,(fs&&e.input.lastIOSEnter>Date.now()-225||io)&&o.some(E=>E.nodeType==1&&!jP.test(E.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",E=>E(e,$a(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(r&&l instanceof $&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let E=iE(e,e.state.doc,u.sel);if(E&&!E.eq(e.state.selection)){let T=e.state.tr.setSelection(E);a&&T.setMeta("composition",a),e.dispatch(T)}}return}e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof $&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),pn&&Xo<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),b=u.doc.resolveNoCache(h.endB-u.from),g=c.resolve(h.start),y=m.sameParent(b)&&m.parent.inlineContent&&g.end()>=h.endA,w;if((fs&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!y&&m.pos<u.doc.content.size&&(!m.sameParent(b)||!m.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(m.pos,b.pos,"",""))&&(w=K.findFrom(u.doc.resolve(m.pos+1),1,!0))&&w.head>m.pos)&&e.someProp("handleKeyDown",E=>E(e,$a(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&ZP(c,h.start,h.endA,m,b)&&e.someProp("handleKeyDown",E=>E(e,$a(8,"Backspace")))){io&&Gt&&e.domObserver.suppressSelectionUpdates();return}Gt&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),io&&!y&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,b=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(E){return E(e,$a(13,"Enter"))})},20));let x=h.start,S=h.endA,v=E=>{let T=E||e.state.tr.replace(x,S,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let I=iE(e,T.doc,u.sel);I&&!(Gt&&e.composing&&I.empty&&(h.start!=h.endB||e.input.lastChromeDelete<Date.now()-100)&&(I.head==x||I.head==T.mapping.map(S)-1)||pn&&I.empty&&I.head==x)&&T.setSelection(I)}return a&&T.setMeta("composition",a),T.scrollIntoView()},C;if(y){if(m.pos==b.pos){pn&&Xo<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>so(e),20));let E=v(e.state.tr.delete(x,S)),T=c.resolve(h.start).marksAcross(c.resolve(h.endA));T&&E.ensureMarks(T),e.dispatch(E)}else if(h.endA==h.endB&&(C=YP(m.parent.content.cut(m.parentOffset,b.parentOffset),g.parent.content.cut(g.parentOffset,h.endA-g.start())))){let E=v(e.state.tr);C.type=="add"?E.addMark(x,S,C.mark):E.removeMark(x,S,C.mark),e.dispatch(E)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let E=m.parent.textBetween(m.parentOffset,b.parentOffset),T=()=>v(e.state.tr.insertText(E,x,S));e.someProp("handleTextInput",I=>I(e,x,S,E,T))||e.dispatch(T())}}else e.dispatch(v())}function iE(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:H0(e,t.resolve(n.anchor),t.resolve(n.head))}function YP(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,a=r,i,s,l;for(let c=0;c<r.length;c++)o=r[c].removeFromSet(o);for(let c=0;c<n.length;c++)a=n[c].removeFromSet(a);if(o.length==1&&a.length==0)s=o[0],i="add",l=c=>c.mark(s.addToSet(c.marks));else if(o.length==0&&a.length==1)s=a[0],i="remove",l=c=>c.mark(s.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<t.childCount;c++)u.push(l(t.child(c)));if(D.from(u).eq(e))return{mark:s,type:i}}function ZP(e,t,n,r,o){if(n-t<=o.pos-r.pos||y0(r,!0,!1)<o.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let s=a.nodeAfter;return s!=null&&n==t+s.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let i=e.resolve(y0(a,!0,!0));return!i.parent.isTextblock||i.pos>n||y0(i,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(i.parent.content)}function y0(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let a=e.node(r).maybeChild(e.indexAfter(r));for(;a&&!a.isLeaf;)a=a.firstChild,o++}return o}function JP(e,t,n,r,o){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:i,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,a-Math.min(i,s));r-=i+l-a}if(i<a&&e.size<t.size){let l=r<=a&&r>=i?a-r:0;a-=l,a&&a<t.size&&sE(t.textBetween(a-1,a+1))&&(a+=l?1:-1),s=a+(s-i),i=a}else if(s<a){let l=r<=a&&r>=s?a-r:0;a-=l,a&&a<e.size&&sE(e.textBetween(a-1,a+1))&&(a+=l?1:-1),i=a+(i-s),s=a}return{start:a,endA:i,endB:s}}function sE(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}var ou=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new D0,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(fE),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=cE(this),uE(this),this.nodeViews=dE(this),this.docView=$C(this.state.doc,lE(this),x0(this),this.dom,this),this.domObserver=new B0(this,(r,o,a,i)=>XP(this,r,o,a,i)),this.domObserver.start(),vP(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&N0(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(fE),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,a=!1,i=!1;t.storedMarks&&this.composing&&(BE(this),i=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=dE(this);e6(p,this.nodeViews)&&(this.nodeViews=p,a=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&N0(this),this.editable=cE(this),uE(this);let l=x0(this),u=lE(this),c=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=a||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(o.selection))&&(i=!0);let f=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&zR(this);if(i){this.domObserver.stop();let p=d&&(pn||Gt)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&QP(o.selection,t.selection);if(d){let h=Gt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=NP(this)),(a||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=$C(t.doc,u,l,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&iP(this))?so(this,p):(EE(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&HR(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Y){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&PC(this,n.getBoundingClientRect(),t)}else PC(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let a=r.from+(this.state.doc.content.size-n.doc.content.size);(a>0&&this.state.doc.nodeAt(a))==r.node&&(o=a)}this.dragging=new Kd(t.slice,t.move,o<0?void 0:Y.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let i=0;i<this.directPlugins.length;i++){let s=this.directPlugins[i].props[t];if(s!=null&&(o=n?n(s):s))return o}let a=this.state.plugins;if(a)for(let i=0;i<a.length;i++){let s=a[i].props[t];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(pn){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&UR(this.dom),so(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return GR(this,t)}coordsAtPos(t,n=1){return yE(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return ZR(this,n||this.state,t)}pasteHTML(t,n){return nu(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return nu(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return U0(this,t)}destroy(){this.docView&&(SP(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],x0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,MR())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return CP(this,t)}domSelectionRange(){let t=this.domSelection();return t?tn&&this.root.nodeType===11&&NR(this.dom.ownerDocument)==this.dom&&VP(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};ou.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function lE(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[ye.node(0,e.state.doc.content.size,t)]}function uE(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:ye.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function cE(e){return!e.someProp("editable",t=>t(e.state)===!1)}function QP(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function dE(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function e6(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function fE(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var lo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ef={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},t6=typeof navigator<"u"&&/Mac/.test(navigator.platform),n6=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(dt=0;dt<10;dt++)lo[48+dt]=lo[96+dt]=String(dt);var dt;for(dt=1;dt<=24;dt++)lo[dt+111]="F"+dt;var dt;for(dt=65;dt<=90;dt++)lo[dt]=String.fromCharCode(dt+32),ef[dt]=String.fromCharCode(dt);var dt;for(Qd in lo)ef.hasOwnProperty(Qd)||(ef[Qd]=lo[Qd]);var Qd;function qE(e){var t=t6&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||n6&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ef:lo)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var r6=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),o6=typeof navigator<"u"&&/Win/.test(navigator.platform);function a6(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,a,i;for(let s=0;s<t.length-1;s++){let l=t[s];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))r6?i=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),i&&(n="Meta-"+n),a&&(n="Shift-"+n),n}function i6(e){let t=Object.create(null);for(let n in e)t[a6(n)]=e[n];return t}function G0(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function VE(e){return new ie({props:{handleKeyDown:su(e)}})}function su(e){let t=i6(e);return function(n,r){let o=qE(r),a,i=t[G0(o,r)];if(i&&i(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=t[G0(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(o6&&r.ctrlKey&&r.altKey)&&(a=lo[r.keyCode])&&a!=o){let s=t[G0(a,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}var tf=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function GE(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var j0=(e,t,n)=>{let r=GE(e,n);if(!r)return!1;let o=Y0(r);if(!o){let i=r.blockRange(),s=i&&ro(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)}let a=o.nodeBefore;if(tL(e,o,t,-1))return!0;if(r.parent.content.size==0&&(hs(a,"end")||Y.isSelectable(a)))for(let i=r.depth;;i--){let s=Yl(e.doc,r.before(i),r.after(i),B.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(hs(a,"end")?K.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Y.create(l.doc,o.pos-a.nodeSize)),t(l.scrollIntoView())}return!0}if(i==1||r.node(i-1).childCount>1)break}return a.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),!0):!1},KE=(e,t,n)=>{let r=GE(e,n);if(!r)return!1;let o=Y0(r);return o?XE(e,o,t):!1},jE=(e,t,n)=>{let r=YE(e,n);if(!r)return!1;let o=Q0(r);return o?XE(e,o,t):!1};function XE(e,t,n){let r=t.nodeBefore,o=r,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let i=t.nodeAfter,s=i,l=t.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let c=s.firstChild;if(!c)return!1;s=c}let u=Yl(e.doc,a,l,B.empty);if(!u||u.from!=a||u instanceof Vt&&u.slice.size>=l-a)return!1;if(n){let c=e.tr.step(u);c.setSelection($.create(c.doc,a)),n(c.scrollIntoView())}return!0}function hs(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var X0=(e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=Y0(r)}let i=a&&a.nodeBefore;return!i||!Y.isSelectable(i)?!1:(t&&t(e.tr.setSelection(Y.create(e.doc,a.pos-i.nodeSize)).scrollIntoView()),!0)};function Y0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function YE(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}var Z0=(e,t,n)=>{let r=YE(e,n);if(!r)return!1;let o=Q0(r);if(!o)return!1;let a=o.nodeAfter;if(tL(e,o,t,1))return!0;if(r.parent.content.size==0&&(hs(a,"start")||Y.isSelectable(a))){let i=Yl(e.doc,r.before(),r.after(),B.empty);if(i&&i.slice.size<i.to-i.from){if(t){let s=e.tr.step(i);s.setSelection(hs(a,"start")?K.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):Y.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return a.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos,o.pos+a.nodeSize).scrollIntoView()),!0):!1},J0=(e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;a=Q0(r)}let i=a&&a.nodeAfter;return!i||!Y.isSelectable(i)?!1:(t&&t(e.tr.setSelection(Y.create(e.doc,a.pos)).scrollIntoView()),!0)};function Q0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var ZE=(e,t)=>{let n=e.selection,r=n instanceof Y,o;if(r){if(n.node.isTextblock||!ir(e.doc,n.from))return!1;o=n.from}else if(o=rs(e.doc,n.from,-1),o==null)return!1;if(t){let a=e.tr.join(o);r&&a.setSelection(Y.create(a.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(a.scrollIntoView())}return!0},JE=(e,t)=>{let n=e.selection,r;if(n instanceof Y){if(n.node.isTextblock||!ir(e.doc,n.to))return!1;r=n.to}else if(r=rs(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},QE=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),a=o&&ro(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)},eb=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
19
+ `).scrollIntoView()),!0)};function tb(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var nb=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),a=n.indexAfter(-1),i=tb(o.contentMatchAt(a));if(!i||!o.canReplaceWith(a,a,i))return!1;if(t){let s=n.after(),l=e.tr.replaceWith(s,s,i.createAndFill());l.setSelection(K.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},rb=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof gt||r.parent.inlineContent||o.parent.inlineContent)return!1;let a=tb(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let i=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(i,a.createAndFill());s.setSelection($.create(s.doc,i+1)),t(s.scrollIntoView())}return!0},ob=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let a=n.before();if(Fn(e.doc,a))return t&&t(e.tr.split(a).scrollIntoView()),!0}let r=n.blockRange(),o=r&&ro(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function s6(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof Y&&t.selection.node.isBlock)return!r.parentOffset||!Fn(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],i,s,l=!1,u=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),u=r.start(p)==r.pos-(r.depth-p),s=tb(r.node(p-1).contentMatchAt(r.indexAfter(p-1)));let m=e&&e(o.parent,l,r);a.unshift(m||(l&&s?{type:s}:null)),i=p;break}else{if(p==1)return!1;a.unshift(null)}let c=t.tr;(t.selection instanceof $||t.selection instanceof gt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Fn(c.doc,d,a.length,a);if(f||(a[0]=s?{type:s}:null,f=Fn(c.doc,d,a.length,a)),!f)return!1;if(c.split(d,a.length,a),!l&&u&&r.node(i).type!=s){let p=c.mapping.map(r.before(i)),h=c.doc.resolve(p);s&&r.node(i-1).canReplaceWith(h.index(),h.index()+1,s)&&c.setNodeMarkup(c.mapping.map(r.before(i)),s)}return n&&n(c.scrollIntoView()),!0}}var l6=s6();var eL=(e,t)=>{let{$from:n,to:r}=e.selection,o,a=n.sharedDepth(r);return a==0?!1:(o=n.before(a),t&&t(e.tr.setSelection(Y.create(e.doc,o))),!0)},u6=(e,t)=>(t&&t(e.tr.setSelection(new gt(e.doc))),!0);function c6(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,a=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(o.isTextblock||ir(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function tL(e,t,n,r){let o=t.nodeBefore,a=t.nodeAfter,i,s,l=o.type.spec.isolating||a.type.spec.isolating;if(!l&&c6(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(s=o.contentMatchAt(o.childCount)).findWrapping(a.type))&&s.matchType(i[0]||a.type).validEnd){if(n){let p=t.pos+a.nodeSize,h=D.empty;for(let g=i.length-1;g>=0;g--)h=D.from(i[g].create(null,h));h=D.from(o.copy(h));let m=e.tr.step(new ct(t.pos-1,p,t.pos,p,new B(h,1,0),i.length,!0)),b=m.doc.resolve(p+2*i.length);b.nodeAfter&&b.nodeAfter.type==o.type&&ir(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let c=a.type.spec.isolating||r>0&&l?null:K.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&ro(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&hs(a,"start",!0)&&hs(o,"end")){let p=o,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=a,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=D.empty;for(let w=h.length-1;w>=0;w--)g=D.from(h[w].copy(g));let y=e.tr.step(new ct(t.pos-h.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new B(g,h.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function nL(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return o.node(a).isTextblock?(n&&n(t.tr.setSelection($.create(t.doc,e<0?o.start(a):o.end(a)))),!0):!1}}var ab=nL(-1),ib=nL(1);function rL(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),s=i&&ns(i,e,t);return s?(r&&r(n.tr.wrap(i,s).scrollIntoView()),!0):!1}}function sb(e,t=null){return function(n,r){let o=!1;for(let a=0;a<n.selection.ranges.length&&!o;a++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[a];n.doc.nodesBetween(i,s,(l,u)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let a=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];a.setBlockType(s,l,e,t)}r(a.scrollIntoView())}return!0}}function lb(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var K0=lb(tf,j0,X0),WE=lb(tf,Z0,J0),Jo={Enter:lb(eb,rb,ob,l6),"Mod-Enter":nb,Backspace:K0,"Mod-Backspace":K0,"Shift-Backspace":K0,Delete:WE,"Mod-Delete":WE,"Mod-a":u6},d6={"Ctrl-h":Jo.Backspace,"Alt-Backspace":Jo["Mod-Backspace"],"Ctrl-d":Jo.Delete,"Ctrl-Alt-Backspace":Jo["Mod-Delete"],"Alt-Delete":Jo["Mod-Delete"],"Alt-d":Jo["Mod-Delete"],"Ctrl-a":ab,"Ctrl-e":ib};for(let e in Jo)d6[e]=Jo[e];var NW=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1;function oL(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a);if(!i)return!1;let s=r?n.tr:null;return f6(s,i,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function f6(e,t,n,r=null){let o=!1,a=t,i=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=i.resolve(t.start-2);a=new Ba(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new Ba(t.$from,i.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let s=ns(a,n,r,t);return s?(e&&p6(e,t,s,o,n),!0):!1}function p6(e,t,n,r,o){let a=D.empty;for(let c=n.length-1;c>=0;c--)a=D.from(n[c].type.create(n[c].attrs,a));e.step(new ct(t.start-(r?2:0),t.end,t.start,t.end,new B(a,0,0),n.length,!0));let i=0;for(let c=0;c<n.length;c++)n[c].type==o&&(i=c+1);let s=n.length-i,l=t.start+n.length-(r?2:0),u=t.parent;for(let c=t.startIndex,d=t.endIndex,f=!0;c<d;c++,f=!1)!f&&Fn(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=u.child(c).nodeSize;return e}function aL(e){return function(t,n){let{$from:r,$to:o}=t.selection,a=r.blockRange(o,i=>i.childCount>0&&i.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?h6(t,n,e,a):m6(t,n,a):!0:!1}}function h6(e,t,n,r){let o=e.tr,a=r.end,i=r.$to.end(r.depth);a<i&&(o.step(new ct(a-1,i,a,i,new B(D.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ba(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));let s=ro(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(a,-1)-1);return ir(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),t(o.scrollIntoView()),!0}function m6(e,t,n){let r=e.tr,o=n.parent;for(let p=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)p-=o.child(h).nodeSize,r.delete(p-1,p+1);let a=r.doc.resolve(n.start),i=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,l=n.endIndex==o.childCount,u=a.node(-1),c=a.index(-1);if(!u.canReplace(c+(s?0:1),c+1,i.content.append(l?D.empty:D.from(o))))return!1;let d=a.pos,f=d+i.nodeSize;return r.step(new ct(d-(s?1:0),f+(l?1:0),d+1,f-1,new B((s?D.empty:D.from(o.copy(D.empty))).append(l?D.empty:D.from(o.copy(D.empty))),s?0:1,l?0:1),s?0:1)),t(r.scrollIntoView()),!0}function iL(e){return function(t,n){let{$from:r,$to:o}=t.selection,a=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!a)return!1;let i=a.startIndex;if(i==0)return!1;let s=a.parent,l=s.child(i-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==s.type,c=D.from(u?e.create():null),d=new B(D.from(e.create(null,D.from(s.type.create(null,c)))),u?3:1,0),f=a.start,p=a.end;n(t.tr.step(new ct(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function ff(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:o}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,a=n.storedMarks,n}}}var ms=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:t,editor:n,state:r}=this,{view:o}=n,{tr:a}=r,i=this.buildProps(a);return Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...c)=>{let d=l(...c)(i);return!a.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(a),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){let{rawCommands:r,editor:o,state:a}=this,{view:i}=o,s=[],l=!!t,u=t||a.tr,c=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),s.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,p])=>[f,(...m)=>{let b=this.buildProps(u,n),g=p(...m)(b);return s.push(g),d}])),run:c};return d}createCan(t){let{rawCommands:n,state:r}=this,o=!1,a=t||r.tr,i=this.buildProps(a,o);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(a,o)}}buildProps(t,n=!0){let{rawCommands:r,editor:o,state:a}=this,{view:i}=o,s={tr:t,editor:o,view:i,state:ff({state:a,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>u(...c)(s)]))}};return s}},fb=class{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){let r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){let r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}once(t,n){let r=(...o)=>{this.off(t,r),n.apply(this,o)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}};function V(e,t,n){return e.config[t]===void 0&&e.parent?V(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?V(e.parent,t,n):null}):e.config[t]}function pf(e){let t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function mL(e){let t=[],{nodeExtensions:n,markExtensions:r}=pf(e),o=[...n,...r],a={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(i=>{let s={name:i.name,options:i.options,storage:i.storage,extensions:o},l=V(i,"addGlobalAttributes",s);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...a,...p}})})})})}),o.forEach(i=>{let s={name:i.name,options:i.options,storage:i.storage},l=V(i,"addAttributes",s);if(!l)return;let u=l();Object.entries(u).forEach(([c,d])=>{let f={...a,...d};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,t.push({type:i.name,name:c,attribute:f})})}),t}function kt(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function se(...e){return e.filter(t=>!!t).reduce((t,n)=>{let r={...t};return Object.entries(n).forEach(([o,a])=>{if(!r[o]){r[o]=a;return}if(o==="class"){let s=a?String(a).split(" "):[],l=r[o]?r[o].split(" "):[],u=s.filter(c=>!l.includes(c));r[o]=[...l,...u].join(" ")}else if(o==="style"){let s=a?a.split(";").map(c=>c.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),s.forEach(c=>{let[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=a}),r},{})}function lf(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>se(n,r),{})}function gL(e){return typeof e=="function"}function me(e,t=void 0,...n){return gL(e)?t?e.bind(t)(...n):e(...n):e}function g6(e={}){return Object.keys(e).length===0&&e.constructor===Object}function b6(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function sL(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let o=t.reduce((a,i)=>{let s=i.attribute.parseHTML?i.attribute.parseHTML(n):b6(n.getAttribute(i.name));return s==null?a:{...a,[i.name]:s}},{});return{...r,...o}}}}function lL(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&g6(n)?!1:n!=null))}function x6(e,t){var n;let r=mL(e),{nodeExtensions:o,markExtensions:a}=pf(e),i=(n=o.find(u=>V(u,"topNode")))===null||n===void 0?void 0:n.name,s=Object.fromEntries(o.map(u=>{let c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,y)=>{let w=V(y,"extendNodeSchema",d);return{...g,...w?w(u):{}}},{}),p=lL({...f,content:me(V(u,"content",d)),marks:me(V(u,"marks",d)),group:me(V(u,"group",d)),inline:me(V(u,"inline",d)),atom:me(V(u,"atom",d)),selectable:me(V(u,"selectable",d)),draggable:me(V(u,"draggable",d)),code:me(V(u,"code",d)),whitespace:me(V(u,"whitespace",d)),linebreakReplacement:me(V(u,"linebreakReplacement",d)),defining:me(V(u,"defining",d)),isolating:me(V(u,"isolating",d)),attrs:Object.fromEntries(c.map(g=>{var y;return[g.name,{default:(y=g?.attribute)===null||y===void 0?void 0:y.default}]}))}),h=me(V(u,"parseHTML",d));h&&(p.parseDOM=h.map(g=>sL(g,c)));let m=V(u,"renderHTML",d);m&&(p.toDOM=g=>m({node:g,HTMLAttributes:lf(g,c)}));let b=V(u,"renderText",d);return b&&(p.toText=b),[u.name,p]})),l=Object.fromEntries(a.map(u=>{let c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((b,g)=>{let y=V(g,"extendMarkSchema",d);return{...b,...y?y(u):{}}},{}),p=lL({...f,inclusive:me(V(u,"inclusive",d)),excludes:me(V(u,"excludes",d)),group:me(V(u,"group",d)),spanning:me(V(u,"spanning",d)),code:me(V(u,"code",d)),attrs:Object.fromEntries(c.map(b=>{var g;return[b.name,{default:(g=b?.attribute)===null||g===void 0?void 0:g.default}]}))}),h=me(V(u,"parseHTML",d));h&&(p.parseDOM=h.map(b=>sL(b,c)));let m=V(u,"renderHTML",d);return m&&(p.toDOM=b=>m({mark:b,HTMLAttributes:lf(b,c)})),[u.name,p]}));return new za({topNode:i,nodes:s,marks:l})}function ub(e,t){return t.nodes[e]||t.marks[e]||null}function uL(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function bs(e,t){let n=to.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}var y6=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,a,i,s)=>{var l,u;let c=((u=(l=o.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:o,pos:a,parent:i,index:s}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?c:c.slice(0,Math.max(0,r-a))}),n};function xb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var gs=class{constructor(t){this.find=t.find,this.handler=t.handler}},w6=(e,t)=>{if(xb(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function nf(e){var t;let{editor:n,from:r,to:o,text:a,rules:i,plugin:s}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(r);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=y6(u)+a;return i.forEach(f=>{if(c)return;let p=w6(d,f.find);if(!p)return;let h=l.state.tr,m=ff({state:l.state,transaction:h}),b={from:r-(p[0].length-a.length),to:o},{commands:g,chain:y,can:w}=new ms({editor:n,state:m});f.handler({state:m,range:b,match:p,commands:g,chain:y,can:w})===null||!h.steps.length||(h.setMeta(s,{transform:h,from:r,to:o,text:a}),l.dispatch(h),c=!0)}),c}function v6(e){let{editor:t,rules:n}=e,r=new ie({state:{init(){return null},apply(o,a,i){let s=o.getMeta(r);if(s)return s;let l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=bs(D.from(c),i.schema);let{from:d}=l,f=d+c.length;nf({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:a}},props:{handleTextInput(o,a,i,s){return nf({editor:t,from:a,to:i,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{let{$cursor:a}=o.state.selection;a&&nf({editor:t,from:a.pos,to:a.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,a){if(a.key!=="Enter")return!1;let{$cursor:i}=o.state.selection;return i?nf({editor:t,from:i.pos,to:i.pos,text:`
20
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function S6(e){return Object.prototype.toString.call(e).slice(8,-1)}function rf(e){return S6(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function hf(e,t){let n={...e};return rf(e)&&rf(t)&&Object.keys(t).forEach(r=>{rf(t[r])&&rf(e[r])?n[r]=hf(e[r],t[r]):n[r]=t[r]}),n}var tt=class e{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=me(V(this,"addOptions",{name:this.name}))),this.storage=me(V(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(t={}){let n=this.extend({...this.config,addOptions:()=>hf(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){let n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=me(V(n,"addOptions",{name:n.name})),n.storage=me(V(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){let{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){let i=o.marks();if(!!!i.find(u=>u?.type.name===n.name))return!1;let l=i.find(u=>u?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}};function k6(e){return typeof e=="number"}var pb=class{constructor(t){this.find=t.find,this.handler=t.handler}},C6=(e,t,n)=>{if(xb(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(o=>{let a=[o.text];return a.index=o.index,a.input=e,a.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),a.push(o.replaceWith)),a}):[]};function E6(e){let{editor:t,state:n,from:r,to:o,rule:a,pasteEvent:i,dropEvent:s}=e,{commands:l,chain:u,can:c}=new ms({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,h)=>{if(!p.isTextblock||p.type.spec.code)return;let m=Math.max(r,h),b=Math.min(o,h+p.content.size),g=p.textBetween(m-h,b-h,void 0,"");C6(g,a.find,i).forEach(w=>{if(w.index===void 0)return;let x=m+w.index+1,S=x+w[0].length,v={from:n.tr.mapping.map(x),to:n.tr.mapping.map(S)},C=a.handler({state:n,range:v,match:w,commands:l,chain:u,can:c,pasteEvent:i,dropEvent:s});d.push(C)})}),d.every(p=>p!==null)}var of=null,L6=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function I6(e){let{editor:t,rules:n}=e,r=null,o=!1,a=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}let l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{let m=c.tr,b=ff({state:c,transaction:m});if(!(!E6({editor:t,state:b,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:s})||!m.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new ie({view(d){let f=h=>{var m;r=!((m=d.dom.parentElement)===null||m===void 0)&&m.contains(h.target)?d.dom.parentElement:null,r&&(of=t)},p=()=>{of&&(of=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(a=r===d.dom.parentElement,s=f,!a){let p=of;p?.isEditable&&setTimeout(()=>{let h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;let h=(p=f.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return i=f,o=!!h?.includes("data-pm-slice"),!1}}},appendTransaction:(d,f,p)=>{let h=d[0],m=h.getMeta("uiEvent")==="paste"&&!o,b=h.getMeta("uiEvent")==="drop"&&!a,g=h.getMeta("applyPasteRules"),y=!!g;if(!m&&!b&&!y)return;if(y){let{text:S}=g;typeof S=="string"?S=S:S=bs(D.from(S),p.schema);let{from:v}=g,C=v+S.length,E=L6(S);return l({rule:c,state:p,from:v,to:{b:C},pasteEvt:E})}let w=f.doc.content.findDiffStart(p.doc.content),x=f.doc.content.findDiffEnd(p.doc.content);if(!(!k6(w)||!x||w===x.b))return l({rule:c,state:p,from:w,to:x,pasteEvt:i})}}))}function M6(e){let t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}var hb=class e{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=x6(this.extensions,n),this.setupExtensions()}static resolve(t){let n=e.sort(e.flatten(t)),r=M6(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{let r={name:n.name,options:n.options,storage:n.storage},o=V(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{let a=V(r,"priority")||100,i=V(o,"priority")||100;return a>i?-1:a<i?1:0})}get commands(){return this.extensions.reduce((t,n)=>{let r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:ub(n.name,this.schema)},o=V(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){let{editor:t}=this,n=e.sort([...this.extensions].reverse()),r=[],o=[],a=n.map(i=>{let s={name:i.name,options:i.options,storage:i.storage,editor:t,type:ub(i.name,this.schema)},l=[],u=V(i,"addKeyboardShortcuts",s),c={};if(i.type==="mark"&&V(i,"exitable",s)&&(c.ArrowRight=()=>tt.handleExit({editor:t,mark:i})),u){let m=Object.fromEntries(Object.entries(u()).map(([b,g])=>[b,()=>g({editor:t})]));c={...c,...m}}let d=VE(c);l.push(d);let f=V(i,"addInputRules",s);uL(i,t.options.enableInputRules)&&f&&r.push(...f());let p=V(i,"addPasteRules",s);uL(i,t.options.enablePasteRules)&&p&&o.push(...p());let h=V(i,"addProseMirrorPlugins",s);if(h){let m=h();l.push(...m)}return l}).flat();return[v6({editor:t,rules:r}),...I6({editor:t,rules:o}),...a]}get attributes(){return mL(this.extensions)}get nodeViews(){let{editor:t}=this,{nodeExtensions:n}=pf(this.extensions);return Object.fromEntries(n.filter(r=>!!V(r,"addNodeView")).map(r=>{let o=this.attributes.filter(l=>l.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t,type:kt(r.name,this.schema)},i=V(r,"addNodeView",a);if(!i)return[];let s=(l,u,c,d,f)=>{let p=lf(l,o);return i()({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:t,extension:r,HTMLAttributes:p})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;let r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:ub(t.name,this.schema)};t.type==="mark"&&(!((n=me(V(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);let o=V(t,"onBeforeCreate",r),a=V(t,"onCreate",r),i=V(t,"onUpdate",r),s=V(t,"onSelectionUpdate",r),l=V(t,"onTransaction",r),u=V(t,"onFocus",r),c=V(t,"onBlur",r),d=V(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),a&&this.editor.on("create",a),i&&this.editor.on("update",i),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}},Ce=class e{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=me(V(this,"addOptions",{name:this.name}))),this.storage=me(V(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(t={}){let n=this.extend({...this.config,addOptions:()=>hf(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){let n=new e({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=me(V(n,"addOptions",{name:n.name})),n.storage=me(V(n,"addStorage",{name:n.name,options:n.options})),n}};function bL(e,t,n){let{from:r,to:o}=t,{blockSeparator:a=`
21
+
22
+ `,textSerializers:i={}}=n||{},s="";return e.nodesBetween(r,o,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(s+=a);let p=i?.[l.type.name];if(p)return c&&(s+=p({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(s+=(f=l?.text)===null||f===void 0?void 0:f.slice(Math.max(r,u)-u,o-u))}),s}function xL(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}var yL=Ce.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ie({key:new de("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:a}=o,i=Math.min(...a.map(c=>c.$from.pos)),s=Math.max(...a.map(c=>c.$to.pos)),l=xL(n);return bL(r,{from:i,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),_6=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),T6=(e=!1)=>({commands:t})=>t.setContent("",e),A6=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:a,$to:i})=>{e.doc.nodesBetween(a.pos,i.pos,(s,l)=>{if(s.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+s.nodeSize)),p=d.blockRange(f);if(!p)return;let h=ro(p);if(s.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},D6=e=>t=>e(t),N6=()=>({state:e,dispatch:t})=>rb(e,t),O6=(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,a=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let i=r.mapping.map(t);return r.insert(i,a.content),r.setSelection(new $(r.doc.resolve(Math.max(i-1,0)))),!0},R6=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let o=e.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===r.type){if(t){let s=o.before(a),l=o.after(a);e.delete(s,l).scrollIntoView()}return!0}return!1},P6=e=>({tr:t,state:n,dispatch:r})=>{let o=kt(e,n.schema),a=t.selection.$anchor;for(let i=a.depth;i>0;i-=1)if(a.node(i).type===o){if(r){let l=a.before(i),u=a.after(i);t.delete(l,u).scrollIntoView()}return!0}return!1},B6=e=>({tr:t,dispatch:n})=>{let{from:r,to:o}=e;return n&&t.delete(r,o),!0},F6=()=>({state:e,dispatch:t})=>tf(e,t),z6=()=>({commands:e})=>e.keyboardShortcut("Enter"),H6=()=>({state:e,dispatch:t})=>nb(e,t);function uf(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:xb(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function wL(e,t,n={}){return e.find(r=>r.type===t&&uf(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function cL(e,t,n={}){return!!wL(e,t,n)}function yb(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===t)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!wL([...o.node.marks],t,n)))return;let i=o.index,s=e.start()+o.offset,l=i+1,u=s+o.node.nodeSize;for(;i>0&&cL([...e.parent.child(i-1).marks],t,n);)i-=1,s-=e.parent.child(i).nodeSize;for(;l<e.parent.childCount&&cL([...e.parent.child(l).marks],t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:s,to:u}}function Qo(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var U6=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let a=Qo(e,r.schema),{doc:i,selection:s}=n,{$from:l,from:u,to:c}=s;if(o){let d=yb(l,a,t);if(d&&d.from<=u&&d.to>=c){let f=$.create(i,d.from,d.to);n.setSelection(f)}}return!0},$6=e=>t=>{let n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function mf(e){return e instanceof $}function uo(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function vL(e,t=null){if(!t)return null;let n=K.atStart(e),r=K.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;let o=n.from,a=r.to;return t==="all"?$.create(e,uo(0,o,a),uo(e.content.size,o,a)):$.create(e,uo(t,o,a),uo(t,o,a))}function dL(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function cf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function q6(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var V6=(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:a})=>{t={scrollIntoView:!0,...t};let i=()=>{(cf()||dL())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),q6()&&!cf()&&!dL()&&r.dom.focus({preventScroll:!0}))})};if(r.hasFocus()&&e===null||e===!1)return!0;if(a&&e===null&&!mf(n.state.selection))return i(),!0;let s=vL(o.doc,e)||n.state.selection,l=n.state.selection.eq(s);return a&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},W6=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),G6=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),SL=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&SL(r)}return e};function af(e){let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return SL(n)}function lu(e,t,n){if(e instanceof Bn||e instanceof D)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return D.fromArray(e.map(s=>t.nodeFromJSON(s)));let i=t.nodeFromJSON(e);return n.errorOnInvalidContent&&i.check(),i}catch(a){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",a),lu("",t,n)}if(o){if(n.errorOnInvalidContent){let i=!1,s="",l=new za({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(i=!0,s=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?ar.fromSchema(l).parseSlice(af(e),n.parseOptions):ar.fromSchema(l).parse(af(e),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}let a=ar.fromSchema(t);return n.slice?a.parseSlice(af(e),n.parseOptions).content:a.parse(af(e),n.parseOptions)}return lu("",t,n)}function K6(e,t,n){let r=e.steps.length-1;if(r<t)return;let o=e.steps[r];if(!(o instanceof Vt||o instanceof ct))return;let a=e.mapping.maps[r],i=0;a.forEach((s,l,u,c)=>{i===0&&(i=c)}),e.setSelection(K.near(e.doc.resolve(i),n))}var j6=e=>!("type"in e),X6=(e,t,n)=>({tr:r,dispatch:o,editor:a})=>{var i;if(o){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s,l=b=>{a.emit("contentError",{editor:a,error:b,disableCollaboration:()=>{a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{lu(t,a.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(b){l(b)}try{s=lu(t,a.schema,{parseOptions:u,errorOnInvalidContent:(i=n.errorOnInvalidContent)!==null&&i!==void 0?i:a.options.enableContentCheck})}catch(b){return l(b),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0;if((j6(s)?s:[s]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,p=p?b.isBlock:!1}),c===d&&p){let{parent:b}=r.doc.resolve(c);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof D){let b="";t.forEach(g=>{g.text&&(b+=g.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,c,d)}else m=s,r.replaceWith(c,d,m);n.updateSelection&&K6(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},Y6=()=>({state:e,dispatch:t})=>ZE(e,t),Z6=()=>({state:e,dispatch:t})=>JE(e,t),J6=()=>({state:e,dispatch:t})=>j0(e,t),Q6=()=>({state:e,dispatch:t})=>Z0(e,t),eB=()=>({state:e,dispatch:t,tr:n})=>{try{let r=rs(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},tB=()=>({state:e,dispatch:t,tr:n})=>{try{let r=rs(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},nB=()=>({state:e,dispatch:t})=>KE(e,t),rB=()=>({state:e,dispatch:t})=>jE(e,t);function kL(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function oB(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,o,a,i;for(let s=0;s<t.length-1;s+=1){let l=t[s];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))cf()||kL()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var aB=e=>({editor:t,view:n,tr:r,dispatch:o})=>{let a=oB(e).split(/-(?!$)/),i=a.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),s=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,s))});return l?.steps.forEach(u=>{let c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function uu(e,t,n={}){let{from:r,to:o,empty:a}=e.selection,i=t?kt(t,e.schema):null,s=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;let p=Math.max(r,f),h=Math.min(o,f+d.nodeSize);s.push({node:d,from:p,to:h})});let l=o-r,u=s.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>uf(d.node.attrs,n,{strict:!1}));return a?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var iB=(e,t={})=>({state:n,dispatch:r})=>{let o=kt(e,n.schema);return uu(n,o,t)?QE(n,r):!1},sB=()=>({state:e,dispatch:t})=>ob(e,t),lB=e=>({state:t,dispatch:n})=>{let r=kt(e,t.schema);return aL(r)(t,n)},uB=()=>({state:e,dispatch:t})=>eb(e,t);function gf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function fL(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var cB=(e,t)=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null,s=gf(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(a=kt(e,r.schema)),s==="mark"&&(i=Qo(e,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{a&&a===u.type&&n.setNodeMarkup(c,void 0,fL(u.attrs,t)),i&&u.marks.length&&u.marks.forEach(d=>{i===d.type&&n.addMark(c,c+u.nodeSize,i.create(fL(d.attrs,t)))})})}),!0):!1},dB=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),fB=()=>({tr:e,dispatch:t})=>{if(t){let n=new gt(e.doc);e.setSelection(n)}return!0},pB=()=>({state:e,dispatch:t})=>X0(e,t),hB=()=>({state:e,dispatch:t})=>J0(e,t),mB=()=>({state:e,dispatch:t})=>eL(e,t),gB=()=>({state:e,dispatch:t})=>ib(e,t),bB=()=>({state:e,dispatch:t})=>ab(e,t);function mb(e,t,n={},r={}){return lu(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var xB=(e,t=!1,n={},r={})=>({editor:o,tr:a,dispatch:i,commands:s})=>{var l,u;let{doc:c}=a;if(n.preserveWhitespace!=="full"){let d=mb(e,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return i&&a.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!t),!0}return i&&a.setMeta("preventUpdate",!t),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck})};function CL(e,t){let n=Qo(t,e.schema),{from:r,to:o,empty:a}=e.selection,i=[];a?(e.storedMarks&&i.push(...e.storedMarks),i.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{i.push(...l.marks)});let s=i.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function EL(e,t){let n=new Wo(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function yB(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function bf(e,t){let n=[];return e.descendants((r,o)=>{t(r)&&n.push({node:r,pos:o})}),n}function LL(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(o,a)=>{n(o)&&r.push({node:o,pos:a})}),r}function wb(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function vb(e){return t=>wb(t.$from,e)}function wB(e,t){let n={from:0,to:e.content.size};return bL(e,n,t)}function vB(e,t){let n=kt(t,e.schema),{from:r,to:o}=e.selection,a=[];e.doc.nodesBetween(r,o,s=>{a.push(s)});let i=a.reverse().find(s=>s.type.name===n.name);return i?{...i.attrs}:{}}function Sb(e,t){let n=gf(typeof t=="string"?t:t.name,e.schema);return n==="node"?vB(e,t):n==="mark"?CL(e,t):{}}function SB(e,t=JSON.stringify){let n={};return e.filter(r=>{let o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function kB(e){let t=SB(e);return t.length===1?t:t.filter((n,r)=>!t.filter((a,i)=>i!==r).some(a=>n.oldRange.from>=a.oldRange.from&&n.oldRange.to<=a.oldRange.to&&n.newRange.from>=a.newRange.from&&n.newRange.to<=a.newRange.to))}function IL(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,a)=>{let i=[];if(o.ranges.length)o.forEach((s,l)=>{i.push({from:s,to:l})});else{let{from:s,to:l}=n[a];if(s===void 0||l===void 0)return;i.push({from:s,to:l})}i.forEach(({from:s,to:l})=>{let u=t.slice(a).map(s,-1),c=t.slice(a).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),kB(r)}function xf(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(o=>{let a=n.resolve(e),i=yb(a,o.type);i&&r.push({mark:o,...i})}):n.nodesBetween(e,t,(o,a)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(i=>({from:a,to:a+o.nodeSize,mark:i})))}),r}function sf(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=e.find(a=>a.type===t&&a.name===r);return o?o.attribute.keepOnSplit:!1}))}function gb(e,t,n={}){let{empty:r,ranges:o}=e.selection,a=t?Qo(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>a?a.name===d.type.name:!0).find(d=>uf(d.attrs,n,{strict:!1}));let i=0,s=[];if(o.forEach(({$from:d,$to:f})=>{let p=d.pos,h=f.pos;e.doc.nodesBetween(p,h,(m,b)=>{if(!m.isText&&!m.marks.length)return;let g=Math.max(p,b),y=Math.min(h,b+m.nodeSize),w=y-g;i+=w,s.push(...m.marks.map(x=>({mark:x,from:g,to:y})))})}),i===0)return!1;let l=s.filter(d=>a?a.name===d.mark.type.name:!0).filter(d=>uf(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=s.filter(d=>a?d.mark.type!==a&&d.mark.type.excludes(a):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=i}function CB(e,t,n={}){if(!t)return uu(e,null,n)||gb(e,null,n);let r=gf(t,e.schema);return r==="node"?uu(e,t,n):r==="mark"?gb(e,t,n):!1}function pL(e,t){let{nodeExtensions:n}=pf(t),r=n.find(i=>i.name===e);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},a=me(V(r,"group",o));return typeof a!="string"?!1:a.split(" ").includes("list")}function cu(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(a=>{o!==!1&&(cu(a,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function yf(e){return e instanceof Y}function ML(e,t,n){let o=e.state.doc.content.size,a=uo(t,0,o),i=uo(n,0,o),s=e.coordsAtPos(a),l=e.coordsAtPos(i,-1),u=Math.min(s.top,l.top),c=Math.max(s.bottom,l.bottom),d=Math.min(s.left,l.left),f=Math.max(s.right,l.right),p=f-d,h=c-u,g={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...g,toJSON:()=>g}}function EB(e,t,n){var r;let{selection:o}=t,a=null;if(mf(o)&&(a=o.$cursor),a){let s=(r=e.storedMarks)!==null&&r!==void 0?r:a.marks();return!!n.isInSet(s)||!s.some(l=>l.type.excludes(n))}let{ranges:i}=o;return i.some(({$from:s,$to:l})=>{let u=s.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var LB=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let{selection:a}=n,{empty:i,ranges:s}=a,l=Qo(e,r.schema);if(o)if(i){let u=CL(r,l);n.addStoredMark(l.create({...u,...t}))}else s.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return EB(r,n,l)},IB=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),MB=(e,t={})=>({state:n,dispatch:r,chain:o})=>{let a=kt(e,n.schema),i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),a.isTextblock?o().command(({commands:s})=>sb(a,{...i,...t})(n)?!0:s.clearNodes()).command(({state:s})=>sb(a,{...i,...t})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},_B=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,o=uo(e,0,r.content.size),a=Y.create(r,o);t.setSelection(a)}return!0},TB=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:o,to:a}=typeof e=="number"?{from:e,to:e}:e,i=$.atStart(r).from,s=$.atEnd(r).to,l=uo(o,i,s),u=uo(a,i,s),c=$.create(r,l,u);t.setSelection(c)}return!0},AB=e=>({state:t,dispatch:n})=>{let r=kt(e,t.schema);return iL(r)(t,n)};function hL(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var DB=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:a,doc:i}=t,{$from:s,$to:l}=a,u=o.extensionManager.attributes,c=sf(u,s.node().type.name,s.node().attrs);if(a instanceof Y&&a.node.isBlock)return!s.parentOffset||!Fn(i,s.pos)?!1:(r&&(e&&hL(n,o.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=s.depth===0?void 0:yB(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=Fn(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!h&&Fn(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),r){if(h&&(a instanceof $&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let m=t.mapping.map(s.before()),b=t.doc.resolve(m);s.node(-1).canReplaceWith(b.index(),b.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&hL(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return h},NB=(e,t={})=>({tr:n,state:r,dispatch:o,editor:a})=>{var i;let s=kt(e,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;let d=l.node(-1);if(d.type!==s)return!1;let f=a.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let g=D.empty,y=l.index(-1)?1:l.index(-2)?2:3;for(let E=l.depth-y;E>=l.depth-3;E-=1)g=D.from(l.node(E).copy(g));let w=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,x={...sf(f,l.node().type.name,l.node().attrs),...t},S=((i=s.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(x))||void 0;g=g.append(D.from(s.createAndFill(null,S)||void 0));let v=l.before(l.depth-(y-1));n.replace(v,l.after(-w),new B(g,4-y,0));let C=-1;n.doc.nodesBetween(v,n.doc.content.size,(E,T)=>{if(C>-1)return!1;E.isTextblock&&E.content.size===0&&(C=T+1)}),C>-1&&n.setSelection($.near(n.doc.resolve(C))),n.scrollIntoView()}return!0}let p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...sf(f,d.type.name,d.attrs),...t},m={...sf(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);let b=p?[{type:s,attrs:h},{type:p,attrs:m}]:[{type:s,attrs:h}];if(!Fn(n.doc,l.pos,2))return!1;if(o){let{selection:g,storedMarks:y}=r,{splittableMarks:w}=a.extensionManager,x=y||g.$to.parentOffset&&g.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!x||!o)return!0;let S=x.filter(v=>w.includes(v.type.name));n.ensureMarks(S)}return!0},cb=(e,t)=>{let n=vb(i=>i.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&ir(e.doc,n.pos)&&e.join(n.pos),!0},db=(e,t)=>{let n=vb(i=>i.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let o=e.doc.nodeAt(r);return n.node.type===o?.type&&ir(e.doc,r)&&e.join(r),!0},OB=(e,t,n,r={})=>({editor:o,tr:a,state:i,dispatch:s,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=o.extensionManager,p=kt(e,i.schema),h=kt(t,i.schema),{selection:m,storedMarks:b}=i,{$from:g,$to:y}=m,w=g.blockRange(y),x=b||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;let S=vb(v=>pL(v.type.name,d))(m);if(w.depth>=1&&S&&w.depth-S.depth<=1){if(S.node.type===p)return u.liftListItem(h);if(pL(S.node.type.name,d)&&p.validContent(S.node.content)&&s)return l().command(()=>(a.setNodeMarkup(S.pos,p),!0)).command(()=>cb(a,p)).command(()=>db(a,p)).run()}return!n||!x||!s?l().command(()=>c().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>cb(a,p)).command(()=>db(a,p)).run():l().command(()=>{let v=c().wrapInList(p,r),C=x.filter(E=>f.includes(E.type.name));return a.ensureMarks(C),v?!0:u.clearNodes()}).wrapInList(p,r).command(()=>cb(a,p)).command(()=>db(a,p)).run()},RB=(e,t={},n={})=>({state:r,commands:o})=>{let{extendEmptyMarkRange:a=!1}=n,i=Qo(e,r.schema);return gb(r,i,t)?o.unsetMark(i,{extendEmptyMarkRange:a}):o.setMark(i,t)},PB=(e,t,n={})=>({state:r,commands:o})=>{let a=kt(e,r.schema),i=kt(t,r.schema),s=uu(r,a,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(i,l):o.setNode(a,{...l,...n})},BB=(e,t={})=>({state:n,commands:r})=>{let o=kt(e,n.schema);return uu(n,o,t)?r.lift(o):r.wrapIn(o,t)},FB=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let o=n[r],a;if(o.spec.isInputRules&&(a=o.getState(e))){if(t){let i=e.tr,s=a.transform;for(let l=s.steps.length-1;l>=0;l-=1)i.step(s.steps[l].invert(s.docs[l]));if(a.text){let l=i.doc.resolve(a.from).marks();i.replaceWith(a.from,a.to,e.schema.text(a.text,l))}else i.delete(a.from,a.to)}return!0}}return!1},zB=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(a=>{e.removeMark(a.$from.pos,a.$to.pos)}),!0},HB=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var a;let{extendEmptyMarkRange:i=!1}=t,{selection:s}=n,l=Qo(e,r.schema),{$from:u,empty:c,ranges:d}=s;if(!o)return!0;if(c&&i){let{from:f,to:p}=s,h=(a=u.marks().find(b=>b.type===l))===null||a===void 0?void 0:a.attrs,m=yb(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},UB=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null,s=gf(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(a=kt(e,r.schema)),s==="mark"&&(i=Qo(e,r.schema)),o&&n.selection.ranges.forEach(l=>{let u=l.$from.pos,c=l.$to.pos,d,f,p,h;n.selection.empty?r.doc.nodesBetween(u,c,(m,b)=>{a&&a===m.type&&(p=Math.max(b,u),h=Math.min(b+m.nodeSize,c),d=b,f=m)}):r.doc.nodesBetween(u,c,(m,b)=>{b<u&&a&&a===m.type&&(p=Math.max(b,u),h=Math.min(b+m.nodeSize,c),d=b,f=m),b>=u&&b<=c&&(a&&a===m.type&&n.setNodeMarkup(b,void 0,{...m.attrs,...t}),i&&m.marks.length&&m.marks.forEach(g=>{if(i===g.type){let y=Math.max(b,u),w=Math.min(b+m.nodeSize,c);n.addMark(y,w,i.create({...g.attrs,...t}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...t}),i&&f.marks.length&&f.marks.forEach(m=>{i===m.type&&n.addMark(p,h,i.create({...m.attrs,...t}))}))}),!0):!1},$B=(e,t={})=>({state:n,dispatch:r})=>{let o=kt(e,n.schema);return rL(o,t)(n,r)},qB=(e,t={})=>({state:n,dispatch:r})=>{let o=kt(e,n.schema);return oL(o,t)(n,r)},VB=Object.freeze({__proto__:null,blur:_6,clearContent:T6,clearNodes:A6,command:D6,createParagraphNear:N6,cut:O6,deleteCurrentNode:R6,deleteNode:P6,deleteRange:B6,deleteSelection:F6,enter:z6,exitCode:H6,extendMarkRange:U6,first:$6,focus:V6,forEach:W6,insertContent:G6,insertContentAt:X6,joinBackward:J6,joinDown:Z6,joinForward:Q6,joinItemBackward:eB,joinItemForward:tB,joinTextblockBackward:nB,joinTextblockForward:rB,joinUp:Y6,keyboardShortcut:aB,lift:iB,liftEmptyBlock:sB,liftListItem:lB,newlineInCode:uB,resetAttributes:cB,scrollIntoView:dB,selectAll:fB,selectNodeBackward:pB,selectNodeForward:hB,selectParentNode:mB,selectTextblockEnd:gB,selectTextblockStart:bB,setContent:xB,setMark:LB,setMeta:IB,setNode:MB,setNodeSelection:_B,setTextSelection:TB,sinkListItem:AB,splitBlock:DB,splitListItem:NB,toggleList:OB,toggleMark:RB,toggleNode:PB,toggleWrap:BB,undoInputRule:FB,unsetAllMarks:zB,unsetMark:HB,updateAttributes:UB,wrapIn:$B,wrapInList:qB}),_L=Ce.create({name:"commands",addCommands(){return{...VB}}}),TL=Ce.create({name:"drop",addProseMirrorPlugins(){return[new ie({key:new de("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),AL=Ce.create({name:"editable",addProseMirrorPlugins(){return[new ie({key:new de("editable"),props:{editable:()=>this.editor.options.editable}})]}}),DL=new de("focusEvents"),NL=Ce.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new ie({key:DL,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),OL=Ce.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:s})=>{let{selection:l,doc:u}=s,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?s.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,b=d.pos-d.parentOffset,g=m&&h.parent.childCount===1?b===d.pos:K.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!g||g&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},a={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return cf()||kL()?a:o},addProseMirrorPlugins(){return[new ie({key:new de("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;let r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;let{empty:a,from:i,to:s}=t.selection,l=K.atStart(t.doc).from,u=K.atEnd(t.doc).to;if(a||!(i===l&&s===u)||!cu(n.doc))return;let f=n.tr,p=ff({state:n,transaction:f}),{commands:h}=new ms({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),RL=Ce.create({name:"paste",addProseMirrorPlugins(){return[new ie({key:new de("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),PL=Ce.create({name:"tabindex",addProseMirrorPlugins(){return[new ie({key:new de("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),BL=Object.freeze({__proto__:null,ClipboardTextSerializer:yL,Commands:_L,Drop:TL,Editable:AL,FocusEvents:NL,Keymap:OL,Paste:RL,Tabindex:PL,focusEventsPluginKey:DL}),bb=class e{get name(){return this.node.type.name}constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let o=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,i=this.pos+r+(a?0:1);if(i<0||i>this.resolvedPos.doc.nodeSize-2)return;let s=this.resolvedPos.doc.resolve(i);if(!o&&s.depth<=this.depth)return;let l=new e(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new e(s,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){let a=o.node.attrs,i=Object.keys(n);for(let s=0;s<i.length;s+=1){let l=i[s];if(a[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;let a=Object.keys(n);return this.children.forEach(i=>{r&&o.length>0||(i.node.type.name===t&&a.every(l=>n[l]===i.node.attrs[l])&&o.push(i),!(r&&o.length>0)&&(o=o.concat(i.querySelectorAll(t,n,r))))}),o}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},WB=`.ProseMirror {
23
+ position: relative;
24
+ }
25
+
26
+ .ProseMirror {
27
+ word-wrap: break-word;
28
+ white-space: pre-wrap;
29
+ white-space: break-spaces;
30
+ -webkit-font-variant-ligatures: none;
31
+ font-variant-ligatures: none;
32
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
33
+ }
34
+
35
+ .ProseMirror [contenteditable="false"] {
36
+ white-space: normal;
37
+ }
38
+
39
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
40
+ white-space: pre-wrap;
41
+ }
42
+
43
+ .ProseMirror pre {
44
+ white-space: pre-wrap;
45
+ }
46
+
47
+ img.ProseMirror-separator {
48
+ display: inline !important;
49
+ border: none !important;
50
+ margin: 0 !important;
51
+ width: 0 !important;
52
+ height: 0 !important;
53
+ }
54
+
55
+ .ProseMirror-gapcursor {
56
+ display: none;
57
+ pointer-events: none;
58
+ position: absolute;
59
+ margin: 0;
60
+ }
61
+
62
+ .ProseMirror-gapcursor:after {
63
+ content: "";
64
+ display: block;
65
+ position: absolute;
66
+ top: -2px;
67
+ width: 20px;
68
+ border-top: 1px solid black;
69
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
70
+ }
71
+
72
+ @keyframes ProseMirror-cursor-blink {
73
+ to {
74
+ visibility: hidden;
75
+ }
76
+ }
77
+
78
+ .ProseMirror-hideselection *::selection {
79
+ background: transparent;
80
+ }
81
+
82
+ .ProseMirror-hideselection *::-moz-selection {
83
+ background: transparent;
84
+ }
85
+
86
+ .ProseMirror-hideselection * {
87
+ caret-color: transparent;
88
+ }
89
+
90
+ .ProseMirror-focused .ProseMirror-gapcursor {
91
+ display: block;
92
+ }
93
+
94
+ .tippy-box[data-animation=fade][data-state=hidden] {
95
+ opacity: 0
96
+ }`;function GB(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var df=class extends fb{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=GB(WB,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){let r=gL(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(t){if(this.isDestroyed)return;let n=this.state.plugins,r=n;if([].concat(t).forEach(a=>{let i=typeof a=="string"?`${a}$`:a.key;r=r.filter(s=>!s.key.startsWith(i))}),n.length===r.length)return;let o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var t,n;let o=[...this.options.enableCoreExtensions?[AL,yL.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),_L,NL,OL,PL,TL,RL].filter(a=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[a.name]!==!1:!0):[],...this.options.extensions].filter(a=>["extension","node","mark"].includes(a?.type));this.extensionManager=new hb(o,this)}createCommandManager(){this.commandManager=new ms({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let n;try{n=mb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(i){if(!(i instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(i.message))throw i;this.emit("contentError",{editor:this,error:i,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),n=mb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}let r=vL(n,this.options.autofocus);this.view=new ou(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Hd.create({doc:n,selection:r||void 0})});let o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();let a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;let n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(i=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(i)});return}let n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});let o=t.getMeta("focus"),a=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),a&&this.emit("blur",{editor:this,event:a.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return Sb(this.state,t)}isActive(t,n){let r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return CB(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return bs(this.state.doc.content,this.schema)}getText(t){let{blockSeparator:n=`
97
+
98
+ `,textSerializers:r={}}=t||{};return wB(this.state.doc,{blockSeparator:n,textSerializers:{...xL(this.schema),...r}})}get isEmpty(){return cu(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){let t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){let n=this.state.doc.resolve(t);return new bb(n,this)}get $doc(){return this.$pos(0)}};function Lr(e){return new gs({find:e.find,handler:({state:t,range:n,match:r})=>{let o=me(e.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:a}=t,i=r[r.length-1],s=r[0];if(i){let l=s.search(/\S/),u=n.from+s.indexOf(i),c=u+i.length;if(xf(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===e.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;c<n.to&&a.delete(c,n.to),u>n.from&&a.delete(n.from+l,u);let f=n.from+l+i.length;a.addMark(n.from+l,f,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}function FL(e){return new gs({find:e.find,handler:({state:t,range:n,match:r})=>{let o=me(e.getAttributes,void 0,r)||{},{tr:a}=t,i=n.from,s=n.to,l=e.type.create(o);if(r[1]){let u=r[0].lastIndexOf(r[1]),c=i+u;c>s?c=s:s=c+r[1].length;let d=r[0][r[0].length-1];a.insertText(d,i+r[0].length-1),a.replaceWith(c,s,l)}else if(r[0]){let u=e.type.isInline?i:i-1;a.insert(u,e.type.create(o)).delete(a.mapping.map(i),a.mapping.map(s))}a.scrollIntoView()}})}function du(e){return new gs({find:e.find,handler:({state:t,range:n,match:r})=>{let o=t.doc.resolve(n.from),a=me(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)}})}function Ir(e){return new gs({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{let a=me(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),u=l&&ns(l,e.type,a);if(!u)return null;if(i.wrap(l,u),e.keepMarks&&e.editor){let{selection:d,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){let m=h.filter(b=>p.includes(b.type.name));i.ensureMarks(m)}}if(e.keepAttributes){let d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,a).run()}let c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&ir(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&i.join(n.from-1)}})}var J=class e{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=me(V(this,"addOptions",{name:this.name}))),this.storage=me(V(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(t={}){let n=this.extend({...this.config,addOptions:()=>hf(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){let n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=me(V(n,"addOptions",{name:n.name})),n.storage=me(V(n,"addStorage",{name:n.name,options:n.options})),n}};function qn(e){return new pb({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{let a=me(e.getAttributes,void 0,r,o);if(a===!1||a===null)return null;let{tr:i}=t,s=r[r.length-1],l=r[0],u=n.to;if(s){let c=l.search(/\S/),d=n.from+l.indexOf(s),f=d+s.length;if(xf(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(b=>b===e.type&&b!==h.mark.type)).filter(h=>h.to>d).length)return null;f<n.to&&i.delete(f,n.to),d>n.from&&i.delete(n.from+c,d),u=n.from+c+s.length,i.addMark(n.from+c,u,e.type.create(a||{})),i.removeStoredMark(e.type)}}})}function zL(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof Y){let a=r.index();return r.parent.canReplaceWith(a,a+1,t)}let o=r.depth;for(;o>=0;){let a=r.index(o);if(r.node(o).contentMatchAt(a).matchType(t))return!0;o-=1}return!1}var nt="top",bt="bottom",ft="right",it="left",wf="auto",ea=[nt,bt,ft,it],co="start",Ya="end",HL="clippingParents",vf="viewport",xs="popper",UL="reference",kb=ea.reduce(function(e,t){return e.concat([t+"-"+co,t+"-"+Ya])},[]),Sf=[].concat(ea,[wf]).reduce(function(e,t){return e.concat([t,t+"-"+co,t+"-"+Ya])},[]),KB="beforeRead",jB="read",XB="afterRead",YB="beforeMain",ZB="main",JB="afterMain",QB="beforeWrite",e4="write",t4="afterWrite",$L=[KB,jB,XB,YB,ZB,JB,QB,e4,t4];function Ct(e){return e?(e.nodeName||"").toLowerCase():null}function Ye(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Vn(e){var t=Ye(e).Element;return e instanceof t||e instanceof Element}function xt(e){var t=Ye(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ys(e){if(typeof ShadowRoot>"u")return!1;var t=Ye(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function n4(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!xt(a)||!Ct(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(i){var s=o[i];s===!1?a.removeAttribute(i):a.setAttribute(i,s===!0?"":s)}))})}function r4(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],a=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=i.reduce(function(l,u){return l[u]="",l},{});!xt(o)||!Ct(o)||(Object.assign(o.style,s),Object.keys(a).forEach(function(l){o.removeAttribute(l)}))})}}var fu={name:"applyStyles",enabled:!0,phase:"write",fn:n4,effect:r4,requires:["computeStyles"]};function Et(e){return e.split("-")[0]}var sr=Math.max,Za=Math.min,fo=Math.round;function ws(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function pu(){return!/^((?!chrome|android).)*safari/i.test(ws())}function Wn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&xt(e)&&(o=e.offsetWidth>0&&fo(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&fo(r.height)/e.offsetHeight||1);var i=Vn(e)?Ye(e):window,s=i.visualViewport,l=!pu()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,c=(r.top+(l&&s?s.offsetTop:0))/a,d=r.width/o,f=r.height/a;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function Ja(e){var t=Wn(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function hu(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ys(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function on(e){return Ye(e).getComputedStyle(e)}function Cb(e){return["table","td","th"].indexOf(Ct(e))>=0}function Ot(e){return((Vn(e)?e.ownerDocument:e.document)||window.document).documentElement}function po(e){return Ct(e)==="html"?e:e.assignedSlot||e.parentNode||(ys(e)?e.host:null)||Ot(e)}function qL(e){return!xt(e)||on(e).position==="fixed"?null:e.offsetParent}function o4(e){var t=/firefox/i.test(ws()),n=/Trident/i.test(ws());if(n&&xt(e)){var r=on(e);if(r.position==="fixed")return null}var o=po(e);for(ys(o)&&(o=o.host);xt(o)&&["html","body"].indexOf(Ct(o))<0;){var a=on(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function lr(e){for(var t=Ye(e),n=qL(e);n&&Cb(n)&&on(n).position==="static";)n=qL(n);return n&&(Ct(n)==="html"||Ct(n)==="body"&&on(n).position==="static")?t:n||o4(e)||t}function Qa(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ei(e,t,n){return sr(e,Za(t,n))}function VL(e,t,n){var r=ei(e,t,n);return r>n?n:r}function mu(){return{top:0,right:0,bottom:0,left:0}}function gu(e){return Object.assign({},mu(),e)}function bu(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var a4=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,gu(typeof t!="number"?t:bu(t,ea))};function i4(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=Et(n.placement),l=Qa(s),u=[it,ft].indexOf(s)>=0,c=u?"height":"width";if(!(!a||!i)){var d=a4(o.padding,n),f=Ja(a),p=l==="y"?nt:it,h=l==="y"?bt:ft,m=n.rects.reference[c]+n.rects.reference[l]-i[l]-n.rects.popper[c],b=i[l]-n.rects.reference[l],g=lr(a),y=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,w=m/2-b/2,x=d[p],S=y-f[c]-d[h],v=y/2-f[c]/2+w,C=ei(x,v,S),E=l;n.modifiersData[r]=(t={},t[E]=C,t.centerOffset=C-v,t)}}function s4(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||hu(t.elements.popper,o)&&(t.elements.arrow=o))}var WL={name:"arrow",enabled:!0,phase:"main",fn:i4,effect:s4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Gn(e){return e.split("-")[1]}var l4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function u4(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:fo(n*o)/o||0,y:fo(r*o)/o||0}}function GL(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=i.x,p=f===void 0?0:f,h=i.y,m=h===void 0?0:h,b=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=b.x,m=b.y;var g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),w=it,x=nt,S=window;if(u){var v=lr(n),C="clientHeight",E="clientWidth";if(v===Ye(n)&&(v=Ot(n),on(v).position!=="static"&&s==="absolute"&&(C="scrollHeight",E="scrollWidth")),v=v,o===nt||(o===it||o===ft)&&a===Ya){x=bt;var T=d&&v===S&&S.visualViewport?S.visualViewport.height:v[C];m-=T-r.height,m*=l?1:-1}if(o===it||(o===nt||o===bt)&&a===Ya){w=ft;var I=d&&v===S&&S.visualViewport?S.visualViewport.width:v[E];p-=I-r.width,p*=l?1:-1}}var W=Object.assign({position:s},u&&l4),te=c===!0?u4({x:p,y:m},Ye(n)):{x:p,y:m};if(p=te.x,m=te.y,l){var fe;return Object.assign({},W,(fe={},fe[x]=y?"0":"",fe[w]=g?"0":"",fe.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",fe))}return Object.assign({},W,(t={},t[x]=y?m+"px":"",t[w]=g?p+"px":"",t.transform="",t))}function c4(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,i=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Et(t.placement),variation:Gn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,GL(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,GL(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var KL={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:c4,data:{}};var kf={passive:!0};function d4(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,i=r.resize,s=i===void 0?!0:i,l=Ye(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(c){c.addEventListener("scroll",n.update,kf)}),s&&l.addEventListener("resize",n.update,kf),function(){a&&u.forEach(function(c){c.removeEventListener("scroll",n.update,kf)}),s&&l.removeEventListener("resize",n.update,kf)}}var jL={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:d4,data:{}};var f4={left:"right",right:"left",bottom:"top",top:"bottom"};function vs(e){return e.replace(/left|right|bottom|top/g,function(t){return f4[t]})}var p4={start:"end",end:"start"};function Cf(e){return e.replace(/start|end/g,function(t){return p4[t]})}function ti(e){var t=Ye(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function ni(e){return Wn(Ot(e)).left+ti(e).scrollLeft}function Eb(e,t){var n=Ye(e),r=Ot(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var u=pu();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+ni(e),y:l}}function Lb(e){var t,n=Ot(e),r=ti(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=sr(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=sr(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+ni(e),l=-r.scrollTop;return on(o||n).direction==="rtl"&&(s+=sr(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}function ri(e){var t=on(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ef(e){return["html","body","#document"].indexOf(Ct(e))>=0?e.ownerDocument.body:xt(e)&&ri(e)?e:Ef(po(e))}function ta(e,t){var n;t===void 0&&(t=[]);var r=Ef(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=Ye(r),i=o?[a].concat(a.visualViewport||[],ri(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(ta(po(i)))}function Ss(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function h4(e,t){var n=Wn(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function XL(e,t,n){return t===vf?Ss(Eb(e,n)):Vn(t)?h4(t,n):Ss(Lb(Ot(e)))}function m4(e){var t=ta(po(e)),n=["absolute","fixed"].indexOf(on(e).position)>=0,r=n&&xt(e)?lr(e):e;return Vn(r)?t.filter(function(o){return Vn(o)&&hu(o,r)&&Ct(o)!=="body"}):[]}function Ib(e,t,n,r){var o=t==="clippingParents"?m4(e):[].concat(t),a=[].concat(o,[n]),i=a[0],s=a.reduce(function(l,u){var c=XL(e,u,r);return l.top=sr(c.top,l.top),l.right=Za(c.right,l.right),l.bottom=Za(c.bottom,l.bottom),l.left=sr(c.left,l.left),l},XL(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function xu(e){var t=e.reference,n=e.element,r=e.placement,o=r?Et(r):null,a=r?Gn(r):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case nt:l={x:i,y:t.y-n.height};break;case bt:l={x:i,y:t.y+t.height};break;case ft:l={x:t.x+t.width,y:s};break;case it:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?Qa(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(a){case co:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Ya:l[u]=l[u]+(t[c]/2-n[c]/2);break;default:}}return l}function ur(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,i=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?HL:s,u=n.rootBoundary,c=u===void 0?vf:u,d=n.elementContext,f=d===void 0?xs:d,p=n.altBoundary,h=p===void 0?!1:p,m=n.padding,b=m===void 0?0:m,g=gu(typeof b!="number"?b:bu(b,ea)),y=f===xs?UL:xs,w=e.rects.popper,x=e.elements[h?y:f],S=Ib(Vn(x)?x:x.contextElement||Ot(e.elements.popper),l,c,i),v=Wn(e.elements.reference),C=xu({reference:v,element:w,strategy:"absolute",placement:o}),E=Ss(Object.assign({},w,C)),T=f===xs?E:v,I={top:S.top-T.top+g.top,bottom:T.bottom-S.bottom+g.bottom,left:S.left-T.left+g.left,right:T.right-S.right+g.right},W=e.modifiersData.offset;if(f===xs&&W){var te=W[o];Object.keys(I).forEach(function(fe){var oe=[ft,bt].indexOf(fe)>=0?1:-1,Z=[nt,bt].indexOf(fe)>=0?"y":"x";I[fe]+=te[Z]*oe})}return I}function Mb(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Sf:l,c=Gn(r),d=c?s?kb:kb.filter(function(h){return Gn(h)===c}):ea,f=d.filter(function(h){return u.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=ur(e,{placement:m,boundary:o,rootBoundary:a,padding:i})[Et(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function g4(e){if(Et(e)===wf)return[];var t=vs(e);return[Cf(e),t,Cf(t)]}function b4(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!0:i,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,b=t.options.placement,g=Et(b),y=g===b,w=l||(y||!h?[vs(b)]:g4(b)),x=[b].concat(w).reduce(function(Le,ge){return Le.concat(Et(ge)===wf?Mb(t,{placement:ge,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):ge)},[]),S=t.rects.reference,v=t.rects.popper,C=new Map,E=!0,T=x[0],I=0;I<x.length;I++){var W=x[I],te=Et(W),fe=Gn(W)===co,oe=[nt,bt].indexOf(te)>=0,Z=oe?"width":"height",_=ur(t,{placement:W,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),k=oe?fe?ft:it:fe?bt:nt;S[Z]>v[Z]&&(k=vs(k));var L=vs(k),P=[];if(a&&P.push(_[te]<=0),s&&P.push(_[k]<=0,_[L]<=0),P.every(function(Le){return Le})){T=W,E=!1;break}C.set(W,P)}if(E)for(var H=h?3:1,X=function(ge){var Te=x.find(function(Pt){var st=C.get(Pt);if(st)return st.slice(0,ge).every(function(z){return z})});if(Te)return T=Te,"break"},ae=H;ae>0;ae--){var Ne=X(ae);if(Ne==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}var YL={name:"flip",enabled:!0,phase:"main",fn:b4,requiresIfExists:["offset"],data:{_skip:!1}};function ZL(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function JL(e){return[nt,ft,bt,it].some(function(t){return e[t]>=0})}function x4(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=ur(t,{elementContext:"reference"}),s=ur(t,{altBoundary:!0}),l=ZL(i,r),u=ZL(s,o,a),c=JL(l),d=JL(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var QL={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:x4};function y4(e,t,n){var r=Et(e),o=[it,nt].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[it,ft].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function w4(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,i=Sf.reduce(function(c,d){return c[d]=y4(d,t.rects,a),c},{}),s=i[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}var e2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:w4};function v4(e){var t=e.state,n=e.name;t.modifiersData[n]=xu({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var t2={name:"popperOffsets",enabled:!0,phase:"read",fn:v4,data:{}};function _b(e){return e==="x"?"y":"x"}function S4(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!1:i,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,b=ur(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),g=Et(t.placement),y=Gn(t.placement),w=!y,x=Qa(g),S=_b(x),v=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,T=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,I=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),W=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,te={x:0,y:0};if(v){if(a){var fe,oe=x==="y"?nt:it,Z=x==="y"?bt:ft,_=x==="y"?"height":"width",k=v[x],L=k+b[oe],P=k-b[Z],H=p?-E[_]/2:0,X=y===co?C[_]:E[_],ae=y===co?-E[_]:-C[_],Ne=t.elements.arrow,Le=p&&Ne?Ja(Ne):{width:0,height:0},ge=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:mu(),Te=ge[oe],Pt=ge[Z],st=ei(0,C[_],Le[_]),z=w?C[_]/2-H-st-Te-I.mainAxis:X-st-Te-I.mainAxis,Q=w?-C[_]/2+H+st+Pt+I.mainAxis:ae+st+Pt+I.mainAxis,Ae=t.elements.arrow&&lr(t.elements.arrow),De=Ae?x==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,Fe=(fe=W?.[x])!=null?fe:0,je=k+z-Fe-De,$e=k+Q-Fe,le=ei(p?Za(L,je):L,k,p?sr(P,$e):P);v[x]=le,te[x]=le-k}if(s){var yt,G=x==="x"?nt:it,ee=x==="x"?bt:ft,Oe=v[S],ne=S==="y"?"height":"width",Se=Oe+b[G],lt=Oe-b[ee],Mt=[nt,it].indexOf(g)!==-1,Mn=(yt=W?.[S])!=null?yt:0,F=Mt?Se:Oe-C[ne]-E[ne]-Mn+I.altAxis,M=Mt?Oe+C[ne]+E[ne]-Mn-I.altAxis:lt,N=p&&Mt?VL(F,Oe,M):ei(p?F:Se,Oe,p?M:lt);v[S]=N,te[S]=N-Oe}t.modifiersData[r]=te}}var n2={name:"preventOverflow",enabled:!0,phase:"main",fn:S4,requiresIfExists:["offset"]};function Tb(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ab(e){return e===Ye(e)||!xt(e)?ti(e):Tb(e)}function k4(e){var t=e.getBoundingClientRect(),n=fo(t.width)/e.offsetWidth||1,r=fo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Db(e,t,n){n===void 0&&(n=!1);var r=xt(t),o=xt(t)&&k4(t),a=Ot(t),i=Wn(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ct(t)!=="body"||ri(a))&&(s=Ab(t)),xt(t)?(l=Wn(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=ni(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function C4(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var i=[].concat(a.requires||[],a.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function Nb(e){var t=C4(e);return $L.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Ob(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Rb(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var r2={placement:"bottom",modifiers:[],strategy:"absolute"};function o2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function a2(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,a=o===void 0?r2:o;return function(s,l,u){u===void 0&&(u=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},r2,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:c,setOptions:function(g){var y=typeof g=="function"?g(c.options):g;m(),c.options=Object.assign({},a,c.options,y),c.scrollParents={reference:Vn(s)?ta(s):s.contextElement?ta(s.contextElement):[],popper:ta(l)};var w=Nb(Rb([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(x){return x.enabled}),h(),p.update()},forceUpdate:function(){if(!f){var g=c.elements,y=g.reference,w=g.popper;if(o2(y,w)){c.rects={reference:Db(y,lr(w),c.options.strategy==="fixed"),popper:Ja(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(I){return c.modifiersData[I.name]=Object.assign({},I.data)});for(var x=0;x<c.orderedModifiers.length;x++){if(c.reset===!0){c.reset=!1,x=-1;continue}var S=c.orderedModifiers[x],v=S.fn,C=S.options,E=C===void 0?{}:C,T=S.name;typeof v=="function"&&(c=v({state:c,options:E,name:T,instance:p})||c)}}}},update:Ob(function(){return new Promise(function(b){p.forceUpdate(),b(c)})}),destroy:function(){m(),f=!0}};if(!o2(s,l))return p;p.setOptions(u).then(function(b){!f&&u.onFirstUpdate&&u.onFirstUpdate(b)});function h(){c.orderedModifiers.forEach(function(b){var g=b.name,y=b.options,w=y===void 0?{}:y,x=b.effect;if(typeof x=="function"){var S=x({state:c,name:g,instance:p,options:w}),v=function(){};d.push(S||v)}})}function m(){d.forEach(function(b){return b()}),d=[]}return p}}var E4=[jL,t2,KL,fu,e2,YL,n2,WL,QL],Pb=a2({defaultModifiers:E4});var L4="tippy-box",m2="tippy-content",I4="tippy-backdrop",g2="tippy-arrow",b2="tippy-svg-arrow",oi={passive:!0,capture:!0},x2=function(){return document.body};function Bb(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function qb(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function y2(e,t){return typeof e=="function"?e.apply(void 0,t):e}function i2(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function M4(e){return e.split(/\s+/).filter(Boolean)}function ks(e){return[].concat(e)}function s2(e,t){e.indexOf(t)===-1&&e.push(t)}function _4(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function T4(e){return e.split("-")[0]}function If(e){return[].slice.call(e)}function l2(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function yu(){return document.createElement("div")}function Mf(e){return["Element","Fragment"].some(function(t){return qb(e,t)})}function A4(e){return qb(e,"NodeList")}function D4(e){return qb(e,"MouseEvent")}function N4(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function O4(e){return Mf(e)?[e]:A4(e)?If(e):Array.isArray(e)?e:If(document.querySelectorAll(e))}function Fb(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function u2(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function R4(e){var t,n=ks(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function P4(e,t){var n=t.clientX,r=t.clientY;return e.every(function(o){var a=o.popperRect,i=o.popperState,s=o.props,l=s.interactiveBorder,u=T4(i.placement),c=i.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,f=u==="top"?c.bottom.y:0,p=u==="right"?c.left.x:0,h=u==="left"?c.right.x:0,m=a.top-r+d>l,b=r-a.bottom-f>l,g=a.left-n+p>l,y=n-a.right-h>l;return m||b||g||y})}function zb(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[r](o,n)})}function c2(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Mr={isTouch:!1},d2=0;function B4(){Mr.isTouch||(Mr.isTouch=!0,window.performance&&document.addEventListener("mousemove",w2))}function w2(){var e=performance.now();e-d2<20&&(Mr.isTouch=!1,document.removeEventListener("mousemove",w2)),d2=e}function F4(){var e=document.activeElement;if(N4(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function z4(){document.addEventListener("touchstart",B4,oi),window.addEventListener("blur",F4)}var H4=typeof window<"u"&&typeof document<"u",U4=H4?!!window.msCrypto:!1;var $4={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},q4={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},cr=Object.assign({appendTo:x2,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},$4,q4),V4=Object.keys(cr),W4=function(t){var n=Object.keys(t);n.forEach(function(r){cr[r]=t[r]})};function v2(e){var t=e.plugins||[],n=t.reduce(function(r,o){var a=o.name,i=o.defaultValue;if(a){var s;r[a]=e[a]!==void 0?e[a]:(s=cr[a])!=null?s:i}return r},{});return Object.assign({},e,n)}function G4(e,t){var n=t?Object.keys(v2(Object.assign({},cr,{plugins:t}))):V4,r=n.reduce(function(o,a){var i=(e.getAttribute("data-tippy-"+a)||"").trim();if(!i)return o;if(a==="content")o[a]=i;else try{o[a]=JSON.parse(i)}catch{o[a]=i}return o},{});return r}function f2(e,t){var n=Object.assign({},t,{content:y2(t.content,[e])},t.ignoreAttributes?{}:G4(e,t.plugins));return n.aria=Object.assign({},cr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var K4=function(){return"innerHTML"};function Ub(e,t){e[K4()]=t}function p2(e){var t=yu();return e===!0?t.className=g2:(t.className=b2,Mf(e)?t.appendChild(e):Ub(t,e)),t}function h2(e,t){Mf(t.content)?(Ub(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Ub(e,t.content):e.textContent=t.content)}function $b(e){var t=e.firstElementChild,n=If(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(m2)}),arrow:n.find(function(r){return r.classList.contains(g2)||r.classList.contains(b2)}),backdrop:n.find(function(r){return r.classList.contains(I4)})}}function S2(e){var t=yu(),n=yu();n.className=L4,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=yu();r.className=m2,r.setAttribute("data-state","hidden"),h2(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props);function o(a,i){var s=$b(t),l=s.box,u=s.content,c=s.arrow;i.theme?l.setAttribute("data-theme",i.theme):l.removeAttribute("data-theme"),typeof i.animation=="string"?l.setAttribute("data-animation",i.animation):l.removeAttribute("data-animation"),i.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof i.maxWidth=="number"?i.maxWidth+"px":i.maxWidth,i.role?l.setAttribute("role",i.role):l.removeAttribute("role"),(a.content!==i.content||a.allowHTML!==i.allowHTML)&&h2(u,e.props),i.arrow?c?a.arrow!==i.arrow&&(l.removeChild(c),l.appendChild(p2(i.arrow))):l.appendChild(p2(i.arrow)):c&&l.removeChild(c)}return{popper:t,onUpdate:o}}S2.$$tippy=!0;var j4=1,Lf=[],Hb=[];function X4(e,t){var n=f2(e,Object.assign({},cr,v2(l2(t)))),r,o,a,i=!1,s=!1,l=!1,u=!1,c,d,f,p=[],h=i2(je,n.interactiveDebounce),m,b=j4++,g=null,y=_4(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:b,reference:e,popper:yu(),popperInstance:g,props:n,state:w,plugins:y,clearDelayTimeouts:F,setProps:M,setContent:N,show:U,hide:ue,hideWithInteractivity:ze,enable:Mt,disable:Mn,unmount:mn,destroy:Ks};if(!n.render)return x;var S=n.render(x),v=S.popper,C=S.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+x.id,x.popper=v,e._tippy=x,v._tippy=x;var E=y.map(function(A){return A.fn(x)}),T=e.hasAttribute("aria-expanded");return Ae(),H(),k(),L("onCreate",[x]),n.showOnCreate&&Se(),v.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&oe().addEventListener("mousemove",h)}),x;function I(){var A=x.props.touch;return Array.isArray(A)?A:[A,0]}function W(){return I()[0]==="hold"}function te(){var A;return!!((A=x.props.render)!=null&&A.$$tippy)}function fe(){return m||e}function oe(){var A=fe().parentNode;return A?R4(A):document}function Z(){return $b(v)}function _(A){return x.state.isMounted&&!x.state.isVisible||Mr.isTouch||c&&c.type==="focus"?0:Bb(x.props.delay,A?0:1,cr.delay)}function k(A){A===void 0&&(A=!1),v.style.pointerEvents=x.props.interactive&&!A?"":"none",v.style.zIndex=""+x.props.zIndex}function L(A,j,ce){if(ce===void 0&&(ce=!0),E.forEach(function(Ie){Ie[A]&&Ie[A].apply(Ie,j)}),ce){var Re;(Re=x.props)[A].apply(Re,j)}}function P(){var A=x.props.aria;if(A.content){var j="aria-"+A.content,ce=v.id,Re=ks(x.props.triggerTarget||e);Re.forEach(function(Ie){var Yt=Ie.getAttribute(j);if(x.state.isVisible)Ie.setAttribute(j,Yt?Yt+" "+ce:ce);else{var _n=Yt&&Yt.replace(ce,"").trim();_n?Ie.setAttribute(j,_n):Ie.removeAttribute(j)}})}}function H(){if(!(T||!x.props.aria.expanded)){var A=ks(x.props.triggerTarget||e);A.forEach(function(j){x.props.interactive?j.setAttribute("aria-expanded",x.state.isVisible&&j===fe()?"true":"false"):j.removeAttribute("aria-expanded")})}}function X(){oe().removeEventListener("mousemove",h),Lf=Lf.filter(function(A){return A!==h})}function ae(A){if(!(Mr.isTouch&&(l||A.type==="mousedown"))){var j=A.composedPath&&A.composedPath()[0]||A.target;if(!(x.props.interactive&&c2(v,j))){if(ks(x.props.triggerTarget||e).some(function(ce){return c2(ce,j)})){if(Mr.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[x,A]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||Te())}}}function Ne(){l=!0}function Le(){l=!1}function ge(){var A=oe();A.addEventListener("mousedown",ae,!0),A.addEventListener("touchend",ae,oi),A.addEventListener("touchstart",Le,oi),A.addEventListener("touchmove",Ne,oi)}function Te(){var A=oe();A.removeEventListener("mousedown",ae,!0),A.removeEventListener("touchend",ae,oi),A.removeEventListener("touchstart",Le,oi),A.removeEventListener("touchmove",Ne,oi)}function Pt(A,j){z(A,function(){!x.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&j()})}function st(A,j){z(A,j)}function z(A,j){var ce=Z().box;function Re(Ie){Ie.target===ce&&(zb(ce,"remove",Re),j())}if(A===0)return j();zb(ce,"remove",d),zb(ce,"add",Re),d=Re}function Q(A,j,ce){ce===void 0&&(ce=!1);var Re=ks(x.props.triggerTarget||e);Re.forEach(function(Ie){Ie.addEventListener(A,j,ce),p.push({node:Ie,eventType:A,handler:j,options:ce})})}function Ae(){W()&&(Q("touchstart",Fe,{passive:!0}),Q("touchend",$e,{passive:!0})),M4(x.props.trigger).forEach(function(A){if(A!=="manual")switch(Q(A,Fe),A){case"mouseenter":Q("mouseleave",$e);break;case"focus":Q(U4?"focusout":"blur",le);break;case"focusin":Q("focusout",le);break}})}function De(){p.forEach(function(A){var j=A.node,ce=A.eventType,Re=A.handler,Ie=A.options;j.removeEventListener(ce,Re,Ie)}),p=[]}function Fe(A){var j,ce=!1;if(!(!x.state.isEnabled||yt(A)||s)){var Re=((j=c)==null?void 0:j.type)==="focus";c=A,m=A.currentTarget,H(),!x.state.isVisible&&D4(A)&&Lf.forEach(function(Ie){return Ie(A)}),A.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||i)&&x.props.hideOnClick!==!1&&x.state.isVisible?ce=!0:Se(A),A.type==="click"&&(i=!ce),ce&&!Re&&lt(A)}}function je(A){var j=A.target,ce=fe().contains(j)||v.contains(j);if(!(A.type==="mousemove"&&ce)){var Re=ne().concat(v).map(function(Ie){var Yt,_n=Ie._tippy,vi=(Yt=_n.popperInstance)==null?void 0:Yt.state;return vi?{popperRect:Ie.getBoundingClientRect(),popperState:vi,props:n}:null}).filter(Boolean);P4(Re,A)&&(X(),lt(A))}}function $e(A){var j=yt(A)||x.props.trigger.indexOf("click")>=0&&i;if(!j){if(x.props.interactive){x.hideWithInteractivity(A);return}lt(A)}}function le(A){x.props.trigger.indexOf("focusin")<0&&A.target!==fe()||x.props.interactive&&A.relatedTarget&&v.contains(A.relatedTarget)||lt(A)}function yt(A){return Mr.isTouch?W()!==A.type.indexOf("touch")>=0:!1}function G(){ee();var A=x.props,j=A.popperOptions,ce=A.placement,Re=A.offset,Ie=A.getReferenceClientRect,Yt=A.moveTransition,_n=te()?$b(v).arrow:null,vi=Ie?{getBoundingClientRect:Ie,contextElement:Ie.contextElement||fe()}:e,sw={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(nc){var Si=nc.state;if(te()){var mN=Z(),Mh=mN.box;["placement","reference-hidden","escaped"].forEach(function(rc){rc==="placement"?Mh.setAttribute("data-placement",Si.placement):Si.attributes.popper["data-popper-"+rc]?Mh.setAttribute("data-"+rc,""):Mh.removeAttribute("data-"+rc)}),Si.attributes.popper={}}}},ba=[{name:"offset",options:{offset:Re}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Yt}},sw];te()&&_n&&ba.push({name:"arrow",options:{element:_n,padding:3}}),ba.push.apply(ba,j?.modifiers||[]),x.popperInstance=Pb(vi,v,Object.assign({},j,{placement:ce,onFirstUpdate:f,modifiers:ba}))}function ee(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function Oe(){var A=x.props.appendTo,j,ce=fe();x.props.interactive&&A===x2||A==="parent"?j=ce.parentNode:j=y2(A,[ce]),j.contains(v)||j.appendChild(v),x.state.isMounted=!0,G()}function ne(){return If(v.querySelectorAll("[data-tippy-root]"))}function Se(A){x.clearDelayTimeouts(),A&&L("onTrigger",[x,A]),ge();var j=_(!0),ce=I(),Re=ce[0],Ie=ce[1];Mr.isTouch&&Re==="hold"&&Ie&&(j=Ie),j?r=setTimeout(function(){x.show()},j):x.show()}function lt(A){if(x.clearDelayTimeouts(),L("onUntrigger",[x,A]),!x.state.isVisible){Te();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(A.type)>=0&&i)){var j=_(!1);j?o=setTimeout(function(){x.state.isVisible&&x.hide()},j):a=requestAnimationFrame(function(){x.hide()})}}function Mt(){x.state.isEnabled=!0}function Mn(){x.hide(),x.state.isEnabled=!1}function F(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(a)}function M(A){if(!x.state.isDestroyed){L("onBeforeUpdate",[x,A]),De();var j=x.props,ce=f2(e,Object.assign({},j,l2(A),{ignoreAttributes:!0}));x.props=ce,Ae(),j.interactiveDebounce!==ce.interactiveDebounce&&(X(),h=i2(je,ce.interactiveDebounce)),j.triggerTarget&&!ce.triggerTarget?ks(j.triggerTarget).forEach(function(Re){Re.removeAttribute("aria-expanded")}):ce.triggerTarget&&e.removeAttribute("aria-expanded"),H(),k(),C&&C(j,ce),x.popperInstance&&(G(),ne().forEach(function(Re){requestAnimationFrame(Re._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[x,A])}}function N(A){x.setProps({content:A})}function U(){var A=x.state.isVisible,j=x.state.isDestroyed,ce=!x.state.isEnabled,Re=Mr.isTouch&&!x.props.touch,Ie=Bb(x.props.duration,0,cr.duration);if(!(A||j||ce||Re)&&!fe().hasAttribute("disabled")&&(L("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,te()&&(v.style.visibility="visible"),k(),ge(),x.state.isMounted||(v.style.transition="none"),te()){var Yt=Z(),_n=Yt.box,vi=Yt.content;Fb([_n,vi],0)}f=function(){var ba;if(!(!x.state.isVisible||u)){if(u=!0,v.offsetHeight,v.style.transition=x.props.moveTransition,te()&&x.props.animation){var Ih=Z(),nc=Ih.box,Si=Ih.content;Fb([nc,Si],Ie),u2([nc,Si],"visible")}P(),H(),s2(Hb,x),(ba=x.popperInstance)==null||ba.forceUpdate(),L("onMount",[x]),x.props.animation&&te()&&st(Ie,function(){x.state.isShown=!0,L("onShown",[x])})}},Oe()}}function ue(){var A=!x.state.isVisible,j=x.state.isDestroyed,ce=!x.state.isEnabled,Re=Bb(x.props.duration,1,cr.duration);if(!(A||j||ce)&&(L("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,u=!1,i=!1,te()&&(v.style.visibility="hidden"),X(),Te(),k(!0),te()){var Ie=Z(),Yt=Ie.box,_n=Ie.content;x.props.animation&&(Fb([Yt,_n],Re),u2([Yt,_n],"hidden"))}P(),H(),x.props.animation?te()&&Pt(Re,x.unmount):x.unmount()}}function ze(A){oe().addEventListener("mousemove",h),s2(Lf,h),h(A)}function mn(){x.state.isVisible&&x.hide(),x.state.isMounted&&(ee(),ne().forEach(function(A){A._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),Hb=Hb.filter(function(A){return A!==x}),x.state.isMounted=!1,L("onHidden",[x]))}function Ks(){x.state.isDestroyed||(x.clearDelayTimeouts(),x.unmount(),De(),delete e._tippy,x.state.isDestroyed=!0,L("onDestroy",[x]))}}function wu(e,t){t===void 0&&(t={});var n=cr.plugins.concat(t.plugins||[]);z4();var r=Object.assign({},t,{plugins:n}),o=O4(e);if(0)var a,i;var s=o.reduce(function(l,u){var c=u&&X4(u,r);return c&&l.push(c),l},[]);return Mf(e)?s[0]:s}wu.defaultProps=cr;wu.setDefaultProps=W4;wu.currentInput=Mr;var GX=Object.assign({},fu,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});wu.setDefaultProps({render:S2});var k2=wu;var Vb=class{constructor({editor:t,element:n,view:r,tippyOptions:o={},updateDelay:a=250,shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:s,state:l,from:u,to:c})=>{let{doc:d,selection:f}=l,{empty:p}=f,h=!d.textBetween(u,c).length&&mf(l.selection),m=this.element.contains(document.activeElement);return!(!(s.hasFocus()||m)||p||h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s?.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(s.relatedTarget))||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.handleDebouncedUpdate=(s,l)=>{let u=!l?.selection.eq(s.state.selection),c=!l?.doc.eq(s.state.doc);!u&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(s,u,c,l)},this.updateDelay))},this.updateHandler=(s,l,u,c)=>{var d,f,p;let{state:h,composing:m}=s,{selection:b}=h;if(m||!l&&!u)return;this.createTooltip();let{ranges:y}=b,w=Math.min(...y.map(v=>v.$from.pos)),x=Math.max(...y.map(v=>v.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,element:this.element,view:s,state:h,oldState:c,from:w,to:x}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(yf(h.selection)){let v=s.nodeDOM(w);if(v){let C=v.dataset.nodeViewWrapper?v:v.querySelector("[data-node-view-wrapper]");if(C&&(v=C.firstChild),v)return v.getBoundingClientRect()}}return ML(s,w,x)})}),this.show()},this.editor=t,this.element=n,this.view=r,this.updateDelay=a,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:t}=this.editor.options,n=!!t.parentElement;this.element.tabIndex=0,!(this.tippy||!n)&&(this.tippy=k2(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){let{state:r}=t,o=r.selection.from!==r.selection.to;if(this.updateDelay>0&&o){this.handleDebouncedUpdate(t,n);return}let a=!n?.selection.eq(t.state.selection),i=!n?.doc.eq(t.state.doc);this.updateHandler(t,a,i,n)}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;!((t=this.tippy)===null||t===void 0)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}},Wb=e=>new ie({key:typeof e.pluginKey=="string"?new de(e.pluginKey):e.pluginKey,view:t=>new Vb({view:t,...e})}),ZX=Ce.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Wb({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});var pe=Ee(Bt(),1),Jb=Ee(Na(),1);function Y4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I2={exports:{}},Gb={};var C2;function Z4(){if(C2)return Gb;C2=1;var e=pe.default;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(d,f){var p=f(),h=r({inst:{value:p,getSnapshot:f}}),m=h[0].inst,b=h[1];return a(function(){m.value=p,m.getSnapshot=f,l(m)&&b({inst:m})},[d,p,f]),o(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),i(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function u(d,f){return f()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Gb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Gb}I2.exports=Z4();var Qb=I2.exports,J4=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},Q4=({contentComponent:e})=>{let t=Qb.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return pe.default.createElement(pe.default.Fragment,null,Object.values(t))};function eF(){let e=new Set,t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:Jb.default.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(o=>o())}}}var jb=class extends pe.default.Component{constructor(t){var n;super(t),this.editorContentRef=pe.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;let n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=eF(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;let n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){let{editor:t,innerRef:n,...r}=this.props;return pe.default.createElement(pe.default.Fragment,null,pe.default.createElement("div",{ref:J4(n,this.editorContentRef),...r}),t?.contentComponent&&pe.default.createElement(Q4,{contentComponent:t.contentComponent}))}},tF=(0,pe.forwardRef)((e,t)=>{let n=pe.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return pe.default.createElement(jb,{key:n,innerRef:t,...e})}),M2=pe.default.memo(tF),nF=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;o--!==0;){var i=a[o];if(!(i==="_owner"&&t.$$typeof)&&!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n},rF=Y4(nF),_2={exports:{}},Kb={};var E2;function oF(){if(E2)return Kb;E2=1;var e=pe.default,t=Qb;function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Kb.useSyncExternalStoreWithSelector=function(u,c,d,f,p){var h=a(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function g(v){if(!y){if(y=!0,w=v,v=f(v),p!==void 0&&m.hasValue){var C=m.value;if(p(C,v))return x=C}return x=v}if(C=x,r(w,v))return C;var E=f(v);return p!==void 0&&p(C,E)?C:(w=v,x=E)}var y=!1,w,x,S=d===void 0?null:d;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,d,f,p]);var b=o(u,h[0],h[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},Kb}_2.exports=oF();var aF=_2.exports,iF=typeof window<"u"?pe.useLayoutEffect:pe.useEffect,Xb=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let n=()=>{this.transactionNumber+=1,this.subscribers.forEach(o=>o())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}};function sF(e){var t;let[n]=(0,pe.useState)(()=>new Xb(e.editor)),r=aF.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:rF);return iF(()=>n.watch(e.editor),[e.editor,n]),(0,pe.useDebugValue)(r),r}var L2=!1,Yb=typeof window>"u",lF=Yb||!!(typeof window<"u"&&window.next),Zb=class e{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return Yb||lF?(L2&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&Yb&&L2)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...r)=>{var o,a;return(a=(o=this.options.current).onBeforeCreate)===null||a===void 0?void 0:a.call(o,...r)},onBlur:(...r)=>{var o,a;return(a=(o=this.options.current).onBlur)===null||a===void 0?void 0:a.call(o,...r)},onCreate:(...r)=>{var o,a;return(a=(o=this.options.current).onCreate)===null||a===void 0?void 0:a.call(o,...r)},onDestroy:(...r)=>{var o,a;return(a=(o=this.options.current).onDestroy)===null||a===void 0?void 0:a.call(o,...r)},onFocus:(...r)=>{var o,a;return(a=(o=this.options.current).onFocus)===null||a===void 0?void 0:a.call(o,...r)},onSelectionUpdate:(...r)=>{var o,a;return(a=(o=this.options.current).onSelectionUpdate)===null||a===void 0?void 0:a.call(o,...r)},onTransaction:(...r)=>{var o,a;return(a=(o=this.options.current).onTransaction)===null||a===void 0?void 0:a.call(o,...r)},onUpdate:(...r)=>{var o,a;return(a=(o=this.options.current).onUpdate)===null||a===void 0?void 0:a.call(o,...r)},onContentError:(...r)=>{var o,a;return(a=(o=this.options.current).onContentError)===null||a===void 0?void 0:a.call(o,...r)},onDrop:(...r)=>{var o,a;return(a=(o=this.options.current).onDrop)===null||a===void 0?void 0:a.call(o,...r)},onPaste:(...r)=>{var o,a;return(a=(o=this.options.current).onPaste)===null||a===void 0?void 0:a.call(o,...r)}};return new df(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,a)=>{var i;return o===((i=n.extensions)===null||i===void 0?void 0:i[a])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function T2(e={},t=[]){let n=(0,pe.useRef)(e);n.current=e;let[r]=(0,pe.useState)(()=>new Zb(n)),o=Qb.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,pe.useDebugValue)(o),(0,pe.useEffect)(r.onRender(t)),sF({editor:o,selector:({transactionNumber:a})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&a===0?0:a+1}),o}var A2=(0,pe.createContext)({editor:null}),nY=A2.Consumer,uF=()=>(0,pe.useContext)(A2);var D2=e=>{let[t,n]=(0,pe.useState)(null),{editor:r}=uF();return(0,pe.useEffect)(()=>{var o;if(!t||!((o=e.editor)===null||o===void 0)&&o.isDestroyed||r?.isDestroyed)return;let{pluginKey:a="bubbleMenu",editor:i,tippyOptions:s={},updateDelay:l,shouldShow:u=null}=e,c=i||r;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let d=Wb({updateDelay:l,editor:c,element:t,pluginKey:a,shouldShow:u,tippyOptions:s});return c.registerPlugin(d),()=>{c.unregisterPlugin(a)}},[e.editor,r,t]),pe.default.createElement("div",{ref:n,className:e.className,style:{visibility:"hidden"}},e.children)};var cF=(0,pe.createContext)({onDragStart:void 0}),dF=()=>(0,pe.useContext)(cF);var rY=pe.default.forwardRef((e,t)=>{let{onDragStart:n}=dF(),r=e.as||"div";return pe.default.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});var fF=/^\s*>\s$/,N2=J.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ir({find:fF,type:this.type})]}});var pF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,hF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,mF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,gF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,O2=tt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Lr({find:pF,type:this.type}),Lr({find:mF,type:this.type})]},addPasteRules(){return[qn({find:hF,type:this.type}),qn({find:gF,type:this.type})]}});var bF="listItem",R2="textStyle",P2=/^\s*([-+*])\s$/,B2=J.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",se(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(bF,this.editor.getAttributes(R2)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Ir({find:P2,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ir({find:P2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(R2),editor:this.editor})),[e]}});var xF=/(^|[^`])`([^`]+)`(?!`)/,yF=/(^|[^`])`([^`]+)`(?!`)/g,F2=tt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Lr({find:xF,type:this.type})]},addPasteRules(){return[qn({find:yF,type:this.type})]}});var wF=/^```([a-z]+)?[\s\n]$/,vF=/^~~~([a-z]+)?[\s\n]$/,_f=J.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,a=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",se(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(`
99
+
100
+ `);return!a||!i?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:a}=n;if(!a||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let s=o.after();return s===void 0?!1:r.nodeAt(s)?e.commands.command(({tr:u})=>(u.setSelection(K.near(r.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[du({find:wF,type:this.type,getAttributes:e=>({language:e[1]})}),du({find:vF,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new ie({key:new de("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=o?.mode;if(!n||!a)return!1;let{tr:i,schema:s}=e.state,l=s.text(n.replace(/\r\n?/g,`
101
+ `));return i.replaceSelectionWith(this.type.create({language:a},l)),i.selection.$from.parent.type!==this.type&&i.setSelection($.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}});var z2=J.create({name:"doc",topNode:!0,content:"block+"});function H2(e={}){return new ie({view(t){return new e1(t,e)}})}var e1=class{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let a=i=>{this[o](i)};return t.dom.addEventListener(o,a),{name:o,handler:a}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,o=this.editorView.dom,a=o.getBoundingClientRect(),i=a.width/o.offsetWidth,s=a.height/o.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*s;r={left:h.left,right:h.right,top:m-b,bottom:m+b}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*i;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(r.left-u)/i+"px",this.element.style.top=(r.top-c)/s+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,a=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!a){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=Bd(this.editorView.state.doc,i,this.editorView.dragging.slice);s!=null&&(i=s)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var U2=Ce.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[H2(this.options)]}});var Kt=class e extends K{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):K.near(r)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new t1(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!SF(t)||!kF(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&e.valid(t))return t;let o=t.pos,a=null;for(let i=t.depth;;i--){let s=t.node(i);if(n>0?t.indexAfter(i)<s.childCount:t.index(i)>0){a=s.child(n>0?t.indexAfter(i):t.index(i)-1);break}else if(i==0)return null;o+=n;let l=t.doc.resolve(o);if(e.valid(l))return l}for(;;){let i=n>0?a.firstChild:a.lastChild;if(!i){if(a.isAtom&&!a.isText&&!Y.isSelectable(a)){t=t.doc.resolve(o+a.nodeSize*n),r=!1;continue e}break}a=i,o+=n;let s=t.doc.resolve(o);if(e.valid(s))return s}return null}}};Kt.prototype.visible=!1;Kt.findFrom=Kt.findGapCursorFrom;K.jsonID("gapcursor",Kt);var t1=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Kt.valid(n)?new Kt(n):K.near(n)}};function SF(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function kF(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function $2(){return new ie({props:{decorations:IF,createSelectionBetween(e,t,n){return t.pos==n.pos&&Kt.valid(n)?new Kt(n):null},handleClick:EF,handleKeyDown:CF,handleDOMEvents:{beforeinput:LF}}})}var CF=su({ArrowLeft:Tf("horiz",-1),ArrowRight:Tf("horiz",1),ArrowUp:Tf("vert",-1),ArrowDown:Tf("vert",1)});function Tf(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,a){let i=r.selection,s=t>0?i.$to:i.$from,l=i.empty;if(i instanceof $){if(!a.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(t>0?s.after():s.before())}let u=Kt.findGapCursorFrom(s,t,l);return u?(o&&o(r.tr.setSelection(new Kt(u))),!0):!1}}function EF(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Kt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Y.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Kt(r))),!0)}function LF(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Kt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=D.empty;for(let i=r.length-1;i>=0;i--)o=D.from(r[i].createAndFill(null,o));let a=e.state.tr.replace(n.pos,n.pos,new B(o,0,0));return a.setSelection($.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function IF(e){if(!(e.selection instanceof Kt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",be.create(e.doc,[ye.widget(e.selection.head,t,{key:"gapcursor"})])}var q2=Ce.create({name:"gapCursor",addProseMirrorPlugins(){return[$2()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=me(V(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}});var V2=J.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",se(this.options.HTMLAttributes,e)]},renderText(){return`
102
+ `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:o,storedMarks:a}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,l=a||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&i){let d=l.filter(f=>s.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var W2=J.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,se(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>du({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var Af=200,Rt=function(){};Rt.prototype.append=function(t){return t.length?(t=Rt.from(t),!this.length&&t||t.length<Af&&this.leafAppend(t)||this.length<Af&&t.leafPrepend(this)||this.appendInner(t)):this};Rt.prototype.prepend=function(t){return t.length?Rt.from(t).append(this):this};Rt.prototype.appendInner=function(t){return new MF(this,t)};Rt.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Rt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Rt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Rt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Rt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(a,i){return o.push(t(a,i))},n,r),o};Rt.from=function(t){return t instanceof Rt?t:t&&t.length?new G2(t):Rt.empty};var G2=(function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,a){return o==0&&a==this.length?this:new t(this.values.slice(o,a))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,a,i,s){for(var l=a;l<i;l++)if(o(this.values[l],s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(o,a,i,s){for(var l=a-1;l>=i;l--)if(o(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=Af)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=Af)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(Rt);Rt.empty=new G2([]);var MF=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,o,a,i){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(a,s),i)===!1||a>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,a)-s,i+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,a,i){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(a,s)-s,i+s)===!1||a<s&&this.left.forEachInvertedInner(r,Math.min(o,s),a,i)===!1)return!1},t.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var a=this.left.length;return o<=a?this.left.slice(r,o):r>=a?this.right.slice(r-a,o-a):this.left.slice(r,a).append(this.right.slice(0,o-a))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(Rt),n1=Rt;var _F=500,ii=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,a;n&&(o=this.remapping(r,this.items.length),a=o.maps.length);let i=t.tr,s,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),a=o.maps.length),a--,c.push(d);return}if(o){c.push(new _r(d.map));let p=d.step.map(o.slice(a)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],u.push(new _r(h,void 0,void 0,u.length+c.length))),a--,h&&o.appendMap(h,a)}else i.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(a)):d.selection,l=new e(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:s}}addTransform(t,n,r,o){let a=[],i=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let c=0;c<t.steps.length;c++){let d=t.steps[c].invert(t.docs[c]),f=new _r(t.mapping.maps[c],d,n),p;(p=l&&l.merge(f))&&(f=p,c?a.pop():s=s.slice(0,s.length-1)),a.push(f),n&&(i++,n=void 0),o||(l=f)}let u=i-r.depth;return u>AF&&(s=TF(s,u),i-=u),new e(s.append(a),i)}remapping(t,n){let r=new Kl;return this.items.forEach((o,a)=>{let i=o.mirrorOffset!=null&&a-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,i)},t,n),r}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new _r(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),a=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=a.getMirror(--l);if(p==null)return;i=Math.min(i,p);let h=a.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),b=f.selection&&f.selection.map(a.slice(l+1,p));b&&s++,r.push(new _r(h,m,b))}else r.push(new _r(h))},o);let u=[];for(let f=n;f<i;f++)u.push(new _r(a.maps[f]));let c=this.items.slice(0,o).append(u).append(r),d=new e(c,s);return d.emptyItemCount()>_F&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],a=0;return this.items.forEach((i,s)=>{if(s>=t)o.push(i),i.selection&&a++;else if(i.step){let l=i.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=i.selection&&i.selection.map(n.slice(r));c&&a++;let d=new _r(u.invert(),l,c),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else i.map&&r--},this.items.length,0),new e(n1.from(o.reverse()),a)}};ii.empty=new ii(n1.empty,0);function TF(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}var _r=class e{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Tr=class{constructor(t,n,r,o,a){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=a}},AF=20;function DF(e,t,n,r){let o=n.getMeta(ai),a;if(o)return o.historyState;n.getMeta(RF)&&(e=new Tr(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(ai))return i.getMeta(ai).redo?new Tr(e.done.addTransform(n,void 0,r,Df(t)),e.undone,K2(n.mapping.maps),e.prevTime,e.prevComposition):new Tr(e.done,e.undone.addTransform(n,void 0,r,Df(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!i&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!NF(n,e.prevRanges)),u=i?r1(e.prevRanges,n.mapping):K2(n.mapping.maps);return new Tr(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Df(t)),ii.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new Tr(e.done.rebased(n,a),e.undone.rebased(n,a),r1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Tr(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),r1(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function NF(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let a=0;a<t.length;a+=2)r<=t[a+1]&&o>=t[a]&&(n=!0)}),n}function K2(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,a,i)=>t.push(a,i));return t}function r1(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),a=t.map(e[r+1],-1);o<=a&&n.push(o,a)}return n}function OF(e,t,n){let r=Df(t),o=ai.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let i=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),o,r),l=new Tr(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(i).setMeta(ai,{redo:n,historyState:l})}var o1=!1,j2=null;function Df(e){let t=e.plugins;if(j2!=t){o1=!1,j2=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){o1=!0;break}}return o1}var ai=new de("history"),RF=new de("closeHistory");function X2(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new ie({key:ai,state:{init(){return new Tr(ii.empty,ii.empty,null,0,-1)},apply(t,n,r){return DF(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,o=r=="historyUndo"?a1:r=="historyRedo"?i1:null;return o?(n.preventDefault(),o(t.state,t.dispatch)):!1}}}})}function Nf(e,t){return(n,r)=>{let o=ai.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let a=OF(o,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var a1=Nf(!1,!0),i1=Nf(!0,!0),WY=Nf(!1,!1),GY=Nf(!0,!1);var Y2=Ce.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>a1(e,t),redo:()=>({state:e,dispatch:t})=>i1(e,t)}},addProseMirrorPlugins(){return[X2(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var Z2=J.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",se(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!zL(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$from:r,$to:o}=n,a=e();return r.parentOffset===0?a.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):yf(n)?a.insertContentAt(o.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:i,dispatch:s})=>{var l;if(s){let{$to:u}=i.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?i.setSelection($.create(i.doc,u.pos+1)):u.nodeAfter.isBlock?i.setSelection(Y.create(i.doc,u.pos)):i.setSelection($.create(i.doc,u.pos));else{let d=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(i.insert(c,d),i.setSelection($.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[FL({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var PF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,BF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,FF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,zF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,J2=tt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Lr({find:PF,type:this.type}),Lr({find:FF,type:this.type})]},addPasteRules(){return[qn({find:BF,type:this.type}),qn({find:zF,type:this.type})]}});var Q2=J.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",se(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});var HF="listItem",eI="textStyle",tI=/^(\d+)\.\s$/,nI=J.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?["ol",se(this.options.HTMLAttributes,n),0]:["ol",se(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(HF,this.editor.getAttributes(eI)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Ir({find:tI,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ir({find:tI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(eI)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}});var rI=J.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var UF=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,$F=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,oI=tt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Lr({find:UF,type:this.type})]},addPasteRules(){return[qn({find:$F,type:this.type})]}});var aI=J.create({name:"text",group:"inline"});var iI=Ce.create({name:"starterKit",addExtensions(){let e=[];return this.options.bold!==!1&&e.push(O2.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(N2.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(B2.configure(this.options.bulletList)),this.options.code!==!1&&e.push(F2.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(_f.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(z2.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(U2.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(q2.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(V2.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(W2.configure(this.options.heading)),this.options.history!==!1&&e.push(Y2.configure(this.options.history)),this.options.horizontalRule!==!1&&e.push(Z2.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(J2.configure(this.options.italic)),this.options.listItem!==!1&&e.push(Q2.configure(this.options.listItem)),this.options.orderedList!==!1&&e.push(nI.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(rI.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(oI.configure(this.options.strike)),this.options.text!==!1&&e.push(aI.configure(this.options.text)),e}});var sI=tt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",se(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});var qF="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",VF="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",p1="numeric",h1="ascii",m1="alpha",ku="asciinumeric",Su="alphanumeric",g1="domain",hI="emoji",WF="scheme",GF="slashscheme",s1="whitespace";function KF(e,t){return e in t||(t[e]=[]),t[e]}function si(e,t,n){t[p1]&&(t[ku]=!0,t[Su]=!0),t[h1]&&(t[ku]=!0,t[m1]=!0),t[ku]&&(t[Su]=!0),t[m1]&&(t[Su]=!0),t[Su]&&(t[g1]=!0),t[hI]&&(t[g1]=!0);for(let r in t){let o=KF(r,n);o.indexOf(e)<0&&o.push(e)}}function jF(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function hn(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}hn.groups={};hn.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){let o=t.jr[r][0],a=t.jr[r][1];if(a&&o.test(e))return a}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){r=r||hn.groups;let o;return t&&t.j?o=t:(o=new hn(t),n&&r&&si(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this,a=e.length;if(!a)return o;for(let i=0;i<a-1;i++)o=o.tt(e[i]);return o.tt(e[a-1],t,n,r)},tt(e,t,n,r){r=r||hn.groups;let o=this;if(t&&t.j)return o.j[e]=t,t;let a=t,i,s=o.go(e);if(s?(i=new hn,Object.assign(i.j,s.j),i.jr.push.apply(i.jr,s.jr),i.jd=s.jd,i.t=s.t):i=new hn,a){if(r)if(i.t&&typeof i.t=="string"){let l=Object.assign(jF(i.t,r),n);si(a,l,r)}else n&&si(a,n,r);i.t=a}return o.j[e]=i,i}};var xe=(e,t,n,r,o)=>e.ta(t,n,r,o),rt=(e,t,n,r,o)=>e.tr(t,n,r,o),lI=(e,t,n,r,o)=>e.ts(t,n,r,o),R=(e,t,n,r,o)=>e.tt(t,n,r,o),go="WORD",b1="UWORD",mI="ASCIINUMERICAL",gI="ALPHANUMERICAL",_u="LOCALHOST",x1="TLD",y1="UTLD",Bf="SCHEME",Cs="SLASH_SCHEME",v1="NUM",w1="WS",S1="NL",Cu="OPENBRACE",Eu="CLOSEBRACE",Ff="OPENBRACKET",zf="CLOSEBRACKET",Hf="OPENPAREN",Uf="CLOSEPAREN",$f="OPENANGLEBRACKET",qf="CLOSEANGLEBRACKET",Vf="FULLWIDTHLEFTPAREN",Wf="FULLWIDTHRIGHTPAREN",Gf="LEFTCORNERBRACKET",Kf="RIGHTCORNERBRACKET",jf="LEFTWHITECORNERBRACKET",Xf="RIGHTWHITECORNERBRACKET",Yf="FULLWIDTHLESSTHAN",Zf="FULLWIDTHGREATERTHAN",Jf="AMPERSAND",Qf="APOSTROPHE",ep="ASTERISK",ra="AT",tp="BACKSLASH",np="BACKTICK",rp="CARET",oa="COLON",k1="COMMA",op="DOLLAR",Ar="DOT",ap="EQUALS",C1="EXCLAMATION",jn="HYPHEN",Lu="PERCENT",ip="PIPE",sp="PLUS",lp="POUND",Iu="QUERY",E1="QUOTE",bI="FULLWIDTHMIDDLEDOT",L1="SEMI",Dr="SLASH",Mu="TILDE",up="UNDERSCORE",xI="EMOJI",cp="SYM",yI=Object.freeze({__proto__:null,ALPHANUMERICAL:gI,AMPERSAND:Jf,APOSTROPHE:Qf,ASCIINUMERICAL:mI,ASTERISK:ep,AT:ra,BACKSLASH:tp,BACKTICK:np,CARET:rp,CLOSEANGLEBRACKET:qf,CLOSEBRACE:Eu,CLOSEBRACKET:zf,CLOSEPAREN:Uf,COLON:oa,COMMA:k1,DOLLAR:op,DOT:Ar,EMOJI:xI,EQUALS:ap,EXCLAMATION:C1,FULLWIDTHGREATERTHAN:Zf,FULLWIDTHLEFTPAREN:Vf,FULLWIDTHLESSTHAN:Yf,FULLWIDTHMIDDLEDOT:bI,FULLWIDTHRIGHTPAREN:Wf,HYPHEN:jn,LEFTCORNERBRACKET:Gf,LEFTWHITECORNERBRACKET:jf,LOCALHOST:_u,NL:S1,NUM:v1,OPENANGLEBRACKET:$f,OPENBRACE:Cu,OPENBRACKET:Ff,OPENPAREN:Hf,PERCENT:Lu,PIPE:ip,PLUS:sp,POUND:lp,QUERY:Iu,QUOTE:E1,RIGHTCORNERBRACKET:Kf,RIGHTWHITECORNERBRACKET:Xf,SCHEME:Bf,SEMI:L1,SLASH:Dr,SLASH_SCHEME:Cs,SYM:cp,TILDE:Mu,TLD:x1,UNDERSCORE:up,UTLD:y1,UWORD:b1,WORD:go,WS:w1}),ho=/[a-z]/,vu=/\p{L}/u,l1=/\p{Emoji}/u;var mo=/\d/,u1=/\s/;var uI="\r",c1=`
103
+ `,XF="️",YF="‍",d1="",Of=null,Rf=null;function ZF(e=[]){let t={};hn.groups=t;let n=new hn;Of==null&&(Of=cI(qF)),Rf==null&&(Rf=cI(VF)),R(n,"'",Qf),R(n,"{",Cu),R(n,"}",Eu),R(n,"[",Ff),R(n,"]",zf),R(n,"(",Hf),R(n,")",Uf),R(n,"<",$f),R(n,">",qf),R(n,"(",Vf),R(n,")",Wf),R(n,"「",Gf),R(n,"」",Kf),R(n,"『",jf),R(n,"』",Xf),R(n,"<",Yf),R(n,">",Zf),R(n,"&",Jf),R(n,"*",ep),R(n,"@",ra),R(n,"`",np),R(n,"^",rp),R(n,":",oa),R(n,",",k1),R(n,"$",op),R(n,".",Ar),R(n,"=",ap),R(n,"!",C1),R(n,"-",jn),R(n,"%",Lu),R(n,"|",ip),R(n,"+",sp),R(n,"#",lp),R(n,"?",Iu),R(n,'"',E1),R(n,"/",Dr),R(n,";",L1),R(n,"~",Mu),R(n,"_",up),R(n,"\\",tp),R(n,"・",bI);let r=rt(n,mo,v1,{[p1]:!0});rt(r,mo,r);let o=rt(r,ho,mI,{[ku]:!0}),a=rt(r,vu,gI,{[Su]:!0}),i=rt(n,ho,go,{[h1]:!0});rt(i,mo,o),rt(i,ho,i),rt(o,mo,o),rt(o,ho,o);let s=rt(n,vu,b1,{[m1]:!0});rt(s,ho),rt(s,mo,a),rt(s,vu,s),rt(a,mo,a),rt(a,ho),rt(a,vu,a);let l=R(n,c1,S1,{[s1]:!0}),u=R(n,uI,w1,{[s1]:!0}),c=rt(n,u1,w1,{[s1]:!0});R(n,d1,c),R(u,c1,l),R(u,d1,c),rt(u,u1,c),R(c,uI),R(c,c1),rt(c,u1,c),R(c,d1,c);let d=rt(n,l1,xI,{[hI]:!0});R(d,"#"),rt(d,l1,d),R(d,XF,d);let f=R(d,YF);R(f,"#"),rt(f,l1,d);let p=[[ho,i],[mo,o]],h=[[ho,null],[vu,s],[mo,a]];for(let m=0;m<Of.length;m++)na(n,Of[m],x1,go,p);for(let m=0;m<Rf.length;m++)na(n,Rf[m],y1,b1,h);si(x1,{tld:!0,ascii:!0},t),si(y1,{utld:!0,alpha:!0},t),na(n,"file",Bf,go,p),na(n,"mailto",Bf,go,p),na(n,"http",Cs,go,p),na(n,"https",Cs,go,p),na(n,"ftp",Cs,go,p),na(n,"ftps",Cs,go,p),si(Bf,{scheme:!0,ascii:!0},t),si(Cs,{slashscheme:!0,ascii:!0},t),e=e.sort((m,b)=>m[0]>b[0]?1:-1);for(let m=0;m<e.length;m++){let b=e[m][0],y=e[m][1]?{[WF]:!0}:{[GF]:!0};b.indexOf("-")>=0?y[g1]=!0:ho.test(b)?mo.test(b)?y[ku]=!0:y[h1]=!0:y[p1]=!0,lI(n,b,b,y)}return lI(n,"localhost",_u,{ascii:!0}),n.jd=new hn(cp),{start:n,tokens:Object.assign({groups:t},yI)}}function wI(e,t){let n=JF(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,o=[],a=0,i=0;for(;i<r;){let s=e,l=null,u=0,c=null,d=-1,f=-1;for(;i<r&&(l=s.go(n[i]));)s=l,s.accepts()?(d=0,f=0,c=s):d>=0&&(d+=n[i].length,f++),u+=n[i].length,a+=n[i].length,i++;a-=d,i-=f,u-=d,o.push({t:c.t,v:t.slice(a-u,a),s:a-u,e:a})}return o}function JF(e){let t=[],n=e.length,r=0;for(;r<n;){let o=e.charCodeAt(r),a,i=o<55296||o>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}function na(e,t,n,r,o){let a,i=t.length;for(let s=0;s<i-1;s++){let l=t[s];e.j[l]?a=e.j[l]:(a=new hn(r),a.jr=o.slice(),e.j[l]=a),e=a}return a=new hn(n),a.jr=o.slice(),e.j[t[i-1]]=a,a}function cI(e){let t=[],n=[],r=0,o="0123456789";for(;r<e.length;){let a=0;for(;o.indexOf(e[r+a])>=0;)a++;if(a>0){t.push(n.join(""));for(let i=parseInt(e.substring(r,r+a),10);i>0;i--)n.pop();r+=a}else n.push(e[r]),r++}return t}var Tu={defaultProtocol:"http",events:null,format:dI,formatHref:dI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function I1(e,t=null){let n=Object.assign({},Tu);e&&(n=Object.assign(n,e instanceof I1?e.o:e));let r=n.ignoreTags,o=[];for(let a=0;a<r.length;a++)o.push(r[a].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}I1.prototype={o:Tu,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=t!=null,o=this.o[e];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:Tu[e],typeof o=="function"&&r&&(o=o(t,n))):typeof o=="function"&&r&&(o=o(t,n.t,n)),o)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function dI(e){return e}function vI(e,t){this.t="token",this.v=e,this.tk=t}vI.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Tu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),a=this.toFormattedString(e),i={},s=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return i.href=r,s&&(i.class=s),l&&(i.target=l),u&&(i.rel=u),c&&Object.assign(i,c),{tagName:o,attributes:i,content:a,eventListeners:d}}};function dp(e,t){class n extends vI{constructor(o,a){super(o,a),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var fI=dp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),pI=dp("text"),QF=dp("nl"),Pf=dp("url",{isLink:!0,toHref(e=Tu.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==_u&&e[1].t===oa}});var Kn=e=>new hn(e);function e8({groups:e}){let t=e.domain.concat([Jf,ep,ra,tp,np,rp,op,ap,jn,v1,Lu,ip,sp,lp,Dr,cp,Mu,up]),n=[Qf,oa,k1,Ar,C1,Lu,Iu,E1,L1,$f,qf,Cu,Eu,zf,Ff,Hf,Uf,Vf,Wf,Gf,Kf,jf,Xf,Yf,Zf],r=[Jf,Qf,ep,tp,np,rp,op,ap,jn,Cu,Eu,Lu,ip,sp,lp,Iu,Dr,cp,Mu,up],o=Kn(),a=R(o,Mu);xe(a,r,a),xe(a,e.domain,a);let i=Kn(),s=Kn(),l=Kn();xe(o,e.domain,i),xe(o,e.scheme,s),xe(o,e.slashscheme,l),xe(i,r,a),xe(i,e.domain,i);let u=R(i,ra);R(a,ra,u),R(s,ra,u),R(l,ra,u);let c=R(a,Ar);xe(c,r,a),xe(c,e.domain,a);let d=Kn();xe(u,e.domain,d),xe(d,e.domain,d);let f=R(d,Ar);xe(f,e.domain,d);let p=Kn(fI);xe(f,e.tld,p),xe(f,e.utld,p),R(u,_u,p);let h=R(d,jn);R(h,jn,h),xe(h,e.domain,d),xe(p,e.domain,d),R(p,Ar,f),R(p,jn,h);let m=R(p,oa);xe(m,e.numeric,fI);let b=R(i,jn),g=R(i,Ar);R(b,jn,b),xe(b,e.domain,i),xe(g,r,a),xe(g,e.domain,i);let y=Kn(Pf);xe(g,e.tld,y),xe(g,e.utld,y),xe(y,e.domain,i),xe(y,r,a),R(y,Ar,g),R(y,jn,b),R(y,ra,u);let w=R(y,oa),x=Kn(Pf);xe(w,e.numeric,x);let S=Kn(Pf),v=Kn();xe(S,t,S),xe(S,n,v),xe(v,t,S),xe(v,n,v),R(y,Dr,S),R(x,Dr,S);let C=R(s,oa),E=R(l,oa),T=R(E,Dr),I=R(T,Dr);xe(s,e.domain,i),R(s,Ar,g),R(s,jn,b),xe(l,e.domain,i),R(l,Ar,g),R(l,jn,b),xe(C,e.domain,S),R(C,Dr,S),R(C,Iu,S),xe(I,e.domain,S),xe(I,t,S),R(I,Dr,S);let W=[[Cu,Eu],[Ff,zf],[Hf,Uf],[$f,qf],[Vf,Wf],[Gf,Kf],[jf,Xf],[Yf,Zf]];for(let te=0;te<W.length;te++){let[fe,oe]=W[te],Z=R(S,fe);R(v,fe,Z),R(Z,oe,S);let _=Kn(Pf);xe(Z,t,_);let k=Kn();xe(Z,n),xe(_,t,_),xe(_,n,k),xe(k,t,_),xe(k,n,k),R(_,oe,S),R(k,oe,S)}return R(o,_u,y),R(o,S1,QF),{start:o,tokens:yI}}function t8(e,t,n){let r=n.length,o=0,a=[],i=[];for(;o<r;){let s=e,l=null,u=null,c=0,d=null,f=-1;for(;o<r&&!(l=s.go(n[o].t));)i.push(n[o++]);for(;o<r&&(u=l||s.go(n[o].t));)l=null,s=u,s.accepts()?(f=0,d=s):f>=0&&f++,o++,c++;if(f<0)o-=c,o<r&&(i.push(n[o]),o++);else{i.length>0&&(a.push(f1(pI,t,i)),i=[]),o-=f,c-=f;let p=d.t,h=n.slice(o-c,o);a.push(f1(p,t,h))}}return i.length>0&&a.push(f1(pI,t,i)),a}function f1(e,t,n){let r=n[0].s,o=n[n.length-1].e,a=t.slice(r,o);return new e(a,n)}var n8=typeof console<"u"&&console&&console.warn||(()=>{}),r8="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ke={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function SI(){return hn.groups={},Ke.scanner=null,Ke.parser=null,Ke.tokenQueue=[],Ke.pluginQueue=[],Ke.customSchemes=[],Ke.initialized=!1,Ke}function M1(e,t=!1){if(Ke.initialized&&n8(`linkifyjs: already initialized - will not register custom scheme "${e}" ${r8}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
104
+ 1. Must only contain digits, lowercase ASCII letters or "-"
105
+ 2. Cannot start or end with "-"
106
+ 3. "-" cannot repeat`);Ke.customSchemes.push([e,t])}function o8(){Ke.scanner=ZF(Ke.customSchemes);for(let e=0;e<Ke.tokenQueue.length;e++)Ke.tokenQueue[e][1]({scanner:Ke.scanner});Ke.parser=e8(Ke.scanner.tokens);for(let e=0;e<Ke.pluginQueue.length;e++)Ke.pluginQueue[e][1]({scanner:Ke.scanner,parser:Ke.parser});return Ke.initialized=!0,Ke}function fp(e){return Ke.initialized||o8(),t8(Ke.parser.start,e,wI(Ke.scanner.start,e))}fp.scan=wI;function _1(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new I1(n),o=fp(e),a=[];for(let i=0;i<o.length;i++){let s=o[i];s.isLink&&(!t||s.t===t)&&r.check(s)&&a.push(s.toFormattedObject(r))}return a}var T1="[\0-   ᠎ -\u2029  ]",a8=new RegExp(T1),i8=new RegExp(`${T1}$`),s8=new RegExp(T1,"g");function l8(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function u8(e){return new ie({key:new de("autolink"),appendTransaction:(t,n,r)=>{let o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),a=t.some(u=>u.getMeta("preventAutolink"));if(!o||a)return;let{tr:i}=r,s=EL(n.doc,[...t]);if(IL(s).forEach(({newRange:u})=>{let c=LL(r.doc,u,p=>p.isTextblock),d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){let p=r.doc.textBetween(u.from,u.to," "," ");if(!i8.test(p))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){let p=f.split(a8).filter(Boolean);if(p.length<=0)return!1;let h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;let b=fp(h).map(g=>g.toObject(e.defaultProtocol));if(!l8(b))return!1;b.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{xf(g.from,g.to,r.doc).some(y=>y.mark.type===e.type)||i.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!i.steps.length)return i}})}function c8(e){return new ie({key:new de("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,a;if(r.button!==0||!t.editable)return!1;let i=r.target,s=[];for(;i.nodeName!=="DIV";)s.push(i),i=i.parentNode;if(!s.find(f=>f.nodeName==="A"))return!1;let l=Sb(t.state,e.type.name),u=r.target,c=(o=u?.href)!==null&&o!==void 0?o:l.href,d=(a=u?.target)!==null&&a!==void 0?a:l.target;return u&&c?(window.open(c,d),!0):!1}}})}function d8(e){return new ie({key:new de("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{state:o}=t,{selection:a}=o,{empty:i}=a;if(i)return!1;let s="";r.content.forEach(u=>{s+=u.textContent});let l=_1(s,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!l?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function li(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(s8,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var kI=tt.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){M1(e);return}M1(e.scheme,e.optionalSlashes)})},onDestroy(){SI()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!li(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!li(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!li(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",se(this.options.HTMLAttributes,e),0]:["a",se(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!li(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!li(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[qn({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,o=_1(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:i=>!!li(i,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(a=>t.push({text:a.value,data:{href:a.href},index:a.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(u8({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!li(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(c8({type:this.type})),this.options.linkOnPaste&&e.push(d8({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});var CI=Ce.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ie({key:new de("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let a=this.editor.isEmpty;return e.descendants((i,s)=>{let l=r>=s&&r<=s+i.nodeSize,u=!i.isLeaf&&cu(i);if((l||!this.options.showOnlyCurrent)&&u){let c=[this.options.emptyNodeClass];a&&c.push(this.options.emptyEditorClass);let d=ye.node(s,s+i.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:i,pos:s,hasAnchor:l}):this.options.placeholder});o.push(d)}return this.options.includeChildren}),be.create(e,o)}}})]}});var D1,N1;if(typeof WeakMap<"u"){let e=new WeakMap;D1=t=>e.get(t),N1=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;D1=r=>{for(let o=0;o<e.length;o+=2)if(e[o]==r)return e[o+1]},N1=(r,o)=>(n==10&&(n=0),e[n++]=r,e[n++]=o)}var ot=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,o=t/this.width|0,a=r+1,i=o+1;for(let s=1;a<this.width&&this.map[t+s]==n;s++)a++;for(let s=1;i<this.height&&this.map[t+this.width*s]==n;s++)i++;return{left:r,top:o,right:a,bottom:i}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:o,top:a,bottom:i}=this.findCell(e);return t=="horiz"?(n<0?r==0:o==this.width)?null:this.map[a*this.width+(n<0?r-1:o)]:(n<0?a==0:i==this.height)?null:this.map[r+this.width*(n<0?a-1:i)]}rectBetween(e,t){let{left:n,right:r,top:o,bottom:a}=this.findCell(e),{left:i,right:s,top:l,bottom:u}=this.findCell(t);return{left:Math.min(n,i),top:Math.min(o,l),right:Math.max(r,s),bottom:Math.max(a,u)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){let a=r*this.width+o,i=this.map[a];n[i]||(n[i]=!0,!(o==e.left&&o&&this.map[a-1]==i||r==e.top&&r&&this.map[a-this.width]==i)&&t.push(i))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){let a=o+n.child(r).nodeSize;if(r==e){let i=t+e*this.width,s=(e+1)*this.width;for(;i<s&&this.map[i]<o;)i++;return i==s?a-1:this.map[i]}o=a}}static get(e){return D1(e)||N1(e,f8(e))}};function f8(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);let t=p8(e),n=e.childCount,r=[],o=0,a=null,i=[];for(let u=0,c=t*n;u<c;u++)r[u]=0;for(let u=0,c=0;u<n;u++){let d=e.child(u);c++;for(let h=0;;h++){for(;o<r.length&&r[o]!=0;)o++;if(h==d.childCount)break;let m=d.child(h),{colspan:b,rowspan:g,colwidth:y}=m.attrs;for(let w=0;w<g;w++){if(w+u>=n){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:g-w});break}let x=o+w*t;for(let S=0;S<b;S++){r[x+S]==0?r[x+S]=c:(a||(a=[])).push({type:"collision",row:u,pos:c,n:b-S});let v=y&&y[S];if(v){let C=(x+S)%t*2,E=i[C];E==null||E!=v&&i[C+1]==1?(i[C]=v,i[C+1]=1):E==v&&i[C+1]++}}}o+=b,c+=m.nodeSize}let f=(u+1)*t,p=0;for(;o<f;)r[o++]==0&&p++;p&&(a||(a=[])).push({type:"missing",row:u,n:p}),c++}(t===0||n===0)&&(a||(a=[])).push({type:"zero_sized"});let s=new ot(t,n,r,a),l=!1;for(let u=0;!l&&u<i.length;u+=2)i[u]!=null&&i[u+1]<n&&(l=!0);return l&&h8(s,i,e),s}function p8(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let o=e.child(r),a=0;if(n)for(let i=0;i<r;i++){let s=e.child(i);for(let l=0;l<s.childCount;l++){let u=s.child(l);i+u.attrs.rowspan>r&&(a+=u.attrs.colspan)}}for(let i=0;i<o.childCount;i++){let s=o.child(i);a+=s.attrs.colspan,s.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function h8(e,t,n){e.problems||(e.problems=[]);let r={};for(let o=0;o<e.map.length;o++){let a=e.map[o];if(r[a])continue;r[a]=!0;let i=n.nodeAt(a);if(!i)throw new RangeError(`No cell with offset ${a} found`);let s=null,l=i.attrs;for(let u=0;u<l.colspan;u++){let c=(o+u)%e.width,d=t[c*2];d!=null&&(!l.colwidth||l.colwidth[u]!=d)&&((s||(s=m8(l)))[u]=d)}s&&e.problems.unshift({type:"colwidth mismatch",pos:a,colwidth:s})}}function m8(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function jt(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var aa=new de("selectingCells");function Es(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function g8(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function dr(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function xp(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Es(t.$head)||b8(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function b8(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function O1(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function x8(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function B1(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function OI(e,t,n){let r=e.node(-1),o=ot.get(r),a=e.start(-1),i=o.nextCell(e.pos-a,t,n);return i==null?null:e.node(0).resolve(a+i)}function ui(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function RI(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}function y8(e,t,n){let r=jt(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}var Ue=class bo extends K{constructor(t,n=t){let r=t.node(-1),o=ot.get(r),a=t.start(-1),i=o.rectBetween(t.pos-a,n.pos-a),s=t.node(0),l=o.cellsInRect(i).filter(c=>c!=n.pos-a);l.unshift(n.pos-a);let u=l.map(c=>{let d=r.nodeAt(c);if(!d)throw RangeError(`No cell with offset ${c} found`);let f=a+c+1;return new is(s.resolve(f),s.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(O1(r)&&O1(o)&&B1(r,o)){let a=this.$anchorCell.node(-1)!=r.node(-1);return a&&this.isRowSelection()?bo.rowSelection(r,o):a&&this.isColSelection()?bo.colSelection(r,o):new bo(r,o)}return $.between(r,o)}content(){let t=this.$anchorCell.node(-1),n=ot.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),a={},i=[];for(let l=o.top;l<o.bottom;l++){let u=[];for(let c=l*n.width+o.left,d=o.left;d<o.right;d++,c++){let f=n.map[c];if(a[f])continue;a[f]=!0;let p=n.findCell(f),h=t.nodeAt(f);if(!h)throw RangeError(`No cell with offset ${f} found`);let m=o.left-p.left,b=p.right-o.right;if(m>0||b>0){let g=h.attrs;if(m>0&&(g=ui(g,0,m)),b>0&&(g=ui(g,g.colspan-b,b)),p.left<o.left){if(h=h.type.createAndFill(g),!h)throw RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else h=h.type.create(g,h.content)}if(p.top<o.top||p.bottom>o.bottom){let g={...h.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?h=h.type.createAndFill(g):h=h.type.create(g,h.content)}u.push(h)}i.push(t.child(l).copy(D.from(u)))}let s=this.isColSelection()&&this.isRowSelection()?t:i;return new B(D.from(s),1,1)}replace(t,n=B.empty){let r=t.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],u=t.mapping.slice(r);t.replace(u.map(s.pos),u.map(l.pos),i?B.empty:n)}let a=K.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);a&&t.setSelection(a)}replaceWith(t,n){this.replace(t,new B(D.from(n),0,0))}forEachCell(t){let n=this.$anchorCell.node(-1),r=ot.get(n),o=this.$anchorCell.start(-1),a=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let i=0;i<a.length;i++)t(n.nodeAt(a[i]),o+a[i])}isColSelection(){let t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;let r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),o=ot.get(r),a=t.start(-1),i=o.findCell(t.pos-a),s=o.findCell(n.pos-a),l=t.node(0);return i.top<=s.top?(i.top>0&&(t=l.resolve(a+o.map[i.left])),s.bottom<o.height&&(n=l.resolve(a+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(n=l.resolve(a+o.map[s.left])),i.bottom<o.height&&(t=l.resolve(a+o.map[o.width*(o.height-1)+i.right-1]))),new bo(t,n)}isRowSelection(){let t=this.$anchorCell.node(-1),n=ot.get(t),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),a=n.colCount(this.$headCell.pos-r);if(Math.min(o,a)>0)return!1;let i=o+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==n.width}eq(t){return t instanceof bo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),o=ot.get(r),a=t.start(-1),i=o.findCell(t.pos-a),s=o.findCell(n.pos-a),l=t.node(0);return i.left<=s.left?(i.left>0&&(t=l.resolve(a+o.map[i.top*o.width])),s.right<o.width&&(n=l.resolve(a+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(n=l.resolve(a+o.map[s.top*o.width])),i.right<o.width&&(t=l.resolve(a+o.map[o.width*(i.top+1)-1]))),new bo(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new bo(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new bo(t.resolve(n),t.resolve(r))}getBookmark(){return new w8(this.$anchorCell.pos,this.$headCell.pos)}};Ue.prototype.visible=!1;K.jsonID("cell",Ue);var w8=class PI{constructor(t,n){this.anchor=t,this.head=n}map(t){return new PI(t.map(this.anchor),t.map(this.head))}resolve(t){let n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&B1(n,r)?new Ue(n,r):K.near(r,1)}};function v8(e){if(!(e.selection instanceof Ue))return null;let t=[];return e.selection.forEachCell((n,r)=>{t.push(ye.node(r,r+n.nodeSize,{class:"selectedCell"}))}),be.create(e.doc,t)}function S8({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let a=t.depth;a>=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function k8({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){let a=e.node(o);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){n=a;break}}for(let o=t.depth;o>0;o--){let a=t.node(o);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){r=a;break}}return n!==r&&t.parentOffset===0}function C8(e,t,n){let r=(t||e).selection,o=(t||e).doc,a,i;if(r instanceof Y&&(i=r.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")a=Ue.create(o,r.from);else if(i=="row"){let s=o.resolve(r.from+1);a=Ue.rowSelection(s,s)}else if(!n){let s=ot.get(r.node),l=r.from+1,u=l+s.map[s.width*s.height-1];a=Ue.create(o,l+1,u)}}else r instanceof $&&S8(r)?a=$.create(o,r.from):r instanceof $&&k8(r)&&(a=$.create(o,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}var E8=new de("fix-tables");function BI(e,t,n,r){let o=e.childCount,a=t.childCount;e:for(let i=0,s=0;i<a;i++){let l=t.child(i);for(let u=s,c=Math.min(o,i+3);u<c;u++)if(e.child(u)==l){s=u+1,n+=l.nodeSize;continue e}r(l,n),s<o&&e.child(s).sameMarkup(l)?BI(e.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function F1(e,t){let n,r=(o,a)=>{o.type.spec.tableRole=="table"&&(n=L8(e,o,a,n))};return t?t.doc!=e.doc&&BI(t.doc,e.doc,0,r):e.doc.descendants(r),n}function L8(e,t,n,r){let o=ot.get(t);if(!o.problems)return r;r||(r=e.tr);let a=[];for(let l=0;l<o.height;l++)a.push(0);for(let l=0;l<o.problems.length;l++){let u=o.problems[l];if(u.type=="collision"){let c=t.nodeAt(u.pos);if(!c)continue;let d=c.attrs;for(let f=0;f<d.rowspan;f++)a[u.row+f]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,ui(d,d.colspan-u.n,u.n))}else if(u.type=="missing")a[u.row]+=u.n;else if(u.type=="overlong_rowspan"){let c=t.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){let c=t.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){let c=r.mapping.map(n);r.delete(c,c+t.nodeSize)}}let i,s;for(let l=0;l<a.length;l++)a[l]&&(i==null&&(i=l),s=l);for(let l=0,u=n+1;l<o.height;l++){let c=t.child(l),d=u+c.nodeSize,f=a[l];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let b=0;b<f;b++){let g=jt(e.schema)[p].createAndFill();g&&h.push(g)}let m=(l==0||i==l-1)&&s==l?u+1:d-1;r.insert(r.mapping.map(m),h)}u=d}return r.setMeta(E8,{fixTables:!0})}function Nr(e){let t=e.selection,n=xp(e),r=n.node(-1),o=n.start(-1),a=ot.get(r);return{...t instanceof Ue?a.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):a.findCell(n.pos-o),tableStart:o,map:a,table:r}}function FI(e,{map:t,tableStart:n,table:r},o){let a=o>0?-1:0;y8(t,r,o+a)&&(a=o==0||o==t.width?null:0);for(let i=0;i<t.height;i++){let s=i*t.width+o;if(o>0&&o<t.width&&t.map[s-1]==t.map[s]){let l=t.map[s],u=r.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,RI(u.attrs,o-t.colCount(l))),i+=u.attrs.rowspan-1}else{let l=a==null?jt(r.type.schema).cell:r.nodeAt(t.map[s+a]).type,u=t.positionAt(i,o,r);e.insert(e.mapping.map(n+u),l.createAndFill())}}return e}function zI(e,t){if(!dr(e))return!1;if(t){let n=Nr(e);t(FI(e.tr,n,n.left))}return!0}function HI(e,t){if(!dr(e))return!1;if(t){let n=Nr(e);t(FI(e.tr,n,n.right))}return!0}function I8(e,{map:t,table:n,tableStart:r},o){let a=e.mapping.maps.length;for(let i=0;i<t.height;){let s=i*t.width+o,l=t.map[s],u=n.nodeAt(l),c=u.attrs;if(o>0&&t.map[s-1]==l||o<t.width-1&&t.map[s+1]==l)e.setNodeMarkup(e.mapping.slice(a).map(r+l),null,ui(c,o-t.colCount(l)));else{let d=e.mapping.slice(a).map(r+l);e.delete(d,d+u.nodeSize)}i+=c.rowspan}}function UI(e,t){if(!dr(e))return!1;if(t){let n=Nr(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;I8(r,n,o),o!=n.left;o--){let a=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!a)throw RangeError("No table found");n.table=a,n.map=ot.get(a)}t(r)}return!0}function M8(e,t,n){var r;let o=jt(t.type.schema).header_cell;for(let a=0;a<e.width;a++)if(((r=t.nodeAt(e.map[a+n*e.width]))==null?void 0:r.type)!=o)return!1;return!0}function $I(e,{map:t,tableStart:n,table:r},o){var a;let i=n;for(let u=0;u<o;u++)i+=r.child(u).nodeSize;let s=[],l=o>0?-1:0;M8(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let u=0,c=t.width*o;u<t.width;u++,c++)if(o>0&&o<t.height&&t.map[c]==t.map[c-t.width]){let d=t.map[c],f=r.nodeAt(d).attrs;e.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),u+=f.colspan-1}else{let d=l==null?jt(r.type.schema).cell:(a=r.nodeAt(t.map[c+l*t.width]))==null?void 0:a.type,f=d?.createAndFill();f&&s.push(f)}return e.insert(i,jt(r.type.schema).row.create(null,s)),e}function qI(e,t){if(!dr(e))return!1;if(t){let n=Nr(e);t($I(e.tr,n,n.top))}return!0}function VI(e,t){if(!dr(e))return!1;if(t){let n=Nr(e);t($I(e.tr,n,n.bottom))}return!0}function _8(e,{map:t,table:n,tableStart:r},o){let a=0;for(let u=0;u<o;u++)a+=n.child(u).nodeSize;let i=a+n.child(o).nodeSize,s=e.mapping.maps.length;e.delete(a+r,i+r);let l=new Set;for(let u=0,c=o*t.width;u<t.width;u++,c++){let d=t.map[c];if(!l.has(d)){if(l.add(d),o>0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(o<t.height&&d==t.map[c+t.width]){let f=n.nodeAt(d),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),m=t.positionAt(o+1,u,n);e.insert(e.mapping.slice(s).map(r+m),h),u+=p.colspan-1}}}}function WI(e,t){if(!dr(e))return!1;if(t){let n=Nr(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;_8(r,n,o),o!=n.top;o--){let a=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!a)throw RangeError("No table found");n.table=a,n.map=ot.get(n.table)}t(r)}return!0}function EI(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function T8({width:e,height:t,map:n},r){let o=r.top*e+r.left,a=o,i=(r.bottom-1)*e+r.left,s=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[s]==n[s+1])return!0;a+=e,s+=e}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[i]==n[i+e])return!0;o++,i++}return!1}function z1(e,t){let n=e.selection;if(!(n instanceof Ue)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=Nr(e),{map:o}=r;if(T8(o,r))return!1;if(t){let a=e.tr,i={},s=D.empty,l,u;for(let c=r.top;c<r.bottom;c++)for(let d=r.left;d<r.right;d++){let f=o.map[c*o.width+d],p=r.table.nodeAt(f);if(!(i[f]||!p))if(i[f]=!0,l==null)l=f,u=p;else{EI(p)||(s=s.append(p.content));let h=a.mapping.map(f+r.tableStart);a.delete(h,h+p.nodeSize)}}if(l==null||u==null)return!0;if(a.setNodeMarkup(l+r.tableStart,null,{...RI(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),s.size){let c=l+1+u.content.size,d=EI(u)?l+1:c;a.replaceWith(d+r.tableStart,c+r.tableStart,s)}a.setSelection(new Ue(a.doc.resolve(l+r.tableStart))),t(a)}return!0}function H1(e,t){let n=jt(e.schema);return A8(({node:r})=>n[r.type.spec.tableRole])(e,t)}function A8(e){return(t,n)=>{var r;let o=t.selection,a,i;if(o instanceof Ue){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;a=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(a=g8(o.$from),!a)return!1;i=(r=Es(o.$from))==null?void 0:r.pos}if(a==null||i==null||a.attrs.colspan==1&&a.attrs.rowspan==1)return!1;if(n){let s=a.attrs,l=[],u=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});let c=Nr(t),d=t.tr;for(let p=0;p<c.right-c.left;p++)l.push(u?{...s,colwidth:u&&u[p]?[u[p]]:null}:s);let f;for(let p=c.top;p<c.bottom;p++){let h=c.map.positionAt(p,c.left,c.table);p==c.top&&(h+=a.nodeSize);for(let m=c.left,b=0;m<c.right;m++,b++)m==c.left&&p==c.top||d.insert(f=d.mapping.map(h+c.tableStart,1),e({node:a,row:p,col:m}).createAndFill(l[b]))}d.setNodeMarkup(i,e({node:a,row:c.top,col:c.left}),l[0]),o instanceof Ue&&d.setSelection(new Ue(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function GI(e,t){return function(n,r){if(!dr(n))return!1;let o=xp(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){let a=n.tr;n.selection instanceof Ue?n.selection.forEachCell((i,s)=>{i.attrs[e]!==t&&a.setNodeMarkup(s,null,{...i.attrs,[e]:t})}):a.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function D8(e){return function(t,n){if(!dr(t))return!1;if(n){let r=jt(t.schema),o=Nr(t),a=t.tr,i=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=i.map(l=>o.table.nodeAt(l));for(let l=0;l<i.length;l++)s[l].type==r.header_cell&&a.setNodeMarkup(o.tableStart+i[l],r.cell,s[l].attrs);if(a.steps.length==0)for(let l=0;l<i.length;l++)a.setNodeMarkup(o.tableStart+i[l],r.header_cell,s[l].attrs);n(a)}return!0}}function LI(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let o=0;o<r.length;o++){let a=t.table.nodeAt(r[o]);if(a&&a.type!==n.header_cell)return!1}return!0}function Ls(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?D8(e):function(n,r){if(!dr(n))return!1;if(r){let o=jt(n.schema),a=Nr(n),i=n.tr,s=LI("row",a,o),l=LI("column",a,o),c=(e==="column"?s:e==="row"?l:!1)?1:0,d=e=="column"?{left:0,top:c,right:1,bottom:a.map.height}:e=="row"?{left:c,top:0,right:a.map.width,bottom:1}:a,f=e=="column"?l?o.cell:o.header_cell:e=="row"?s?o.cell:o.header_cell:o.cell;a.map.cellsInRect(d).forEach(p=>{let h=p+a.tableStart,m=i.doc.nodeAt(h);m&&i.setNodeMarkup(h,f,m.attrs)}),r(i)}return!0}}var nJ=Ls("row",{useDeprecatedLogic:!0}),rJ=Ls("column",{useDeprecatedLogic:!0}),KI=Ls("cell",{useDeprecatedLogic:!0});function N8(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){let a=e.node(-1).child(r),i=a.lastChild;if(i)return o-1-i.nodeSize;o-=a.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let n=e.node(-1);for(let r=e.indexAfter(-1),o=e.after();r<n.childCount;r++){let a=n.child(r);if(a.childCount)return o+1;o+=a.nodeSize}}return null}function U1(e){return function(t,n){if(!dr(t))return!1;let r=N8(xp(t),e);if(r==null)return!1;if(n){let o=t.doc.resolve(r);n(t.tr.setSelection($.between(o,x8(o))).scrollIntoView())}return!0}}function jI(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function pp(e,t){let n=e.selection;if(!(n instanceof Ue))return!1;if(t){let r=e.tr,o=jt(e.schema).cell.createAndFill().content;n.forEachCell((a,i)=>{a.content.eq(o)||r.replace(r.mapping.map(i+1),r.mapping.map(i+a.nodeSize-1),new B(o,0,0))}),r.docChanged&&t(r)}return!0}function O8(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;let o=t.child(0),a=o.type.spec.tableRole,i=o.type.schema,s=[];if(a=="row")for(let l=0;l<t.childCount;l++){let u=t.child(l).content,c=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(u=R1(jt(i).row,new B(u,c,d)).content),s.push(u)}else if(a=="cell"||a=="header_cell")s.push(n||r?R1(jt(i).row,new B(t,n,r)).content:t);else return null;return R8(i,s)}function R8(e,t){let n=[];for(let o=0;o<t.length;o++){let a=t[o];for(let i=a.childCount-1;i>=0;i--){let{rowspan:s,colspan:l}=a.child(i).attrs;for(let u=o;u<o+s;u++)n[u]=(n[u]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(D.empty),n[o]<r){let a=jt(e).cell.createAndFill(),i=[];for(let s=n[o];s<r;s++)i.push(a);t[o]=t[o].append(D.from(i))}return{height:t.length,width:r,rows:t}}function R1(e,t){let n=e.createAndFill();return new Wo(n).replace(0,n.content.size,t).doc}function P8({width:e,height:t,rows:n},r,o){if(e!=r){let a=[],i=[];for(let s=0;s<n.length;s++){let l=n[s],u=[];for(let c=a[s]||0,d=0;c<r;d++){let f=l.child(d%l.childCount);c+f.attrs.colspan>r&&(f=f.type.createChecked(ui(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)a[s+p]=(a[s+p]||0)+f.attrs.colspan}i.push(D.from(u))}n=i,e=r}if(t!=o){let a=[];for(let i=0,s=0;i<o;i++,s++){let l=[],u=n[s%t];for(let c=0;c<u.childCount;c++){let d=u.child(c);i+d.attrs.rowspan>o&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}a.push(D.from(l))}n=a,t=o}return{width:e,height:t,rows:n}}function B8(e,t,n,r,o,a,i){let s=e.doc.type.schema,l=jt(s),u,c;if(o>t.width)for(let d=0,f=0;d<t.height;d++){let p=n.child(d);f+=p.nodeSize;let h=[],m;p.lastChild==null||p.lastChild.type==l.cell?m=u||(u=l.cell.createAndFill()):m=c||(c=l.header_cell.createAndFill());for(let b=t.width;b<o;b++)h.push(m);e.insert(e.mapping.slice(i).map(f-1+r),h)}if(a>t.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h<Math.max(t.width,o);h++){let b=h>=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(b?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,D.from(d)),p=[];for(let h=t.height;h<a;h++)p.push(f);e.insert(e.mapping.slice(i).map(r+n.nodeSize-2),p)}return!!(u||c)}function II(e,t,n,r,o,a,i,s){if(i==0||i==t.height)return!1;let l=!1;for(let u=o;u<a;u++){let c=i*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){l=!0;let f=n.nodeAt(d),{top:p,left:h}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f.attrs,rowspan:i-p}),e.insert(e.mapping.slice(s).map(t.positionAt(i,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-i})),u+=f.attrs.colspan-1}}return l}function MI(e,t,n,r,o,a,i,s){if(i==0||i==t.width)return!1;let l=!1;for(let u=o;u<a;u++){let c=u*t.width+i,d=t.map[c];if(t.map[c-1]==d){l=!0;let f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(s).map(d+r);e.setNodeMarkup(h,null,ui(f.attrs,i-p,f.attrs.colspan-(i-p))),e.insert(h+f.nodeSize,f.type.createAndFill(ui(f.attrs,0,i-p))),u+=f.attrs.rowspan-1}}return l}function _I(e,t,n,r,o){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw new Error("No table found");let i=ot.get(a),{top:s,left:l}=r,u=l+o.width,c=s+o.height,d=e.tr,f=0;function p(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw new Error("No table found");i=ot.get(a),f=d.mapping.maps.length}B8(d,i,a,n,u,c,f)&&p(),II(d,i,a,n,l,u,s,f)&&p(),II(d,i,a,n,l,u,c,f)&&p(),MI(d,i,a,n,s,c,l,f)&&p(),MI(d,i,a,n,s,c,u,f)&&p();for(let h=s;h<c;h++){let m=i.positionAt(h,l,a),b=i.positionAt(h,u,a);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(b+n),new B(o.rows[h-s],0,0))}p(),d.setSelection(new Ue(d.doc.resolve(n+i.positionAt(s,l,a)),d.doc.resolve(n+i.positionAt(c-1,u-1,a)))),t(d)}var F8=su({ArrowLeft:hp("horiz",-1),ArrowRight:hp("horiz",1),ArrowUp:hp("vert",-1),ArrowDown:hp("vert",1),"Shift-ArrowLeft":mp("horiz",-1),"Shift-ArrowRight":mp("horiz",1),"Shift-ArrowUp":mp("vert",-1),"Shift-ArrowDown":mp("vert",1),Backspace:pp,"Mod-Backspace":pp,Delete:pp,"Mod-Delete":pp});function gp(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function hp(e,t){return(n,r,o)=>{if(!o)return!1;let a=n.selection;if(a instanceof Ue)return gp(n,r,K.near(a.$headCell,t));if(e!="horiz"&&!a.empty)return!1;let i=XI(o,e,t);if(i==null)return!1;if(e=="horiz")return gp(n,r,K.near(n.doc.resolve(a.head+t),t));{let s=n.doc.resolve(i),l=OI(s,e,t),u;return l?u=K.near(l,1):t<0?u=K.near(n.doc.resolve(s.before(-1)),-1):u=K.near(n.doc.resolve(s.after(-1)),1),gp(n,r,u)}}}function mp(e,t){return(n,r,o)=>{if(!o)return!1;let a=n.selection,i;if(a instanceof Ue)i=a;else{let l=XI(o,e,t);if(l==null)return!1;i=new Ue(n.doc.resolve(l))}let s=OI(i.$headCell,e,t);return s?gp(n,r,new Ue(i.$anchorCell,s)):!1}}function z8(e,t){let n=e.state.doc,r=Es(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Ue(r))),!0):!1}function H8(e,t,n){if(!dr(e.state))return!1;let r=O8(n),o=e.state.selection;if(o instanceof Ue){r||(r={width:1,height:1,rows:[D.from(R1(jt(e.state.schema).cell,n))]});let a=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=ot.get(a).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=P8(r,s.right-s.left,s.bottom-s.top),_I(e.state,e.dispatch,i,s,r),!0}else if(r){let a=xp(e.state),i=a.start(-1);return _I(e.state,e.dispatch,i,ot.get(a.node(-1)).findCell(a.pos-i),r),!0}else return!1}function U8(e,t){var n;if(t.ctrlKey||t.metaKey)return;let r=TI(e,t.target),o;if(t.shiftKey&&e.state.selection instanceof Ue)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=Es(e.state.selection.$anchor))!=null&&((n=A1(e,t))==null?void 0:n.pos)!=o.pos)a(o,t),t.preventDefault();else if(!r)return;function a(l,u){let c=A1(e,u),d=aa.getState(e.state)==null;if(!c||!B1(l,c))if(d)c=l;else return;let f=new Ue(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(aa,l.pos),e.dispatch(p)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",s),aa.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(aa,-1))}function s(l){let u=l,c=aa.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(TI(e,u.target)!=r&&(d=A1(e,t),!d))return i();d&&a(d,u)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",s)}function XI(e,t,n){if(!(e.state.selection instanceof $))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){let s=r.before(o),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function TI(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function A1(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Es(e.state.doc.resolve(n.pos)):null}var $8=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),P1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,P1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function P1(e,t,n,r,o,a){var i;let s=0,l=!0,u=t.firstChild,c=e.firstChild;if(c){for(let d=0,f=0;d<c.childCount;d++){let{colspan:p,colwidth:h}=c.child(d).attrs;for(let m=0;m<p;m++,f++){let b=o==f?a:h&&h[m],g=b?b+"px":"";if(s+=b||r,b||(l=!1),u)u.style.width!=g&&(u.style.width=g),u=u.nextSibling;else{let y=document.createElement("col");y.style.width=g,t.appendChild(y)}}}for(;u;){let d=u.nextSibling;(i=u.parentNode)==null||i.removeChild(u),u=d}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var Sn=new de("tableColumnResizing");function YI({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=$8,lastColumnResizable:o=!0}={}){let a=new ie({key:Sn,state:{init(i,s){var l,u;let c=(u=(l=a.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,d=jt(s.schema).table.name;return r&&c&&(c[d]=(f,p)=>new r(f,n,p)),new q8(-1,!1)},apply(i,s){return s.apply(i)}},props:{attributes:i=>{let s=Sn.getState(i);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(i,s)=>{V8(i,s,e,o)},mouseleave:i=>{W8(i)},mousedown:(i,s)=>{G8(i,s,t,n)}},decorations:i=>{let s=Sn.getState(i);if(s&&s.activeHandle>-1)return Z8(i,s.activeHandle)},nodeViews:{}}});return a}var q8=class bp{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,r=t.getMeta(Sn);if(r&&r.setHandle!=null)return new bp(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new bp(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return O1(t.doc.resolve(o))||(o=-1),new bp(o,n.dragging)}return n}};function V8(e,t,n,r){if(!e.editable)return;let o=Sn.getState(e.state);if(o&&!o.dragging){let a=j8(t.target),i=-1;if(a){let{left:s,right:l}=a.getBoundingClientRect();t.clientX-s<=n?i=AI(e,t,"left",n):l-t.clientX<=n&&(i=AI(e,t,"right",n))}if(i!=o.activeHandle){if(!r&&i!==-1){let s=e.state.doc.resolve(i),l=s.node(-1),u=ot.get(l),c=s.start(-1);if(u.colCount(s.pos-c)+s.nodeAfter.attrs.colspan-1==u.width-1)return}ZI(e,i)}}}function W8(e){if(!e.editable)return;let t=Sn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&ZI(e,-1)}function G8(e,t,n,r){var o;if(!e.editable)return!1;let a=(o=e.dom.ownerDocument.defaultView)!=null?o:window,i=Sn.getState(e.state);if(!i||i.activeHandle==-1||i.dragging)return!1;let s=e.state.doc.nodeAt(i.activeHandle),l=K8(e,i.activeHandle,s.attrs);e.dispatch(e.state.tr.setMeta(Sn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){a.removeEventListener("mouseup",u),a.removeEventListener("mousemove",c);let f=Sn.getState(e.state);f?.dragging&&(X8(e,f.activeHandle,DI(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(Sn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=Sn.getState(e.state);if(f&&f.dragging){let p=DI(f.dragging,d,n);NI(e,f.activeHandle,p,r)}}return NI(e,i.activeHandle,l,r),a.addEventListener("mouseup",u),a.addEventListener("mousemove",c),t.preventDefault(),!0}function K8(e,t,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=n;if(r)for(let u=0;u<n;u++)r[u]&&(s-=r[u],l--);return s/l}function j8(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function AI(e,t,n,r){let o=n=="right"?-r:r,a=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!a)return-1;let{pos:i}=a,s=Es(e.state.doc.resolve(i));if(!s)return-1;if(n=="right")return s.pos;let l=ot.get(s.node(-1)),u=s.start(-1),c=l.map.indexOf(s.pos-u);return c%l.width==0?-1:u+l.map[c-1]}function DI(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ZI(e,t){e.dispatch(e.state.tr.setMeta(Sn,{setHandle:t}))}function X8(e,t,n){let r=e.state.doc.resolve(t),o=r.node(-1),a=ot.get(o),i=r.start(-1),s=a.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let u=0;u<a.height;u++){let c=u*a.width+s;if(u&&a.map[c]==a.map[c-a.width])continue;let d=a.map[c],f=o.nodeAt(d).attrs,p=f.colspan==1?0:s-a.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;let h=f.colwidth?f.colwidth.slice():Y8(f.colspan);h[p]=n,l.setNodeMarkup(i+d,null,{...f,colwidth:h})}l.docChanged&&e.dispatch(l)}function NI(e,t,n,r){let o=e.state.doc.resolve(t),a=o.node(-1),i=o.start(-1),s=ot.get(a).colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&P1(a,l.firstChild,l,r,s,n)}function Y8(e){return Array(e).fill(0)}function Z8(e,t){var n;let r=[],o=e.doc.resolve(t),a=o.node(-1);if(!a)return be.empty;let i=ot.get(a),s=o.start(-1),l=i.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let u=0;u<i.height;u++){let c=l+u*i.width;if((l==i.width-1||i.map[c]!=i.map[c+1])&&(u==0||i.map[c]!=i.map[c-i.width])){let d=i.map[c],f=s+d+a.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=Sn.getState(e))!=null&&n.dragging&&r.push(ye.node(s+d,s+d+a.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(ye.widget(f,p))}}return be.create(e.doc,r)}function JI({allowTableNodeSelection:e=!1}={}){return new ie({key:aa,state:{init(){return null},apply(t,n){let r=t.getMeta(aa);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;let{deleted:o,pos:a}=t.mapping.mapResult(n);return o?null:a}},props:{decorations:v8,handleDOMEvents:{mousedown:U8},createSelectionBetween(t){return aa.getState(t.state)!=null?t.state.selection:null},handleTripleClick:z8,handleKeyDown:F8,handlePaste:H8},appendTransaction(t,n,r){return C8(r,F1(r,n),e)}})}function $1(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function QI(e,t,n,r,o,a){var i;let s=0,l=!0,u=t.firstChild,c=e.firstChild;if(c!==null)for(let d=0,f=0;d<c.childCount;d+=1){let{colspan:p,colwidth:h}=c.child(d).attrs;for(let m=0;m<p;m+=1,f+=1){let b=o===f?a:h&&h[m],g=b?`${b}px`:"";if(s+=b||r,b||(l=!1),u){if(u.style.width!==g){let[y,w]=$1(r,b);u.style.setProperty(y,w)}u=u.nextSibling}else{let y=document.createElement("col"),[w,x]=$1(r,b);y.style.setProperty(w,x),t.appendChild(y)}}}for(;u;){let d=u.nextSibling;(i=u.parentNode)===null||i===void 0||i.removeChild(u),u=d}l?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var q1=class{constructor(t,n){this.node=t,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),QI(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,QI(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}};function J8(e,t,n,r){let o=0,a=!0,i=[],s=e.firstChild;if(!s)return{};for(let d=0,f=0;d<s.childCount;d+=1){let{colspan:p,colwidth:h}=s.child(d).attrs;for(let m=0;m<p;m+=1,f+=1){let b=n===f?r:h&&h[m];o+=b||t,b||(a=!1);let[g,y]=$1(t,b);i.push(["col",{style:`${g}: ${y}`}])}}let l=a?`${o}px`:"",u=a?"":`${o}px`;return{colgroup:["colgroup",{},...i],tableWidth:l,tableMinWidth:u}}function eM(e,t){return t?e.createChecked(null,t):e.createAndFill()}function Q8(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function e5(e,t,n,r,o){let a=Q8(e),i=[],s=[];for(let u=0;u<n;u+=1){let c=eM(a.cell,o);if(c&&s.push(c),r){let d=eM(a.header_cell,o);d&&i.push(d)}}let l=[];for(let u=0;u<t;u+=1)l.push(a.row.createChecked(null,r&&u===0?i:s));return a.table.createChecked(null,l)}function t5(e){return e instanceof Ue}var yp=({editor:e})=>{let{selection:t}=e.state;if(!t5(t))return!1;let n=0,r=wb(t.ranges[0].$from,a=>a.type.name==="table");return r?.node.descendants(a=>{if(a.type.name==="table")return!1;["tableCell","tableHeader"].includes(a.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},tM=J.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:q1,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=J8(e,this.options.cellMinWidth),a=["table",se(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:a})=>{let i=e5(a.schema,e,t,n);if(o){let s=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection($.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>zI(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>HI(e,t),deleteColumn:()=>({state:e,dispatch:t})=>UI(e,t),addRowBefore:()=>({state:e,dispatch:t})=>qI(e,t),addRowAfter:()=>({state:e,dispatch:t})=>VI(e,t),deleteRow:()=>({state:e,dispatch:t})=>WI(e,t),deleteTable:()=>({state:e,dispatch:t})=>jI(e,t),mergeCells:()=>({state:e,dispatch:t})=>z1(e,t),splitCell:()=>({state:e,dispatch:t})=>H1(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Ls("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Ls("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>KI(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>z1(e,t)?!0:H1(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>GI(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>U1(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>U1(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&F1(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let r=Ue.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:yp,"Mod-Backspace":yp,Delete:yp,"Mod-Delete":yp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[YI({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],JI({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:me(V(e,"tableRole",t))}}});var nM=J.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",se(this.options.HTMLAttributes,e),0]}});var rM=J.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",se(this.options.HTMLAttributes,e),0]}});var oM=J.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",se(this.options.HTMLAttributes,e),0]}});var aM=J.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",se(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});var n5=/^\s*(\[([( |x])?\])\s$/,iM=J.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",se(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let o=document.createElement("li"),a=document.createElement("label"),i=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),u=()=>{var c,d;s.ariaLabel=((d=(c=this.options.a11y)===null||c===void 0?void 0:c.checkboxLabel)===null||d===void 0?void 0:d.call(c,e,s.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};return u(),a.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:d}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let h=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...h?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,d])=>{o.setAttribute(c,d)}),o.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,i),o.append(a,l),Object.entries(t).forEach(([c,d])=>{o.setAttribute(c,d)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,u(),!0)}}},addInputRules(){return[Ir({find:n5,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}});function r5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mM(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&mM(n)}),e}var vp=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function gM(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ia(e,...t){let n=Object.create(null);for(let r in e)n[r]=e[r];return t.forEach(function(r){for(let o in r)n[o]=r[o]}),n}var o5="</span>",sM=e=>!!e.scope,a5=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,o)=>`${r}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`},W1=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=gM(t)}openNode(t){if(!sM(t))return;let n=a5(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){sM(t)&&(this.buffer+=o5)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},lM=(e={})=>{let t={children:[]};return Object.assign(t,e),t},G1=class e{constructor(){this.rootNode=lM(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=lM({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},K1=class extends G1{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new W1(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Au(e){return e?typeof e=="string"?e:e.source:null}function bM(e){return di("(?=",e,")")}function i5(e){return di("(?:",e,")*")}function s5(e){return di("(?:",e,")?")}function di(...e){return e.map(n=>Au(n)).join("")}function l5(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function X1(...e){return"("+(l5(e).capture?"":"?:")+e.map(r=>Au(r)).join("|")+")"}function xM(e){return new RegExp(e.toString()+"|").exec("").length-1}function u5(e,t){let n=e&&e.exec(t);return n&&n.index===0}var c5=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Y1(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;let o=n,a=Au(r),i="";for(;a.length>0;){let s=c5.exec(a);if(!s){i+=a;break}i+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?i+="\\"+String(Number(s[1])+o):(i+=s[0],s[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(t)}var d5=/\b\B/,yM="[a-zA-Z]\\w*",Z1="[a-zA-Z_]\\w*",wM="\\b\\d+(\\.\\d+)?",vM="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",SM="\\b(0b[01]+)",f5="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",p5=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=di(t,/.*\b/,e.binary,/\b.*/)),ia({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Du={begin:"\\\\[\\s\\S]",relevance:0},h5={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Du]},m5={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Du]},g5={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},kp=function(e,t,n={}){let r=ia({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let o=X1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:di(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},b5=kp("//","$"),x5=kp("/\\*","\\*/"),y5=kp("#","$"),w5={scope:"number",begin:wM,relevance:0},v5={scope:"number",begin:vM,relevance:0},S5={scope:"number",begin:SM,relevance:0},k5={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Du,{begin:/\[/,end:/\]/,relevance:0,contains:[Du]}]},C5={scope:"title",begin:yM,relevance:0},E5={scope:"title",begin:Z1,relevance:0},L5={begin:"\\.\\s*"+Z1,relevance:0},I5=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},wp=Object.freeze({__proto__:null,APOS_STRING_MODE:h5,BACKSLASH_ESCAPE:Du,BINARY_NUMBER_MODE:S5,BINARY_NUMBER_RE:SM,COMMENT:kp,C_BLOCK_COMMENT_MODE:x5,C_LINE_COMMENT_MODE:b5,C_NUMBER_MODE:v5,C_NUMBER_RE:vM,END_SAME_AS_BEGIN:I5,HASH_COMMENT_MODE:y5,IDENT_RE:yM,MATCH_NOTHING_RE:d5,METHOD_GUARD:L5,NUMBER_MODE:w5,NUMBER_RE:wM,PHRASAL_WORDS_MODE:g5,QUOTE_STRING_MODE:m5,REGEXP_MODE:k5,RE_STARTERS_RE:f5,SHEBANG:p5,TITLE_MODE:C5,UNDERSCORE_IDENT_RE:Z1,UNDERSCORE_TITLE_MODE:E5});function M5(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function _5(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function T5(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=M5,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function A5(e,t){Array.isArray(e.illegal)&&(e.illegal=X1(...e.illegal))}function D5(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function N5(e,t){e.relevance===void 0&&(e.relevance=1)}var O5=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=di(n.beforeMatch,bM(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},R5=["of","and","for","in","not","or","if","then","parent","list","value"],P5="keyword";function kM(e,t,n=P5){let r=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(a){Object.assign(r,kM(e[a],t,a))}),r;function o(a,i){t&&(i=i.map(s=>s.toLowerCase())),i.forEach(function(s){let l=s.split("|");r[l[0]]=[a,B5(l[0],l[1])]})}}function B5(e,t){return t?Number(t):F5(e)?0:1}function F5(e){return R5.includes(e.toLowerCase())}var uM={},ci=e=>{console.error(e)},cM=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Is=(e,t)=>{uM[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),uM[`${e}/${t}`]=!0)},Sp=new Error;function CM(e,t,{key:n}){let r=0,o=e[n],a={},i={};for(let s=1;s<=t.length;s++)i[s+r]=o[s],a[s+r]=!0,r+=xM(t[s-1]);e[n]=i,e[n]._emit=a,e[n]._multi=!0}function z5(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ci("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Sp;if(typeof e.beginScope!="object"||e.beginScope===null)throw ci("beginScope must be object"),Sp;CM(e,e.begin,{key:"beginScope"}),e.begin=Y1(e.begin,{joinWith:""})}}function H5(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ci("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Sp;if(typeof e.endScope!="object"||e.endScope===null)throw ci("endScope must be object"),Sp;CM(e,e.end,{key:"endScope"}),e.end=Y1(e.end,{joinWith:""})}}function U5(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function $5(e){U5(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),z5(e),H5(e)}function q5(e){function t(i,s){return new RegExp(Au(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=xM(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let s=this.regexes.map(l=>l[1]);this.matcherRe=t(Y1(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(s);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];let l=new n;return this.rules.slice(s).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(s);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function o(i){let s=new r;return i.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),i.terminatorEnd&&s.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&s.addRule(i.illegal,{type:"illegal"}),s}function a(i,s){let l=i;if(i.isCompiled)return l;[_5,D5,$5,O5].forEach(c=>c(i,s)),e.compilerExtensions.forEach(c=>c(i,s)),i.__beforeBegin=null,[T5,A5,N5].forEach(c=>c(i,s)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=kM(i.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),s&&(i.begin||(i.begin=/\B|\b/),l.beginRe=t(l.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(l.endRe=t(l.end)),l.terminatorEnd=Au(l.end)||"",i.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(i.end?"|":"")+s.terminatorEnd)),i.illegal&&(l.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(c){return V5(c==="self"?i:c)})),i.contains.forEach(function(c){a(c,l)}),i.starts&&a(i.starts,s),l.matcher=o(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ia(e.classNameAliases||{}),a(e)}function EM(e){return e?e.endsWithParent||EM(e.starts):!1}function V5(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return ia(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:EM(e)?ia(e,{starts:e.starts?ia(e.starts):null}):Object.isFrozen(e)?ia(e):e}var W5="11.10.0",j1=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},V1=gM,dM=ia,fM=Symbol("nomatch"),G5=7,LM=function(e){let t=Object.create(null),n=Object.create(null),r=[],o=!0,a="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]},s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:K1};function l(k){return s.noHighlightRe.test(k)}function u(k){let L=k.className+" ";L+=k.parentNode?k.parentNode.className:"";let P=s.languageDetectRe.exec(L);if(P){let H=T(P[1]);return H||(cM(a.replace("{}",P[1])),cM("Falling back to no-highlight mode for this block.",k)),H?P[1]:"no-highlight"}return L.split(/\s+/).find(H=>l(H)||T(H))}function c(k,L,P){let H="",X="";typeof L=="object"?(H=k,P=L.ignoreIllegals,X=L.language):(Is("10.7.0","highlight(lang, code, ...args) has been deprecated."),Is("10.7.0",`Please use highlight(code, options) instead.
107
+ https://github.com/highlightjs/highlight.js/issues/2277`),X=k,H=L),P===void 0&&(P=!0);let ae={code:H,language:X};Z("before:highlight",ae);let Ne=ae.result?ae.result:d(ae.language,ae.code,P);return Ne.code=ae.code,Z("after:highlight",Ne),Ne}function d(k,L,P,H){let X=Object.create(null);function ae(M,N){return M.keywords[N]}function Ne(){if(!ee.keywords){ne.addText(Se);return}let M=0;ee.keywordPatternRe.lastIndex=0;let N=ee.keywordPatternRe.exec(Se),U="";for(;N;){U+=Se.substring(M,N.index);let ue=le.case_insensitive?N[0].toLowerCase():N[0],ze=ae(ee,ue);if(ze){let[mn,Ks]=ze;if(ne.addText(U),U="",X[ue]=(X[ue]||0)+1,X[ue]<=G5&&(lt+=Ks),mn.startsWith("_"))U+=N[0];else{let A=le.classNameAliases[mn]||mn;Te(N[0],A)}}else U+=N[0];M=ee.keywordPatternRe.lastIndex,N=ee.keywordPatternRe.exec(Se)}U+=Se.substring(M),ne.addText(U)}function Le(){if(Se==="")return;let M=null;if(typeof ee.subLanguage=="string"){if(!t[ee.subLanguage]){ne.addText(Se);return}M=d(ee.subLanguage,Se,!0,Oe[ee.subLanguage]),Oe[ee.subLanguage]=M._top}else M=p(Se,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&(lt+=M.relevance),ne.__addSublanguage(M._emitter,M.language)}function ge(){ee.subLanguage!=null?Le():Ne(),Se=""}function Te(M,N){M!==""&&(ne.startScope(N),ne.addText(M),ne.endScope())}function Pt(M,N){let U=1,ue=N.length-1;for(;U<=ue;){if(!M._emit[U]){U++;continue}let ze=le.classNameAliases[M[U]]||M[U],mn=N[U];ze?Te(mn,ze):(Se=mn,Ne(),Se=""),U++}}function st(M,N){return M.scope&&typeof M.scope=="string"&&ne.openNode(le.classNameAliases[M.scope]||M.scope),M.beginScope&&(M.beginScope._wrap?(Te(Se,le.classNameAliases[M.beginScope._wrap]||M.beginScope._wrap),Se=""):M.beginScope._multi&&(Pt(M.beginScope,N),Se="")),ee=Object.create(M,{parent:{value:ee}}),ee}function z(M,N,U){let ue=u5(M.endRe,U);if(ue){if(M["on:end"]){let ze=new vp(M);M["on:end"](N,ze),ze.isMatchIgnored&&(ue=!1)}if(ue){for(;M.endsParent&&M.parent;)M=M.parent;return M}}if(M.endsWithParent)return z(M.parent,N,U)}function Q(M){return ee.matcher.regexIndex===0?(Se+=M[0],1):(F=!0,0)}function Ae(M){let N=M[0],U=M.rule,ue=new vp(U),ze=[U.__beforeBegin,U["on:begin"]];for(let mn of ze)if(mn&&(mn(M,ue),ue.isMatchIgnored))return Q(N);return U.skip?Se+=N:(U.excludeBegin&&(Se+=N),ge(),!U.returnBegin&&!U.excludeBegin&&(Se=N)),st(U,M),U.returnBegin?0:N.length}function De(M){let N=M[0],U=L.substring(M.index),ue=z(ee,M,U);if(!ue)return fM;let ze=ee;ee.endScope&&ee.endScope._wrap?(ge(),Te(N,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(ge(),Pt(ee.endScope,M)):ze.skip?Se+=N:(ze.returnEnd||ze.excludeEnd||(Se+=N),ge(),ze.excludeEnd&&(Se=N));do ee.scope&&ne.closeNode(),!ee.skip&&!ee.subLanguage&&(lt+=ee.relevance),ee=ee.parent;while(ee!==ue.parent);return ue.starts&&st(ue.starts,M),ze.returnEnd?0:N.length}function Fe(){let M=[];for(let N=ee;N!==le;N=N.parent)N.scope&&M.unshift(N.scope);M.forEach(N=>ne.openNode(N))}let je={};function $e(M,N){let U=N&&N[0];if(Se+=M,U==null)return ge(),0;if(je.type==="begin"&&N.type==="end"&&je.index===N.index&&U===""){if(Se+=L.slice(N.index,N.index+1),!o){let ue=new Error(`0 width match regex (${k})`);throw ue.languageName=k,ue.badRule=je.rule,ue}return 1}if(je=N,N.type==="begin")return Ae(N);if(N.type==="illegal"&&!P){let ue=new Error('Illegal lexeme "'+U+'" for mode "'+(ee.scope||"<unnamed>")+'"');throw ue.mode=ee,ue}else if(N.type==="end"){let ue=De(N);if(ue!==fM)return ue}if(N.type==="illegal"&&U==="")return 1;if(Mn>1e5&&Mn>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=U,U.length}let le=T(k);if(!le)throw ci(a.replace("{}",k)),new Error('Unknown language: "'+k+'"');let yt=q5(le),G="",ee=H||yt,Oe={},ne=new s.__emitter(s);Fe();let Se="",lt=0,Mt=0,Mn=0,F=!1;try{if(le.__emitTokens)le.__emitTokens(L,ne);else{for(ee.matcher.considerAll();;){Mn++,F?F=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=Mt;let M=ee.matcher.exec(L);if(!M)break;let N=L.substring(Mt,M.index),U=$e(N,M);Mt=M.index+U}$e(L.substring(Mt))}return ne.finalize(),G=ne.toHTML(),{language:k,value:G,relevance:lt,illegal:!1,_emitter:ne,_top:ee}}catch(M){if(M.message&&M.message.includes("Illegal"))return{language:k,value:V1(L),illegal:!0,relevance:0,_illegalBy:{message:M.message,index:Mt,context:L.slice(Mt-100,Mt+100),mode:M.mode,resultSoFar:G},_emitter:ne};if(o)return{language:k,value:V1(L),illegal:!1,relevance:0,errorRaised:M,_emitter:ne,_top:ee};throw M}}function f(k){let L={value:V1(k),illegal:!1,relevance:0,_top:i,_emitter:new s.__emitter(s)};return L._emitter.addText(k),L}function p(k,L){L=L||s.languages||Object.keys(t);let P=f(k),H=L.filter(T).filter(W).map(ge=>d(ge,k,!1));H.unshift(P);let X=H.sort((ge,Te)=>{if(ge.relevance!==Te.relevance)return Te.relevance-ge.relevance;if(ge.language&&Te.language){if(T(ge.language).supersetOf===Te.language)return 1;if(T(Te.language).supersetOf===ge.language)return-1}return 0}),[ae,Ne]=X,Le=ae;return Le.secondBest=Ne,Le}function h(k,L,P){let H=L&&n[L]||P;k.classList.add("hljs"),k.classList.add(`language-${H}`)}function m(k){let L=null,P=u(k);if(l(P))return;if(Z("before:highlightElement",{el:k,language:P}),k.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",k);return}if(k.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(k)),s.throwUnescapedHTML))throw new j1("One of your code blocks includes unescaped HTML.",k.innerHTML);L=k;let H=L.textContent,X=P?c(H,{language:P,ignoreIllegals:!0}):p(H);k.innerHTML=X.value,k.dataset.highlighted="yes",h(k,P,X.language),k.result={language:X.language,re:X.relevance,relevance:X.relevance},X.secondBest&&(k.secondBest={language:X.secondBest.language,relevance:X.secondBest.relevance}),Z("after:highlightElement",{el:k,result:X,text:H})}function b(k){s=dM(s,k)}let g=()=>{x(),Is("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){x(),Is("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function x(){if(document.readyState==="loading"){w=!0;return}document.querySelectorAll(s.cssSelector).forEach(m)}function S(){w&&x()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",S,!1);function v(k,L){let P=null;try{P=L(e)}catch(H){if(ci("Language definition for '{}' could not be registered.".replace("{}",k)),o)ci(H);else throw H;P=i}P.name||(P.name=k),t[k]=P,P.rawDefinition=L.bind(null,e),P.aliases&&I(P.aliases,{languageName:k})}function C(k){delete t[k];for(let L of Object.keys(n))n[L]===k&&delete n[L]}function E(){return Object.keys(t)}function T(k){return k=(k||"").toLowerCase(),t[k]||t[n[k]]}function I(k,{languageName:L}){typeof k=="string"&&(k=[k]),k.forEach(P=>{n[P.toLowerCase()]=L})}function W(k){let L=T(k);return L&&!L.disableAutodetect}function te(k){k["before:highlightBlock"]&&!k["before:highlightElement"]&&(k["before:highlightElement"]=L=>{k["before:highlightBlock"](Object.assign({block:L.el},L))}),k["after:highlightBlock"]&&!k["after:highlightElement"]&&(k["after:highlightElement"]=L=>{k["after:highlightBlock"](Object.assign({block:L.el},L))})}function fe(k){te(k),r.push(k)}function oe(k){let L=r.indexOf(k);L!==-1&&r.splice(L,1)}function Z(k,L){let P=k;r.forEach(function(H){H[P]&&H[P](L)})}function _(k){return Is("10.7.0","highlightBlock will be removed entirely in v12.0"),Is("10.7.0","Please use highlightElement now."),m(k)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:x,highlightElement:m,highlightBlock:_,configure:b,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:v,unregisterLanguage:C,listLanguages:E,getLanguage:T,registerAliases:I,autoDetection:W,inherit:dM,addPlugin:fe,removePlugin:oe}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=W5,e.regex={concat:di,lookahead:bM,either:X1,optional:s5,anyNumberOfTimes:i5};for(let k in wp)typeof wp[k]=="object"&&mM(wp[k]);return Object.assign(e,wp),e},Ms=LM({});Ms.newInstance=()=>LM({});var K5=Ms;Ms.HighlightJS=Ms;Ms.default=Ms;var j5=r5(K5);function IM(e,t=[]){return e.map(n=>{let r=[...t,...n.properties?n.properties.className:[]];return n.children?IM(n.children,r):{text:n.value,classes:r}}).flat()}function pM(e){return e.value||e.children||[]}function X5(e){return!!j5.getLanguage(e)}function hM({doc:e,name:t,lowlight:n,defaultLanguage:r}){let o=[];return bf(e,a=>a.type.name===t).forEach(a=>{var i;let s=a.pos+1,l=a.node.attrs.language||r,u=n.listLanguages(),c=l&&(u.includes(l)||X5(l)||!((i=n.registered)===null||i===void 0)&&i.call(n,l))?pM(n.highlight(l,a.node.textContent)):pM(n.highlightAuto(a.node.textContent));IM(c).forEach(d=>{let f=s+d.text.length;if(d.classes.length){let p=ye.inline(s,f,{class:d.classes.join(" ")});o.push(p)}s=f})}),be.create(e,o)}function Y5(e){return typeof e=="function"}function Z5({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(o=>Y5(t[o])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");let r=new ie({key:new de("lowlight"),state:{init:(o,{doc:a})=>hM({doc:a,name:e,lowlight:t,defaultLanguage:n}),apply:(o,a,i,s)=>{let l=i.selection.$head.parent.type.name,u=s.selection.$head.parent.type.name,c=bf(i.doc,f=>f.type.name===e),d=bf(s.doc,f=>f.type.name===e);return o.docChanged&&([l,u].includes(e)||d.length!==c.length||o.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?hM({doc:o.doc,name:e,lowlight:t,defaultLanguage:n}):a.map(o.mapping,o.doc)}},props:{decorations(o){return r.getState(o)}}});return r}var MM=_f.extend({addOptions(){var e;return{...(e=this.parent)===null||e===void 0?void 0:e.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},addProseMirrorPlugins(){var e;return[...((e=this.parent)===null||e===void 0?void 0:e.call(this))||[],Z5({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});var ix={};oc(ix,{arrayReplaceAt:()=>ax,assign:()=>As,escapeHtml:()=>yo,escapeRE:()=>O9,fromCodePoint:()=>Ru,has:()=>k9,isMdAsciiPunct:()=>hi,isPunctChar:()=>pi,isSpace:()=>ve,isString:()=>Rp,isValidEntityCode:()=>Pp,isWhiteSpace:()=>fi,lib:()=>R9,normalizeReference:()=>mi,unescapeAll:()=>xo,unescapeMd:()=>M9});var Mp={};oc(Mp,{decode:()=>Nu,encode:()=>Lp,format:()=>_s,parse:()=>Ou});var _M={};function J5(e){let t=_M[e];if(t)return t;t=_M[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Cp(e,t){typeof t!="string"&&(t=Cp.defaultChars);let n=J5(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let a=0,i=r.length;a<i;a+=3){let s=parseInt(r.slice(a+1,a+3),16);if(s<128){o+=n[s];continue}if((s&224)===192&&a+3<i){let l=parseInt(r.slice(a+4,a+6),16);if((l&192)===128){let u=s<<6&1984|l&63;u<128?o+="��":o+=String.fromCharCode(u),a+=3;continue}}if((s&240)===224&&a+6<i){let l=parseInt(r.slice(a+4,a+6),16),u=parseInt(r.slice(a+7,a+9),16);if((l&192)===128&&(u&192)===128){let c=s<<12&61440|l<<6&4032|u&63;c<2048||c>=55296&&c<=57343?o+="���":o+=String.fromCharCode(c),a+=6;continue}}if((s&248)===240&&a+9<i){let l=parseInt(r.slice(a+4,a+6),16),u=parseInt(r.slice(a+7,a+9),16),c=parseInt(r.slice(a+10,a+12),16);if((l&192)===128&&(u&192)===128&&(c&192)===128){let d=s<<18&1835008|l<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),a+=9;continue}}o+="�"}return o})}Cp.defaultChars=";/?:@&=+$,#";Cp.componentChars="";var Nu=Cp;var TM={};function Q5(e){let t=TM[e];if(t)return t;t=TM[e]=[];for(let n=0;n<128;n++){let r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Ep(e,t,n){typeof t!="string"&&(n=t,t=Ep.defaultChars),typeof n>"u"&&(n=!0);let r=Q5(t),o="";for(let a=0,i=e.length;a<i;a++){let s=e.charCodeAt(a);if(n&&s===37&&a+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(a+1,a+3))){o+=e.slice(a,a+3),a+=2;continue}if(s<128){o+=r[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1<i){let l=e.charCodeAt(a+1);if(l>=56320&&l<=57343){o+=encodeURIComponent(e[a]+e[a+1]),a++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[a])}return o}Ep.defaultChars=";/?:@&=+$,-_.!~*'()#";Ep.componentChars="-_.!~*'()";var Lp=Ep;function _s(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Ip(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var e9=/^([a-z0-9.+-]+:)/i,t9=/:[0-9]*$/,n9=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,r9=["<",">",'"',"`"," ","\r",`
108
+ `," "],o9=["{","}","|","\\","^","`"].concat(r9),a9=["'"].concat(o9),AM=["%","/","?",";","#"].concat(a9),DM=["/","?","#"],i9=255,NM=/^[+a-z0-9A-Z_-]{0,63}$/,s9=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,OM={javascript:!0,"javascript:":!0},RM={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function l9(e,t){if(e&&e instanceof Ip)return e;let n=new Ip;return n.parse(e,t),n}Ip.prototype.parse=function(e,t){let n,r,o,a=e;if(a=a.trim(),!t&&e.split("#").length===1){let u=n9.exec(a);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let i=e9.exec(a);if(i&&(i=i[0],n=i.toLowerCase(),this.protocol=i,a=a.substr(i.length)),(t||i||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=a.substr(0,2)==="//",o&&!(i&&OM[i])&&(a=a.substr(2),this.slashes=!0)),!OM[i]&&(o||i&&!RM[i])){let u=-1;for(let h=0;h<DM.length;h++)r=a.indexOf(DM[h]),r!==-1&&(u===-1||r<u)&&(u=r);let c,d;u===-1?d=a.lastIndexOf("@"):d=a.lastIndexOf("@",u),d!==-1&&(c=a.slice(0,d),a=a.slice(d+1),this.auth=c),u=-1;for(let h=0;h<AM.length;h++)r=a.indexOf(AM[h]),r!==-1&&(u===-1||r<u)&&(u=r);u===-1&&(u=a.length),a[u-1]===":"&&u--;let f=a.slice(0,u);a=a.slice(u),this.parseHost(f),this.hostname=this.hostname||"";let p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){let h=this.hostname.split(/\./);for(let m=0,b=h.length;m<b;m++){let g=h[m];if(g&&!g.match(NM)){let y="";for(let w=0,x=g.length;w<x;w++)g.charCodeAt(w)>127?y+="x":y+=g[w];if(!y.match(NM)){let w=h.slice(0,m),x=h.slice(m+1),S=g.match(s9);S&&(w.push(S[1]),x.unshift(S[2])),x.length&&(a=x.join(".")+a),this.hostname=w.join(".");break}}}}this.hostname.length>i9&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf("#");s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let l=a.indexOf("?");return l!==-1&&(this.search=a.substr(l),a=a.slice(0,l)),a&&(this.pathname=a),RM[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ip.prototype.parseHost=function(e){let t=t9.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Ou=l9;var J1={};oc(J1,{Any:()=>_p,Cc:()=>Tp,Cf:()=>PM,P:()=>Ts,S:()=>Ap,Z:()=>Dp});var _p=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Tp=/[\0-\x1F\x7F-\x9F]/;var PM=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Ts=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Ap=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Dp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var BM=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0)));var FM=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Q1,u9=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ex=(Q1=String.fromCodePoint)!==null&&Q1!==void 0?Q1:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function tx(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=u9.get(e))!==null&&t!==void 0?t:e}var It;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(It||(It={}));var c9=32,sa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(sa||(sa={}));function nx(e){return e>=It.ZERO&&e<=It.NINE}function d9(e){return e>=It.UPPER_A&&e<=It.UPPER_F||e>=It.LOWER_A&&e<=It.LOWER_F}function f9(e){return e>=It.UPPER_A&&e<=It.UPPER_Z||e>=It.LOWER_A&&e<=It.LOWER_Z||nx(e)}function p9(e){return e===It.EQUALS||f9(e)}var Lt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Lt||(Lt={}));var Or;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Or||(Or={}));var Np=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Lt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Or.Strict}startEntity(t){this.decodeMode=t,this.state=Lt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Lt.EntityStart:return t.charCodeAt(n)===It.NUM?(this.state=Lt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Lt.NamedEntity,this.stateNamedEntity(t,n));case Lt.NumericStart:return this.stateNumericStart(t,n);case Lt.NumericDecimal:return this.stateNumericDecimal(t,n);case Lt.NumericHex:return this.stateNumericHex(t,n);case Lt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|c9)===It.LOWER_X?(this.state=Lt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Lt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){let a=r-n;this.result=this.result*Math.pow(o,a)+parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){let r=n;for(;n<t.length;){let o=t.charCodeAt(n);if(nx(o)||d9(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){let r=n;for(;n<t.length;){let o=t.charCodeAt(n);if(nx(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===It.SEMI)this.consumed+=1;else if(this.decodeMode===Or.Strict)return 0;return this.emitCodePoint(tx(this.result),this.consumed),this.errors&&(t!==It.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){let{decodeTree:r}=this,o=r[this.treeIndex],a=(o&sa.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){let i=t.charCodeAt(n);if(this.treeIndex=h9(r,o,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return this.result===0||this.decodeMode===Or.Attribute&&(a===0||p9(i))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&sa.VALUE_LENGTH)>>14,a!==0){if(i===It.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Or.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:r}=this,o=(r[n]&sa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~sa.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Lt.NamedEntity:return this.result!==0&&(this.decodeMode!==Or.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Lt.NumericDecimal:return this.emitNumericEntity(0,2);case Lt.NumericHex:return this.emitNumericEntity(0,3);case Lt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Lt.EntityStart:return 0}}};function zM(e){let t="",n=new Np(e,r=>t+=ex(r));return function(o,a){let i=0,s=0;for(;(s=o.indexOf("&",s))>=0;){t+=o.slice(i,s),n.startEntity(a);let u=n.write(o,s+1);if(u<0){i=s+n.end();break}i=s+u,s=u===0?i+1:i}let l=t+o.slice(i);return t="",l}}function h9(e,t,n,r){let o=(t&sa.BRANCH_LENGTH)>>7,a=t&sa.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){let l=r-a;return l<0||l>=o?-1:e[n+l]-1}let i=n,s=i+o-1;for(;i<=s;){let l=i+s>>>1,u=e[l];if(u<r)i=l+1;else if(u>r)s=l-1;else return e[l+o]}return-1}var m9=zM(BM),aQ=zM(FM);function la(e,t=Or.Legacy){return m9(e,t)}function Op(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}var g9=new Map(Op([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(Op([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(Op([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(Op([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]));var b9=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),x9=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function rx(e,t){return function(r){let o,a=0,i="";for(;o=e.exec(r);)a!==o.index&&(i+=r.substring(a,o.index)),i+=t.get(o[0].charCodeAt(0)),a=o.index+1;return i+r.substring(a)}}var HM=rx(/[&<>'"]/g,b9),UM=rx(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),$M=rx(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var qM;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(qM||(qM={}));var VM;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(VM||(VM={}));function v9(e){return Object.prototype.toString.call(e)}function Rp(e){return v9(e)==="[object String]"}var S9=Object.prototype.hasOwnProperty;function k9(e,t){return S9.call(e,t)}function As(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function ax(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Pp(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ru(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var KM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,C9=/&([a-z#][a-z0-9]{1,31});/gi,E9=new RegExp(KM.source+"|"+C9.source,"gi"),L9=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function I9(e,t){if(t.charCodeAt(0)===35&&L9.test(t)){let r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Pp(r)?Ru(r):e}let n=la(e);return n!==e?n:e}function M9(e){return e.indexOf("\\")<0?e:e.replace(KM,"$1")}function xo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(E9,function(t,n,r){return n||I9(t,r)})}var _9=/[&<>"]/,T9=/[&<>"]/g,A9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function D9(e){return A9[e]}function yo(e){return _9.test(e)?e.replace(T9,D9):e}var N9=/[.?*+^$[\]\\(){}|-]/g;function O9(e){return e.replace(N9,"\\$&")}function ve(e){switch(e){case 9:case 32:return!0}return!1}function fi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function pi(e){return Ts.test(e)||Ap.test(e)}function hi(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function mi(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}var R9={mdurl:Mp,ucmicro:J1};var cx={};oc(cx,{parseLinkDestination:()=>lx,parseLinkLabel:()=>sx,parseLinkTitle:()=>ux});function sx(e,t,n){let r,o,a,i,s=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){o=!0;break}if(i=e.pos,e.md.inline.skipToken(e),a===91){if(i===e.pos-1)r++;else if(n)return e.pos=l,-1}}let u=-1;return o&&(u=e.pos),e.pos=l,u}function lx(e,t,n){let r,o=t,a={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return a;if(r===62)return a.pos=o+1,a.str=xo(e.slice(t+1,o)),a.ok=!0,a;if(r===92&&o+1<n){o+=2;continue}o++}return a}let i=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(i++,i>32))return a;if(r===41){if(i===0)break;i--}o++}return t===o||i!==0||(a.str=xo(e.slice(t,o)),a.pos=o,a.ok=!0),a}function ux(e,t,n,r){let o,a=t,i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)i.str=r.str,i.marker=r.marker;else{if(a>=n)return i;let s=e.charCodeAt(a);if(s!==34&&s!==39&&s!==40)return i;t++,a++,s===40&&(s=41),i.marker=s}for(;a<n;){if(o=e.charCodeAt(a),o===i.marker)return i.pos=a+1,i.str+=xo(e.slice(t,a)),i.ok=!0,i;if(o===40&&i.marker===41)return i;o===92&&a+1<n&&a++,a++}return i.can_continue=!0,i.str+=xo(e.slice(t,a)),i}var Rr={};Rr.code_inline=function(e,t,n,r,o){let a=e[t];return"<code"+o.renderAttrs(a)+">"+yo(a.content)+"</code>"};Rr.code_block=function(e,t,n,r,o){let a=e[t];return"<pre"+o.renderAttrs(a)+"><code>"+yo(e[t].content)+`</code></pre>
109
+ `};Rr.fence=function(e,t,n,r,o){let a=e[t],i=a.info?xo(a.info).trim():"",s="",l="";if(i){let c=i.split(/(\s+)/g);s=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(a.content,s,l)||yo(a.content):u=yo(a.content),u.indexOf("<pre")===0)return u+`
110
+ `;if(i){let c=a.attrIndex("class"),d=a.attrs?a.attrs.slice():[];c<0?d.push(["class",n.langPrefix+s]):(d[c]=d[c].slice(),d[c][1]+=" "+n.langPrefix+s);let f={attrs:d};return`<pre><code${o.renderAttrs(f)}>${u}</code></pre>
111
+ `}return`<pre><code${o.renderAttrs(a)}>${u}</code></pre>
112
+ `};Rr.image=function(e,t,n,r,o){let a=e[t];return a.attrs[a.attrIndex("alt")][1]=o.renderInlineAsText(a.children,n,r),o.renderToken(e,t,n)};Rr.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
113
+ `:`<br>
114
+ `};Rr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
115
+ `:`<br>
116
+ `:`
117
+ `};Rr.text=function(e,t){return yo(e[t].content)};Rr.html_block=function(e,t){return e[t].content};Rr.html_inline=function(e,t){return e[t].content};function Ds(){this.rules=As({},Rr)}Ds.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+yo(t.attrs[n][0])+'="'+yo(t.attrs[n][1])+'"';return o};Ds.prototype.renderToken=function(t,n,r){let o=t[n],a="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(a+=`
118
+ `),a+=(o.nesting===-1?"</":"<")+o.tag,a+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(a+=" /");let i=!1;if(o.block&&(i=!0,o.nesting===1&&n+1<t.length)){let s=t[n+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===o.tag)&&(i=!1)}return a+=i?`>
119
+ `:">",a};Ds.prototype.renderInline=function(e,t,n){let r="",o=this.rules;for(let a=0,i=e.length;a<i;a++){let s=e[a].type;typeof o[s]<"u"?r+=o[s](e,a,t,n,this):r+=this.renderToken(e,a,t)}return r};Ds.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,a=e.length;o<a;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
120
+ `;break;default:}return r};Ds.prototype.render=function(e,t,n){let r="",o=this.rules;for(let a=0,i=e.length;a<i;a++){let s=e[a].type;s==="inline"?r+=this.renderInline(e[a].children,t,n):typeof o[s]<"u"?r+=o[s](e,a,t,n,this):r+=this.renderToken(e,a,t,n)}return r};var jM=Ds;function fr(){this.__rules__=[],this.__cache__=null}fr.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};fr.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};fr.prototype.at=function(e,t,n){let r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};fr.prototype.before=function(e,t,n,r){let o=this.__find__(e),a=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null};fr.prototype.after=function(e,t,n,r){let o=this.__find__(e),a=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null};fr.prototype.push=function(e,t,n){let r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};fr.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(r){let o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};fr.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};fr.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(r){let o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};fr.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var gi=fr;function Ns(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Ns.prototype.attrIndex=function(t){if(!this.attrs)return-1;let n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};Ns.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Ns.prototype.attrSet=function(t,n){let r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};Ns.prototype.attrGet=function(t){let n=this.attrIndex(t),r=null;return n>=0&&(r=this.attrs[n][1]),r};Ns.prototype.attrJoin=function(t,n){let r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var wo=Ns;function XM(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}XM.prototype.Token=wo;var YM=XM;var P9=/\r\n?|\n/g,B9=/\0/g;function dx(e){let t;t=e.src.replace(P9,`
121
+ `),t=t.replace(B9,"�"),e.src=t}function fx(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function px(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function F9(e){return/^<a[>\s]/i.test(e)}function z9(e){return/^<\/a\s*>/i.test(e)}function hx(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,a=0;for(let i=o.length-1;i>=0;i--){let s=o[i];if(s.type==="link_close"){for(i--;o[i].level!==s.level&&o[i].type!=="link_open";)i--;continue}if(s.type==="html_inline"&&(F9(s.content)&&a>0&&a--,z9(s.content)&&a++),!(a>0)&&s.type==="text"&&e.md.linkify.test(s.content)){let l=s.content,u=e.md.linkify.match(l),c=[],d=s.level,f=0;u.length>0&&u[0].index===0&&i>0&&o[i-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){let h=u[p].url,m=e.md.normalizeLink(h);if(!e.md.validateLink(m))continue;let b=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");let g=u[p].index;if(g>f){let S=new e.Token("text","",0);S.content=l.slice(f,g),S.level=d,c.push(S)}let y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);let w=new e.Token("text","",0);w.content=b,w.level=d,c.push(w);let x=new e.Token("link_close","a",-1);x.level=--d,x.markup="linkify",x.info="auto",c.push(x),f=u[p].lastIndex}if(f<l.length){let p=new e.Token("text","",0);p.content=l.slice(f),p.level=d,c.push(p)}t[n].children=o=ax(o,i,c)}}}}var ZM=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,H9=/\((c|tm|r)\)/i,U9=/\((c|tm|r)\)/ig,$9={c:"©",r:"®",tm:"™"};function q9(e,t){return $9[t.toLowerCase()]}function V9(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(U9,q9)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function W9(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type==="text"&&!t&&ZM.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function mx(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(H9.test(e.tokens[t].content)&&V9(e.tokens[t].children),ZM.test(e.tokens[t].content)&&W9(e.tokens[t].children))}var G9=/['"]/,JM=/['"]/g,QM="’";function Bp(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function K9(e,t){let n,r=[];for(let o=0;o<e.length;o++){let a=e[o],i=e[o].level;for(n=r.length-1;n>=0&&!(r[n].level<=i);n--);if(r.length=n+1,a.type!=="text")continue;let s=a.content,l=0,u=s.length;e:for(;l<u;){JM.lastIndex=l;let c=JM.exec(s);if(!c)break;let d=!0,f=!0;l=c.index+1;let p=c[0]==="'",h=32;if(c.index-1>=0)h=s.charCodeAt(c.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l<u)m=s.charCodeAt(l);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}let b=hi(h)||pi(String.fromCharCode(h)),g=hi(m)||pi(String.fromCharCode(m)),y=fi(h),w=fi(m);if(w?d=!1:g&&(y||b||(d=!1)),y?f=!1:b&&(w||g||(f=!1)),m===34&&c[0]==='"'&&h>=48&&h<=57&&(f=d=!1),d&&f&&(d=b,f=g),!d&&!f){p&&(a.content=Bp(a.content,c.index,QM));continue}if(f)for(n=r.length-1;n>=0;n--){let x=r[n];if(r[n].level<i)break;if(x.single===p&&r[n].level===i){x=r[n];let S,v;p?(S=t.md.options.quotes[2],v=t.md.options.quotes[3]):(S=t.md.options.quotes[0],v=t.md.options.quotes[1]),a.content=Bp(a.content,c.index,v),e[x.token].content=Bp(e[x.token].content,x.pos,S),l+=v.length-1,x.token===o&&(l+=S.length-1),s=a.content,u=s.length,r.length=n;continue e}}d?r.push({token:o,pos:c.index,single:p,level:i}):f&&p&&(a.content=Bp(a.content,c.index,QM))}}}function gx(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!G9.test(e.tokens[t].content)||K9(e.tokens[t].children,e)}function bx(e){let t,n,r=e.tokens,o=r.length;for(let a=0;a<o;a++){if(r[a].type!=="inline")continue;let i=r[a].children,s=i.length;for(t=0;t<s;t++)i[t].type==="text_special"&&(i[t].type="text");for(t=n=0;t<s;t++)i[t].type==="text"&&t+1<s&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var xx=[["normalize",dx],["block",fx],["inline",px],["linkify",hx],["replacements",mx],["smartquotes",gx],["text_join",bx]];function yx(){this.ruler=new gi;for(let e=0;e<xx.length;e++)this.ruler.push(xx[e][0],xx[e][1])}yx.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};yx.prototype.State=YM;var e_=yx;function Pr(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let o=this.src;for(let a=0,i=0,s=0,l=0,u=o.length,c=!1;i<u;i++){let d=o.charCodeAt(i);if(!c)if(ve(d)){s++,d===9?l+=4-l%4:l++;continue}else c=!0;(d===10||i===u-1)&&(d!==10&&i++,this.bMarks.push(a),this.eMarks.push(i),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),c=!1,s=0,l=0,a=i+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Pr.prototype.push=function(e,t,n){let r=new wo(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Pr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Pr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Pr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){let r=this.src.charCodeAt(t);if(!ve(r))break}return t};Pr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ve(this.src.charCodeAt(--t)))return t+1;return t};Pr.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};Pr.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Pr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";let a=new Array(n-t);for(let i=0,s=t;s<n;s++,i++){let l=0,u=this.bMarks[s],c=u,d;for(s+1<n||o?d=this.eMarks[s]+1:d=this.eMarks[s];c<d&&l<r;){let f=this.src.charCodeAt(c);if(ve(f))f===9?l+=4-(l+this.bsCount[s])%4:l++;else if(c-u<this.tShift[s])l++;else break;c++}l>r?a[i]=new Array(l-r+1).join(" ")+this.src.slice(c,d):a[i]=this.src.slice(c,d)}return a.join("")};Pr.prototype.Token=wo;var t_=Pr;var j9=65536;function wx(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function n_(e){let t=[],n=e.length,r=0,o=e.charCodeAt(r),a=!1,i=0,s="";for(;r<n;)o===124&&(a?(s+=e.substring(i,r-1),i=r):(t.push(s+e.substring(i,r)),s="",i=r+1)),a=o===92,r++,o=e.charCodeAt(r);return t.push(s+e.substring(i)),t}function vx(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let a=e.bMarks[o]+e.tShift[o];if(a>=e.eMarks[o])return!1;let i=e.src.charCodeAt(a++);if(i!==124&&i!==45&&i!==58||a>=e.eMarks[o])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!ve(s)||i===45&&ve(s))return!1;for(;a<e.eMarks[o];){let x=e.src.charCodeAt(a);if(x!==124&&x!==45&&x!==58&&!ve(x))return!1;a++}let l=wx(e,t+1),u=l.split("|"),c=[];for(let x=0;x<u.length;x++){let S=u[x].trim();if(!S){if(x===0||x===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(S))return!1;S.charCodeAt(S.length-1)===58?c.push(S.charCodeAt(0)===58?"center":"right"):S.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=wx(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=n_(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let b=e.push("thead_open","thead",1);b.map=[t,t+1];let g=e.push("tr_open","tr",1);g.map=[t,t+1];for(let x=0;x<u.length;x++){let S=e.push("th_open","th",1);c[x]&&(S.attrs=[["style","text-align:"+c[x]]]);let v=e.push("inline","",0);v.content=u[x].trim(),v.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,w=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let x=!1;for(let v=0,C=p.length;v<C;v++)if(p[v](e,o,n,!0)){x=!0;break}if(x||(l=wx(e,o).trim(),!l)||e.sCount[o]-e.blkIndent>=4||(u=n_(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),w+=d-u.length,w>j9))break;if(o===t+2){let v=e.push("tbody_open","tbody",1);v.map=y=[t+2,0]}let S=e.push("tr_open","tr",1);S.map=[o,o+1];for(let v=0;v<d;v++){let C=e.push("td_open","td",1);c[v]&&(C.attrs=[["style","text-align:"+c[v]]]);let E=e.push("inline","",0);E.content=u[v]?u[v].trim():"",E.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=f,e.line=o,!0}function Sx(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;let a=e.push("code_block","code",0);return a.content=e.getLines(t,o,4+e.blkIndent,!1)+`
122
+ `,a.map=[t,e.line],!0}function kx(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>a)return!1;let i=e.src.charCodeAt(o);if(i!==126&&i!==96)return!1;let s=o;o=e.skipChars(o,i);let l=o-s;if(l<3)return!1;let u=e.src.slice(s,o),c=e.src.slice(o,a);if(i===96&&c.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],o<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===i&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,i),!(o-s<l)&&(o=e.skipSpaces(o),!(o<a)))){f=!0;break}l=e.sCount[t],e.line=d+(f?1:0);let p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,d,l,!0),p.markup=u,p.map=[t,e.line],!0}function Cx(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],i=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;let s=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h<n;h++){let w=e.sCount[h]<e.blkIndent;if(o=e.bMarks[h]+e.tShift[h],a=e.eMarks[h],o>=a)break;if(e.src.charCodeAt(o++)===62&&!w){let S=e.sCount[h]+1,v,C;e.src.charCodeAt(o)===32?(o++,S++,C=!1,v=!0):e.src.charCodeAt(o)===9?(v=!0,(e.bsCount[h]+S)%4===3?(o++,S++,C=!1):C=!0):v=!1;let E=S;for(s.push(e.bMarks[h]),e.bMarks[h]=o;o<a;){let T=e.src.charCodeAt(o);if(ve(T))T===9?E+=4-(E+e.bsCount[h]+(C?1:0))%4:E++;else break;o++}p=o>=a,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(v?1:0),u.push(e.sCount[h]),e.sCount[h]=E-S,c.push(e.tShift[h]),e.tShift[h]=o-e.bMarks[h];continue}if(p)break;let x=!1;for(let S=0,v=d.length;S<v;S++)if(d[S](e,h,n,!0)){x=!0;break}if(x){e.lineMax=h,e.blkIndent!==0&&(s.push(e.bMarks[h]),l.push(e.bsCount[h]),c.push(e.tShift[h]),u.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}s.push(e.bMarks[h]),l.push(e.bsCount[h]),c.push(e.tShift[h]),u.push(e.sCount[h]),e.sCount[h]=-1}let m=e.blkIndent;e.blkIndent=0;let b=e.push("blockquote_open","blockquote",1);b.markup=">";let g=[t,0];b.map=g,e.md.block.tokenize(e,t,h);let y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=i,e.parentType=f,g[1]=e.line;for(let w=0;w<c.length;w++)e.bMarks[w+t]=s[w],e.tShift[w+t]=c[w],e.sCount[w+t]=u[w],e.bsCount[w+t]=l[w];return e.blkIndent=m,!0}function Ex(e,t,n,r){let o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(a++);if(i!==42&&i!==45&&i!==95)return!1;let s=1;for(;a<o;){let u=e.src.charCodeAt(a++);if(u!==i&&!ve(u))return!1;u===i&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(i)),!0}function r_(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){let a=e.src.charCodeAt(r);if(!ve(a))return-1}return r}function o_(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],o=n;if(o+1>=r)return-1;let a=e.src.charCodeAt(o++);if(a<48||a>57)return-1;for(;;){if(o>=r)return-1;if(a=e.src.charCodeAt(o++),a>=48&&a<=57){if(o-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return o<r&&(a=e.src.charCodeAt(o),!ve(a))?-1:o}function X9(e,t){let n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Lx(e,t,n,r){let o,a,i,s,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let c=!1;r&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(c=!0);let d,f,p;if((p=o_(e,l))>=0){if(d=!0,i=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(i,p-1)),c&&f!==1)return!1}else if((p=r_(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(s=e.push("ordered_list_open","ol",1),f!==1&&(s.attrs=[["start",f]])):s=e.push("bullet_list_open","ul",1);let b=[l,0];s.map=b,s.markup=String.fromCharCode(h);let g=!1,y=e.md.block.ruler.getRules("list"),w=e.parentType;for(e.parentType="list";l<n;){a=p,o=e.eMarks[l];let x=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]),S=x;for(;a<o;){let Z=e.src.charCodeAt(a);if(Z===9)S+=4-(S+e.bsCount[l])%4;else if(Z===32)S++;else break;a++}let v=a,C;v>=o?C=1:C=S-x,C>4&&(C=1);let E=x+C;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(h);let T=[l,0];s.map=T,d&&(s.info=e.src.slice(i,p-1));let I=e.tight,W=e.tShift[l],te=e.sCount[l],fe=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=E,e.tight=!0,e.tShift[l]=v-e.bMarks[l],e.sCount[l]=S,v>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||g)&&(u=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=fe,e.tShift[l]=W,e.sCount[l]=te,e.tight=I,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(h),l=e.line,T[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let oe=!1;for(let Z=0,_=y.length;Z<_;Z++)if(y[Z](e,l,n,!0)){oe=!0;break}if(oe)break;if(d){if(p=o_(e,l),p<0)break;i=e.bMarks[l]+e.tShift[l]}else if(p=r_(e,l),p<0)break;if(h!==e.src.charCodeAt(p-1))break}return d?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(h),b[1]=l,e.line=l,e.parentType=w,u&&X9(e,m),!0}function Ix(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],i=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function s(y){let w=e.lineMax;if(y>=w||e.isEmpty(y))return null;let x=!1;if(e.sCount[y]-e.blkIndent>3&&(x=!0),e.sCount[y]<0&&(x=!0),!x){let C=e.md.block.ruler.getRules("reference"),E=e.parentType;e.parentType="reference";let T=!1;for(let I=0,W=C.length;I<W;I++)if(C[I](e,y,w,!0)){T=!0;break}if(e.parentType=E,T)return null}let S=e.bMarks[y]+e.tShift[y],v=e.eMarks[y];return e.src.slice(S,v+1)}let l=e.src.slice(o,a+1);a=l.length;let u=-1;for(o=1;o<a;o++){let y=l.charCodeAt(o);if(y===91)return!1;if(y===93){u=o;break}else if(y===10){let w=s(i);w!==null&&(l+=w,a=l.length,i++)}else if(y===92&&(o++,o<a&&l.charCodeAt(o)===10)){let w=s(i);w!==null&&(l+=w,a=l.length,i++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(o=u+2;o<a;o++){let y=l.charCodeAt(o);if(y===10){let w=s(i);w!==null&&(l+=w,a=l.length,i++)}else if(!ve(y))break}let c=e.md.helpers.parseLinkDestination(l,o,a);if(!c.ok)return!1;let d=e.md.normalizeLink(c.str);if(!e.md.validateLink(d))return!1;o=c.pos;let f=o,p=i,h=o;for(;o<a;o++){let y=l.charCodeAt(o);if(y===10){let w=s(i);w!==null&&(l+=w,a=l.length,i++)}else if(!ve(y))break}let m=e.md.helpers.parseLinkTitle(l,o,a);for(;m.can_continue;){let y=s(i);if(y===null)break;l+=y,o=a,a=l.length,i++,m=e.md.helpers.parseLinkTitle(l,o,a,m)}let b;for(o<a&&h!==o&&m.ok?(b=m.str,o=m.pos):(b="",o=f,i=p);o<a;){let y=l.charCodeAt(o);if(!ve(y))break;o++}if(o<a&&l.charCodeAt(o)!==10&&b)for(b="",o=f,i=p;o<a;){let y=l.charCodeAt(o);if(!ve(y))break;o++}if(o<a&&l.charCodeAt(o)!==10)return!1;let g=mi(l.slice(1,u));return g?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[g]>"u"&&(e.env.references[g]={title:b,href:d}),e.line=i),!0):!1}var a_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var Y9="[a-zA-Z_:][a-zA-Z0-9:._-]*",Z9="[^\"'=<>`\\x00-\\x20]+",J9="'[^']*'",Q9='"[^"]*"',ez="(?:"+Z9+"|"+J9+"|"+Q9+")",tz="(?:\\s+"+Y9+"(?:\\s*=\\s*"+ez+")?)",i_="<[A-Za-z][A-Za-z0-9\\-]*"+tz+"*\\s*\\/?>",s_="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",nz="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",rz="<[?][\\s\\S]*?[?]>",oz="<![A-Za-z][^>]*>",az="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",l_=new RegExp("^(?:"+i_+"|"+s_+"|"+nz+"|"+rz+"|"+oz+"|"+az+")"),u_=new RegExp("^(?:"+i_+"|"+s_+")");var Os=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+a_.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(u_.source+"\\s*$"),/^$/,!1]];function Mx(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let i=e.src.slice(o,a),s=0;for(;s<Os.length&&!Os[s][0].test(i);s++);if(s===Os.length)return!1;if(r)return Os[s][2];let l=t+1;if(!Os[s][1].test(i)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(o=e.bMarks[l]+e.tShift[l],a=e.eMarks[l],i=e.src.slice(o,a),Os[s][1].test(i)){i.length!==0&&l++;break}}e.line=l;let u=e.push("html_block","",0);return u.map=[t,l],u.content=e.getLines(t,l,e.blkIndent,!0),!0}function _x(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.src.charCodeAt(o);if(i!==35||o>=a)return!1;let s=1;for(i=e.src.charCodeAt(++o);i===35&&o<a&&s<=6;)s++,i=e.src.charCodeAt(++o);if(s>6||o<a&&!ve(i))return!1;if(r)return!0;a=e.skipSpacesBack(a,o);let l=e.skipCharsBack(a,35,o);l>o&&ve(e.src.charCodeAt(l-1))&&(a=l),e.line=t+1;let u=e.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[t,e.line];let c=e.push("inline","",0);c.content=e.src.slice(o,a).trim(),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(s),-1);return d.markup="########".slice(0,s),!0}function Tx(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.parentType;e.parentType="paragraph";let a=0,i,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s],h=e.eMarks[s];if(p<h&&(i=e.src.charCodeAt(p),(i===45||i===61)&&(p=e.skipChars(p,i),p=e.skipSpaces(p),p>=h))){a=i===61?1:2;break}}if(e.sCount[s]<0)continue;let f=!1;for(let p=0,h=r.length;p<h;p++)if(r[p](e,s,n,!0)){f=!0;break}if(f)break}if(!a)return!1;let l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;let u=e.push("heading_open","h"+String(a),1);u.markup=String.fromCharCode(i),u.map=[t,e.line];let c=e.push("inline","",0);c.content=l,c.map=[t,e.line-1],c.children=[];let d=e.push("heading_close","h"+String(a),-1);return d.markup=String.fromCharCode(i),e.parentType=o,!0}function Ax(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),o=e.parentType,a=t+1;for(e.parentType="paragraph";a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let u=!1;for(let c=0,d=r.length;c<d;c++)if(r[c](e,a,n,!0)){u=!0;break}if(u)break}let i=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a;let s=e.push("paragraph_open","p",1);s.map=[t,e.line];let l=e.push("inline","",0);return l.content=i,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}var Fp=[["table",vx,["paragraph","reference"]],["code",Sx],["fence",kx,["paragraph","reference","blockquote","list"]],["blockquote",Cx,["paragraph","reference","blockquote","list"]],["hr",Ex,["paragraph","reference","blockquote","list"]],["list",Lx,["paragraph","reference","blockquote"]],["reference",Ix],["html_block",Mx,["paragraph","reference","blockquote"]],["heading",_x,["paragraph","reference","blockquote"]],["lheading",Tx],["paragraph",Ax]];function zp(){this.ruler=new gi;for(let e=0;e<Fp.length;e++)this.ruler.push(Fp[e][0],Fp[e][1],{alt:(Fp[e][2]||[]).slice()})}zp.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(""),o=r.length,a=e.md.options.maxNesting,i=t,s=!1;for(;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n||e.sCount[i]<e.blkIndent));){if(e.level>=a){e.line=n;break}let l=e.line,u=!1;for(let c=0;c<o;c++)if(u=r[c](e,i,n,!1),u){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),i=e.line,i<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}};zp.prototype.parse=function(e,t,n,r){if(!e)return;let o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};zp.prototype.State=t_;var c_=zp;function Pu(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Pu.prototype.pushPending=function(){let e=new wo("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Pu.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new wo(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Pu.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32,a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let i=a-e,s=a<n?this.src.charCodeAt(a):32,l=hi(o)||pi(String.fromCharCode(o)),u=hi(s)||pi(String.fromCharCode(s)),c=fi(o),d=fi(s),f=!d&&(!u||c||l),p=!c&&(!l||d||u);return{can_open:f&&(t||!p||l),can_close:p&&(t||!f||u),length:i}};Pu.prototype.Token=wo;var d_=Pu;function iz(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Dx(e,t){let n=e.pos;for(;n<e.posMax&&!iz(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var sz=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Nx(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let o=e.pending.match(sz);if(!o)return!1;let a=o[1],i=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!i)return!1;let s=i.url;if(s.length<=a.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));let u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let c=e.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";let d=e.push("text","",0);d.content=e.md.normalizeLinkText(s);let f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-a.length,!0}function Ox(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let a=r-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&ve(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Rx=[];for(let e=0;e<256;e++)Rx.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Rx[e.charCodeAt(0)]=1});function Px(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!ve(o));)n++;return e.pos=n,!0}let a=e.src[n];if(o>=55296&&o<=56319&&n+1<r){let s=e.src.charCodeAt(n+1);s>=56320&&s<=57343&&(a+=e.src[n+1],n++)}let i="\\"+a;if(!t){let s=e.push("text_special","",0);o<256&&Rx[o]!==0?s.content=a:s.content=i,s.markup=i,s.info="escape"}return e.pos=n+1,!0}function Bx(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let o=n;n++;let a=e.posMax;for(;n<a&&e.src.charCodeAt(n)===96;)n++;let i=e.src.slice(o,n),s=i.length;if(e.backticksScanned&&(e.backticks[s]||0)<=o)return t||(e.pending+=i),e.pos+=s,!0;let l=n,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<a&&e.src.charCodeAt(l)===96;)l++;let c=l-u;if(c===s){if(!t){let d=e.push("code_inline","code",0);d.markup=i,d.content=e.src.slice(n,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=i),e.pos+=s,!0}function lz(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let o=e.scanDelims(e.pos,!0),a=o.length,i=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push("text","",0),s.content=i,a--);for(let l=0;l<a;l+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function f_(e,t){let n,r=[],o=t.length;for(let a=0;a<o;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let s=t[i.end];n=e.tokens[i.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&r.push(s.token-1)}for(;r.length;){let a=r.pop(),i=a+1;for(;i<e.tokens.length&&e.tokens[i].type==="s_close";)i++;i--,a!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[a],e.tokens[a]=n)}}function uz(e){let t=e.tokens_meta,n=e.tokens_meta.length;f_(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&f_(e,t[r].delimiters)}var Fx={tokenize:lz,postProcess:uz};function cz(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let o=e.scanDelims(e.pos,r===42);for(let a=0;a<o.length;a++){let i=e.push("text","",0);i.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function p_(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let a=t[o.end],i=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===a.token+1,s=String.fromCharCode(o.marker),l=e.tokens[o.token];l.type=i?"strong_open":"em_open",l.tag=i?"strong":"em",l.nesting=1,l.markup=i?s+s:s,l.content="";let u=e.tokens[a.token];u.type=i?"strong_close":"em_close",u.tag=i?"strong":"em",u.nesting=-1,u.markup=i?s+s:s,u.content="",i&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function dz(e){let t=e.tokens_meta,n=e.tokens_meta.length;p_(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&p_(e,t[r].delimiters)}var zx={tokenize:cz,postProcess:dz};function Hx(e,t){let n,r,o,a,i="",s="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let c=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let h=p+1;if(h<d&&e.src.charCodeAt(h)===40){for(u=!1,h++;h<d&&(n=e.src.charCodeAt(h),!(!ve(n)&&n!==10));h++);if(h>=d)return!1;if(l=h,o=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),o.ok){for(i=e.md.normalizeLink(o.str),e.md.validateLink(i)?h=o.pos:i="",l=h;h<d&&(n=e.src.charCodeAt(h),!(!ve(n)&&n!==10));h++);if(o=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<d&&l!==h&&o.ok)for(s=o.str,h=o.pos;h<d&&(n=e.src.charCodeAt(h),!(!ve(n)&&n!==10));h++);}(h>=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h<d&&e.src.charCodeAt(h)===91?(l=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),a=e.env.references[mi(r)],!a)return e.pos=c,!1;i=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),b=[["href",i]];m.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function Ux(e,t){let n,r,o,a,i,s,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(a=h+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),!(!ve(n)&&n!==10));a++);if(a>=f)return!1;for(u=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?a=s.pos:c=""),u=a;a<f&&(n=e.src.charCodeAt(a),!(!ve(n)&&n!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&u!==a&&s.ok)for(l=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),!(!ve(n)&&n!==10));a++);else l="";if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a<f&&e.src.charCodeAt(a)===91?(u=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?o=e.src.slice(u,a++):a=h+1):a=h+1,o||(o=e.src.slice(p,h)),i=e.env.references[mi(o)],!i)return e.pos=d,!1;c=i.href,l=i.title}if(!t){r=e.src.slice(p,h);let m=[];e.md.inline.parse(r,e.md,e.env,m);let b=e.push("image","img",0),g=[["src",c],["alt",""]];b.attrs=g,b.children=m,b.content=r,l&&g.push(["title",l])}return e.pos=a,e.posMax=f,!0}var fz=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,pz=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function $x(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;let i=e.src.charCodeAt(n);if(i===60)return!1;if(i===62)break}let a=e.src.slice(r+1,n);if(pz.test(a)){let i=e.md.normalizeLink(a);if(!e.md.validateLink(i))return!1;if(!t){let s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=a.length+2,!0}if(fz.test(a)){let i=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(i))return!1;if(!t){let s=e.push("link_open","a",1);s.attrs=[["href",i]],s.markup="autolink",s.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=a.length+2,!0}return!1}function hz(e){return/^<a[>\s]/i.test(e)}function mz(e){return/^<\/a\s*>/i.test(e)}function gz(e){let t=e|32;return t>=97&&t<=122}function qx(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!gz(o))return!1;let a=e.src.slice(r).match(l_);if(!a)return!1;if(!t){let i=e.push("html_inline","",0);i.content=a[0],hz(i.content)&&e.linkLevel++,mz(i.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var bz=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,xz=/^&([a-z][a-z0-9]{1,31});/i;function Vx(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let a=e.src.slice(n).match(bz);if(a){if(!t){let i=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),s=e.push("text_special","",0);s.content=Pp(i)?Ru(i):Ru(65533),s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}else{let a=e.src.slice(n).match(xz);if(a){let i=la(a[0]);if(i!==a[0]){if(!t){let s=e.push("text_special","",0);s.content=i,s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function h_(e){let t={},n=e.length;if(!n)return;let r=0,o=-2,a=[];for(let i=0;i<n;i++){let s=e[i];if(a.push(0),(e[r].marker!==s.marker||o!==s.token-1)&&(r=i),o=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);let l=t[s.marker][(s.open?3:0)+s.length%3],u=r-a[r]-1,c=u;for(;u>l;u-=a[u]+1){let d=e[u];if(d.marker===s.marker&&d.open&&d.end<0){let f=!1;if((d.close||s.open)&&(d.length+s.length)%3===0&&(d.length%3!==0||s.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?a[u-1]+1:0;a[i]=i-u+p,a[u]=p,s.open=!1,d.end=i,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function Wx(e){let t=e.tokens_meta,n=e.tokens_meta.length;h_(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&h_(t[r].delimiters)}function Gx(e){let t,n,r=0,o=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<a&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}var Kx=[["text",Dx],["linkify",Nx],["newline",Ox],["escape",Px],["backticks",Bx],["strikethrough",Fx.tokenize],["emphasis",zx.tokenize],["link",Hx],["image",Ux],["autolink",$x],["html_inline",qx],["entity",Vx]],jx=[["balance_pairs",Wx],["strikethrough",Fx.postProcess],["emphasis",zx.postProcess],["fragments_join",Gx]];function Bu(){this.ruler=new gi;for(let e=0;e<Kx.length;e++)this.ruler.push(Kx[e][0],Kx[e][1]);this.ruler2=new gi;for(let e=0;e<jx.length;e++)this.ruler2.push(jx[e][0],jx[e][1])}Bu.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,a=e.cache;if(typeof a[t]<"u"){e.pos=a[t];return}let i=!1;if(e.level<o){for(let s=0;s<r;s++)if(e.level++,i=n[s](e,!0),e.level--,i){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,a[t]=e.pos};Bu.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,i=!1;if(e.level<o){for(let s=0;s<n;s++)if(i=t[s](e,!1),i){if(a>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Bu.prototype.parse=function(e,t,n,r){let o=new this.State(e,t,n,r);this.tokenize(o);let a=this.ruler2.getRules(""),i=a.length;for(let s=0;s<i;s++)a[s](o)};Bu.prototype.State=d_;var m_=Bu;function g_(e){let t={};e=e||{},t.src_Any=_p.source,t.src_Cc=Tp.source,t.src_Z=Dp.source,t.src_P=Ts.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");let n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Xx(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Up(e){return Object.prototype.toString.call(e)}function yz(e){return Up(e)==="[object String]"}function wz(e){return Up(e)==="[object Object]"}function vz(e){return Up(e)==="[object RegExp]"}function b_(e){return Up(e)==="[object Function]"}function Sz(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var y_={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function kz(e){return Object.keys(e||{}).reduce(function(t,n){return t||y_.hasOwnProperty(n)},!1)}var Cz={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Ez="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Lz="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Iz(e){e.__index__=-1,e.__text_cache__=""}function Mz(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function x_(){return function(e,t){t.normalize(e)}}function Hp(e){let t=e.re=g_(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Ez),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let o=[];e.__compiled__={};function a(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){let l=e.__schemas__[s];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[s]=u,wz(l)){vz(l.validate)?u.validate=Mz(l.validate):b_(l.validate)?u.validate=l.validate:a(s,l),b_(l.normalize)?u.normalize=l.normalize:l.normalize?a(s,l):u.normalize=x_();return}if(yz(l)){o.push(s);return}a(s,l)}),o.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:x_()};let i=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(Sz).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Iz(e)}function _z(e,t){let n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function Yx(e,t){let n=new _z(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function kn(e,t){if(!(this instanceof kn))return new kn(e,t);t||kz(e)&&(t=e,e={}),this.__opts__=Xx({},y_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Xx({},Cz,e),this.__compiled__={},this.__tlds__=Lz,this.__tlds_replaced__=!1,this.re={},Hp(this)}kn.prototype.add=function(t,n){return this.__schemas__[t]=n,Hp(this),this};kn.prototype.set=function(t){return this.__opts__=Xx(this.__opts__,t),this};kn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,o,a,i,s,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(a=this.testSchemaAt(t,n[2],l.lastIndex),a){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=t.indexOf("@"),c>=0&&(o=t.match(this.re.email_fuzzy))!==null&&(i=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s))),this.__index__>=0};kn.prototype.pretest=function(t){return this.re.pretest.test(t)};kn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};kn.prototype.match=function(t){let n=[],r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Yx(this,r)),r=this.__last_index__);let o=r?t.slice(r):t;for(;this.test(o);)n.push(Yx(this,r)),o=o.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};kn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,Yx(this,0)):null};kn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,a){return r!==a[o-1]}).reverse(),Hp(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Hp(this),this)};kn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};kn.prototype.onCompile=function(){};var w_=kn;var Tz=/^xn--/,Az=/[^\0-\x7F]/,Dz=/[\x2E\u3002\uFF0E\uFF61]/g,Nz={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Zx=35,Br=Math.floor,Jx=String.fromCharCode;function ua(e){throw new RangeError(Nz[e])}function Oz(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function S_(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Dz,".");let o=e.split("."),a=Oz(o,t).join(".");return r+a}function k_(e){let t=[],n=0,r=e.length;for(;n<r;){let o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){let a=e.charCodeAt(n++);(a&64512)==56320?t.push(((o&1023)<<10)+(a&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}var Rz=e=>String.fromCodePoint(...e),Pz=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},v_=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},C_=function(e,t,n){let r=0;for(e=n?Br(e/700):e>>1,e+=Br(e/t);e>Zx*26>>1;r+=36)e=Br(e/Zx);return Br(r+(Zx+1)*e/(e+38))},E_=function(e){let t=[],n=e.length,r=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(let s=0;s<i;++s)e.charCodeAt(s)>=128&&ua("not-basic"),t.push(e.charCodeAt(s));for(let s=i>0?i+1:0;s<n;){let l=r;for(let c=1,d=36;;d+=36){s>=n&&ua("invalid-input");let f=Pz(e.charCodeAt(s++));f>=36&&ua("invalid-input"),f>Br((2147483647-r)/c)&&ua("overflow"),r+=f*c;let p=d<=a?1:d>=a+26?26:d-a;if(f<p)break;let h=36-p;c>Br(2147483647/h)&&ua("overflow"),c*=h}let u=t.length+1;a=C_(r-l,u,l==0),Br(r/u)>2147483647-o&&ua("overflow"),o+=Br(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},L_=function(e){let t=[];e=k_(e);let n=e.length,r=128,o=0,a=72;for(let l of e)l<128&&t.push(Jx(l));let i=t.length,s=i;for(i&&t.push("-");s<n;){let l=2147483647;for(let c of e)c>=r&&c<l&&(l=c);let u=s+1;l-r>Br((2147483647-o)/u)&&ua("overflow"),o+=(l-r)*u,r=l;for(let c of e)if(c<r&&++o>2147483647&&ua("overflow"),c===r){let d=o;for(let f=36;;f+=36){let p=f<=a?1:f>=a+26?26:f-a;if(d<p)break;let h=d-p,m=36-p;t.push(Jx(v_(p+h%m,0))),d=Br(h/m)}t.push(Jx(v_(d,0))),a=C_(o,u,s===i),o=0,++s}++o,++r}return t.join("")},Bz=function(e){return S_(e,function(t){return Tz.test(t)?E_(t.slice(4).toLowerCase()):t})},Fz=function(e){return S_(e,function(t){return Az.test(t)?"xn--"+L_(t):t})},zz={version:"2.3.1",ucs2:{decode:k_,encode:Rz},decode:E_,encode:L_,toASCII:Fz,toUnicode:Bz};var Qx=zz;var I_={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var M_={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var __={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var Hz={default:I_,zero:M_,commonmark:__},Uz=/^(vbscript|javascript|file|data):/,$z=/^data:image\/(gif|png|jpeg|webp);/;function qz(e){let t=e.trim().toLowerCase();return Uz.test(t)?$z.test(t):!0}var T_=["http:","https:","mailto:"];function Vz(e){let t=Ou(e,!0);if(t.hostname&&(!t.protocol||T_.indexOf(t.protocol)>=0))try{t.hostname=Qx.toASCII(t.hostname)}catch{}return Lp(_s(t))}function Wz(e){let t=Ou(e,!0);if(t.hostname&&(!t.protocol||T_.indexOf(t.protocol)>=0))try{t.hostname=Qx.toUnicode(t.hostname)}catch{}return Nu(_s(t),Nu.defaultChars+"%")}function Xn(e,t){if(!(this instanceof Xn))return new Xn(e,t);t||Rp(e)||(t=e||{},e="default"),this.inline=new m_,this.block=new c_,this.core=new e_,this.renderer=new jM,this.linkify=new w_,this.validateLink=qz,this.normalizeLink=Vz,this.normalizeLinkText=Wz,this.utils=ix,this.helpers=As({},cx),this.options={},this.configure(e),t&&this.set(t)}Xn.prototype.set=function(e){return As(this.options,e),this};Xn.prototype.configure=function(e){let t=this;if(Rp(e)){let n=e;if(e=Hz[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Xn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Xn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Xn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Xn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Xn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Xn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Xn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Rs=Xn;var Gz=new za({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function Kz(e,t){if(e.isText&&t.isText&&ke.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var ny=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:ke.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,o=r[r.length-1],a=this.schema.text(t,n.marks),i;o&&(i=Kz(o,a))?r[r.length-1]=i:r.push(a)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n<t.length;n++){let r=t[n],o=this.tokenHandlers[r.type];if(!o)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");o(this,r,t,n)}}addNode(t,n,r){let o=this.top(),a=t.createAndFill(n,r,o?o.marks:[]);return a?(this.push(a),a):null}openNode(t,n){this.stack.push({type:t,attrs:n,content:[],marks:ke.none})}closeNode(){let t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)}};function Fu(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function ey(e,t){return e.noCloseToken||t=="code_inline"||t=="code_block"||t=="fence"}function A_(e){return e[e.length-1]==`
123
+ `?e.slice(0,e.length-1):e}function ty(){}function jz(e,t){let n=Object.create(null);for(let r in t){let o=t[r];if(o.block){let a=e.nodeType(o.block);ey(o,r)?n[r]=(i,s,l,u)=>{i.openNode(a,Fu(o,s,l,u)),i.addText(A_(s.content)),i.closeNode()}:(n[r+"_open"]=(i,s,l,u)=>i.openNode(a,Fu(o,s,l,u)),n[r+"_close"]=i=>i.closeNode())}else if(o.node){let a=e.nodeType(o.node);n[r]=(i,s,l,u)=>i.addNode(a,Fu(o,s,l,u))}else if(o.mark){let a=e.marks[o.mark];ey(o,r)?n[r]=(i,s,l,u)=>{i.openMark(a.create(Fu(o,s,l,u))),i.addText(A_(s.content)),i.closeMark(a)}:(n[r+"_open"]=(i,s,l,u)=>i.openMark(a.create(Fu(o,s,l,u))),n[r+"_close"]=i=>i.closeMark(a))}else if(o.ignore)ey(o,r)?n[r]=ty:(n[r+"_open"]=ty,n[r+"_close"]=ty);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}var ry=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=jz(t,r)}parse(t,n={}){let r=new ny(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(t,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function D_(e,t){for(;++t<e.length;)if(e[t].type!="list_item_open")return e[t].hidden;return!1}var Yte=new ry(Gz,Rs("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:D_(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:D_(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),Xz={open:"",close:"",mixable:!0},oy=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new zu(this.nodes,this.marks,n);return r.renderContent(t),r.out}},Cn=new oy({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+`
124
+ `),e.text(t.textContent,!1),e.write(`
125
+ `),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,a=>{let i=String(n+a);return e.repeat(" ",r-i.length)+i+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let o=r+1;o<n.childCount;o++)if(n.child(o).type!=t.type){e.write(`\\
126
+ `);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,r){return e.inAutolink=Yz(t,n,r),e.inAutolink?"<":"["},close(e,t,n,r){let{inAutolink:o}=e;return e.inAutolink=void 0,o?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return N_(n.child(r),-1)},close(e,t,n,r){return N_(n.child(r-1),1)},escape:!1}});function N_(e,t){let n=/`+/g,r,o=0;if(e.isText)for(;r=n.exec(e.text);)o=Math.max(o,r[0].length);let a=o>0&&t>0?" `":"`";for(let i=0;i<o;i++)a+="`";return o>0&&t<0&&(a+=" "),a}function Yz(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var zu=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=`
127
+ `),t>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let o=1;o<t;o++)this.out+=n+`
128
+ `}this.closed=null}}getMark(t){let n=this.marks[t];if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${t}\` not supported by Markdown renderer`);n=Xz}return n}wrapBlock(t,n,r,o){let a=this.delim;this.write(n??t),this.delim+=t,o(),this.delim=a,this.closeBlock(r)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
129
+ `)}write(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)}closeBlock(t){this.closed=t}text(t,n=!0){let r=t.split(`
130
+ `);for(let o=0;o<r.length;o++)this.write(),!n&&r[o][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(r[o],this.atBlockStart):r[o],o!=r.length-1&&(this.out+=`
131
+ `)}render(t,n,r){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,r,o)=>this.render(n,t,o))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],o="",a=(i,s,l)=>{let u=i?i.marks:[];i&&i.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return m.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let c=o;if(o="",i&&i.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,b,g]=/^(\s*)(.*)$/m.exec(i.text);b&&(c+=b,i=g?i.withText(g):null,i||(u=r))}if(i&&i.isText&&u.some(m=>{let b=this.getMark(m.type.name);return b&&b.expelEnclosingWhitespace&&!this.isMarkAhead(t,l+1,m)})){let[m,b,g]=/^(.*?)(\s*)$/m.exec(i.text);g&&(o=g,i=b?i.withText(b):null,i||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;m<p;m++){let b=u[m];if(!this.getMark(b.type.name).mixable)break;for(let g=0;g<r.length;g++){let y=r[g];if(!this.getMark(y.type.name).mixable)break;if(b.eq(y)){m>g?u=u.slice(0,g).concat(b).concat(u.slice(g,m)).concat(u.slice(m+1,p)):g>m&&(u=u.slice(0,m).concat(u.slice(m+1,g)).concat(b).concat(u.slice(g,p)));continue e}}}let h=0;for(;h<Math.min(r.length,p)&&u[h].eq(r[h]);)++h;for(;h<r.length;)this.text(this.markString(r.pop(),!1,t,l),!1);if(c&&this.text(c),i){for(;r.length<p;){let m=u[r.length];r.push(m),this.text(this.markString(m,!0,t,l),!1),this.atBlockStart=!1}f&&i.isText?this.text(this.markString(d,!0,t,l)+i.text+this.markString(d,!1,t,l+1),!1):this.render(i,t,l),this.atBlockStart=!1}i?.isText&&i.nodeSize>0&&(this.atBlockStart=!1)};t.forEach(a),a(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,a=this.inTightList;this.inTightList=o,t.forEach((i,s,l)=>{l&&o&&this.flushClose(1),this.wrapBlock(n,r(l),t,()=>this.render(i,t,l))}),this.inTightList=a}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1<t.length&&t[o-1].match(/\w/)&&t[o+1].match(/\w/)?r:"\\"+r),n&&(t=t.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let o=0;o<n;o++)r+=t;return r}markString(t,n,r,o){let a=this.getMark(t.type.name),i=n?a.open:a.close;return typeof i=="string"?i:i(this,t,r,o)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(t,n,r){for(;;n++){if(n>=t.childCount)return!1;let o=t.child(n);if(o.type.name!=this.options.hardBreakNodeName)return r.isInSet(o.marks);n++}}};var $_=Ee(F_(),1);var lH=Object.defineProperty,uH=(e,t,n)=>t in e?lH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$p=(e,t,n)=>(uH(e,typeof t!="symbol"?t+"":t,n),n),cH=Ce.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function a(i){if(!r.isActive(i))return!1;let s=r.getAttributes(i);return o.updateAttributes(i,{tight:t??!(s!=null&&s.tight)})}return e.options.listTypes.some(i=>a(i))}}}}}),z_=Rs();function q_(e,t){return z_.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new z_.inline.State(e,null,null,[]).scanDelims(t,!0)}function V_(e,t,n,r){let o=e.substring(0,n)+e.substring(n+t.length);return o=o.substring(0,n+r)+t+o.substring(n+r),o}function dH(e,t,n,r){let o=n,a=e;for(;o<r&&!q_(a,o).can_open;)a=V_(a,t,o,1),o++;return{text:a,from:o,to:r}}function fH(e,t,n,r){let o=r,a=e;for(;o>n&&!q_(a,o).can_close;)a=V_(a,t,o,-1),o--;return{text:a,from:n,to:o}}function pH(e,t,n,r){let o={text:e,from:n,to:r};return o=dH(o.text,t,o.from,o.to),o=fH(o.text,t,o.from,o.to),o.to-o.from<t.length+1&&(o.text=o.text.substring(0,o.from)+o.text.substring(o.to+t.length)),o.text}var sy=class extends zu{constructor(t,n,r){super(t,n,r??{}),$p(this,"inTable",!1),this.inlines=[]}render(t,n,r){super.render(t,n,r);let o=this.inlines[this.inlines.length-1];if(o!=null&&o.start&&o!==null&&o!==void 0&&o.end){let{delimiter:a,start:i,end:s}=this.normalizeInline(o);this.out=pH(this.out,a,i,s),this.inlines.pop()}}markString(t,n,r,o){let a=this.marks[t.type.name];if(a.expelEnclosingWhitespace)if(n)this.inlines.push({start:this.out.length,delimiter:a.open});else{let i=this.inlines.pop();this.inlines.push({...i,end:this.out.length})}return super.markString(t,n,r,o)}normalizeInline(t){let{start:n,end:r}=t;for(;this.out.charAt(n).match(/\s/);)n++;return{...t,start:n}}},W_=tt.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(e,t){var n,r;return this.editor.storage.markdown.options.html?(n=(r=H_(t))===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:"":(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),"")},close(e,t){var n,r;return this.editor.storage.markdown.options.html&&(n=(r=H_(t))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function H_(e){let t=e.type.schema,n=t.text(" ",[e]),o=bs(D.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function cy(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function hH(e){return e?.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function mH(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function gH(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var Vp=J.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(bH(t,n)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function bH(e,t){let n=e.type.schema,r=bs(D.from(e),n);return e.isBlock&&(t instanceof D||t.type.name===n.topNodeType.name)?xH(r):r}function xH(e){let n=cy(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?`
132
+ ${n.innerHTML}
133
+ `:`
134
+ `,n.outerHTML}var yH=J.create({name:"blockquote"}),wH=yH.extend({addStorage(){return{markdown:{serialize:Cn.nodes.blockquote,parse:{}}}}}),vH=J.create({name:"bulletList"}),G_=vH.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),SH=J.create({name:"codeBlock"}),kH=SH.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+`
135
+ `),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}}}}),CH=J.create({name:"hardBreak"}),K_=CH.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let o=r+1;o<n.childCount;o++)if(n.child(o).type!=t.type){e.write(e.inTable?Vp.storage.markdown.serialize.call(this,e,t,n):`\\
136
+ `);return}},parse:{}}}}}),EH=J.create({name:"heading"}),LH=EH.extend({addStorage(){return{markdown:{serialize:Cn.nodes.heading,parse:{}}}}}),IH=J.create({name:"horizontalRule"}),MH=IH.extend({addStorage(){return{markdown:{serialize:Cn.nodes.horizontal_rule,parse:{}}}}}),_H=J.create({name:"image"}),TH=_H.extend({addStorage(){return{markdown:{serialize:Cn.nodes.image,parse:{}}}}}),AH=J.create({name:"listItem"}),DH=AH.extend({addStorage(){return{markdown:{serialize:Cn.nodes.list_item,parse:{}}}}}),NH=J.create({name:"orderedList"});function OH(e,t,n){let r=0;for(;n-r>0&&t.child(n-r-1).type.name===e.type.name;r++);return r}var RH=NH.extend({addStorage(){return{markdown:{serialize(e,t,n,r){let o=t.attrs.start||1,a=String(o+t.childCount-1).length,i=e.repeat(" ",a+2),l=OH(t,n,r)%2?") ":". ";e.renderList(t,i,u=>{let c=String(o+u);return e.repeat(" ",a-c.length)+c+l})},parse:{}}}}}),PH=J.create({name:"paragraph"}),BH=PH.extend({addStorage(){return{markdown:{serialize:Cn.nodes.paragraph,parse:{}}}}});function iy(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var FH=J.create({name:"table"}),zH=FH.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!HH(t)){Vp.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,o,a)=>{if(e.write("| "),r.forEach((i,s,l)=>{l&&e.write(" | ");let u=i.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!a){let i=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${i} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function U_(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function HH(e){let t=iy(e),n=t[0],r=t.slice(1);return!(iy(n).some(o=>o.type.name!=="tableHeader"||U_(o)||o.childCount>1)||r.some(o=>iy(o).some(a=>a.type.name==="tableHeader"||U_(a)||a.childCount>1)))}var UH=J.create({name:"taskItem"}),$H=UH.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),qH=J.create({name:"taskList"}),VH=qH.extend({addStorage(){return{markdown:{serialize:G_.storage.markdown.serialize,parse:{setup(e){e.use($_.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),WH=J.create({name:"text"}),GH=WH.extend({addStorage(){return{markdown:{serialize(e,t){e.text(hH(t.text))},parse:{}}}}}),KH=tt.create({name:"bold"}),jH=KH.extend({addStorage(){return{markdown:{serialize:Cn.marks.strong,parse:{}}}}}),XH=tt.create({name:"code"}),YH=XH.extend({addStorage(){return{markdown:{serialize:Cn.marks.code,parse:{}}}}}),ZH=tt.create({name:"italic"}),JH=ZH.extend({addStorage(){return{markdown:{serialize:Cn.marks.em,parse:{}}}}}),QH=tt.create({name:"link"}),eU=QH.extend({addStorage(){return{markdown:{serialize:Cn.marks.link,parse:{}}}}}),tU=tt.create({name:"strike"}),nU=tU.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),rU=[wH,G_,kH,K_,LH,MH,Vp,TH,DH,RH,BH,zH,$H,VH,GH,jH,YH,W_,JH,eU,nU];function qp(e){var t,n;let r=(t=e.storage)===null||t===void 0?void 0:t.markdown,o=(n=rU.find(a=>a.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}var ly=class{constructor(t){$p(this,"editor",null),this.editor=t}serialize(t){let n=new sy(this.nodes,this.marks,{hardBreakNodeName:K_.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(Vp)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(W_)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=qp(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let r=(n=qp(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}},uy=class{constructor(t,n){$p(this,"editor",null),$p(this,"md",null);let{html:r,linkify:o,breaks:a}=n;this.editor=t,this.md=this.withPatchedRenderer(Rs({html:r,linkify:o,breaks:a}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(a=>{var i;return(i=qp(a))===null||i===void 0||(i=i.parse)===null||i===void 0||(i=i.setup)===null||i===void 0?void 0:i.call({editor:this.editor,options:a.options},this.md)});let r=this.md.render(t),o=cy(r);return this.editor.extensionManager.extensions.forEach(a=>{var i;return(i=qp(a))===null||i===void 0||(i=i.parse)===null||i===void 0||(i=i.updateDOM)===null||i===void 0?void 0:i.call({editor:this.editor,options:a.options},o)}),this.normalizeDOM(o,{inline:n,content:t}),o.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:o}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(a=>{var i;((i=a.nextSibling)===null||i===void 0?void 0:i.nodeType)===Node.TEXT_NODE&&!a.closest("pre")&&(a.nextSibling.textContent=a.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(t,o),t}normalizeBlocks(t){let r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var a;return(a=o.spec.parseDOM)===null||a===void 0?void 0:a.map(i=>i.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&mH(o)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,a,i,s;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(o=(a=n.match(/^\s+/))===null||a===void 0?void 0:a[0])!==null&&o!==void 0?o:"",d=u?"":(i=(s=n.match(/\s+$/))===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}gH(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=r=>function(){let o=r(...arguments);return o===`
137
+ `?o:o[o.length-1]===`
138
+ `?o.slice(0,-1):o};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},oU=Ce.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new ie({key:new de("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return ar.fromSchema(this.editor.schema).parseSlice(cy(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),j_=Ce.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=BL.Commands.config.addCommands();return{setContent:(t,n,r)=>o=>e.setContent(o.editor.storage.markdown.parser.parse(t),n,r)(o),insertContentAt:(t,n,r)=>o=>e.insertContentAt(t,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new uy(this.editor,this.options),serializer:new ly(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[cH.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),oU.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function aU(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],x={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},S={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[S,d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:v.concat([{begin:/\(/,end:/\)/,keywords:x,contains:v.concat(["self"]),relevance:0}]),relevance:0},E={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,E,S,v,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:x,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function X_(e){let t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=aU(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Y_(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});let o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(s);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],w=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],x=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...y,...w,"set","shopt",...x,...S]},contains:[p,e.SHEBANG(),h,d,a,i,g,s,l,u,c,n]}}function Z_(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},g=[d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:g.concat([{begin:/\(/,end:/\)/,keywords:b,contains:g.concat(["self"]),relevance:0}]),relevance:0},w={begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"</",contains:[].concat(y,w,g,[d,{begin:e.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:b}}}function J_(e){let t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",i="(?!struct)("+r+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},p=t.optional(o)+e.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],g=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],x={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},S={className:"function.dispatch",relevance:0,keywords:{_hint:g},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[S,d,s,n,e.C_BLOCK_COMMENT_MODE,c,u],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:v.concat([{begin:/\(/,end:/\)/,keywords:x,contains:v.concat(["self"]),relevance:0}]),relevance:0},E={className:"function",begin:"("+i+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,c,s,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,c,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:x,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,E,S,v,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:x,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:x},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Q_(e){let t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],i={keyword:o.concat(a),built_in:t,literal:r},s=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:i},p=e.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[b,h,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let g={variants:[u,m,h,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},s]},w=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",x={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:i,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},s,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+w+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:i,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,relevance:0,contains:[g,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},x]}}var iU=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),sU=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],lU=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],uU=[...sU,...lU],cU=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),dU=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),fU=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pU=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function eT(e){let t=e.regex,n=iU(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",a=/@-?\w[\w]*(-\w+)*/,i="[a-zA-Z-][a-zA-Z0-9_-]*",s=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+i,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+dU.join("|")+")"},{begin:":(:)?("+fU.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pU.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...s,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...s,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:cU.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...s,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+uU.join("|")+")\\b"}]}}function tT(e){let t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function nT(e){let a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}function rT(e){let t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function oT(e){let t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},i={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},s={begin:/\[/,end:/\]/,contains:[r,a,o,i,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,u=/"(\\"|[^"])*"/,c=/'[^']*'/,d=t.either(l,u,c),f=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:f,className:"attr",starts:{end:/$/,contains:[r,s,a,o,i,n]}}]}}var Ps="[0-9](_*[0-9])*",Wp=`\\.(${Ps})`,Gp="[0-9a-fA-F](_*[0-9a-fA-F])*",aT={className:"number",variants:[{begin:`(\\b(${Ps})((${Wp})|\\.)?|(${Wp}))[eE][+-]?(${Ps})[fFdD]?\\b`},{begin:`\\b(${Ps})((${Wp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Wp})[fFdD]?\\b`},{begin:`\\b(${Ps})[fFdD]\\b`},{begin:`\\b0[xX]((${Gp})\\.?|(${Gp})?\\.(${Gp}))[pP][+-]?(${Ps})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Gp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function iT(e,t,n){return n===-1?"":e.replace(t,r=>iT(e,t,n-1))}function sT(e){let t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+iT("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,aT,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},aT,u]}}var lT="[A-Za-z$_][0-9A-Za-z$_]*",hU=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],mU=["true","false","null","undefined","NaN","Infinity"],uT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],cT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],dT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],gU=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],bU=[].concat(dT,uT,cT);function fT(e){let t=e.regex,n=(L,{after:P})=>{let H="</"+L[0].slice(1);return L.input.indexOf(H,P)!==-1},r=lT,o={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,P)=>{let H=L[0].length+L.index,X=L.input[H];if(X==="<"||X===","){P.ignoreMatch();return}X===">"&&(n(L,{after:H})||P.ignoreMatch());let ae,Ne=L.input.substring(H);if(ae=Ne.match(/^\s*=/)){P.ignoreMatch();return}if((ae=Ne.match(/^\s+extends\s+/))&&ae.index===0){P.ignoreMatch();return}}},s={$pattern:lT,keyword:hU,literal:mU,built_in:bU,"variable.language":gU},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=w.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(w)});let x=[].concat(y,f.contains),S=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(x)}]),v={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:S},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},E={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...uT,...cT]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},W={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(L){return t.concat("(?!",L.join("|"),")")}let fe={match:t.concat(/\b/,te([...dT,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},oe={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},_="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",k={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(_)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,E,{scope:"attr",match:r+t.lookahead(":"),relevance:0},k,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:_,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},oe,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},fe,W,C,Z,{match:/\$[(.]/}]}}function pT(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],o={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Bs="[0-9](_*[0-9])*",Kp=`\\.(${Bs})`,jp="[0-9a-fA-F](_*[0-9a-fA-F])*",xU={className:"number",variants:[{begin:`(\\b(${Bs})((${Kp})|\\.)?|(${Kp}))[eE][+-]?(${Bs})[fFdD]?\\b`},{begin:`\\b(${Bs})((${Kp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Kp})[fFdD]?\\b`},{begin:`\\b(${Bs})[fFdD]\\b`},{begin:`\\b0[xX]((${jp})\\.?|(${jp})?\\.(${jp}))[pP][+-]?(${Bs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${jp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function hT(e){let t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},o={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},i={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,o]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,o]}]};o.contains.push(i);let s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(i,{className:"string"}),"self"]}]},u=xU,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,n,r,s,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,l,i,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,l]},i,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
139
+ `},u]}}var yU=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),wU=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],vU=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],SU=[...wU,...vU],kU=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),mT=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),gT=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),CU=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),EU=mT.concat(gT).sort().reverse();function bT(e){let t=yU(e),n=EU,r="and or not only",o="[\\w-]+",a="("+o+"|@\\{"+o+"\\})",i=[],s=[],l=function(w){return{className:"string",begin:"~?"+w+".*?"+w}},u=function(w,x,S){return{className:w,begin:x,relevance:S}},c={$pattern:/[a-z-]+/,keyword:r,attribute:kU.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,u("variable","@@?"+o,10),u("variable","@\\{"+o+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:o+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);let f=s.concat({begin:/\{/,end:/\}/,contains:i}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+CU.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},b={className:"variable",variants:[{begin:"@"+o+"\\s*:",relevance:15},{begin:"@"+o}],starts:{end:"[;}]",returnEnd:!0,contains:f}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+o+"\\}"),{begin:"\\b("+SU.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",a,0),u("selector-id","#"+a),u("selector-class","\\."+a,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+mT.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+gT.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:o+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,y,h,g,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function xT(e){let t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function yT(e){let t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},i={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,o,a,i]}}function wT(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},s=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,s,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(g=>{g.contains=g.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,a,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},o,r,l,i,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function vT(e){let t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,s={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:s,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function ST(e){let t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},i={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,a,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,b,g="\\1")=>{let y=g==="\\1"?g:t.concat(g,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,g,r)},p=(m,b,g)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,g,r),h=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),i,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=h,i.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:h}}function kT(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),i={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(oe,Z)=>{Z.data._beginMatch=oe[1]||oe[2]},"on:end":(oe,Z)=>{Z.data._beginMatch!==oe[1]&&Z.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
140
+ ]`,h={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],g=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],x={keyword:g,literal:(oe=>{let Z=[];return oe.forEach(_=>{Z.push(_),_.toLowerCase()===_?Z.push(_.toUpperCase()):Z.push(_.toLowerCase())}),Z})(b),built_in:y},S=oe=>oe.map(Z=>Z.replace(/\|\d+$/,"")),v={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",S(y).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},C=t.concat(r,"\\b(?!\\()"),E={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),C],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},T={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:x,contains:[T,i,E,e.C_BLOCK_COMMENT_MODE,h,m,v]},W={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(g).join("\\b|"),"|",S(y).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(W);let te=[T,E,e.C_BLOCK_COMMENT_MODE,h,m,v],fe={begin:t.concat(/#\[\s*\\?/,t.either(o,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...te]},...te,{scope:"meta",variants:[{match:o},{match:a}]}]};return{case_insensitive:!1,keywords:x,contains:[fe,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},i,W,E,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},v,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:x,contains:["self",fe,i,E,e.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,m]}}function CT(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Xp(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function ET(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:s,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:s,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,g,d]}]}}function LT(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function IT(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function MT(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(r,/(::\w+)*/),i={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:i},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:i}]},v=[d,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:i},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=v,m.contains=v;let I=[{begin:/^\s*=>/,starts:{end:"$",contains:v}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:i,contains:v}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(I).concat(u).concat(v)}}function _T(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),o=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",s=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:s,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:c}},{className:"punctuation",begin:"->"},a]}}var LU=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),IU=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],MU=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],_U=[...IU,...MU],TU=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),AU=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),DU=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),NU=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function TT(e){let t=LU(e),n=DU,r=AU,o="@[a-z-]+",a="and or not only",s={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+_U.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},s,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NU.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,s,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:TU.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},s,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function AT(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function DT(e){let t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],s=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(S=>!c.includes(S)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function y(S){return t.concat(/\b/,t.either(...S.map(v=>v.replace(/\s+/,"\\s+"))),/\b/)}let w={scope:"keyword",match:y(f),relevance:0};function x(S,{exceptions:v,when:C}={}){let E=C;return v=v||[],S.map(T=>T.match(/\|\d+$/)||v.includes(T)?T:E(T)?`${T}|0`:T)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(h,{when:S=>S.length<3}),literal:a,type:s,built_in:d},contains:[{scope:"type",match:y(i)},w,g,m,r,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function PT(e){return e?typeof e=="string"?e:e.source:null}function Hu(e){return He("(?=",e,")")}function He(...e){return e.map(n=>PT(n)).join("")}function OU(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function an(...e){return"("+(OU(e).capture?"":"?:")+e.map(r=>PT(r)).join("|")+")"}var py=e=>He(/\b/,e,/\w$/.test(e)?/\b/:/\B/),RU=["Protocol","Type"].map(py),NT=["init","self"].map(py),PU=["Any","Self"],dy=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],OT=["false","nil","true"],BU=["assignment","associativity","higherThan","left","lowerThan","none","right"],FU=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],RT=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],BT=an(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),FT=an(BT,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),fy=He(BT,FT,"*"),zT=an(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Zp=an(zT,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Fr=He(zT,Zp,"*"),Yp=He(/[A-Z]/,Zp,"*"),zU=["attached","autoclosure",He(/convention\(/,an("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",He(/objc\(/,Fr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],HU=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function HT(e){let t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],o={match:[/\./,an(...RU,...NT)],className:{2:"keyword"}},a={match:He(/\./,an(...dy)),relevance:0},i=dy.filter(le=>typeof le=="string").concat(["_|0"]),s=dy.filter(le=>typeof le!="string").concat(PU).map(py),l={variants:[{className:"keyword",match:an(...s,...NT)}]},u={$pattern:an(/\b\w+/,/#\w+/),keyword:i.concat(FU),literal:OT},c=[o,a,l],d={match:He(/\./,an(...RT)),relevance:0},f={className:"built_in",match:He(/\b/,an(...RT),/(?=\()/)},p=[d,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:fy},{match:`\\.(\\.|${FT})+`}]},b=[h,m],g="([0-9]_*)+",y="([0-9a-fA-F]_*)+",w={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},x=(le="")=>({className:"subst",variants:[{match:He(/\\/,le,/[0\\tnr"']/)},{match:He(/\\/,le,/u\{[0-9a-fA-F]{1,8}\}/)}]}),S=(le="")=>({className:"subst",match:He(/\\/,le,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(le="")=>({className:"subst",label:"interpol",begin:He(/\\/,le,/\(/),end:/\)/}),C=(le="")=>({begin:He(le,/"""/),end:He(/"""/,le),contains:[x(le),S(le),v(le)]}),E=(le="")=>({begin:He(le,/"/),end:He(/"/,le),contains:[x(le),v(le)]}),T={className:"string",variants:[C(),C("#"),C("##"),C("###"),E(),E("#"),E("##"),E("###")]},I=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],W={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},te=le=>{let yt=He(le,/\//),G=He(/\//,le);return{begin:yt,end:G,contains:[...I,{scope:"comment",begin:`#(?!.*${G})`,end:/$/}]}},fe={scope:"regexp",variants:[te("###"),te("##"),te("#"),W]},oe={match:He(/`/,Fr,/`/)},Z={className:"variable",match:/\$\d+/},_={className:"variable",match:`\\$${Zp}+`},k=[oe,Z,_],L={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:HU,contains:[...b,w,T]}]}},P={scope:"keyword",match:He(/@/,an(...zU),Hu(an(/\(/,/\s+/)))},H={scope:"meta",match:He(/@/,Fr)},X=[L,P,H],ae={match:Hu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:He(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Zp,"+")},{className:"type",match:Yp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:He(/\s+&\s+/,Hu(Yp)),relevance:0}]},Ne={begin:/</,end:/>/,keywords:u,contains:[...r,...c,...X,h,ae]};ae.contains.push(Ne);let Le={match:He(Fr,/\s*:/),keywords:"_|0",relevance:0},ge={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Le,...r,fe,...c,...p,...b,w,T,...k,...X,ae]},Te={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ae]},Pt={begin:an(Hu(He(Fr,/\s*:/)),Hu(He(Fr,/\s+/,Fr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Fr}]},st={begin:/\(/,end:/\)/,keywords:u,contains:[Pt,...r,...c,...b,w,T,...X,ae,ge],endsParent:!0,illegal:/["']/},z={match:[/(func|macro)/,/\s+/,an(oe.match,Fr,fy)],className:{1:"keyword",3:"title.function"},contains:[Te,st,t],illegal:[/\[/,/%/]},Q={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Te,st,t],illegal:/\[|%/},Ae={match:[/operator/,/\s+/,fy],className:{1:"keyword",3:"title"}},De={begin:[/precedencegroup/,/\s+/,Yp],className:{1:"keyword",3:"title"},contains:[ae],keywords:[...BU,...OT],end:/}/},Fe={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},je={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},$e={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Fr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Te,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Yp},...c],relevance:0}]};for(let le of T.variants){let yt=le.contains.find(ee=>ee.label==="interpol");yt.keywords=u;let G=[...c,...p,...b,w,T,...k];yt.contains=[...G,{begin:/\(/,end:/\)/,contains:["self",...G]}]}return{name:"Swift",keywords:u,contains:[...r,z,Q,Fe,je,$e,Ae,De,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},fe,...c,...p,...b,w,T,...k,...X,ae,ge]}}var Jp="[A-Za-z$_][0-9A-Za-z$_]*",UT=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],$T=["true","false","null","undefined","NaN","Infinity"],qT=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],VT=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],WT=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],GT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],KT=[].concat(WT,qT,VT);function UU(e){let t=e.regex,n=(L,{after:P})=>{let H="</"+L[0].slice(1);return L.input.indexOf(H,P)!==-1},r=Jp,o={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,P)=>{let H=L[0].length+L.index,X=L.input[H];if(X==="<"||X===","){P.ignoreMatch();return}X===">"&&(n(L,{after:H})||P.ignoreMatch());let ae,Ne=L.input.substring(H);if(ae=Ne.match(/^\s*=/)){P.ignoreMatch();return}if((ae=Ne.match(/^\s+extends\s+/))&&ae.index===0){P.ignoreMatch();return}}},s={$pattern:Jp,keyword:UT,literal:$T,built_in:KT,"variable.language":GT},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,{match:/\$\d+/},d];f.contains=w.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(w)});let x=[].concat(y,f.contains),S=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(x)}]),v={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:S},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},E={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...qT,...VT]}},T={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},W={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(L){return t.concat("(?!",L.join("|"),")")}let fe={match:t.concat(/\b/,te([...WT,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},oe={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},_="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",k={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(_)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,b,y,{match:/\$\d+/},d,E,{scope:"attr",match:r+t.lookahead(":"),relevance:0},k,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:_,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},oe,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},fe,W,C,Z,{match:/\$[(.]/}]}}function jT(e){let t=e.regex,n=UU(e),r=Jp,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},i={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Jp,keyword:UT.concat(l),literal:$T,built_in:KT.concat(o),"variable.language":GT},c={className:"meta",begin:"@"+r},d=(m,b,g)=>{let y=m.contains.findIndex(w=>w.label===b);if(y===-1)throw new Error("can not find mode to replace");m.contains.splice(y,1,g)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,a,i,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",s);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function XT(e){let t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,i=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,o),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,i,/ *#/)},{begin:t.concat(/# */,t.either(a,o),/ +/,t.either(i,s),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function YT(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");let n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},i={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},s={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,i,o,e.QUOTE_STRING_MODE,l,u,s]}}function ZT(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,s,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,i,l,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function JT(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},i={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},s=e.inherit(i,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,a,i],g=[...b];return g.pop(),g.push(s),p.contains=g,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}var hy={arduino:X_,bash:Y_,c:Z_,cpp:J_,csharp:Q_,css:eT,diff:tT,go:nT,graphql:rT,ini:oT,java:sT,javascript:fT,json:pT,kotlin:hT,less:bT,lua:xT,makefile:yT,markdown:wT,objectivec:vT,perl:ST,php:kT,"php-template":CT,plaintext:Xp,python:ET,"python-repl":LT,r:IT,ruby:MT,rust:_T,scss:TT,shell:AT,sql:DT,swift:HT,typescript:jT,vbnet:XT,wasm:YT,xml:ZT,yaml:JT};var yA=Ee(xA(),1);var wA=yA.default;var vA={},A7="hljs-";function Cy(e){let t=wA.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:o,register:a,registerAlias:i,registered:s};function n(l,u,c){let d=c||vA,f=typeof d.prefix=="string"?d.prefix:A7;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:ky,classPrefix:f});let p=t.highlight(u,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});let h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(l,u){let d=(u||vA).subset||o(),f=-1,p=0,h;for(;++f<d.length;){let m=d[f];if(!t.getLanguage(m))continue;let b=n(m,l,u);b.data&&b.data.relevance!==void 0&&b.data.relevance>p&&(p=b.data.relevance,h=b)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function o(){return t.listLanguages()}function a(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&t.registerLanguage(c,l[c])}}function i(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){let d=l[c];t.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function s(l){return!!t.getLanguage(l)}}var ky=class{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;let n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){let r=this.stack[this.stack.length-1],o=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:o}):r.children.push(...o)}openNode(t){let n=this,r=t.split(".").map(function(i,s){return s?i+"_".repeat(s):n.options.classPrefix+i}),o=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};o.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}};var Hr=Ee(Bt(),1);var rh=new de("blockGutter"),oh="gpdoc-gutter-line-comment";function D7(e=[]){let t=new Map;return e.forEach(n=>{let r=Number.parseInt(`${n?.visualLineNumber||""}`,10);!Number.isInteger(r)||r<=0||t.set(r,{visualLineNumber:r,sourceFrom:Number.isInteger(n?.sourceFrom)?n.sourceFrom:void 0,sourceTo:Number.isInteger(n?.sourceTo)?n.sourceTo:void 0,commentState:n?.commentState==="open"||n?.commentState==="resolved"?n.commentState:null,suggestionState:n?.suggestionState==="added"||n?.suggestionState==="modified"||n?.suggestionState==="deleted"?n.suggestionState:null,suggestionCount:Number.isInteger(n?.suggestionCount)&&(n?.suggestionCount||0)>0?n.suggestionCount:void 0})}),t}function SA(e,t=new Map){let n=[],r=1;return e.forEach((o,a)=>{let i=t.get(r),s=["gpdoc-gutter-row"];i?.commentState==="open"?s.push("gpdoc-comment-line"):i?.commentState==="resolved"&&s.push("gpdoc-comment-resolved-line"),i?.suggestionState&&(s.push("gpdoc-suggestion-line"),s.push(`gpdoc-suggestion-${i.suggestionState}-line`));let l={class:s.join(" "),"data-gpdoc-line":String(r)};Number.isInteger(i?.sourceFrom)&&(i?.sourceFrom||0)>0&&(l["data-gpdoc-source-from"]=String(i?.sourceFrom)),Number.isInteger(i?.sourceTo)&&(i?.sourceTo||0)>0&&(l["data-gpdoc-source-to"]=String(i?.sourceTo)),i?.suggestionState&&(l["data-gpdoc-suggestion-state"]=i.suggestionState);let u=i?.suggestionCount??0;Number.isInteger(u)&&u>0&&(l["data-gpdoc-suggestion-count"]=String(u)),n.push(ye.node(a,a+o.nodeSize,l,{key:`gutter-${r}`})),r++}),be.create(e,n)}function kA(e,t){return!e||e.isDestroyed?!1:(e.view.dispatch(e.state.tr.setMeta(rh,{rowMetadata:t})),!0)}function CA(e){return rh.getState(e)?.rowMetadata??new Map}var EA=Ce.create({name:"blockGutter",addProseMirrorPlugins(){return[new ie({key:rh,state:{init(e,{doc:t}){let n=new Map;return{rowMetadata:n,decorations:SA(t,n)}},apply(e,t){let n=t?.rowMetadata||new Map,r=e.getMeta(rh);return r?.rowMetadata&&(n=D7(r.rowMetadata)),e.docChanged||r?.rowMetadata?{rowMetadata:n,decorations:SA(e.doc,n)}:t}},props:{decorations(e){return this.getState(e)?.decorations??be.empty},handleClick(e,t,n){let r=n.target;if(!(r instanceof HTMLElement))return!1;let o=r.closest(".gpdoc-gutter-row");if(o instanceof HTMLElement||(o=Array.from(e.dom.querySelectorAll(".gpdoc-gutter-row")).find(u=>{let c=u.getBoundingClientRect();return n.clientX<c.left&&n.clientY>=c.top&&n.clientY<=c.bottom})||null),!(o instanceof HTMLElement))return!1;let a=o.getBoundingClientRect();if(n.clientX>=a.left)return!1;let i=Number.parseInt(o.getAttribute("data-gpdoc-line")||"",10),s=Number.parseInt(o.getAttribute("data-gpdoc-source-from")||"",10),l=Number.isInteger(s)&&s>0?s:i;return!Number.isInteger(l)||l<=0||!Number.isInteger(i)||i<=0?!1:(n.preventDefault(),n.stopPropagation(),e.dom.dispatchEvent(new CustomEvent(oh,{bubbles:!0,detail:Object.freeze({lineNumber:l,visualLineNumber:i,lineContent:o.textContent||""})})),!0)}}})]}});var N7=new Set(["__proto__","prototype","constructor"]);function O7(e){let t=e.trim().replace(/^data(?:\.|$)/,"");if(!t)return null;let n=[],r=0,o=/(?:^|\.)([^.\[\]]+)|\[(\d+)\]/g,a;for(;a=o.exec(t);){if(a.index!==r)return null;let i=(a[1]??a[2]??"").trim();if(!i||N7.has(i))return null;n.push(i),r=o.lastIndex}return r===t.length&&n.length>0?n:null}function Ey(e,t){let n=typeof t=="string"?O7(t):null;if(!n)return;let r=e;for(let o of n){if(r===null||typeof r!="object"||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Ly(e){if(e==null)return"";if(typeof e=="object")try{return JSON.stringify(e)}catch{return""}return String(e)}var Iy="http://www.w3.org/2000/svg",Ty=new de("specialPreviews"),R7=0,LA="",P7=8,B7=80,pa=new Map,F7=`<style>
141
+ :host {
142
+ display: block;
143
+ width: 100%;
144
+ }
145
+
146
+ .gpdoc-preview-placeholder {
147
+ color: var(--gpdoc-gutter-text, #64748b);
148
+ }
149
+
150
+ .gpdoc-preview-error {
151
+ color: var(--vscode-errorForeground, #ef4444);
152
+ font-family: var(--gpdoc-editor-font-code, monospace);
153
+ font-size: 0.85em;
154
+ white-space: pre-wrap;
155
+ }
156
+
157
+ pre {
158
+ margin: 0.5rem 0 0;
159
+ white-space: pre;
160
+ overflow-x: auto;
161
+ }
162
+
163
+ code {
164
+ font-family: var(--gpdoc-editor-font-code, monospace);
165
+ }
166
+
167
+ svg {
168
+ display: block;
169
+ max-width: 100%;
170
+ height: auto;
171
+ margin: 0 auto;
172
+ }
173
+ </style>`;function da(e){let t=5381;for(let n=0;n<e.length;n+=1)t=t*33^e.charCodeAt(n);return(t>>>0).toString(36)}function ha(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function z7(e,t,n){return e&&window.getComputedStyle(e).getPropertyValue(t).trim()||n}function OA(e){let t=e.closest(".gpdoc-editor-root"),n=t?.classList.contains("gpdoc-dark")||document.documentElement.classList.contains("dark")||document.body.classList.contains("vscode-dark")||document.body.classList.contains("vscode-high-contrast"),r=z7(t,"--gpdoc-font-sans","system-ui, -apple-system, sans-serif");return{isDarkMode:n,fontFamily:r}}function RA(e){let{isDarkMode:t,fontFamily:n}=OA(e);return{startOnLoad:!1,securityLevel:"loose",theme:t?"dark":"default",fontFamily:n,flowchart:{useMaxWidth:!0}}}function PA(e){try{return JSON.stringify(e)}catch{return""}}function H7(e,t){if(!e.initialize)return"";let n=RA(t),r=PA(n);return r&&r===LA||(e.initialize(n),LA=r),r}function IA(e,t){return`${da(e.sourceMarkdown||e.code)}:${e.occurrence}:${t}`}function U7(e,t){for(pa.set(e,t);pa.size>B7;){let n=pa.keys().next().value;if(!n)break;pa.delete(n)}}function $7(e){let{fontFamily:t}=e;return`
174
+ svg {
175
+ background: transparent !important;
176
+ font-family: ${t} !important;
177
+ }
178
+ `}function My(e,t){let n=t.querySelector("svg");if(!n)return;let r=OA(e),o="http://www.w3.org/2000/svg";n.querySelector('style[data-gpdoc-mermaid-theme="true"]')?.remove();let i=document.createElementNS(o,"style");i.setAttribute("data-gpdoc-mermaid-theme","true"),i.textContent=$7(r),n.insertBefore(i,n.firstChild);let s=n.style.maxWidth?.trim(),u=n.getAttribute("viewBox")?.split(/\s+/).map(Number)?.[2];n.style.width=n.getAttribute("width")||"100%",n.style.maxWidth=s||(Number.isFinite(u)?`${u}px`:"100%"),n.style.height="auto",n.style.background="transparent"}function ah(e,t){let n=typeof e=="string"?e.replace(/\r\n?/g,`
179
+ `).trim():"";return!n||!n.includes("\\")||t==="block"&&(n.includes("&")||/\\begin\{(?:[bBpvV]?matrix|smallmatrix|array|cases|aligned|align(?:at)?\*?|split|gathered|multline|flalign\*?)\}/.test(n))&&(n=n.replace(/\\(?=\s+(?:[^\\\s]|\\))/g,"\\\\")),n}function _y(e){return{data:e?.data??window.gpdocData?.meta?.data??window.gpdocData?.data??{},sourceMarkdown:typeof e?.sourceMarkdown=="string"?e.sourceMarkdown:"",renderEmbedPreview:typeof e?.renderEmbedPreview=="function"?e.renderEmbedPreview:void 0}}function q7(e){try{return JSON.parse(e)}catch{try{let t=e.replace(/,\s*([}\]])/g,"$1");return JSON.parse(t)}catch{return null}}}function V7(e=""){if(!e||typeof e!="string")return e||"";try{return decodeURI(e)}catch{return e}}function qu(e=""){return V7(e).trim()}function BA(e){if(!e||!e.includes("gpdoc-embed"))return null;let t=e.match(/<!--\s*gpdoc-embed\s*({[\s\S]*?})\s*-->/i);if(!t?.[1])return null;let n=q7(t[1].trim());if(!n||typeof n!="object")return null;let r=n,o=r.type||r.filetype||r.embedType,a=typeof o=="string"?o.toLowerCase():"",i=r.path||r.target||r.id||"",s=qu(String(i||""));return s?{href:s,title:typeof r.title=="string"&&r.title.trim().length>0?r.title.trim():"Embedded GPDoc",sourceMarkdown:t[0].trim(),type:a||void 0,attributes:r}:null}function Ay(e){let t=e.replace(/\s+/g," ").trim();if(!t)return null;let n=t.match(/^\[Embedded GPDoc:\s*([^\]]+?)\]\(([^)\r\n]+?)\)$/i);if(!n?.[2])return null;let r=qu(n[2]);return r?{href:r,title:n[1]?.trim()||"Embedded GPDoc",sourceMarkdown:n[0],attributes:{}}:null}function W7(e){if(!e||typeof e!="string")return[];let t=[],n=[],r=/<!--\s*gpdoc-embed\s*({[\s\S]*?})\s*-->/gi,o=/\[Embedded GPDoc:\s*([^\]]+?)\]\(([^)\r\n]+?)\)/gi,a=r.exec(e),i=0;for(;a;){let l=BA(a[0]);if(l){let c=e.slice(r.lastIndex).match(/^(?:[ \t]*\r?\n)+[ \t]*(\[Embedded GPDoc:\s*([^\]]+?)\]\(([^)\r\n]+?)\))/i);if(c?.[1]&&c[3]){let d=qu(c[3]);if(!l.href||l.href===d){let f=c[2]?.trim()||l.title,p=`${a[0].trim()}
180
+ ${c[1].trim()}`;l.href=d||l.href,l.title=f||l.title,l.sourceMarkdown=p;let h=r.lastIndex+c[0].lastIndexOf(c[1]);n.push({start:h,end:h+c[1].length})}}t.push({...l,order:i++,position:a.index})}a=r.exec(e)}let s=o.exec(e);for(;s;){let l=s.index,u=l+s[0].length;if(!n.some(d=>l>=d.start&&u<=d.end)){let d=Ay(s[0]);d&&t.push({...d,order:i++,position:l})}s=o.exec(e)}return t.sort((l,u)=>l.position-u.position||l.order-u.order)}function G7(e){let t=new Map;return W7(e).forEach(r=>{let o=qu(r.href);if(!o)return;let a=t.get(o)||[];a.push({href:o,title:r.title,sourceMarkdown:r.sourceMarkdown,type:r.type,attributes:r.attributes}),t.set(o,a)}),t}function K7(e,t){let n=qu(t.href);if(!n)return null;let r=e.get(n);if(!r?.length)return null;let o=r.shift()||null;return r.length||e.delete(n),o?{href:t.href,title:o.title||t.title,sourceMarkdown:o.sourceMarkdown||t.sourceMarkdown,type:o.type||t.type,attributes:o.attributes||t.attributes}:null}function j7(e){if(Object.prototype.hasOwnProperty.call(e,"data"))return e.data??{};let t=e?.data,n=window.gpdocData?.meta?.data??window.gpdocData?.data;if(t&&typeof t=="object"){if(Array.isArray(t))return t.length>0?t:n??t;if(Object.keys(t).length>0)return t}return n??t??{}}function X7(e,t){return e.start<t.end&&t.start<e.end}function Dy(e){window.dispatchEvent(new CustomEvent("gpdoc-beta-edit-special",{detail:e}))}function Y7(e){window.dispatchEvent(new CustomEvent("gpdoc-beta-remove-special",{detail:e}))}function Z7(e,t){if(t.onDataVariablesOpen){t.onDataVariablesOpen(Object.freeze({...e}));return}window.dispatchEvent(new CustomEvent("gpdoc-beta-open-data-variables",{detail:e}))}function MA(e,t,n){let r=document.createElement("button");r.type="button",r.className=`gpdoc-preview-action-btn ${n==="remove"?"gpdoc-preview-remove-btn":"gpdoc-preview-edit-btn"}`,r.textContent=e,r.setAttribute("contenteditable","false"),r.title=e;let o=0,a=()=>{let i=Date.now();if(!(i-o<80)){if(o=i,n==="remove"){Y7(t);return}Dy(t)}};return r.addEventListener("mousedown",i=>{i.preventDefault(),i.stopPropagation()}),r.addEventListener("pointerup",i=>{i.preventDefault(),i.stopPropagation(),a()}),r.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),a()}),r.addEventListener("keydown",i=>{i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),i.stopPropagation(),a())}),r}function FA(e,t,n){let r=n?`-${n}`:"";return`gpdoc-mermaid-${e.occurrence+1}-${da(e.code).slice(0,8)}${r}.${t}`}function J7(e){let t=e.querySelector("svg");return t&&t.nodeName.toLowerCase()==="svg"?t:null}function _A(e){if(!e||e.includes("%"))return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}var TA={height:800,width:1200},Q7={original:{dimensionMode:"rendered",scale:"device"},full:{dimensionMode:"natural",filenameVariant:"full-size",scale:1},large:{dimensionMode:"natural",filenameVariant:"large",scale:2}};function Ny(e,t){return!Number.isFinite(e)||!Number.isFinite(t)||!e||!t?null:{height:Math.max(1,Math.ceil(t)),width:Math.max(1,Math.ceil(e))}}function e$(e){let t=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);if(!t||t.length<4)return null;let n=Number.isFinite(t[2])?Math.abs(t[2]):null,r=Number.isFinite(t[3])?Math.abs(t[3]):null;return Ny(n,r)}function t$(e){return Ny(_A(e.getAttribute("width")),_A(e.getAttribute("height")))}function n$(e){let t=e.getBoundingClientRect();return Ny(t.width,t.height)}function r$(e,t="rendered"){let n=n$(e),r=t$(e),o=e$(e);return t==="natural"?o??r??n??TA:n??r??o??TA}function Oy(e,t="rendered"){let n=J7(e);if(!n)return null;let r=n.cloneNode(!0),o=r$(n,t);return r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("width",String(o.width)),r.setAttribute("height",String(o.height)),{...o,svgText:new XMLSerializer().serializeToString(r)}}function AA(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()}function lh(e,t){let n=typeof URL<"u"?URL:null;if(!n?.createObjectURL){let o=new FileReader;o.onload=()=>{typeof o.result=="string"&&AA(o.result,t)},o.readAsDataURL(e);return}let r=n.createObjectURL(e);AA(r,t),window.setTimeout(()=>{n.revokeObjectURL(r)},1e3)}function zA(e,t,n,r,o){let a=window.vscode;if(!a?.postMessage)return!1;try{return a.postMessage({type:"saveMermaidDiagram",format:e,filename:t,mimeType:n,encoding:r,content:o}),!0}catch{return!1}}function o$(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){n(new Error("Could not read Mermaid export data"));return}let o=r.result.indexOf(",");t(o>=0?r.result.slice(o+1):r.result)},r.onerror=()=>{n(r.error??new Error("Could not read Mermaid export data"))},r.readAsDataURL(e)})}function a$(e,t,n,r){if(!window.vscode?.postMessage){lh(e,t);return}o$(e).then(o=>{zA(n,t,r,"base64",o)||lh(e,t)}).catch(()=>{lh(e,t)})}function fa(e){let t=window.vscode;if(t?.postMessage){t.postMessage({type:"showError",message:e});return}console.error(e)}function i$(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function s$(e){return e.scale==="device"?Math.max(1,Math.min(window.devicePixelRatio||1,3)):Math.max(1,e.scale)}function l$(e,t){let n=Oy(e);if(!n){fa("Could not find a rendered Mermaid diagram to export.");return}let r=FA(t,"svg");zA("svg",r,"image/svg+xml","utf8",n.svgText)||lh(new Blob([n.svgText],{type:"image/svg+xml;charset=utf-8"}),r)}function u$(e,t,n="original"){let r=Q7[n],o=Oy(e,r.dimensionMode);if(!o){fa("Could not find a rendered Mermaid diagram to export.");return}if(typeof Image>"u"){fa("PNG export is not available in this editor environment.");return}let a=new Image;a.onload=()=>{try{let i=s$(r),s=document.createElement("canvas");s.width=Math.ceil(o.width*i),s.height=Math.ceil(o.height*i);let l=s.getContext("2d");if(!l){fa("Could not create a PNG renderer for the Mermaid diagram.");return}l.scale(i,i),l.clearRect(0,0,o.width,o.height),l.drawImage(a,0,0,o.width,o.height),s.toBlob(u=>{if(!u){fa("Could not create a PNG file from the Mermaid diagram.");return}a$(u,FA(t,"png",r.filenameVariant),"png","image/png")},"image/png")}catch(i){let s=i instanceof Error?i.message:String(i);fa(`Could not create a PNG file from the Mermaid diagram: ${s}`)}},a.onerror=()=>{fa("Could not load the Mermaid SVG for PNG export.")},a.src=i$(o.svgText)}function c$(e){let t=e;return t.ownerDocument??t.host?.ownerDocument??document}function yi(e,t,n,r){let o=e.createElement("button");return o.type="button",o.className="gpdoc-mermaid-viewer-control-btn",o.textContent=t,o.title=n,o.setAttribute("aria-label",n),o.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),r()}),o}function d$(e){let t=Oy(e,"natural");if(!t){fa("Could not find a rendered Mermaid diagram to view.");return}let n=c$(e),r=n.defaultView??window;n.querySelector(".gpdoc-mermaid-modal-backdrop")?.remove();let o=n.createElement("div");o.className="gpdoc-mermaid-modal-backdrop",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label","Mermaid diagram viewer");let a=n.createElement("div");a.className="gpdoc-mermaid-modal";let i=n.createElement("button");i.type="button",i.className="gpdoc-mermaid-modal-close",i.textContent="x",i.title="Close diagram viewer",i.setAttribute("aria-label","Close diagram viewer");let s=n.createElement("div");s.className="gpdoc-mermaid-modal-viewport",s.tabIndex=0;let l=n.createElement("div");l.className="gpdoc-mermaid-modal-canvas",l.innerHTML=t.svgText,s.append(l);let u={offsetX:0,offsetY:0,zoom:1},c=()=>{l.style.transform=`translate(${u.offsetX}px, ${u.offsetY}px) scale(${u.zoom})`},d=()=>{let x=s.getBoundingClientRect(),S=Math.max(160,x.width-96),v=Math.max(160,x.height-96),C=Math.min(1,S/t.width,v/t.height);u.zoom=Math.max(.1,C),u.offsetX=0,u.offsetY=0,c()},f=x=>{u.zoom=Math.max(.1,Math.min(8,u.zoom*x)),c()},p=(x,S)=>{u.offsetX+=x,u.offsetY+=S,c()},h=n.createElement("div");h.className="gpdoc-mermaid-viewer-controls",h.append(n.createElement("span"),yi(n,"^","Pan up",()=>p(0,-80)),yi(n,"+","Zoom in",()=>f(1.2)),yi(n,"<","Pan left",()=>p(-80,0)),yi(n,"0","Reset view",d),yi(n,">","Pan right",()=>p(80,0)),n.createElement("span"),yi(n,"v","Pan down",()=>p(0,80)),yi(n,"-","Zoom out",()=>f(1/1.2)));let m=()=>{r.removeEventListener("keydown",b),r.removeEventListener("resize",d),o.remove()};function b(x){x.key==="Escape"&&(x.preventDefault(),m())}let g=null;s.addEventListener("pointerdown",x=>{x.button===0&&(x.preventDefault(),s.classList.add("is-dragging"),s.setPointerCapture(x.pointerId),g={offsetX:u.offsetX,offsetY:u.offsetY,pointerX:x.clientX,pointerY:x.clientY})}),s.addEventListener("pointermove",x=>{g&&(u.offsetX=g.offsetX+x.clientX-g.pointerX,u.offsetY=g.offsetY+x.clientY-g.pointerY,c())});let y=x=>{g&&(g=null,s.classList.remove("is-dragging"),s.hasPointerCapture(x.pointerId)&&s.releasePointerCapture(x.pointerId))};s.addEventListener("pointerup",y),s.addEventListener("pointercancel",y),s.addEventListener("wheel",x=>{x.preventDefault(),f(x.deltaY<0?1.1:1/1.1)},{passive:!1}),i.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),m()}),o.addEventListener("mousedown",x=>{x.target===o&&(x.preventDefault(),m())}),r.addEventListener("keydown",b),r.addEventListener("resize",d),a.append(i,s,h),o.append(a),n.body.append(o),(r.requestAnimationFrame??(x=>r.setTimeout(()=>x(Date.now()),16)))(()=>{d(),s.focus({preventScroll:!0})})}function f$(e){let t=document.createElement("button");t.type="button",t.className="gpdoc-preview-action-btn gpdoc-preview-view-btn",t.textContent="View Diagram",t.title="View diagram",t.setAttribute("contenteditable","false");let n=()=>{d$(e)};return t.addEventListener("mousedown",r=>{r.preventDefault(),r.stopPropagation()}),t.addEventListener("pointerup",r=>{r.preventDefault(),r.stopPropagation(),n()}),t.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation()}),t.addEventListener("keydown",r=>{r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),r.stopPropagation(),n())}),t}function p$(e){e.ownerDocument.querySelectorAll(".gpdoc-preview-download-group.is-open").forEach(t=>{t!==e&&(t.classList.remove("is-open"),t.querySelector(".gpdoc-preview-download-btn")?.setAttribute("aria-expanded","false"))})}function ih(e,t,n,r,o,a="original",i){let s=document.createElement("button");s.type="button",s.className="gpdoc-preview-download-option",s.textContent=e,i&&(s.title=i),s.setAttribute("contenteditable","false"),s.setAttribute("role","menuitem");let l=()=>{r==="svg"?l$(t,n):u$(t,n,a),o.classList.remove("is-open"),o.querySelector(".gpdoc-preview-download-btn")?.setAttribute("aria-expanded","false")};return s.addEventListener("mousedown",u=>{u.preventDefault(),u.stopPropagation()}),s.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),l()}),s.addEventListener("keydown",u=>{u.key!=="Enter"&&u.key!==" "||(u.preventDefault(),u.stopPropagation(),l())}),s}function h$(e,t){let n=document.createElement("span");n.className="gpdoc-preview-download-group",n.setAttribute("contenteditable","false");let r=document.createElement("button");r.type="button",r.className="gpdoc-preview-action-btn gpdoc-preview-download-btn",r.textContent="Download",r.title="Download diagram",r.setAttribute("contenteditable","false"),r.setAttribute("aria-haspopup","menu"),r.setAttribute("aria-expanded","false");let o=document.createElement("div");o.className="gpdoc-preview-download-menu",o.setAttribute("role","menu"),o.append(ih("SVG",t,e,"svg",n),ih("PNG Original",t,e,"png",n,"original","Export the diagram at the preview size."),ih("PNG Full Size",t,e,"png",n,"full","Export the diagram at its natural SVG size."),ih("PNG Large",t,e,"png",n,"large","Export the diagram at 2x its natural SVG size."));let a=()=>{p$(n);let i=n.classList.toggle("is-open");r.setAttribute("aria-expanded",i?"true":"false")};return r.addEventListener("mousedown",i=>{i.preventDefault(),i.stopPropagation()}),r.addEventListener("pointerup",i=>{i.preventDefault(),i.stopPropagation(),a()}),r.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation()}),r.addEventListener("keydown",i=>{i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),i.stopPropagation(),a())}),n.append(r,o),n}function m$(e,t,n){e.classList.toggle("gpdoc-controls-visible",t);let r=n??e.querySelector(".gpdoc-preview-controls-toggle");r&&(HA(r,t),r.title=t?"Hide preview controls":"Show preview edit controls",r.setAttribute("aria-label",t?"Hide preview controls":"Show preview edit controls"),r.setAttribute("aria-expanded",t?"true":"false")),e.querySelector(".gpdoc-preview-actions")?.setAttribute("aria-hidden",t?"false":"true"),t||e.querySelectorAll(".gpdoc-preview-download-group.is-open").forEach(o=>{o.classList.remove("is-open"),o.querySelector(".gpdoc-preview-download-btn")?.setAttribute("aria-expanded","false")})}function g$(e,t){let n=e.ownerDocument.createElementNS(Iy,"svg");n.setAttribute("class",t),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2"),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("aria-hidden","true");let r=e.ownerDocument.createElementNS(Iy,"path");r.setAttribute("d","M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z");let o=e.ownerDocument.createElementNS(Iy,"path");o.setAttribute("d","M12 20h9"),n.append(r,o),e.append(n)}function HA(e,t){if(e.replaceChildren(),e.dataset.controlState=t?"open":"closed",t){e.textContent="Hide";return}g$(e,"gpdoc-preview-controls-icon")}function UA(){let e=document.createElement("button");e.type="button",e.className="gpdoc-preview-controls-toggle",HA(e,!1),e.title="Show preview edit controls",e.setAttribute("contenteditable","false"),e.setAttribute("aria-label","Show preview edit controls"),e.setAttribute("aria-expanded","false");let t=()=>{let n=e.closest(".gpdoc-render-preview");n&&m$(n,!n.classList.contains("gpdoc-controls-visible"),e)};return e.addEventListener("mousedown",n=>{n.preventDefault(),n.stopPropagation()}),e.addEventListener("pointerup",n=>{n.preventDefault(),n.stopPropagation(),t()}),e.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation()}),e.addEventListener("keydown",n=>{n.key!=="Enter"&&n.key!==" "||(n.preventDefault(),n.stopPropagation(),t())}),e}function $A(e,t,n=[]){let r=document.createElement("div");return r.className="gpdoc-preview-actions",r.setAttribute("aria-hidden","true"),r.append(MA(t,e,"edit"),...n,MA("Remove",e,"remove")),r}function qA(e,t){let n=document.createElement("div");return n.className=e,n.setAttribute("contenteditable","false"),n.setAttribute("data-gpdoc-special-preview","true"),n.addEventListener("mousedown",r=>{r.preventDefault(),r.stopPropagation()}),n.addEventListener("dblclick",r=>{r.preventDefault(),r.stopPropagation(),Dy(t)}),n}function b$(e){let t=qA("gpdoc-render-preview gpdoc-mermaid-preview",e),n=document.createElement("div");n.className="gpdoc-preview-content";let r=n.attachShadow?n.attachShadow({mode:"open"}):n,o=p=>{r.innerHTML=`${F7}${p}`},a=PA(RA(t)),i=a?IA(e,a):"",s=i?pa.get(i)?.svg:void 0,l=!1;s?(l=!0,o(s),My(t,r)):o('<span class="gpdoc-preview-placeholder">Rendering diagram...</span>'),t.append(n,UA(),$A(e,"Edit diagram",[f$(r),h$(e,r)]));let u=window.mermaid,c=p=>{let h=p instanceof Error?p.message:typeof p=="string"?p:"";o(h?`<div class="gpdoc-preview-error">Mermaid render error: ${ha(h)}</div><pre><code>${ha(e.code)}</code></pre>`:`<pre><code>${ha(e.code)}</code></pre>`)},d=()=>{if(!t.isConnected)return;if(!u?.initialize||!u.render){c();return}let p="";try{p=H7(u,t)}catch(w){c(w);return}let h=w=>{if(!t.isConnected)return;o(w),My(t,r),(t.ownerDocument?.defaultView?.requestAnimationFrame??(S=>window.setTimeout(()=>S(Date.now()),16)))(()=>{t.isConnected&&My(t,r)})},m=IA(e,p),b=pa.get(m);if(b?.svg){h(b.svg);return}if(b?.promise){b.promise.then(h).catch(w=>{t.isConnected&&c(w)});return}let g=`gpdoc-mermaid-preview-${R7++}`,y=Promise.resolve().then(()=>u.render?.(g,e.code)).then(w=>{if(!w?.svg)throw new Error("Mermaid render returned no SVG");let x=pa.get(m);return x&&(x.svg=w.svg),w.svg}).catch(w=>{throw pa.delete(m),w});U7(m,{promise:y}),y.then(h).catch(w=>{t.isConnected&&c(w)})},f=(p=0)=>{(t.ownerDocument?.defaultView?.requestAnimationFrame??(m=>window.setTimeout(()=>m(Date.now()),16)))(()=>{if(!t.isConnected){p<P7&&f(p+1);return}d()})};return!l&&u?.initialize&&u.render&&typeof u.render=="function"?f():l||c(),t}function x$(e){let t=e.displayMode==="block",n=qA(`gpdoc-render-preview gpdoc-katex-preview ${t?"block":"inline"}`,e),r=document.createElement("div");r.className="gpdoc-preview-content",n.append(r,UA(),$A(e,"Edit formula"));try{window.katex?.renderToString?r.innerHTML=window.katex.renderToString(e.latex,{throwOnError:!1,displayMode:t}):r.innerHTML=`<code>${ha(e.latex)}</code>`}catch(o){let a=o instanceof Error?o.message:String(o);r.innerHTML=`<div class="gpdoc-preview-error">KaTeX render error: ${ha(a)}</div>`}return n}function y$(e){let t=document.createElement("span");t.className="gpdoc-inline-katex-preview",t.setAttribute("contenteditable","false"),t.setAttribute("data-gpdoc-special-preview","true"),t.setAttribute("data-gpdoc-inline-editable","true"),t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.title="Click to edit formula";let n=0,r=()=>{let o=Date.now();o-n<80||(n=o,Dy(e))};t.addEventListener("mousedown",o=>{o.preventDefault(),o.stopPropagation()}),t.addEventListener("pointerup",o=>{o.preventDefault(),o.stopPropagation(),r()}),t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),r()}),t.addEventListener("dblclick",o=>{o.preventDefault(),o.stopPropagation(),r()}),t.addEventListener("keydown",o=>{o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),o.stopPropagation(),r())});try{window.katex?.renderToString?t.innerHTML=window.katex.renderToString(e.latex,{throwOnError:!1,displayMode:!1}):t.innerHTML=`<code>${ha(e.latex)}</code>`}catch(o){let a=o instanceof Error?o.message:String(o);t.innerHTML=`<span class="gpdoc-preview-error">KaTeX render error: ${ha(a)}</span>`}return t}function w$(e,t){let n=document.createElement("span");n.className="gpdoc-inline-variable-preview",e.resolved||n.classList.add("gpdoc-inline-variable-preview-unresolved"),n.setAttribute("contenteditable","false"),n.setAttribute("data-gpdoc-special-preview","true"),n.setAttribute("data-gpdoc-variable-path",e.path),n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-label",`${e.resolved?"Resolved":"Unresolved"} variable ${e.path}. Open Data and Variables`),n.title="Click to edit data & variables",n.textContent=e.renderedValue;let r=0,o=()=>{let a=Date.now();a-r<80||(r=a,Z7(e,t))};return n.addEventListener("mousedown",a=>{a.preventDefault(),a.stopPropagation()}),n.addEventListener("pointerup",a=>{a.preventDefault(),a.stopPropagation(),o()}),n.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),o()}),n.addEventListener("keydown",a=>{a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),a.stopPropagation(),o())}),n}function VA(e){if(e.type.name!=="paragraph"||e.childCount===0)return null;let t="",n="",r=!1,o=!1;if(e.forEach(s=>{let l=s.textContent||"",u=l.trim(),c=s.marks.find(f=>f.type.name==="link"&&typeof f.attrs?.href=="string");if(!u){c&&(n+=l);return}if(!s.isText||!c){o=!0;return}let d=`${c.attrs.href||""}`.trim();if(!d){o=!0;return}if(!t)t=d;else if(t!==d){o=!0;return}n+=l,r=!0}),o||!r||!t)return Ay(e.textContent||"");let a=n.replace(/\s+/g," ").trim(),i=a.match(/^Embedded GPDoc:\s*(.+)$/i);return i?{href:t,title:i[1]?.trim()||"Embedded GPDoc",sourceMarkdown:`[${a}](${t})`,attributes:{}}:Ay(e.textContent||"")}function v$(e,t){let n=e[t];if(!n||n.node.type.name!=="paragraph")return null;let r="",o=null,a=t;for(let c=0;t+c<e.length;c+=1){let d=e[t+c];if(!d||d.node.type.name!=="paragraph"||d.parent!==n.parent||d.index!==n.index+c)break;if(r+=`${r?`
181
+ `:""}${d.node.textContent||""}`,o=BA(r),o){a=t+c;break}if(r.includes("-->")||c>=5)break}if(!o)return null;let i=[];for(let c=t;c<=a;c+=1){let d=e[c];i.push({from:d.pos,to:d.pos+d.node.nodeSize})}let s=a,l=e[a].pos+e[a].node.nodeSize,u=e[a+1];if(u&&u.node.type.name==="paragraph"&&u.parent===n.parent&&u.index===e[a].index+1){let c=VA(u.node);c&&c.href===o.href&&(i.push({from:u.pos,to:u.pos+u.node.nodeSize}),s=a+1,l=u.pos+u.node.nodeSize,(!o.title||o.title==="Embedded GPDoc")&&c.title&&(o.title=c.title),o.sourceMarkdown=`${o.sourceMarkdown}
182
+ ${c.sourceMarkdown}`)}return{embed:o,endIndex:s,anchorPos:l,hideRanges:i}}function DA(e,t){let n=document.createElement("div");n.className="gpdoc-embed-preview-host",n.setAttribute("contenteditable","false"),n.setAttribute("data-gpdoc-special-preview","true"),n.setAttribute("data-gpdoc-embed-cue","EMB"),n.setAttribute("title","Embedded file preview");let r=document.createElement("div");r.className="gpdoc-render-preview gpdoc-embed-preview-loading",r.innerHTML='<span class="gpdoc-preview-placeholder">Loading embedded content...</span>',n.appendChild(r);let o=t.renderEmbedPreview;return typeof o!="function"?(r.innerHTML='<div class="gpdoc-preview-error">Embed preview unavailable</div>',n):(Promise.resolve().then(()=>o(r,{target:e.href,title:e.title,type:e.type,attributes:e.attributes,frame:e.attributes?.frame,sourceMarkdown:e.sourceMarkdown})).catch(a=>{if(!n.isConnected)return;let i=a instanceof Error?a.message:String(a);r.innerHTML=`<div class="gpdoc-preview-error">Embedded content unavailable: ${ha(i)}</div>`}),n)}function Hs(e,t,n){let r={key:n};return ye.widget(e,t,{side:1,ignoreSelection:!0,stopEvent:()=>!0,...r})}function S$(e){let t=[];if(!e||!e.includes("$"))return t;for(let n=0;n<e.length;n+=1){if(e[n]!=="$"||n>0&&e[n-1]==="\\"||n+1<e.length&&e[n+1]==="$")continue;let r=-1;for(let i=n+1;i<e.length;i+=1){let s=e[i];if(s===`
183
+ `||s==="\r")break;if(s==="$"&&e[i-1]!=="\\"){if(i+1<e.length&&e[i+1]==="$")break;r=i+1;break}}if(r===-1)continue;let o=e.slice(n,r),a=o.slice(1,-1).trim();a&&t.push({start:n,end:r,latex:a,sourceMarkdown:o}),n=r-1}return t}function k$(e){let t=[];if(!e||!e.includes("{{"))return t;let n=/\{\{\s*([^}]+?)\s*\}\}/g,r=n.exec(e);for(;r;){let o=r[0],a=(r[1]||"").trim();a&&t.push({start:r.index,end:r.index+o.length,path:a,sourceMarkdown:o}),r=n.exec(e)}return t}function C$(e,t){let n=[],r=0;return e.forEach((o,a)=>{let s=(o.textContent||"").length;if(s<=0)return;let l=t+1+a;o.isText&&n.push({start:r,end:r+s,from:l,to:l+s}),r+=s}),n}function sh(e,t){if(!e.length||t<0)return null;for(let n of e){if(t<n.start)break;if(t>=n.start&&t<=n.end){let r=Math.min(t-n.start,n.to-n.from);return n.from+r}}return null}function NA(e,t){let n=[],r=[],o=new Map,a=new Map,i=new Map,s=new Map,l=G7(t.sourceMarkdown||"");e.descendants((u,c,d,f)=>((u.type.name==="paragraph"||u.type.name==="codeBlock"||u.isTextblock)&&r.push({node:u,pos:c,parent:d??null,index:typeof f=="number"?f:0}),!0));for(let u=0;u<r.length;u+=1){let c=r[u],{node:d,pos:f}=c;if(d.type.name==="codeBlock"){if(String(d.attrs?.language||"").toLowerCase()==="mermaid"){let g=d.textContent.trim();if(g){n.push(ye.node(f,f+d.nodeSize,{class:"gpdoc-mermaid-source-hidden"},{key:`mermaid-source-${f}`}));let y=`\`\`\`mermaid
184
+ ${g}
185
+ \`\`\``,w=o.get(y)??0;o.set(y,w+1);let x=da(y),S={kind:"diagram",code:g,sourceMarkdown:y,occurrence:w,sourceFrom:f,sourceTo:f+d.nodeSize};n.push(Hs(f+d.nodeSize,()=>b$(S),`mermaid-${f}-${w}-${x}`))}}continue}if(d.type.name==="paragraph"){let b=d.textContent.trim();if(b){let g=null,y="inline",w="",x=f+d.nodeSize,S=[];if(b==="$$"&&u+2<r.length){let v=r[u+1],C=r[u+2];if(v?.parent===c.parent&&C?.parent===c.parent&&v?.index===c.index+1&&C?.index===c.index+2&&v?.node.type.name==="paragraph"&&C?.node.type.name==="paragraph"&&C.node.textContent.trim()==="$$"){let E=v.node.textContent.trim();E&&(g=ah(E,"block"),y="block",w=`$$
186
+ ${g}
187
+ $$`,x=C.pos+C.node.nodeSize,S.push({from:f,to:f+d.nodeSize},{from:v.pos,to:v.pos+v.node.nodeSize},{from:C.pos,to:C.pos+C.node.nodeSize}),u+=2)}}if(!g){let v=b.match(/^\$\$([\s\S]+)\$\$$/);v?.[1]&&(g=ah(v[1],"block"),y="block",w=b,S.push({from:f,to:f+d.nodeSize}))}if(!g){let v=b.match(/^\$([^$]+)\$$/);v?.[1]&&(g=ah(v[1],"inline"),y="inline",w=b,S.push({from:f,to:f+d.nodeSize}))}if(g){S.forEach(T=>{n.push(ye.node(T.from,T.to,{class:"gpdoc-formula-source-hidden"},{key:`formula-source-${T.from}-${T.to}`}))}),w||(w=y==="block"?`$$${g}$$`:`$${g}$`);let v=da(w),C=a.get(w)??0;a.set(w,C+1);let E={kind:"formula",latex:g,displayMode:y,sourceMarkdown:w,occurrence:C,sourceFrom:S.length?Math.min(...S.map(T=>T.from)):void 0,sourceTo:S.length?Math.max(...S.map(T=>T.to)):void 0};n.push(Hs(x,()=>x$(E),`formula-${x}-${C}-${v}`));continue}}if(typeof t.renderEmbedPreview=="function"){let g=v$(r,u);if(g){let{embed:w,endIndex:x,anchorPos:S,hideRanges:v}=g,C=s.get(w.sourceMarkdown)??0;s.set(w.sourceMarkdown,C+1);let E=da(w.sourceMarkdown);v.forEach(T=>{n.push(ye.node(T.from,T.to,{class:"gpdoc-embed-source-hidden"},{key:`embed-source-${T.from}-${T.to}-${C}`}))}),n.push(Hs(S,()=>DA(w,t),`embed-comment-${S}-${C}-${E}`)),u=x;continue}let y=VA(d);if(y){let w=K7(l,y)||y,x=s.get(w.sourceMarkdown)??0;s.set(w.sourceMarkdown,x+1);let S=da(w.sourceMarkdown);n.push(ye.node(f,f+d.nodeSize,{class:"gpdoc-embed-source-hidden"},{key:`embed-source-${f}-${x}`})),n.push(Hs(f+d.nodeSize,()=>DA(w,t),`embed-${f}-${x}-${S}`));continue}}}if(!d.isTextblock)continue;let p=C$(d,f);if(!p.length)continue;let h=S$(d.textContent);for(let b of h){let g=sh(p,b.start),y=sh(p,b.end);if(g===null||y===null||y<=g)continue;let w=a.get(b.sourceMarkdown)??0;a.set(b.sourceMarkdown,w+1);let x=da(b.sourceMarkdown),S={kind:"formula",latex:ah(b.latex,"inline"),displayMode:"inline",sourceMarkdown:b.sourceMarkdown,occurrence:w,sourceFrom:g,sourceTo:y};n.push(ye.inline(g,y,{class:"gpdoc-formula-inline-source-hidden"},{key:`formula-inline-source-${g}-${y}-${w}`})),n.push(Hs(g,()=>y$(S),`formula-inline-${g}-${w}-${x}`))}let m=k$(d.textContent).filter(b=>!h.some(g=>X7(b,g)));for(let b of m){let g=sh(p,b.start),y=sh(p,b.end);if(g===null||y===null||y<=g)continue;let w=Ey(j7(t),b.path),x=w!==void 0,S=x?Ly(w):b.sourceMarkdown,v=i.get(b.sourceMarkdown)??0;i.set(b.sourceMarkdown,v+1);let C=da(b.sourceMarkdown),E={kind:"variable",path:b.path,sourceMarkdown:b.sourceMarkdown,resolved:x,renderedValue:S};n.push(ye.inline(g,y,{class:"gpdoc-variable-inline-source-hidden"},{key:`variable-inline-source-${g}-${y}-${v}`})),n.push(Hs(g,()=>w$(E,t),`variable-inline-${g}-${v}-${C}`))}}return be.create(e,n)}function Ry(e,t){return!e||e.isDestroyed?!1:(e.view.dispatch(e.state.tr.setMeta(Ty,{previewContext:t})),!0)}var WA=Ce.create({name:"specialPreviews",addProseMirrorPlugins(){return[new ie({key:Ty,state:{init(e,{doc:t}){let n=_y();return{previewContext:n,decorations:NA(t,n)}},apply(e,t){let n=t?.previewContext||_y(),r=e.getMeta(Ty),o=!!r&&Object.prototype.hasOwnProperty.call(r,"previewContext");return o&&(n=_y(r.previewContext)),e.docChanged||o?{previewContext:n,decorations:NA(e.doc,n)}:t}},props:{decorations(e){return this.getState(e)?.decorations??be.empty}}})]}});var En=new de("gpdocSearch");function GA(e){return!!e&&/[A-Za-z0-9_]/.test(e)}function E$(e,t,n){return!GA(e[t-1])&&!GA(e[n])}function L$(e,t,n){if(!t)return[];let r=[],o=n.caseSensitive?t:t.toLowerCase();return o&&e.descendants((a,i)=>{if(!a.isText||!a.text)return!0;let s=a.text,l=n.caseSensitive?s:s.toLowerCase(),u=l.indexOf(o);for(;u!==-1;){let c=u+o.length;(!n.wholeWord||E$(s,u,c))&&r.push({from:i+u,to:i+c}),u=l.indexOf(o,u+Math.max(o.length,1))}return!0}),r}function jA(e,t){return t<=0?-1:Number.isInteger(e)?e<0?t-1:e>=t?0:e:0}function I$(e,t,n){return t.length?be.create(e,t.map((r,o)=>ye.inline(r.from,r.to,{class:o===n?"gpdoc-search-match gpdoc-search-match-current":"gpdoc-search-match","data-gpdoc-search-index":String(o)},{key:`gpdoc-search-${o}-${r.from}-${r.to}`}))):be.empty}function KA(e,t,n){let r=typeof t.query=="string"?t.query:n?.query||"",o=typeof t.caseSensitive=="boolean"?t.caseSensitive:n?.caseSensitive||!1,a=typeof t.wholeWord=="boolean"?t.wholeWord:n?.wholeWord||!1,i=L$(e,r,{caseSensitive:o,wholeWord:a}),s=typeof t.currentIndex=="number"?t.currentIndex:n?.currentIndex??0,l=jA(s,i.length);return{query:r,caseSensitive:o,wholeWord:a,currentIndex:l,matches:i,decorations:I$(e,i,l)}}function pr(e){return{query:e?.query||"",caseSensitive:e?.caseSensitive||!1,wholeWord:e?.wholeWord||!1,count:e?.matches.length||0,currentIndex:e?.currentIndex??-1}}function Us(e){return!e||e.isDestroyed?pr():pr(En.getState(e.state))}function Py(e,t){return!e||e.isDestroyed?pr():(e.view.dispatch(e.state.tr.setMeta(En,t)),Us(e))}function XA(e){return Py(e,{query:"",currentIndex:-1})}function Vu(e,t){if(!e||e.isDestroyed)return pr();let n=En.getState(e.state);if(!n||!n.matches.length)return pr(n);let r=jA(t,n.matches.length),o=n.matches[r],a=e.state.tr.setMeta(En,{currentIndex:r}).setSelection($.create(e.state.doc,o.from,o.to)).scrollIntoView();return e.view.dispatch(a),e.view.focus(),Us(e)}function YA(e,t=1){if(!e||e.isDestroyed)return pr();let n=En.getState(e.state);if(!n||!n.matches.length)return pr(n);let r=n.currentIndex<0?0:n.currentIndex+(t===-1?-1:1);return Vu(e,r)}function ZA(e,t){if(!e||e.isDestroyed)return pr();let n=En.getState(e.state);if(!n||!n.matches.length||n.currentIndex<0)return pr(n);let r=n.matches[n.currentIndex];e.view.dispatch(e.state.tr.insertText(t,r.from,r.to).setMeta(En,{currentIndex:n.currentIndex}));let o=En.getState(e.state);return o?.matches.length?Vu(e,Math.min(n.currentIndex,o.matches.length-1)):Us(e)}function JA(e,t){if(!e||e.isDestroyed)return pr();let n=En.getState(e.state);if(!n||!n.matches.length)return pr(n);let r=e.state.tr;return[...n.matches].reverse().forEach(a=>{r=r.insertText(t,a.from,a.to)}),r=r.setMeta(En,{currentIndex:0}),e.view.dispatch(r),En.getState(e.state)?.matches.length?Vu(e,0):Us(e)}var QA=Ce.create({name:"gpdocSearch",addProseMirrorPlugins(){return[new ie({key:En,state:{init(e,{doc:t}){return KA(t,{})},apply(e,t){let n=e.getMeta(En);return e.docChanged||n?KA(e.doc,n||{},t):t}},props:{decorations(e){return this.getState(e)?.decorations??be.empty}}})]}});function M$(e){return!e||e.startsWith("#")||e.startsWith("/")||e.startsWith("?")?!1:!/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function _$(e){return/^(?:\/Users\/|\/private\/|\/var\/|\/Volumes\/|\/Library\/)/.test(e)}function T$(e){try{return`file://${encodeURI(decodeURI(e)).replace(/#/g,"%23").replace(/\?/g,"%3F")}`}catch{return`file://${encodeURI(e).replace(/#/g,"%23").replace(/\?/g,"%3F")}`}}function A$(e){if(!e)return e;let n=(typeof window<"u"&&window.gpdocLocalImageRenderSources&&typeof window.gpdocLocalImageRenderSources=="object"?window.gpdocLocalImageRenderSources:null)?.[e];if(typeof n=="string"&&n.startsWith("data:image/"))return n;if(_$(e))return T$(e);if(!M$(e))return e;let r=typeof window<"u"&&typeof window.gpdocDocumentBaseHref=="string"?window.gpdocDocumentBaseHref:"";if(!r)return e;try{return new URL(e,r).toString()}catch{return e}}var eD=J.create({name:"image",inline:!0,group:"inline",draggable:!0,atom:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:e}){let t=typeof e?.src=="string"?e.src:null,n=A$(t);return["img",n&&n!==t?se(e,{src:n,"data-gpdoc-original-src":t}):se(e)]},addStorage(){return{markdown:{serialize:Cn.nodes.image,parse:{}}}}});var uh=new de("gpdoc-live-collaboration-awareness"),tD=["#2563eb","#059669","#7c3aed","#d97706","#dc2626","#0891b2","#ea580c","#65a30d"];function By(e){return e.userId||e.userEmail||"anonymous"}function rD(e){return e.userName||e.userEmail?.split("@")[0]||By(e)}function D$(e){let t=e.split("").reduce((n,r)=>n+r.charCodeAt(0),0);return tD[t%tD.length]}function Ln(e,t){let n=Math.max(0,e.content.size);return Math.max(0,Math.min(n,t))}function N$(e,t,n){if(!t||!n)return null;let r=e.textBetween(0,e.content.size,`
188
+ `).split(`
189
+ `),o=Math.max(0,Math.min(r.length-1,t-1)),a=0;for(let i=0;i<o;i+=1)a+=r[i].length+1;return a+Math.max(0,Math.min(r[o].length,n-1))}function O$(e,t){let n=0,r=e.content.size,o=!1,a=!1;return e.descendants((i,s)=>{if(o)return!1;if(i.isTextblock){if(a){if(t<=n)return r=s,o=!0,!1;n+=1}a=!0}if(i.isText){let l=i.text?.length||0,u=n+l;if(t<=u)return r=s+Math.max(0,t-n),o=!0,!1;n=u}return!0}),Ln(e,r)}function ch(e,t,n){let r=H$(e,t,n);if(r!==null)return r;let o=e.doc,a=N$(o,t,n);return a===null?null:O$(o,a)}function R$(e,t){let n=[],r=1;return e.forEach((o,a)=>{n.push({visualLineNumber:r,node:o,from:a,to:a+o.nodeSize,row:t.get(r)}),r+=1}),n}function P$(e,t){let n=null;for(let r of e){let o=r.row?.sourceFrom,a=r.row?.sourceTo;if(Number.isInteger(o)&&Number.isInteger(a)&&o&&a){if(t>=o&&t<=a)return r;if(t>a){n=r;continue}if(t<o)return n||r}if(r.visualLineNumber===t)return r}return n}function B$(e,t){let n=[];return e.descendants((r,o)=>(o<t.from||o>=t.to||!r.isTextblock||n.push({node:r,from:Ln(e,o+1),text:r.textBetween(0,r.content.size,`
190
+ `),textBlockIndex:n.length,topNode:t.node}),!0)),n}function F$(e,t,n){if(t.length<=1)return 0;let r=e.row?.sourceFrom||n,o=Math.max(0,n-r);return e.node.type.name==="codeBlock"&&Number.isInteger(e.row?.sourceTo)&&(e.row?.sourceTo||0)>r&&(o=Math.max(0,o-1)),Math.max(0,Math.min(t.length-1,o))}function z$(e){let t=e.topNode.type.name;if(e.node.type.name==="heading"){let r=Number(e.node.attrs?.level||1);return Math.max(1,Math.min(6,r))+1}if(t==="orderedList"){let r=Number(e.topNode.attrs?.start||e.topNode.attrs?.order||1);return String(r+e.textBlockIndex).length+2}return t==="bulletList"?2:t==="taskList"?6:t==="blockquote"?2:0}function H$(e,t,n){if(!t||!n)return null;let r=CA(e);if(!r.size)return null;let o=R$(e.doc,r),a=P$(o,t);if(!a)return null;let i=B$(e.doc,a);if(!i.length)return Ln(e.doc,a.from+1);let s=i[F$(a,i,t)]||i[0],l=Math.max(0,n-1),u=Math.max(0,l-z$(s));return Ln(e.doc,s.from+Math.min(u,s.text.length))}function nD(e,t){let n=t.cursor||{},r=n.position||n||{},o=typeof r.gpdocPosition=="number"?r.gpdocPosition:typeof r.proseMirrorPosition=="number"?r.proseMirrorPosition:typeof r.pos=="number"?r.pos:typeof r.head=="number"?r.head:typeof r.from=="number"?r.from:typeof r.to=="number"?r.to:null;if(n.editor==="gpdoc"&&o!==null)return Ln(e.doc,o);let a=ch(e,r.lineNumber||r.line,r.column);return a!==null?a:o===null?null:Ln(e.doc,o)}function U$(e,t){let n=t.selection;if(!n){let h=nD(e,t);return h===null?null:{from:h,to:h,head:h,empty:!0}}let r=typeof n.gpdocFrom=="number"?n.gpdocFrom:typeof n.proseMirrorFrom=="number"?n.proseMirrorFrom:typeof n.from=="number"?n.from:typeof n.anchor=="number"?n.anchor:null,o=typeof n.gpdocTo=="number"?n.gpdocTo:typeof n.proseMirrorTo=="number"?n.proseMirrorTo:typeof n.to=="number"?n.to:typeof n.head=="number"?n.head:null,a=typeof n.gpdocHead=="number"?n.gpdocHead:typeof n.proseMirrorHead=="number"?n.proseMirrorHead:typeof n.head=="number"?n.head:o;if(t.cursor?.editor==="gpdoc"&&r!==null&&o!==null){let h=Ln(e.doc,Math.min(r,o)),m=Ln(e.doc,Math.max(r,o));return{from:h,to:m,head:Ln(e.doc,a??o),empty:n.empty??h===m}}let i=ch(e,n.startLineNumber,n.startColumn),s=ch(e,n.endLineNumber,n.endColumn),l=i??r,u=s??o;if(l===null||u===null){let h=nD(e,t);return h===null?null:{from:h,to:h,head:h,empty:!0}}let c=Ln(e.doc,Math.min(l,u)),d=Ln(e.doc,Math.max(l,u)),f=ch(e,n.endLineNumber,n.endColumn),p=f!==null?f:a!==null?Ln(e.doc,a):d;return{from:c,to:d,head:p,empty:n.empty??c===d}}function $$(e,t){let n=document.createElement("span");n.className="gpdoc-live-cursor",n.style.setProperty("--gpdoc-live-color",t),n.setAttribute("data-user-id",By(e)),n.setAttribute("aria-hidden","true");let r=document.createElement("span");return r.className="gpdoc-live-cursor-label",r.textContent=rD(e),n.appendChild(r),n}function q$(e,t){let n=[];return t.forEach(r=>{let o=By(r),a=U$(e,r);if(!a)return;let i=D$(o);!a.empty&&a.to>a.from&&n.push(ye.inline(a.from,a.to,{class:"gpdoc-live-selection",style:`background-color: ${i}2e; box-shadow: inset 0 -2px 0 ${i};`,title:`${rD(r)} selected text`})),n.push(ye.widget(Ln(e.doc,a.head),()=>$$(r,i),{key:`gpdoc-live-cursor-${o}`,side:-1}))}),be.create(e.doc,n)}var oD=Ce.create({name:"liveCollaborationAwareness",addProseMirrorPlugins(){return[new ie({key:uh,state:{init:()=>({collaborators:[]}),apply(e,t){let n=e.getMeta(uh);return n?.type==="set-collaborators"?{collaborators:Array.isArray(n.collaborators)?n.collaborators:[]}:t}},props:{decorations(e){let t=uh.getState(e);return q$(e,t?.collaborators||[])}}})]}});function Fy(e,t=[]){return!e||e.isDestroyed||!e.view||typeof e.view.dispatch!="function"?!1:(e.view.dispatch(e.state.tr.setMeta(uh,{type:"set-collaborators",collaborators:t})),!0)}var hh=new de("gpdoc-inline-suggestions");function dh(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return Math.floor(e)}function V$(e){return e==="added"||e==="inserted"?"added":e==="deleted"||e==="removed"?"deleted":e==="modified"||e==="replaced"?"modified":null}function iD(e){if(Array.isArray(e))return e.flatMap((r,o)=>aD(r,String(o)));if(!e||typeof e!="object")return[];let n=e.items;return!n||typeof n!="object"||Array.isArray(n)?[]:Object.entries(n).flatMap(([r,o])=>aD(o,r))}function aD(e,t){if(!e||typeof e!="object")return[];let n=e;if(n.applied===!0||n.accepted===!0||n.rejected===!0)return[];let r=V$(n.changeType??n.type),o=dh(n.lineNumber??n.line),a=dh(n.logicalBlockNumber??n.blockNumber)??o,i=typeof n.id=="string"&&n.id.trim()?n.id:t;if(!r||!o||!a||!i)return[];let s=dh(n.from),l=dh(n.to);return[{id:i,lineNumber:o,logicalBlockNumber:a,oldContent:typeof n.oldContent=="string"?n.oldContent:"",newContent:typeof n.newContent=="string"?n.newContent:"",changeType:r,...s!==void 0?{from:s}:{},...l!==void 0?{to:l}:{}}]}function W$(e){let t=[];return e.forEach((n,r)=>{t.push({node:n,from:r+1,to:r+n.nodeSize-1,text:n.textContent})}),t}function sD(e,t){return{gpdocSuggestion:{id:e.id,side:t,changeType:e.changeType}}}function fh(e,t,n,r){return ye.inline(e,t,{class:`gpdoc-suggestion gpdoc-suggestion-${r} gpdoc-suggestion-${n.changeType}`,role:"note","aria-label":`${r==="old"?"Original":"Suggested"} text`,"data-gpdoc-suggestion-id":n.id},sD(n,r))}function ph(e,t,n,r,o){return ye.widget(e,()=>{let a=document.createElement("span");return a.className=`gpdoc-suggestion gpdoc-suggestion-widget gpdoc-suggestion-${r} gpdoc-suggestion-${n.changeType}`,a.dataset.gpdocSuggestionId=n.id,a.setAttribute("contenteditable","false"),a.setAttribute("role","note"),a.setAttribute("aria-label",`${r==="old"?"Original":"Suggested"} text: ${t}`),a.textContent=t,a},{...sD(n,r),key:`${n.id}:${r}:${o}`,side:r==="old"?-1:1})}function G$(e,t,n){if(n.from!==void 0&&n.to!==void 0&&n.from>=0&&n.to<=e.content.size&&n.from<n.to){let o=e.textBetween(n.from,n.to,`
191
+ `);if(o===n.oldContent||o===n.newContent)return{node:e,from:n.from,to:n.to,text:o}}let r=t[n.logicalBlockNumber-1]||t[n.lineNumber-1];return!r||r.text!==n.oldContent&&r.text!==n.newContent?null:r}function zy(e,t){let n=[],r=[],o=W$(e);return t.forEach(a=>{let i=G$(e,o,a);if(!i){let u=a.logicalBlockNumber-1,c=u<o.length?o[Math.max(0,u)]?.from:u===o.length?e.content.size:void 0;if(c!==void 0&&a.changeType==="added"&&a.oldContent===""&&a.newContent){n.push(ph(c,a.newContent,a,"new","insert"));return}if(c!==void 0&&a.changeType==="deleted"&&a.newContent===""&&a.oldContent&&!o.some(d=>d.text===a.oldContent)){n.push(ph(c,a.oldContent,a,"old","delete"));return}r.push(a.id);return}let s=i.text===a.oldContent,l=i.text===a.newContent;if(a.changeType==="modified"){s?(n.push(fh(i.from,i.to,a,"old")),n.push(ph(i.to,a.newContent,a,"new","after"))):l&&(n.push(ph(i.from,a.oldContent,a,"old","before")),n.push(fh(i.from,i.to,a,"new")));return}if(a.changeType==="added"&&l){n.push(fh(i.from,i.to,a,"new"));return}if(a.changeType==="deleted"&&s){n.push(fh(i.from,i.to,a,"old"));return}r.push(a.id)}),{decorations:be.create(e,n),unmappedSuggestionIds:r}}var lD=Ce.create({name:"gpdocInlineSuggestions",addProseMirrorPlugins(){return[new ie({key:hh,state:{init:(e,t)=>({suggestions:[],...zy(t.doc,[])}),apply:(e,t)=>{let n=e.getMeta(hh),r=n??t.suggestions;return!n&&!e.docChanged?t:{suggestions:r,...zy(e.doc,r)}}},props:{decorations:e=>hh.getState(e)?.decorations||null}})]}});function Hy(e,t){if(!e||e.isDestroyed)return!1;let n=e.state?.tr;return!n||typeof n.setMeta!="function"||typeof e.view?.dispatch!="function"?!1:(e.view.dispatch(n.setMeta(hh,iD(t))),!0)}var Uy='<div style="page-break-after: always;"></div>',K$=/<div\b(?=[^>]*(?:data-page-break\s*=\s*["']?true["']?|(?:style\s*=\s*["'][^"']*(?:page-break-after\s*:\s*always|break-after\s*:\s*page)[^"']*["'])))[^>]*>\s*<\/div>/gi,j$=/(^|(?:\r?\n))[\t ]*---[\t ]*(?:\r?\n){2,}(?=<div style="page-break-after: always;"><\/div>)/g,X$=/\s+/g;function uD(e){return e.replace(X$,"").toLowerCase()}function vo(e){return!e||typeof e!="string"?e:e.replace(K$,Uy).replace(j$,"$1")}function cD(e){let t=vo(e).trim();return uD(t)===uD(Uy)}function Y$(e){if(e.tagName.toLowerCase()!=="div")return!1;if(e.getAttribute("data-page-break")==="true")return!0;let t=e.getAttribute("style")||"";return/page-break-after\s*:\s*always/i.test(t)||/break-after\s*:\s*page/i.test(t)}var dD=J.create({name:"pageBreak",group:"block",atom:!0,selectable:!0,isolating:!0,parseHTML(){return[{tag:"div",getAttrs:e=>e instanceof Element&&Y$(e)?{}:!1}]},renderHTML({HTMLAttributes:e}){return["div",se(e,{"data-page-break":"true",class:"gpdoc-page-break",style:"break-after: page; page-break-after: always;"})]},addStorage(){return{markdown:{serialize:(e,t)=>{e.write(Uy),e.closeBlock(t)},parse:{}}}}});var Z$=new Set(["codeBlock","table","horizontalRule","pageBreak"]),pD=/^\$[^$]+\$$/,hD=/^\$\$[\s\S]+\$\$$/,J$=/^<gpdoc\b[\s\S]*?(?:\/>|>\s*<\/gpdoc>)$/i;function $y(e,t){let n=0;for(let r=t-1;r>=0&&e[r]==="\\";r-=1)n+=1;return n%2===1}function Q$(e){let t=[],n=String(e||"").split(`
192
+ `),r=0,o=null;for(let a of n)/^\s*```/.test(a)&&(o===null?o=r:(t.push({start:o,end:r+a.length}),o=null)),r+=a.length+1;return o!==null&&t.push({start:o,end:e.length}),t}function fD(e,t){return t.some(n=>e>=n.start&&e<n.end)}function eq(e){let t=[],n=String(e||""),r=Q$(n);for(let o=0;o<n.length;o+=1){if(n[o]!=="$"||$y(n,o)||fD(o,r))continue;if(n[o+1]==="$"){let i=-1;for(let s=o+2;s<n.length-1;s+=1)if(!fD(s,r)&&n[s]==="$"&&n[s+1]==="$"&&!$y(n,s)){i=s;break}i!==-1&&(t.push({displayMode:"block",end:i+2,sourceMarkdown:n.slice(o,i+2),start:o}),o=i+1);continue}let a=-1;for(let i=o+1;i<n.length;i+=1){let s=n[i];if(s===`
193
+ `||s==="\r")break;if(s==="$"&&!$y(n,i)&&n[i+1]!=="$"){a=i;break}}a!==-1&&(t.push({displayMode:"inline",end:a+1,sourceMarkdown:n.slice(o,a+1),start:o}),o=a)}return t}function tq(e){let t=[];if(!e||!e.includes("$"))return t;for(let n=0;n<e.length;n+=1){if(e[n]!=="$"||n>0&&e[n-1]==="\\"||n+1<e.length&&e[n+1]==="$")continue;let r=-1;for(let o=n+1;o<e.length;o+=1){let a=e[o];if(a===`
194
+ `||a==="\r")break;if(a==="$"&&e[o-1]!=="\\"){if(o+1<e.length&&e[o+1]==="$")break;r=o+1;break}}r!==-1&&(t.push({sourceMarkdown:e.slice(n,r)}),n=r-1)}return t}function qy(e){return String(e?.textContent||"")}function Wu(e){return qy(e).trim()}function nq(e){if(!e||e.type?.name!=="paragraph")return!1;let t=Wu(e);return!!(t&&(hD.test(t)||pD.test(t)))}function rq(e){if(!e||e.type?.name!=="paragraph")return!1;let t=qy(e).replace(/\s+/g," ").trim();if(!/^Embedded GPDoc:\s+.+$/i.test(t))return!1;let n="",r=!1,o=!1;return e.forEach(a=>{if(o)return;let s=String(a.textContent||"").trim(),l=a.marks?.find(c=>{let d=`${c.attrs?.href||""}`.trim();return c.type?.name==="link"&&d.length>0});if(!s){l&&(r=!0);return}if(!a.isText||!l){o=!0;return}let u=`${l.attrs?.href||""}`.trim();if(!u){o=!0;return}if(!n)n=u;else if(n!==u){o=!0;return}r=!0}),!o&&r&&n.length>0}function oq(e){let t=e?.content?.content;if(Array.isArray(t))return t;let n=[];return e?.forEach?.(r=>{n.push(r)}),n}function aq(e){return!!e?.isText&&Wu(e).length===0}function mD(e){if(!e||e.type?.name!=="paragraph"||e.childCount===0)return!1;let t=oq(e);if(t.length===0)return!1;let n=!1,r=!1,o=a=>{if(a.type?.name==="image"){n=!0;return}aq(a)||(r=!0)};return t.forEach(o),n&&!r}function iq(e){if(!e||e.type?.name!=="paragraph")return!1;let t=qy(e).replace(/\s+/g," ").trim();return J$.test(t)}function sq(e){return nq(e)||rq(e)||mD(e)||iq(e)}function gD(e){if(!e.length)return 0;let t=e[e.length-1];if(cq(t)||sq(t))return 1;if(e.length<3)return 0;let n=e[e.length-3],r=e[e.length-2],o=e[e.length-1];return n?.type?.name==="paragraph"&&r?.type?.name==="paragraph"&&o?.type?.name==="paragraph"&&Wu(n)==="$$"&&Wu(o)==="$$"&&Wu(r).length>0?3:0}function lq(e){let t=[],n=[];e.descendants((r,o,a,i)=>((r.type.name==="paragraph"||r.isTextblock)&&n.push({index:typeof i=="number"?i:0,node:r,parent:a??null}),!0));for(let r=0;r<n.length;r+=1){let o=n[r],{node:a}=o;if(a.type.name==="codeBlock")continue;let i=a.textContent||"",s=i.trim();if(s){if(a.type.name==="paragraph"&&s==="$$"&&r+2<n.length){let l=n[r+1],u=n[r+2];if(l?.parent===o.parent&&u?.parent===o.parent&&l?.index===o.index+1&&u?.index===o.index+2&&l?.node.type.name==="paragraph"&&u?.node.type.name==="paragraph"&&u.node.textContent.trim()==="$$"){let c=l.node.textContent.trim();if(c){t.push({displayMode:"block",sourceMarkdown:`$$
195
+ ${c}
196
+ $$`}),r+=2;continue}}}if(hD.test(s)){t.push({displayMode:"block",sourceMarkdown:s});continue}if(pD.test(s)){t.push({displayMode:"inline",sourceMarkdown:s});continue}tq(i).forEach(l=>{t.push({displayMode:"inline",sourceMarkdown:l.sourceMarkdown})})}}return t}function uq(e,t){if(!e||!t)return e;let n=eq(e);if(!n.length)return e;let r=lq(t);if(!r.length)return e;let o=0,a="",i=0;return n.forEach(s=>{let l=r[i];a+=e.slice(o,s.start),l&&l.displayMode===s.displayMode?(a+=l.sourceMarkdown,i+=1):a+=s.sourceMarkdown,o=s.end}),a+=e.slice(o),a}function bD(e){let t=e?.content?.content;return Array.isArray(t)?t:[]}function xD(e){return!!e&&e.type?.name==="paragraph"&&!mD(e)&&(e.textContent||"").trim().length===0}function cq(e){return!!e&&Z$.has(e.type?.name||"")}function dq(e){let t=bD(e);if(t.length<2)return!1;let n=t[t.length-1];return xD(n)&&gD(t.slice(0,-1))>0}function fq(e,t,n){if(!dq(t))return{doc:t,markdown:n};try{let r=t.toJSON();if(!Array.isArray(r.content)||r.content.length<2)return{doc:t,markdown:n};r.content=r.content.slice(0,-1);let o=e.state.schema.nodeFromJSON(r),a=e.storage?.markdown?.serializer,i=typeof a?.serialize=="function"?a.serialize(o):n.replace(/(?:\r?\n){2,}$/,`
197
+ `);return{doc:o,markdown:i}}catch{return{doc:t,markdown:n.replace(/(?:\r?\n){2,}$/,`
198
+ `)}}}function yD(e){if(!e||e.isDestroyed)return!1;let t=e.state?.doc,n=e.state?.schema?.nodes?.paragraph,r=t?bD(t):[],o=r[r.length-1];if(!t||!n||!o||xD(o)||gD(r)===0)return!1;try{let a=n.createAndFill?.()||n.create(),i=e.state.tr.insert(t.content.size,a);return e.view.dispatch(i),!0}catch{return!1}}function Vy(e){let t=e?.storage?.markdown?.getMarkdown?.()??"",n=e?.state?.doc;if(!e||!t||!n)return t;let r=fq(e,n,t);return uq(r.markdown,r.doc)}var $s=Object.freeze({rowStriping:!1,alignment:"left",tableBorder:!1,cellBorders:!1,boldHeadings:!0,customCss:"",footer:!1}),pq=new Set(["left","center","right"]),CD="gpdoc-table:",ED="⁣⁣⁣",LD="⁤⁤⁤",Gy="​",Ky="‌";function Gu(e=""){return String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wD(e=""){return new RegExp(`${Gu(ED)}([${Gy}${Ky}]+)${Gu(LD)}`,e)}function vD(e=""){return new RegExp(`[${ED}${LD}${Gy}${Ky}]`,e)}function hq(e){let t=Uint8Array.from(e);return typeof TextDecoder<"u"?new TextDecoder().decode(t):decodeURIComponent(escape(String.fromCharCode(...t)))}function mq(e=""){let t=String(e).replace(new RegExp(Gu(Gy),"g"),"0").replace(new RegExp(Gu(Ky),"g"),"1"),n=[];for(let r=0;r<t.length;r+=8){let o=t.slice(r,r+8);o.length===8&&n.push(parseInt(o,2))}try{return JSON.parse(hq(n))}catch{return null}}function gq(e=""){let t=String(e),n=wD("g"),r=vD("g"),o,a=null;for(;(o=n.exec(t))!==null;){if(!o[1])continue;let i=mq(o[1]);i&&(a=i)}return a===null&&!wD().test(t)&&!vD().test(t)?{cleanValue:t,metadata:null}:{cleanValue:t.replace(n,"").replace(r,""),metadata:a}}function ID(e=""){let t=String(e).trim().match(new RegExp(`^<!--\\s*${Gu(CD)}(?<payload>[\\s\\S]+?)\\s*-->$`,"i"));if(!t?.groups?.payload)return null;try{return JSON.parse(t.groups.payload)}catch{return null}}function bq(e=""){if(!e)return[];let t=[],n=0;for(let r=0;r<e.length;r+=1){if(e[r]!==`
199
+ `)continue;let o=r>n&&e[r-1]==="\r"?r-1:r;t.push({end:r+1,start:n,text:e.slice(n,o)}),n=r+1}return n<e.length&&t.push({end:e.length,start:n,text:e.slice(n)}),t}function xq(e=""){let t=0,n=0;for(let r of String(e)){if(r==="|"){n%2===0&&(t+=1),n=0;continue}r==="\\"?n+=1:n=0}return t}function SD(e=""){let t=String(e).trim();return t.length>0&&xq(t)>=1}function mh(e=""){let t=String(e).trim();if(!t)return[];let n=t;n.startsWith("|")&&(n=n.slice(1)),n.endsWith("|")&&(n=n.slice(0,-1));let r=[],o="",a=0;for(let i of n){if(i==="|"){a%2===1?o=`${o.slice(0,-1)}|`:(r.push(o.trim().replace(/\\\|/g,"|")),o=""),a=0;continue}o+=i,i==="\\"?a+=1:a=0}return r.push(o.trim().replace(/\\\|/g,"|")),r}function kD(e=""){return String(e??"").replace(/\r?\n+/g," ").replace(/\|/g,"\\|").trim()}function yq(e=!0,t=$s){let n=gh(t),r={};return e===!1&&(r.hasHeaders=!1),n.rowStriping&&(r.rowStriping=!0),n.alignment!==$s.alignment&&(r.alignment=n.alignment),n.tableBorder&&(r.tableBorder=!0),n.cellBorders&&(r.cellBorders=!0),n.boldHeadings===!1&&(r.boldHeadings=!1),n.footer&&(r.footer=!0),n.customCss&&(r.customCss=n.customCss),r}function wq(e){return!e||Object.keys(e).length===0?"":`<!-- ${CD}${JSON.stringify(e)} -->
200
+ `}function vq(e=$s.alignment){switch(e){case"left":return":---";case"center":return":---:";case"right":default:return"---:"}}function Sq(e=[]){if(!Array.isArray(e)||e.length===0)return[];let t=Math.max(1,e.reduce((n,r)=>Array.isArray(r)?Math.max(n,r.length):n,0));return e.map(n=>{let r=Array.isArray(n)?[...n]:[""];for(;r.length<t;)r.push("");return r.slice(0,t).map(o=>String(o??""))})}function kq(e=[],t=!0,n=$s){let r=Sq(e);if(!r.length)return"";let o=gh(n),[a,...i]=r,s=vq(o.alignment),l=yq(t,o),u=wq(l),c=[`| ${a.map(kD).join(" | ")} |`,`| ${a.map(()=>s).join(" | ")} |`,...i.map(d=>`| ${d.map(kD).join(" | ")} |`)];return`${u}${c.join(`
201
+ `)}
202
+ `}function Cq(e=[],t=[]){return e.length!==t.length?!1:e.every((n,r)=>{let o=t[r];return!o||n.length!==o.length?!1:n.every((a,i)=>a===o[i])})}function MD(e=""){return/^:?-{3,}:?$/.test(String(e).trim())}function Eq(e="",t=0){let n=mh(e);return n.length===0||t>0&&n.length!==t?!1:n.every(MD)}function Lq(e){for(let t of e){let n=String(t).trim();if(MD(n)){if(n.startsWith(":")&&n.endsWith(":"))return"center";if(n.startsWith(":"))return"left";if(n.endsWith(":"))return"right"}}return $s.alignment}function _D(e=""){return String(e).trim().length===0}function Iq(e,t){let n=t-1;for(;n>=0&&_D(e[n]?e[n].text:"");)n-=1;return n<0?null:ID(e[n].text)}function gh(e={}){let t=pq.has(String(e.alignment||"").toLowerCase())?String(e.alignment).toLowerCase():$s.alignment;return{rowStriping:!!e.rowStriping,alignment:t,tableBorder:!!e.tableBorder,cellBorders:!!e.cellBorders,boldHeadings:e.boldHeadings!==!1,customCss:typeof e.customCss=="string"?e.customCss:"",footer:!!e.footer}}function Wy(e=""){if(!e||typeof e!="string")return[];let t=bq(e),n=[];for(let r=0;r<t.length;r+=1){let o=t[r];if(!SD(o.text)||r+1>=t.length)continue;let a=mh(o.text);if(a.length===0)continue;let i=t[r+1];if(!Eq(i.text,a.length))continue;let s=mh(i.text),l=gq(a[0]||"");a[0]=l.cleanValue;let u=l.metadata||Iq(t,r),c=[a],d=r+1;for(let m=r+2;m<t.length;m+=1){let b=t[m];if(!SD(b.text))break;c.push(mh(b.text)),d=m}let f=l.metadata===null?(()=>{let m=r-1;for(;m>=0&&_D(t[m]?t[m].text:"");)m-=1;return m>=0&&ID(t[m].text)?m:null})():null,p=f!==null?t[f].start:o.start,h=t[d].end;n.push({end:h,hasHeaders:!u||u.hasHeaders!==!1,options:gh({alignment:Lq(s),...u||{}}),rows:c,sourceMarkdown:e.slice(p,h),start:p}),r=d}return n}function Mq(e=""){return Wy(e).map(({options:t})=>({options:t}))}function jy(e="",t=""){if(!e||typeof e!="string"||!t||typeof t!="string")return e;let n=Wy(e),r=Wy(t);if(!n.length||!r.length)return e;let o=e;for(let a=n.length-1;a>=0;a-=1){let i=n[a],s=r[a];if(!i||!s)continue;let l=i.hasHeaders===s.hasHeaders&&Cq(i.rows,s.rows)?s.sourceMarkdown:kq(i.rows,s.hasHeaders,s.options);o=`${o.slice(0,i.start)}${l}${o.slice(i.end)}`}return o}function _q(e,t={}){let n=gh(t),r=(a,i)=>{e.dataset[a]!==i&&(e.dataset[a]=i)},o=a=>{typeof e.dataset[a]<"u"&&delete e.dataset[a]};r("gpdocTableAlign",n.alignment),n.rowStriping?r("gpdocTableStriping","true"):o("gpdocTableStriping"),n.tableBorder?r("gpdocTableBordered","true"):o("gpdocTableBordered"),n.cellBorders?r("gpdocCellBorders","true"):o("gpdocCellBorders"),n.boldHeadings===!1?r("gpdocBoldHeadings","false"):o("gpdocBoldHeadings"),n.footer?r("gpdocTableFooter","true"):o("gpdocTableFooter")}function TD(e,t){let n=Mq(t),r=Array.from(e.querySelectorAll("table")).filter(o=>!o.closest(".gpdoc-render-preview"));return r.forEach((o,a)=>{o instanceof HTMLTableElement&&_q(o,n[a]?.options)}),{expectedTableCount:n.length,renderedTableCount:r.length}}function Tq(e){return{type:"root",children:[{type:"text",value:e}],data:{language:"plaintext",relevance:0}}}function AD(e,t,n){try{return e.highlight("plaintext",t,n)}catch{return Tq(t)}}function Aq(e){return{...e,highlight(t,n,r){try{return e.highlight(t,n,r)}catch{return AD(e,n,r)}},highlightAuto(t,n){try{return e.highlightAuto(t,n)}catch{return AD(e,t,n)}}}}var Jy=Cy(hy);Jy.registered("mermaid")||Jy.register({mermaid:Xp});var Dq=Aq(Jy),ju=new WeakMap,Xy=new WeakSet,So=new WeakMap,Yy=new WeakSet,Xu=new WeakMap,Zy=new WeakSet,Nq=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]);function OD(e){return{from:e.from,to:e.to,anchor:e.anchor,head:e.head}}function Qy(e,t){return e.from===t.from&&e.to===t.to&&e.anchor===t.anchor&&e.head===t.head}function Yu(e){let t=e.dom.parentElement;return typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.classList.contains("tiptap-container")?t:e.dom}function Oq(e,t){let n=Yu(t);if(e.deltaMode===WheelEvent.DOM_DELTA_LINE){let r=PD(t);return{deltaX:e.deltaX*r,deltaY:e.deltaY*r}}return e.deltaMode===WheelEvent.DOM_DELTA_PAGE?{deltaX:e.deltaX*n.clientWidth,deltaY:e.deltaY*n.clientHeight}:{deltaX:e.deltaX,deltaY:e.deltaY}}function Rq(e,t,n,r){ju.set(e,{selection:OD(t),scrollLeft:n,scrollTop:r,expiresAt:Date.now()+1800})}function Pq(e,t,n){let r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom}function Bq(e,t){let n=e.getBoundingClientRect(),r=Math.min(56,Math.max(24,n.height*.08));return t<=n.top+r||t>=n.bottom-r}function Fq(e,t){let n=Yu(e);if(n.scrollTop<=0&&n.scrollLeft<=0){So.delete(e);return}So.set(e,{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,expiresAt:Date.now()+2500,dragging:!0,lastClientX:t.clientX,lastClientY:t.clientY})}function zq(e,t){let n=So.get(e);n&&(n.lastClientX=t.clientX,n.lastClientY=t.clientY,n.expiresAt=Date.now()+(n.dragging?2500:800))}function DD(e,t){let n=So.get(e);n&&(n.dragging=!1,n.lastClientX=t.clientX,n.lastClientY=t.clientY,n.expiresAt=Date.now()+800,RD(e))}function hr(e,t,n={}){let r=So.get(e);if(!r)return!1;if(Date.now()>r.expiresAt)return So.delete(e),!1;let o=Yu(e),a=Pq(o,r.lastClientX,r.lastClientY),i=Bq(o,r.lastClientY),s=a&&!i;return n.suppressOnly?s:r.scrollTop>24&&o.scrollTop<=1&&a&&!i?(o.scrollTop=r.scrollTop,o.scrollLeft=r.scrollLeft,!0):!1}function RD(e){let t=e.dom.ownerDocument?.defaultView?.requestAnimationFrame??(n=>window.setTimeout(()=>n(Date.now()),16));if(!Yy.has(e)){Yy.add(e);let n=()=>{let r=So.get(e);if(r&&Date.now()<=r.expiresAt){hr(e,"animation-frame-loop"),t(n);return}Yy.delete(e),So.delete(e)};t(n)}t(()=>{hr(e,"requestAnimationFrame")}),window.setTimeout(()=>{hr(e,"timeout:50")},50),window.setTimeout(()=>{hr(e,"timeout:150")},150),window.setTimeout(()=>{hr(e,"timeout:350")},350),window.setTimeout(()=>{hr(e,"timeout:700")},700)}function zr(e,t){let n=ju.get(e);if(!n)return!1;if(Date.now()>n.expiresAt||!Qy(e.state.selection,n.selection))return ju.delete(e),!1;let r=Yu(e);return(r.scrollTop!==n.scrollTop||r.scrollLeft!==n.scrollLeft)&&(r.scrollTop=n.scrollTop,r.scrollLeft=n.scrollLeft),!0}function Hq(e){let t=e.dom.ownerDocument?.defaultView?.requestAnimationFrame??(n=>window.setTimeout(()=>n(Date.now()),16));if(!Xy.has(e)){Xy.add(e);let n=()=>{if(zr(e,"animation-frame-loop")){t(n);return}Xy.delete(e)};t(n)}t(()=>{zr(e,"requestAnimationFrame")}),window.setTimeout(()=>{zr(e,"timeout:50")},50),window.setTimeout(()=>{zr(e,"timeout:150")},150),window.setTimeout(()=>{zr(e,"timeout:350")},350),window.setTimeout(()=>{zr(e,"timeout:700")},700),window.setTimeout(()=>{zr(e,"timeout:1200")},1200),window.setTimeout(()=>{zr(e,"timeout:1700")},1700)}function Uq(e,t){if(e.state.selection.empty||t.defaultPrevented)return!1;t.cancelable&&t.preventDefault(),t.stopPropagation();let{deltaX:n,deltaY:r}=Oq(t,e),o=Yu(e),a=Math.max(0,o.scrollHeight-o.clientHeight),i=Math.max(0,o.scrollWidth-o.clientWidth),s=Math.max(0,Math.min(a,o.scrollTop+r)),l=Math.max(0,Math.min(i,o.scrollLeft+n));return o.scrollTop=s,o.scrollLeft=l,Rq(e,e.state.selection,l,s),Hq(e),!0}function Ku(e,t,n,r){let o=Math.max(0,Math.min(e.state.doc.content.size,t));if(typeof r=="number"){let a=Math.max(0,Math.min(e.state.doc.content.size,r));try{return $.create(e.state.doc,a,o)}catch{return K.near(e.state.doc.resolve(o),n)}}try{return $.create(e.state.doc,o)}catch{return K.near(e.state.doc.resolve(o),n)}}function PD(e){let t=window.getComputedStyle(e.dom),n=Number.parseFloat(t.lineHeight||"");if(Number.isFinite(n))return Math.max(12,n);let r=Number.parseFloat(t.fontSize||"");return Number.isFinite(r)?Math.max(12,r*1.45):24}function $q(e,t,n){let{selection:r,doc:o}=e.state,a=t==="ArrowLeft"||t==="ArrowUp"?-1:1;if((t==="ArrowLeft"||t==="ArrowRight")&&!r.empty&&!n)return Ku(e,t==="ArrowLeft"?r.from:r.to,a);if(t==="ArrowLeft"||t==="ArrowRight"){let i=r.head+(t==="ArrowLeft"?-1:1);return Ku(e,i,a,n?r.anchor:void 0)}if(!r.empty&&!n)return Ku(e,t==="ArrowUp"?r.from:r.to,a);try{let i=e.coordsAtPos(r.head),s=PD(e),l=e.posAtCoords({left:i.left,top:t==="ArrowUp"?i.top-s:i.bottom+s});if(l)return Ku(e,l.pos,a,n?r.anchor:void 0)}catch{}return Ku(e,t==="ArrowUp"?0:o.content.size,a,n?r.anchor:void 0)}function qq(e,t){if(!Nq.has(t.key)||t.altKey||t.ctrlKey||t.metaKey||t.isComposing)return;let n=t.key,r=t.shiftKey,o=OD(e.state.selection);(e.dom.ownerDocument?.defaultView?.requestAnimationFrame??(i=>window.setTimeout(()=>i(Date.now()),16)))(()=>{if(typeof document<"u"&&document.activeElement!==e.dom)return;let i=e.state.selection;if(!Qy(i,o))return;let s=$q(e,n,r);!s||Qy(s,o)||e.dispatch(e.state.tr.setSelection(s).scrollIntoView())})}function Vq(e){return!e.defaultPrevented&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()==="a"&&(e.metaKey||e.ctrlKey)}function ND(e){if(e.key==="Meta"||e.key==="Control"||e.key==="Shift"||e.key==="Alt")return!0;if(e.altKey||e.shiftKey||!(e.metaKey||e.ctrlKey))return!1;let t=e.key.toLowerCase();return t==="a"||t==="c"||t==="x"}function Wq(e){let t=e.dom.ownerDocument?.defaultView?.getSelection?.();return!t||t.rangeCount===0?"":Array.from({length:t.rangeCount},(o,a)=>t.getRangeAt(a)).some(o=>{try{return o.intersectsNode(e.dom)}catch{return!1}})?t.toString():""}function wi(e,t){let n=Xu.get(e);if(!n)return!1;if(Date.now()>n.expiresAt||e.state.doc.content.size!==n.docSize)return Xu.delete(e),!1;let r=e.state.selection instanceof gt,o=Wq(e).length>0;return r&&o||(r||e.dispatch(e.state.tr.setSelection(new gt(e.state.doc))),e.focus()),!0}function Gq(e){let t=e.dom.ownerDocument?.defaultView??window,n=t.requestAnimationFrame?.bind(t)??(r=>t.setTimeout(()=>r(Date.now()),16));if(!Zy.has(e)){Zy.add(e);let r=()=>{if(wi(e,"animation-frame-loop")){n(r);return}Zy.delete(e)};n(r)}n(()=>{wi(e,"requestAnimationFrame")}),t.setTimeout(()=>{wi(e,"timeout:50")},50),t.setTimeout(()=>{wi(e,"timeout:150")},150),t.setTimeout(()=>{wi(e,"timeout:350")},350),t.setTimeout(()=>{wi(e,"timeout:700")},700)}function Kq(e,t){return Vq(t)?(t.preventDefault(),t.stopPropagation(),e.dispatch(e.state.tr.setSelection(new gt(e.state.doc))),Xu.set(e,{docSize:e.state.doc.content.size,expiresAt:Date.now()+900}),Gq(e),!0):!1}function BD({value:e="",onChange:t,placeholder:n="Start writing...",editable:r=!0,autofocus:o=!1,gutterVisible:a=!0}){let i=vo(e),s=(0,Hr.useRef)(!1),l=(0,Hr.useRef)(i),u=(0,Hr.useRef)(i),c=T2({extensions:[iI.configure({codeBlock:!1}),sI,kI.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),CI.configure({placeholder:n}),tM.configure({resizable:!0,handleWidth:6,cellMinWidth:80,lastColumnResizable:!0}),nM,rM,oM,aM,iM.configure({nested:!0}),MM.configure({lowlight:Dq}),eD,dD,j_.configure({html:!0,transformPastedText:!0,transformCopiedText:!0}),EA,QA,WA,oD,lD],content:i,editable:r,autofocus:o?"end":!1,editorProps:{attributes:{class:a?"":"no-gutter"},handleDOMEvents:{mousedown(p,h){return ju.delete(p),Xu.delete(p),h.button===0?(Fq(p,h),RD(p)):So.delete(p),!1},mousemove(p,h){return zq(p,h),hr(p,"mousemove"),!1},mouseup(p,h){return DD(p,h),hr(p,"mouseup"),!1},click(p,h){return DD(p,h),hr(p,"click"),!1},wheel(p,h){return Uq(p,h)},scroll(p){return hr(p,"dom-scroll"),zr(p,"dom-scroll"),!1},keydown(p,h){return Kq(p,h)?!0:(ND(h)||Xu.delete(p),qq(p,h),!1)},keyup(p,h){return ND(h)&&wi(p,"keyup"),!1}},handleScrollToSelection(p){return!!(hr(p,"handleScrollToSelection",{suppressOnly:!0})||zr(p,"handleScrollToSelection"))}},onUpdate({editor:p}){if(s.current)return;let h=vo(Vy(p)),m=h&&jy(h,u.current);m!==l.current&&(l.current=m,u.current=m,t?.(m))}}),d=(0,Hr.useCallback)(p=>{if(!c||c.isDestroyed)return;let h=vo(p);s.current=!0,c.commands.setContent(h),l.current=h,u.current=h,s.current=!1},[c]),f=(0,Hr.useCallback)((p=c)=>{let h=Vy(p);return h&&jy(vo(h),u.current)},[c]);return(0,Hr.useEffect)(()=>{if(!c||c.isDestroyed)return;let p=vo(e);p!==l.current&&(u.current=p,d(p))},[e,c,d]),(0,Hr.useEffect)(()=>{if(!c||c.isDestroyed)return;let p=()=>{queueMicrotask(()=>{yD(c)})};return p(),c.on("update",p),()=>{c.off("update",p)}},[c,e]),{editor:c,getMarkdown:f,setContent:d}}var ma=Ee(Bt(),1);var xh=Ee(Bt());var FD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jq=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ew=e=>{let t=jq(e);return t.charAt(0).toUpperCase()+t.slice(1)},bh=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),zD=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Zu=Ee(Bt());var HD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var UD=(0,Zu.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>(0,Zu.createElement)("svg",{ref:l,...HD,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:bh("lucide",o),...!a&&!zD(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Zu.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var $D=(e,t)=>{let n=(0,xh.forwardRef)(({className:r,...o},a)=>(0,xh.createElement)(UD,{ref:a,iconNode:t,className:bh(`lucide-${FD(ew(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ew(e),n};var Xq=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],Ju=$D("message-square-plus",Xq);var he=Ee(sn(),1),nV=Ju;function pt({onClick:e,active:t,title:n,children:r,wide:o}){let a=ma.default.useCallback(s=>{s.preventDefault(),s.stopPropagation()},[]),i=ma.default.useCallback(s=>{s.preventDefault(),s.stopPropagation(),e()},[e]);return(0,he.jsx)("button",{type:"button",className:`gpdoc-tb-btn${t?" active":""}${o?" gpdoc-tb-btn-wide":""}`,contentEditable:!1,tabIndex:-1,onMouseDown:a,onClick:i,title:n,"aria-label":n,children:r})}function Qu(){return(0,he.jsx)("span",{className:"gpdoc-tb-sep"})}function rV(e){let t=e.state.selection;return t instanceof $||t?.constructor?.name==="TextSelection"}function tw(e){let t=e.state.selection;if(!t||t.empty||!rV(e)||!Number.isFinite(t.from)||!Number.isFinite(t.to)||t.from>t.to)return!1;let n=t.selectedText;if(typeof n=="string")return!!n.trim();let r=t.$from,o=t.$to;return r?.parent===o?.parent&&typeof r?.parent?.textBetween=="function"?!!r.parent.textBetween(r.parentOffset,o.parentOffset,`
203
+ `,`
204
+ `).trim():!0}function oV(e){let t=e?.content?.size;return e?.textBetween&&typeof t=="number"&&Number.isFinite(t)?e.textBetween(0,t,`
205
+ `,`
206
+ `):String(e?.textContent||"")}function aV(e){let t=e.state.selection;if(!t||!tw(e))return null;let n=e.state.doc.textBetween(t.from,t.to,`
207
+ `,`
208
+ `),r=t.$from?.index?.(0),o=t.$from?.parentOffset,a=Number.isInteger(r)?Number(r)+1:1,i=t.$from,s=Number.isInteger(i.depth)&&Number(i.depth)>0?i.node?.(1):void 0,l=s?oV(s):String(i.parent?.textContent||""),u=Number.isFinite(o)?Number(o)+1:1;if(s?.textBetween&&i.start){let c=i.start(1),d=Math.max(0,t.from-c),f=s.content?.size,p=typeof f=="number"?Math.min(d,f):d;u=s.textBetween(0,p,`
209
+ `,`
210
+ `).length+1}return!n.trim()||a<1||u<1?null:Object.freeze({from:t.from,to:t.to,selectedText:n,lineNumber:a,logicalBlockNumber:a,column:u,lineContent:l})}function iV({editor:e,onCommentCreate:t}){let n=ma.default.useRef(null),r=ma.default.useCallback(()=>{let s=aV(e);if(s)try{t(s)}catch{console.error("[GPDoc][CommentCreate] Callback failed")}},[e,t]),o=ma.default.useCallback(s=>{typeof s.button=="number"&&s.button!==0||(s.preventDefault(),s.stopPropagation(),n.current=s.pointerId,r())},[r]),a=ma.default.useCallback(s=>{n.current===s.pointerId&&(n.current=null)},[]),i=ma.default.useCallback(s=>{s.preventDefault(),s.stopPropagation(),s.detail===0&&r(),n.current=null},[r]);return(0,he.jsx)("button",{type:"button",className:"gpdoc-tb-btn gpdoc-tb-btn-comment",contentEditable:!1,tabIndex:0,onPointerDown:o,onPointerCancel:a,onClick:i,title:"Add Comment","aria-label":"Add Comment",children:(0,he.jsx)(nV,{"aria-hidden":"true"})})}function GD({editor:e,tableEditMode:t="toolbar",onCommentCreate:n}){let r=tw(e),o=e.isActive("table")&&!r,a=!!(n&&r);return(0,he.jsx)(D2,{editor:e,tippyOptions:{duration:150,placement:"top",appendTo:()=>typeof document>"u"?e.view.dom:e.view.dom.closest(".gpdoc-editor-root")||e.view.dom.parentElement||e.view.dom,interactive:!0,zIndex:240},className:"gpdoc-bubble-toolbar",shouldShow:({editor:s,state:l})=>{if(typeof document<"u"&&(document.querySelector(".menu-dropdown:not(.hidden)")||document.querySelector(".modal:not(.hidden)")))return!1;let u=tw(s);return s.isActive("table")&&!u?t==="toolbar":!l.selection.empty&&u},children:(0,he.jsx)("div",{className:"gpdoc-bubble-toolbar-content",contentEditable:!1,children:o&&t==="toolbar"?(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(pt,{onClick:()=>e.chain().focus().addColumnBefore().run(),title:"Add Column Before",wide:!0,children:"+Col"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().addColumnAfter().run(),title:"Add Column After",wide:!0,children:"Col+"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().deleteColumn().run(),title:"Delete Column",wide:!0,children:"-Col"}),(0,he.jsx)(Qu,{}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().addRowBefore().run(),title:"Add Row Above",wide:!0,children:"+Row"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().addRowAfter().run(),title:"Add Row Below",wide:!0,children:"Row+"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().deleteRow().run(),title:"Delete Row",wide:!0,children:"-Row"}),(0,he.jsx)(Qu,{}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleHeaderRow().run(),title:"Toggle Header Row",wide:!0,children:"Head"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().deleteTable().run(),title:"Delete Table",wide:!0,children:"Drop"})]}):(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleBold().run(),active:e.isActive("bold"),title:"Bold (Cmd+B)",children:"B"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleItalic().run(),active:e.isActive("italic"),title:"Italic (Cmd+I)",children:(0,he.jsx)("em",{children:"I"})}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleUnderline().run(),active:e.isActive("underline"),title:"Underline (Cmd+U)",children:(0,he.jsx)("u",{children:"U"})}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleStrike().run(),active:e.isActive("strike"),title:"Strikethrough",children:(0,he.jsx)("s",{children:"S"})}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleCode().run(),active:e.isActive("code"),title:"Inline Code",children:"<>"}),(0,he.jsx)(Qu,{}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleHeading({level:1}).run(),active:e.isActive("heading",{level:1}),title:"Heading 1",children:"H1"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleHeading({level:2}).run(),active:e.isActive("heading",{level:2}),title:"Heading 2",children:"H2"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleHeading({level:3}).run(),active:e.isActive("heading",{level:3}),title:"Heading 3",children:"H3"}),(0,he.jsx)(Qu,{}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleBulletList().run(),active:e.isActive("bulletList"),title:"Bullet List",children:"•"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleOrderedList().run(),active:e.isActive("orderedList"),title:"Ordered List",children:"1."}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleBlockquote().run(),active:e.isActive("blockquote"),title:"Blockquote",children:"“"}),(0,he.jsx)(pt,{onClick:()=>e.chain().focus().toggleCodeBlock().run(),active:e.isActive("codeBlock"),title:"Code Block",children:"{ }"}),a&&n&&(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(Qu,{}),(0,he.jsx)(iV,{editor:e,onCommentCreate:n})]})]})})})}var Ur=Ee(Bt(),1),KD=Ee(Na(),1);var Be=Ee(sn(),1);function mr({actionKey:e,icon:t,label:n,ownerId:r,onActivate:o}){let a=Ur.default.useCallback(s=>{s.preventDefault(),s.stopPropagation()},[]),i=Ur.default.useCallback(s=>{s.preventDefault(),s.stopPropagation(),o()},[o]);return(0,Be.jsxs)("button",{type:"button",className:"gpdoc-fm-btn","data-gpdoc-menu-action":e,"data-gpdoc-menu-label":n,"data-gpdoc-menu-owner":r,onMouseDown:a,onClick:i,children:[(0,Be.jsx)("span",{className:"gpdoc-fm-icon",children:t}),n]})}function gr({children:e,className:t=""}){return(0,Be.jsx)("span",{className:`gpdoc-fm-glyph ${t}`.trim(),children:e})}function sV(e,t){if(typeof window>"u"){t();return}let n=new CustomEvent("gpdoc-beta-menu-action",{detail:{action:e},cancelable:!0});!window.dispatchEvent(n)||t()}function jD({editor:e}){let t=Ur.default.useRef(`gpdoc-floating-menu-${Math.random().toString(36).slice(2,10)}`),n=Ur.default.useRef(new de(`gpdoc-floating-menu-anchor-${Math.random().toString(36).slice(2,10)}`)),[r,o]=Ur.default.useState(null),a=t.current,i=`.gpdoc-floating-menu-anchor[data-gpdoc-menu-owner="${a}"]`,s=Ur.default.useCallback(()=>e.view.dom.closest(".gpdoc-editor-root")||null,[e]),l=Ur.default.useCallback(()=>{let p=e.view.dom.querySelector(i);o(h=>h===p?h:p)},[i,e]),u=(p,h)=>()=>{h()};Ur.default.useEffect(()=>{if(e.isDestroyed)return;let p=n.current,h=new ie({key:p,props:{decorations(b){return typeof document>"u"?be.empty:be.create(b.doc,[ye.widget(b.doc.content.size,()=>{let g=document.createElement("div");return g.className="gpdoc-floating-menu-anchor",g.setAttribute("data-gpdoc-menu-owner",a),g.setAttribute("contenteditable","false"),g},{key:`${a}-anchor`,side:1,ignoreSelection:!0,stopEvent:g=>{let y=g.target;return y instanceof Element&&y.closest(`[data-gpdoc-menu-owner="${a}"]`)!==null}})])}}});e.registerPlugin(h),l(),typeof queueMicrotask=="function"&&queueMicrotask(l);let m=typeof MutationObserver>"u"?null:new MutationObserver(()=>{l()});return m?.observe(e.view.dom,{childList:!0,subtree:!0}),e.on("update",l),()=>{m?.disconnect(),e.off("update",l),o(null),e.isDestroyed||e.unregisterPlugin(p)}},[e,a,l]);let c=(p,h)=>()=>{e.commands.blur();let m=()=>{sV(p,()=>{h?.()})};if(typeof window<"u"&&typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(m);return}m()},d=Ur.default.useMemo(()=>({heading:u("Heading",()=>{e.chain().focus().toggleHeading({level:1}).run()}),list:u("List",()=>{e.chain().focus().toggleBulletList().run()}),numbered:u("Numbered",()=>{e.chain().focus().toggleOrderedList().run()}),code:u("Code",()=>{e.chain().focus().toggleCodeBlock().run()}),quote:u("Quote",()=>{e.chain().focus().toggleBlockquote().run()}),table:c("insert-table",()=>{e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}),embed:c("insert-embed-gpdoc"),image:c("insert-image"),formula:c("insert-formula"),variable:c("insert-variable"),diagram:c("insert-diagram")}),[e]),f=(()=>{if(typeof window>"u")return{};let p=s();if(!p)return{};let h=window.getComputedStyle(p);return{"--gpdoc-menu-bg":h.getPropertyValue("--gpdoc-toolbar-bg").trim(),"--gpdoc-menu-text":h.getPropertyValue("--gpdoc-toolbar-text").trim(),"--gpdoc-menu-border":h.getPropertyValue("--gpdoc-border").trim(),"--gpdoc-menu-hover":h.getPropertyValue("--gpdoc-toolbar-hover").trim()}})();return r?(0,KD.createPortal)((0,Be.jsx)("div",{className:"gpdoc-floating-menu",contentEditable:!1,children:(0,Be.jsxs)("div",{className:"gpdoc-floating-menu-content",contentEditable:!1,style:f,children:[(0,Be.jsx)(mr,{actionKey:"heading",ownerId:a,onActivate:d.heading,icon:(0,Be.jsx)(gr,{className:"gpdoc-fm-glyph-heading",children:"H"}),label:"Heading"}),(0,Be.jsx)(mr,{actionKey:"list",ownerId:a,onActivate:d.list,icon:(0,Be.jsx)(gr,{children:"•"}),label:"List"}),(0,Be.jsx)(mr,{actionKey:"numbered",ownerId:a,onActivate:d.numbered,icon:(0,Be.jsx)(gr,{className:"gpdoc-fm-glyph-numbered",children:"1."}),label:"Numbered"}),(0,Be.jsx)(mr,{actionKey:"code",ownerId:a,onActivate:d.code,icon:(0,Be.jsx)(gr,{className:"gpdoc-fm-glyph-code",children:"</>"}),label:"Code"}),(0,Be.jsx)(mr,{actionKey:"quote",ownerId:a,onActivate:d.quote,icon:(0,Be.jsx)(gr,{children:"“"}),label:"Quote"}),(0,Be.jsx)(mr,{actionKey:"table",ownerId:a,onActivate:d.table,icon:(0,Be.jsx)(gr,{children:"▦"}),label:"Table"}),(0,Be.jsx)(mr,{actionKey:"embed",ownerId:a,onActivate:d.embed,icon:(0,Be.jsx)(gr,{children:"⧉"}),label:"Embed File"}),(0,Be.jsx)(mr,{actionKey:"image",ownerId:a,onActivate:d.image,icon:(0,Be.jsx)(gr,{children:"🖼"}),label:"Image"}),(0,Be.jsx)(mr,{actionKey:"formula",ownerId:a,onActivate:d.formula,icon:(0,Be.jsx)(gr,{children:"∑"}),label:"Formula"}),(0,Be.jsx)(mr,{actionKey:"variable",ownerId:a,onActivate:d.variable,icon:(0,Be.jsx)(gr,{children:"{x}"}),label:"Variable"}),(0,Be.jsx)(mr,{actionKey:"diagram",ownerId:a,onActivate:d.diagram,icon:(0,Be.jsx)(gr,{children:"◫"}),label:"Diagram"})]})}),r):null}var $r=Ee(Bt(),1),XD=Ee(Na(),1),In=Ee(sn(),1);function lV({className:e}){return(0,In.jsxs)("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,In.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"}),(0,In.jsx)("path",{d:"M12 20h9"})]})}function uV(e){if(typeof window>"u")return[];let t=[],n=new Set,r=e?.parentElement??null;for(;r;){let o=window.getComputedStyle(r),a=o.overflowY||o.overflow;/(auto|scroll|overlay)/.test(a)&&r.scrollHeight>r.clientHeight&&(n.has(r)||(t.push(r),n.add(r))),r=r.parentElement}return n.has(window)||t.push(window),t}function cV(e){if(!e||typeof window>"u")return!1;let t=e;for(;t&&t!==document.body;){let r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden")return!1;t=t.parentElement}let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function dV(e){for(let t=e.depth;t>0;t-=1){let n=e.node(t);if(n.type.name==="table")return{node:n,pos:e.before(t)}}return null}function fV(e){let t=[],n=!1;return e.forEach((r,o)=>{let a=[];r.forEach(i=>{a.push((i.textContent||"").replace(/\n+/g," ").trim())}),o===0&&(n=r.firstChild?.type.name==="tableHeader"),t.push(a)}),{hasHeader:n,rows:t}}function pV(e,t){let n=0,r=0;return e.state.doc.descendants((o,a)=>o.type.name!=="table"?!0:a===t?(r=n,!1):(n+=1,!1)),r}function hV(e){if(!e||e.isDestroyed||!e.isActive("table")||typeof document<"u"&&(document.querySelector(".menu-dropdown:not(.hidden)")||document.querySelector(".modal:not(.hidden)"))||!cV(e.view.dom))return null;let t=dV(e.state.selection.$from);if(!t)return null;let n=e.view.nodeDOM(t.pos),r=n instanceof HTMLTableElement?n:n instanceof HTMLElement?n.querySelector("table"):null;if(!r)return null;let o=r.getBoundingClientRect(),a=Math.max(8,o.top+8),i=Math.max(8,o.right-8),{hasHeader:s,rows:l}=fV(t.node),u=pV(e,t.pos),c=e.view.dom.closest(".gpdoc-editor-root"),d=c instanceof HTMLElement?window.getComputedStyle(c):null;return{buttonStyles:d?{background:d.getPropertyValue("--gpdoc-editor-toolbar-bg").trim()||d.getPropertyValue("--gpdoc-editor-surface").trim()||void 0,borderColor:d.getPropertyValue("--gpdoc-editor-border").trim()||void 0,color:d.getPropertyValue("--gpdoc-editor-toolbar-text").trim()||d.getPropertyValue("--gpdoc-editor-text").trim()||void 0}:void 0,hasHeader:s,left:i,rows:l,tableOccurrence:u,tablePos:t.pos,top:a}}function YD({editor:e}){let[t,n]=(0,$r.useState)(null),[r,o]=(0,$r.useState)(!1),a=(0,$r.useRef)(null),i=(0,$r.useMemo)(()=>uV(e.view.dom),[e]);if((0,$r.useEffect)(()=>{let d=0,f=null,p=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(()=>{n(hV(e))})};return p(),e.on("selectionUpdate",p),e.on("update",p),i.forEach(h=>{h.addEventListener("scroll",p,{passive:!0})}),window.addEventListener("resize",p),typeof document<"u"&&(f=new MutationObserver(p),f.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["class","style","hidden"]})),()=>{cancelAnimationFrame(d),e.off("selectionUpdate",p),e.off("update",p),i.forEach(h=>{h.removeEventListener("scroll",p)}),window.removeEventListener("resize",p),f?.disconnect()}},[e,i]),(0,$r.useEffect)(()=>{let d=t?.tablePos??null,f=a.current;f!==null&&f!==d&&o(!1),a.current=d},[t?.tablePos]),!t||typeof document>"u")return null;let s=d=>{d.preventDefault(),d.stopPropagation()},l=d=>{d.preventDefault(),d.stopPropagation(),window.dispatchEvent(new CustomEvent("gpdoc-beta-edit-table",{detail:{kind:"table",hasHeader:t.hasHeader,rows:t.rows,tableOccurrence:t.tableOccurrence,tablePos:t.tablePos}}))},u=d=>{d.preventDefault(),d.stopPropagation(),window.dispatchEvent(new CustomEvent("gpdoc-beta-remove-table",{detail:{kind:"table",hasHeader:t.hasHeader,rows:t.rows,tableOccurrence:t.tableOccurrence,tablePos:t.tablePos}}))},c=d=>{d.preventDefault(),d.stopPropagation(),o(f=>!f)};return(0,XD.createPortal)((0,In.jsxs)("div",{className:`gpdoc-table-action-group${r?" gpdoc-table-action-group-controls-visible":""}`,style:{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,transform:"translateX(-100%)"},children:[(0,In.jsx)("button",{type:"button",className:`gpdoc-table-action-btn gpdoc-table-action-toggle-btn${r?"":" gpdoc-table-action-toggle-btn-icon"}`,contentEditable:!1,onMouseDown:s,onClick:c,tabIndex:-1,"aria-expanded":r,"aria-label":r?"Hide table controls":"Show table edit controls",title:r?"Hide table controls":"Show table edit controls",style:t.buttonStyles,children:r?"Hide":(0,In.jsx)(lV,{className:"gpdoc-table-action-toggle-icon"})}),r&&(0,In.jsxs)(In.Fragment,{children:[(0,In.jsx)("button",{type:"button",className:"gpdoc-table-action-btn",contentEditable:!1,onMouseDown:s,onClick:l,tabIndex:-1,style:t.buttonStyles,children:"Edit Table"}),(0,In.jsx)("button",{type:"button",className:"gpdoc-table-action-btn gpdoc-table-action-btn-danger",contentEditable:!1,onMouseDown:s,onClick:u,tabIndex:-1,style:t.buttonStyles?{...t.buttonStyles,color:"#b91c1c"}:{color:"#b91c1c"},children:"Remove"})]})]}),document.body)}var qs=Ee(Bt(),1),ZD=Ee(Na(),1),ec=Ee(sn(),1);function mV(e){if(typeof window>"u")return[];let t=[],n=new Set,r=e?.parentElement??null;for(;r;){let o=window.getComputedStyle(r),a=o.overflowY||o.overflow;/(auto|scroll|overlay)/.test(a)&&r.scrollHeight>r.clientHeight&&(n.has(r)||(t.push(r),n.add(r))),r=r.parentElement}return n.has(window)||t.push(window),t}function gV(e){if(!e||typeof window>"u")return!1;let t=e;for(;t&&t!==document.body;){let r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden")return!1;t=t.parentElement}let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function bV(e){let t=e.state.selection;if(t.node?.type.name==="image")return{node:t.node,pos:t.from};if(!t.empty)return null;let n=t.$from.nodeAfter;if(n?.type.name==="image")return{node:n,pos:t.from};let r=t.$from.nodeBefore;return r?.type.name==="image"?{node:r,pos:t.from-r.nodeSize}:null}function xV(e){if(!e||e.isDestroyed||typeof document<"u"&&(document.querySelector(".menu-dropdown:not(.hidden)")||document.querySelector(".modal:not(.hidden)"))||!gV(e.view.dom))return null;let t=bV(e);if(!t)return null;let n=e.view.nodeDOM(t.pos),r=n instanceof HTMLImageElement?n:n instanceof HTMLElement?n.querySelector("img"):null;if(!r)return null;let o=r.getBoundingClientRect(),a=Math.max(8,o.top+8),i=Math.max(8,o.right-8),s=e.view.dom.closest(".gpdoc-editor-root"),l=s instanceof HTMLElement?window.getComputedStyle(s):null,u=l?{background:l.getPropertyValue("--gpdoc-editor-toolbar-bg").trim()||l.getPropertyValue("--gpdoc-editor-surface").trim()||void 0,borderColor:l.getPropertyValue("--gpdoc-editor-border").trim()||void 0,color:l.getPropertyValue("--gpdoc-editor-toolbar-text").trim()||l.getPropertyValue("--gpdoc-editor-text").trim()||void 0}:void 0;return{alt:typeof t.node.attrs?.alt=="string"?t.node.attrs.alt:null,buttonStyles:u,imagePos:t.pos,imageSize:t.node.nodeSize,left:i,src:typeof t.node.attrs?.src=="string"?t.node.attrs.src:null,title:typeof t.node.attrs?.title=="string"?t.node.attrs.title:null,top:a}}function JD({editor:e}){let[t,n]=(0,qs.useState)(null),r=(0,qs.useMemo)(()=>mV(e.view.dom),[e]);if((0,qs.useEffect)(()=>{let s=0,l=null,u=()=>{cancelAnimationFrame(s),s=requestAnimationFrame(()=>{n(xV(e))})};return u(),e.on("selectionUpdate",u),e.on("update",u),r.forEach(c=>{c.addEventListener("scroll",u,{passive:!0})}),window.addEventListener("resize",u),typeof document<"u"&&(l=new MutationObserver(u),l.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["class","style","hidden"]})),()=>{cancelAnimationFrame(s),e.off("selectionUpdate",u),e.off("update",u),r.forEach(c=>{c.removeEventListener("scroll",u)}),window.removeEventListener("resize",u),l?.disconnect()}},[e,r]),!t||typeof document>"u")return null;let o=s=>{s.preventDefault(),s.stopPropagation()},a=s=>{s.preventDefault(),s.stopPropagation(),window.dispatchEvent(new CustomEvent("gpdoc-beta-edit-image",{detail:{kind:"image",alt:t.alt,imagePos:t.imagePos,imageSize:t.imageSize,src:t.src,title:t.title}}))},i=s=>{s.preventDefault(),s.stopPropagation(),window.dispatchEvent(new CustomEvent("gpdoc-beta-remove-image",{detail:{kind:"image",alt:t.alt,imagePos:t.imagePos,imageSize:t.imageSize,src:t.src,title:t.title}}))};return(0,ZD.createPortal)((0,ec.jsxs)("div",{className:"gpdoc-table-action-group",style:{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,transform:"translateX(-100%)"},children:[(0,ec.jsx)("button",{type:"button",className:"gpdoc-table-action-btn",contentEditable:!1,onMouseDown:o,onClick:a,tabIndex:-1,style:t.buttonStyles,children:"Edit Image"}),(0,ec.jsx)("button",{type:"button",className:"gpdoc-table-action-btn gpdoc-table-action-btn-danger",contentEditable:!1,onMouseDown:o,onClick:i,tabIndex:-1,style:t.buttonStyles?{...t.buttonStyles,color:"#b91c1c"}:{color:"#b91c1c"},children:"Remove"})]}),document.body)}var qr=Ee(Bt(),1),QD=Ee(Na(),1),nw=Ee(sn(),1);function yV(e){if(typeof window>"u")return[];let t=[],n=new Set,r=e?.parentElement??null;for(;r;){let o=window.getComputedStyle(r),a=o.overflowY||o.overflow;/(auto|scroll|overlay)/.test(a)&&r.scrollHeight>r.clientHeight&&(n.has(r)||(t.push(r),n.add(r))),r=r.parentElement}return n.has(window)||t.push(window),t}function wV(e){if(!e||typeof window>"u")return!1;let t=e;for(;t&&t!==document.body;){let r=window.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden")return!1;t=t.parentElement}let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function vV(e){for(let t=e.depth;t>0;t-=1){let n=e.node(t);if(n.type.name==="codeBlock")return{node:n,pos:e.before(t)}}return null}async function SV(e){if(typeof navigator<"u"&&navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}if(typeof document>"u")throw new Error("Clipboard is not available");let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.opacity="0",t.style.pointerEvents="none",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}function kV(e){if(!e||e.isDestroyed||!e.isActive("codeBlock")||typeof document<"u"&&(document.querySelector(".menu-dropdown:not(.hidden)")||document.querySelector(".modal:not(.hidden)"))||!wV(e.view.dom))return null;let t=vV(e.state.selection.$from);if(!t)return null;let n=e.view.nodeDOM(t.pos),r=n instanceof HTMLPreElement?n:n instanceof HTMLElement?n.querySelector("pre"):null;if(!r)return null;let o=r.getBoundingClientRect(),a=Math.max(8,o.top+8),i=Math.max(8,o.right-8),s=e.view.dom.closest(".gpdoc-editor-root"),l=s instanceof HTMLElement?window.getComputedStyle(s):null;return{buttonStyles:l?{background:l.getPropertyValue("--gpdoc-editor-toolbar-bg").trim()||l.getPropertyValue("--gpdoc-editor-surface").trim()||void 0,borderColor:l.getPropertyValue("--gpdoc-editor-border").trim()||void 0,color:l.getPropertyValue("--gpdoc-editor-toolbar-text").trim()||l.getPropertyValue("--gpdoc-editor-text").trim()||void 0}:void 0,code:t.node.textContent||"",codeBlockPos:t.pos,left:i,top:a}}function eN({editor:e}){let[t,n]=(0,qr.useState)(null),[r,o]=(0,qr.useState)(null),a=(0,qr.useRef)(null),i=(0,qr.useMemo)(()=>yV(e.view.dom),[e]);if((0,qr.useEffect)(()=>{let u=0,c=null,d=()=>{cancelAnimationFrame(u),u=requestAnimationFrame(()=>{n(kV(e))})};return d(),e.on("selectionUpdate",d),e.on("update",d),i.forEach(f=>{f.addEventListener("scroll",d,{passive:!0})}),window.addEventListener("resize",d),typeof document<"u"&&(c=new MutationObserver(d),c.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["class","style","hidden"]})),()=>{cancelAnimationFrame(u),e.off("selectionUpdate",d),e.off("update",d),i.forEach(f=>{f.removeEventListener("scroll",d)}),window.removeEventListener("resize",d),c?.disconnect()}},[e,i]),(0,qr.useEffect)(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]),!t||typeof document>"u")return null;let s=u=>{u.preventDefault(),u.stopPropagation()},l=async u=>{u.preventDefault(),u.stopPropagation();try{await SV(t.code),o(t.codeBlockPos),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>{o(c=>c===t.codeBlockPos?null:c)},1500)}catch(c){console.error("[GPDoc][CodeBlockCopyOverlay] Failed to copy code block.",c)}};return(0,QD.createPortal)((0,nw.jsx)("div",{className:"gpdoc-table-action-group",style:{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,transform:"translateX(-100%)"},children:(0,nw.jsx)("button",{type:"button",className:"gpdoc-table-action-btn",contentEditable:!1,onMouseDown:s,onClick:l,tabIndex:-1,style:t.buttonStyles,children:r===t.codeBlockPos?"Copied":"Copy Code"})}),document.body)}var Ws=Ee(Bt(),1),Vs=Ee(sn(),1),CV=28,ow=8,EV=24;function rw(e){if(!(typeof e!="number"||!Number.isFinite(e)))return e}function wh(e){let t=rw(e);if(!(t===void 0||t<=0))return Math.floor(t)}function vh(e){let t=e.state.doc.content?.size;return typeof t=="number"&&Number.isFinite(t)?Math.max(0,t):0}function Sh(e,t){let n=vh(e);return Math.max(0,Math.min(t,n))}function nN(e,t){let n=e.state.doc.textBetween(0,Sh(e,t),`
211
+ `,`
212
+ `);return Math.max(1,n.split(`
213
+ `).length)}function LV(e,t){let n=vh(e);if(n<=1||t<=1)return Math.min(1,n);let r=0,o=n;for(;r<o;){let a=Math.floor((r+o)/2);nN(e,a)<t?r=a+1:o=a}return Sh(e,r)}function tN(e,t){let n=typeof t=="string"?t.trim():"";if(!n)return;let r=vh(e),a=e.state.doc.textBetween(0,r,`
214
+ `,`
215
+ `).indexOf(n);if(!(a<0))return Sh(e,a+1)}function IV(e,t){let n=rw(t.from)??rw(t.target?.from),r=wh(t.lineNumber)??wh(t.line)??wh(t.target?.lineNumber)??wh(t.target?.line),o=t.selectedText||t.target?.selectedText,a=t.lineContent||t.target?.lineContent;if(n!==void 0)return{fallback:!1,lineNumber:r,position:Sh(e,n)};if(r!==void 0)return{fallback:!1,lineNumber:r,position:LV(e,r)};let i=tN(e,o)??tN(e,a);return i!==void 0?{fallback:!1,lineNumber:nN(e,i),position:i}:{fallback:!0,lineNumber:void 0,position:Math.min(1,vh(e))}}function MV(e){let t=e&&e>0?e:1;return ow+(t-1)*CV}function _V(e,t,n,r){try{let o=e.view.coordsAtPos(n),a=t.getBoundingClientRect(),i=Number(o?.top)-a.top+t.scrollTop;if(Number.isFinite(i))return{fallback:!1,top:Math.max(ow,i)}}catch{}return{fallback:!0,top:MV(r)}}function TV(e){let t=[];return[...e].sort((r,o)=>r.top-o.top).forEach(r=>{let o=t[t.length-1];if(o&&Math.abs(o.top-r.top)<=EV){o.threads.push(r.thread),o.threadIds.push(r.thread.id),o.count+=1,o.fallback=o.fallback||r.fallback,o.resolved=o.resolved&&r.thread.resolved===!0,!o.lineNumber&&r.lineNumber&&(o.lineNumber=r.lineNumber);return}t.push({count:1,fallback:r.fallback,lineNumber:r.lineNumber,resolved:r.thread.resolved===!0,threadIds:[r.thread.id],threads:[r.thread],top:r.top})}),t}function AV(e){let t=e.lineNumber?` on line ${e.lineNumber}`:"",n=e.resolved?"resolved":"open",r=e.count===1?"comment thread":"comment threads";return`${e.count} ${n} ${r}${t}`}function rN({activeCommentThreadId:e=null,commentThreads:t,editor:n,onCommentThreadOpen:r,rootElement:o,showResolvedComments:a}){let i=(0,Ws.useMemo)(()=>t.filter(u=>u?.id?a||u.resolved!==!0:!1),[t,a]),[s,l]=(0,Ws.useState)([]);return(0,Ws.useEffect)(()=>{if(!o||!n||n.isDestroyed||i.length===0){l([]);return}let u=0,c=()=>{cancelAnimationFrame(u),u=requestAnimationFrame(()=>{if(n.isDestroyed)return;let d=i.map(f=>{let p=IV(n,f),h=_V(n,o,p.position,p.lineNumber);return{fallback:p.fallback||h.fallback,lineNumber:p.lineNumber,thread:f,top:h.top}});l(TV(d))})};return c(),n.on("update",c),n.on("selectionUpdate",c),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),()=>{cancelAnimationFrame(u),n.off("update",c),n.off("selectionUpdate",c),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[n,o,i]),s.length===0?null:(0,Vs.jsx)("div",{className:"gpdoc-comment-markers","aria-hidden":!1,children:s.map(u=>{let c=u.threads[0],d=e?u.threadIds.includes(e):!1,f=u.count>1?u.count:Math.max(1,c.commentCount||1);return(0,Vs.jsxs)("button",{type:"button",className:`gpdoc-comment-marker-btn${d?" gpdoc-comment-marker-btn-active":""}`,style:{top:`${Math.max(ow,u.top)}px`},"aria-label":AV(u),"data-fallback":u.fallback?"true":"false","data-line-number":u.lineNumber||void 0,"data-resolved":u.resolved?"true":"false","data-thread-ids":u.threadIds.join(","),onClick:()=>r?.(c.id,c,u),children:[(0,Vs.jsx)("span",{className:"gpdoc-comment-marker-dot","aria-hidden":"true"}),(0,Vs.jsx)("span",{className:"gpdoc-comment-marker-count",children:f})]},u.threadIds.join(":"))})})}var DV=/[;{}]|url\s*\(|expression\s*\(|javascript\s*:|@import/i,NV=/^(?:#[\da-f]{3,8}|(?:rgb|rgba|hsl|hsla)\([^;{}]+\)|transparent|currentcolor)$/i,aN=/^(?:0|\d+(?:\.\d+)?(?:px|rem|em|%|pt|ch|vw|vh))$/i,OV=/^[\w\s,'".\-]+$/;function ko(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Ch(e){if(typeof e!="string")return null;let t=e.trim();return t&&!DV.test(t)?t:null}function oN(e){let t=Ch(e);return t&&NV.test(t)?t:null}function kh(e){let t=typeof e=="number"&&Number.isFinite(e)?`${e}px`:Ch(e);return t&&aN.test(t)?t:null}function aw(e){let t=Ch(e);return t&&OV.test(t)?t:null}function RV(e){if(typeof e=="number"&&Number.isFinite(e)&&e>=.5&&e<=4)return String(e);let t=Ch(e);if(!t)return null;let n=Number(t);return Number.isFinite(n)&&n>=.5&&n<=4||aN.test(t)?t:null}function PV(e){if(e==="normal"||e==="bold")return e;let t=typeof e=="number"?e:Number(e);return Number.isInteger(t)&&t>=100&&t<=900?String(t):null}function br(e,t,n){n!==null&&(e[t]=n)}function iw(e){let t={};if(!e)return t;let n=ko(e.tokens),r=ko(n.colors),o=ko(n.typography),a=ko(o.body??o.paragraph),i=ko(o.heading),s=ko(o.code),l=ko(n.layout),u=ko(n.tables),c=ko(n.lists);return[["background","--gpdoc-editor-background"],["surface","--gpdoc-editor-surface"],["text","--gpdoc-editor-text"],["subtext","--gpdoc-editor-subtext"],["border","--gpdoc-editor-border"],["accent","--gpdoc-document-accent"],["codeBackground","--gpdoc-editor-code-bg"],["codeText","--gpdoc-editor-code-text"],["tableHeaderBackground","--gpdoc-table-header-background"],["tableHeaderText","--gpdoc-table-header-text"]].forEach(([f,p])=>br(t,p,oN(r[f]))),br(t,"--gpdoc-editor-font-body",aw(a.fontFamily)),br(t,"--gpdoc-editor-font-heading",aw(i.fontFamily??a.fontFamily)),br(t,"--gpdoc-editor-font-code",aw(s.fontFamily)),br(t,"--gpdoc-editor-font-size",kh(a.fontSize)),br(t,"--gpdoc-editor-line-height",RV(a.lineHeight)),br(t,"--gpdoc-heading-font-weight",PV(i.fontWeight)),br(t,"--gpdoc-content-max-width",kh(l.maxWidth)),br(t,"--gpdoc-paragraph-spacing",kh(l.paragraphSpacing)),br(t,"--gpdoc-list-indent",kh(c.indent)),br(t,"--gpdoc-table-border",oN(u.borderColor)),t}var Xt=Ee(sn(),1),BV=Object.freeze({}),FV=[],zV=[],ga=class extends _e.default.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){console.error(`[GPDoc][EditorChrome] ${this.props.name} failed`,t)}render(){return this.state.hasError?null:this.props.children}};function HV(e,t){let n=e.view.domObserver;if(!n)return t();n.stop(),n.observer?.takeRecords();try{return t()}finally{n.observer?.takeRecords(),n.start()}}function iN(e,t){let n=vo(t),{from:r,to:o}=e.state.selection,a=cD(n)?{type:"pageBreak"}:n;return e.chain().focus().insertContentAt({from:r,to:o},a).run()}function sN(e,t){let r=e.state.doc.textBetween(0,t,`
216
+ `).split(`
217
+ `);return{lineNumber:r.length,column:(r[r.length-1]?.length||0)+1}}function Vr(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return Math.floor(e)}function lN(e){if(typeof e!="string"||!e.trim())return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function UV(e,t){let n=e.resolved===!0,r=t.resolved===!0;if(n!==r)return n?1:-1;let o=lN(e.createdAt),a=lN(t.createdAt);return o!==a?o===null?1:a===null?-1:o-a:e.id<t.id?-1:e.id>t.id?1:0}function $V(e){return Vr(e.logicalBlockNumber)??Vr(e.target?.logicalBlockNumber)??Vr(e.lineNumber)??Vr(e.line)??Vr(e.target?.lineNumber)??Vr(e.target?.line)}function uN(e){let t=e.target;if(!(t instanceof HTMLElement))return null;let n=t.closest(".gpdoc-gutter-row");return!(n instanceof HTMLElement)||!e.currentTarget.contains(n)?null:e.clientX<n.getBoundingClientRect().left?n:null}var Eh=(0,_e.forwardRef)(({value:e="",onChange:t,theme:n="light",designTheme:r=null,gutterVisible:o=!0,tableEditMode:a="toolbar",imageEditMode:i="disabled",placeholder:s="Start writing...",editable:l=!0,className:u="",style:c,autofocus:d=!1,previewContext:f=BV,onDataVariablesOpen:p,collaborationAwareness:h=FV,suggestions:m=zV,onSelectionChange:b,commentThreads:g=[],showResolvedComments:y=!0,activeCommentThreadId:w=null,onCommentThreadOpen:x,onCommentCreate:S,onGutterCommentCreate:v,onGutterLineCommentCreate:C},E)=>{let T=(0,_e.useRef)(null),[I,W]=(0,_e.useState)(r),[te,fe]=(0,_e.useState)(null),oe=(0,_e.useRef)(e),Z=(0,_e.useRef)(e),_=(0,_e.useCallback)(z=>{oe.current=z,Z.current=z,t?.(z)},[t]),{editor:k,getMarkdown:L,setContent:P}=BD({value:e,onChange:_,placeholder:s,editable:l,autofocus:d,gutterVisible:o}),H=(0,_e.useRef)(L),X=(0,_e.useRef)(()=>{});(0,_e.useEffect)(()=>{W(r)},[r]);let ae=(0,_e.useMemo)(()=>({...f,...p?{onDataVariablesOpen:p}:{}}),[p,f]),Ne=(0,_e.useMemo)(()=>iw(I),[I]);(0,_e.useEffect)(()=>{oe.current=e,Z.current=e,H.current=L},[L,e]),(0,_e.useEffect)(()=>{Ry(k,ae)},[k,ae,n]),(0,_e.useEffect)(()=>{Fy(k,h)},[k,h]),(0,_e.useEffect)(()=>{Hy(k,m)},[k,m]),(0,_e.useEffect)(()=>{if(!k||k.isDestroyed||!b)return;let z=()=>{if(!k||k.isDestroyed)return;let{selection:Q}=k.state,Ae=sN(k,Q.anchor),De=sN(k,Q.head);b({source:"gpdoc",position:{from:Q.head,to:Q.head,anchor:Q.anchor,head:Q.head,lineNumber:De.lineNumber,line:De.lineNumber,column:De.column},selection:{from:Q.from,to:Q.to,anchor:Q.anchor,head:Q.head,empty:Q.empty,startLineNumber:Ae.lineNumber,startColumn:Ae.column,endLineNumber:De.lineNumber,endColumn:De.column,selectedText:k.state.doc.textBetween(Q.from,Q.to,`
218
+ `)}})};return z(),k.on("selectionUpdate",z),()=>{k.off("selectionUpdate",z)}},[k,b]);let Le=(0,_e.useMemo)(()=>{let z=new Map;return g.forEach(Q=>{if(!Q?.id||!y&&Q.resolved===!0)return;let Ae=$V(Q);if(!Ae)return;let De=z.get(Ae)||[];De.push(Q),z.set(Ae,De)}),z.forEach(Q=>Q.sort(UV)),z},[g,y]),ge=(0,_e.useCallback)(z=>{!o||!uN(z)||(z.preventDefault(),z.stopPropagation())},[o]),Te=(0,_e.useCallback)(z=>{let{logicalBlockNumber:Q,sourceLineNumber:Ae}=z,De=Le.get(Q)||[],Fe=De[0];if(Fe){x&&x(Fe.id,Fe,{threadIds:De.map($e=>$e.id),lineNumber:Q,fallback:!1,resolved:De.every($e=>$e.resolved===!0)});return}if(!v&&!C)return;let je=Object.freeze({logicalBlockNumber:Q,...Ae?{sourceLineNumber:Ae}:{},lineContent:z.lineContent});if(v){v(je);return}C?.(Object.freeze({lineNumber:Ae??Q,visualLineNumber:Q,lineContent:je.lineContent}))},[o,x,v,C,Le]),Pt=(0,_e.useCallback)(z=>{if(!o||z.defaultPrevented)return;let Q=uN(z);if(!Q)return;z.preventDefault(),z.stopPropagation();let Ae=Vr(Number(Q.getAttribute("data-gpdoc-line")));if(!Ae)return;let De=Vr(Number(Q.getAttribute("data-gpdoc-source-from")));Te({logicalBlockNumber:Ae,...De?{sourceLineNumber:De}:{},lineContent:String(Q.textContent||"")})},[Te,o]);(0,_e.useEffect)(()=>{if(!k||k.isDestroyed||!o)return;let z=Q=>{let Ae=Q.detail;if(!Ae||typeof Ae!="object")return;let De=Ae,Fe=Vr(De.visualLineNumber),je=Vr(De.lineNumber);!Fe||!je||Te({logicalBlockNumber:Fe,...je!==Fe?{sourceLineNumber:je}:{},lineContent:String(De.lineContent||"")})};return k.view.dom.addEventListener(oh,z),()=>{k.view.dom.removeEventListener(oh,z)}},[Te,k,o]),(0,_e.useEffect)(()=>{if(!k||k.isDestroyed)return;let z=0,Q=null,Ae=()=>k.view.dom.closest(".gpdoc-editor-root")||k.view.dom,De=()=>typeof Z.current=="string"&&Z.current.length>0?Z.current:typeof oe.current=="string"&&oe.current.length>0?oe.current:H.current(k),Fe=(le=0)=>{cancelAnimationFrame(z),z=requestAnimationFrame(()=>{if(!k||k.isDestroyed)return;let yt=Ae(),G=HV(k,()=>TD(yt,De()));G.expectedTableCount>0&&G.renderedTableCount<G.expectedTableCount&&le<30&&Fe(le+1)})};X.current=()=>Fe();let je=()=>{Fe()},$e=()=>{Fe()};return Fe(),k.on("update",je),Q=new MutationObserver($e),Q.observe(k.view.dom,{childList:!0,subtree:!0}),()=>{cancelAnimationFrame(z),X.current=()=>{},k.off("update",je),Q?.disconnect()}},[k]),(0,_e.useImperativeHandle)(E,()=>({focus:()=>k?.chain().focus().run(),blur:()=>k?.commands.blur(),getMarkdown:()=>L(k),setMarkdown:z=>{oe.current=z,Z.current=z,P(z),queueMicrotask(()=>{X.current()})},getSelectionText:()=>{if(!k)return"";let{from:z,to:Q}=k.state.selection;return k.state.doc.textBetween(z,Q,`
219
+ `)},insertMarkdown:z=>{k&&iN(k,z)},insertText:z=>k?iN(k,z):!1,toggleBold:()=>{k?.chain().focus().toggleBold().run()},toggleItalic:()=>{k?.chain().focus().toggleItalic().run()},toggleUnderline:()=>{k?.chain().focus().toggleUnderline().run()},toggleStrikethrough:()=>{k?.chain().focus().toggleStrike().run()},toggleCode:()=>{k?.chain().focus().toggleCode().run()},toggleHeading:z=>{k?.chain().focus().toggleHeading({level:z}).run()},toggleBulletList:()=>{k?.chain().focus().toggleBulletList().run()},toggleOrderedList:()=>{k?.chain().focus().toggleOrderedList().run()},toggleBlockquote:()=>{k?.chain().focus().toggleBlockquote().run()},toggleCodeBlock:()=>{k?.chain().focus().toggleCodeBlock().run()},getSearchResult:()=>Us(k),setSearchQuery:z=>Py(k,z),clearSearch:()=>XA(k),selectSearchMatch:z=>Vu(k,z),findNextSearchMatch:(z=1)=>YA(k,z),replaceCurrentSearchMatch:z=>ZA(k,z),replaceAllSearchMatches:z=>JA(k,z),setGutterDecorations:z=>kA(k,z),setPreviewContext:z=>Ry(k,{...z,...p?{onDataVariablesOpen:p}:{}}),setDesignTheme:z=>W(z),setCollaborationAwareness:z=>Fy(k,z),setSuggestions:z=>Hy(k,z),getEditor:()=>k}),[k,L,p,P]);let st=["gpdoc-editor-root",n==="dark"?"gpdoc-dark":"",o?"gpdoc-gutter-visible":"",u].filter(Boolean).join(" ");return(0,Xt.jsxs)("div",{ref:z=>{T.current=z,fe(z)},className:st,"data-gpdoc-theme":I?I.id||"custom":void 0,style:{...c,...Ne},onMouseDownCapture:ge,onClick:Pt,children:[k&&(0,Xt.jsx)(ga,{name:"bubble-toolbar",children:(0,Xt.jsx)(GD,{editor:k,tableEditMode:a,onCommentCreate:S})}),k&&l&&a==="modal"&&(0,Xt.jsx)(ga,{name:"table-overlay",children:(0,Xt.jsx)(YD,{editor:k})}),k&&l&&(0,Xt.jsx)(ga,{name:"code-block-overlay",children:(0,Xt.jsx)(eN,{editor:k})}),k&&l&&i==="modal"&&(0,Xt.jsx)(ga,{name:"image-overlay",children:(0,Xt.jsx)(JD,{editor:k})}),k&&l&&(0,Xt.jsx)(ga,{name:"floating-menu",children:(0,Xt.jsx)(jD,{editor:k})}),k&&(0,Xt.jsx)(ga,{name:"comment-markers",children:(0,Xt.jsx)(rN,{activeCommentThreadId:w,commentThreads:g,editor:k,onCommentThreadOpen:x,rootElement:te,showResolvedComments:y})}),(0,Xt.jsx)(M2,{editor:k,className:"tiptap-container"})]})});Eh.displayName="GpdocEditor";function Gs(e){return e instanceof Error?e.message:"The GPDoc operation failed."}function qV(e){return e?.shortLink??e?.publicShareUrl??e?.canonicalShareUrl??e?.canonicalUrl??null}function cN({bridge:e}){let[t,n]=re.default.useState(null),[r,o]=re.default.useState(""),[a,i]=re.default.useState("loading"),[s,l]=re.default.useState("Loading the workspace file…"),[u,c]=re.default.useState(()=>window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"),[d,f]=re.default.useState(null),[p,h]=re.default.useState(!1),[m,b]=re.default.useState(null),g=re.default.useCallback(I=>{n(I),o(I.content),i("saved"),l("Saved")},[]);re.default.useEffect(()=>{let I=!0;e.load().then(te=>{I&&g(te)}).catch(te=>{I&&(i("error"),l(Gs(te)))});let W=e.subscribe(te=>{I&&!t&&g(te)});return()=>{I=!1,W()}},[g,e]),re.default.useEffect(()=>{document.documentElement.dataset.theme=u},[u]);let y=re.default.useCallback(async()=>{if(!(!t||a==="saving"||r===t.content)){i("saving"),l("Saving…");try{let I=await e.save(t,r);g(I),b(null)}catch(I){I?.code==="REVISION_CONFLICT"?(i("conflict"),l("The workspace file changed. Your draft is still here.")):(i("error"),l(Gs(I)))}}},[g,e,r,t,a]);re.default.useEffect(()=>{let I=W=>{(W.metaKey||W.ctrlKey)&&W.key.toLowerCase()==="s"&&(W.preventDefault(),y())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[y]);async function w(){if(t){i("loading"),l("Reloading…");try{g(await e.reload(t)),b(null)}catch(I){i("error"),l(Gs(I))}}}async function x(){if(!t||r!==t.content){i("dirty"),l("Save or discard your draft before sharing.");return}h(!0);try{let I=await e.share(t);b(I),i("shared"),l("Shared"),f(null)}catch(I){i("error"),l(Gs(I))}finally{h(!1)}}async function S(){if(!t||r!==t.content){i("dirty"),l("Save or discard your draft before sharing.");return}h(!0);try{if((await e.authStatus()).authenticated){await x();return}let W=await e.authStart();f(W),l("Finish signing in to share this file.")}catch(I){i("error"),l(Gs(I))}finally{h(!1)}}async function v(){h(!0);try{let I=await e.authComplete();I.authenticated||I.status==="authenticated"?(f(null),await x()):(f(W=>({...W,...I})),l(I.status==="pending"?"Sign-in is still pending.":"GPDoc sign-in did not complete."))}catch(I){l(Gs(I))}finally{h(!1)}}if(!t)return re.default.createElement("main",{className:"agent-editor-shell is-loading","data-gpdoc-agent-editor":!0},re.default.createElement("div",{className:"loading-mark","aria-hidden":"true"},"gpd"),re.default.createElement("p",null,s));let C=r!==t.content,E=a==="saved"&&C?"dirty":a,T=qV(m);return re.default.createElement("main",{className:"agent-editor-shell","data-gpdoc-agent-editor":!0,"data-state":E},re.default.createElement("header",{className:"file-bar"},re.default.createElement("div",{className:"file-identity"},re.default.createElement("span",{className:"gpdoc-mark","aria-hidden":"true"},"gpd"),re.default.createElement("span",{className:"file-copy"},re.default.createElement("strong",null,t.fileName),re.default.createElement("small",null,t.managed?"GPDoc document":"Markdown"," · ",t.revision.slice(0,8)))),re.default.createElement("div",{className:"file-status",role:"status","aria-live":"polite"},re.default.createElement("span",{className:"revision-rail","aria-hidden":"true"}),re.default.createElement("span",null,E==="dirty"?"Unsaved changes":s)),re.default.createElement("nav",{className:"file-actions","aria-label":"Document actions"},re.default.createElement("button",{type:"button",className:"quiet-action",onClick:()=>c(u==="light"?"dark":"light")},u==="light"?"Dark":"Light"),re.default.createElement("button",{type:"button",className:"quiet-action",onClick:()=>void w()},C?"Discard and reload":"Reload"),re.default.createElement("button",{type:"button",className:"primary-action",disabled:!C||a==="saving",onClick:()=>void y()},a==="saving"?"Saving…":"Save"),re.default.createElement("button",{type:"button",className:"share-action",disabled:C||p,onClick:()=>void S()},p?"Working…":"Share"))),a==="conflict"&&re.default.createElement("section",{className:"conflict-banner",role:"alert"},re.default.createElement("div",null,re.default.createElement("strong",null,"Newer workspace changes found"),re.default.createElement("span",null,"Your draft has not been discarded or written over the newer file.")),re.default.createElement("button",{type:"button",onClick:()=>void w()},"Reload workspace file")),d&&re.default.createElement("section",{className:"auth-panel","aria-label":"GPDoc sign-in"},re.default.createElement("div",null,re.default.createElement("span",{className:"panel-label"},"GPDoc sign-in"),re.default.createElement("strong",null,"Enter code ",d.userCode),re.default.createElement("span",null,"Complete sign-in in your browser, then return here.")),re.default.createElement("div",{className:"panel-actions"},re.default.createElement("a",{href:d.verificationUriComplete??d.verificationUri,target:"_blank",rel:"noreferrer"},"Open sign-in"),re.default.createElement("button",{type:"button",disabled:p,onClick:()=>void v()},"I finished signing in"))),T&&re.default.createElement("section",{className:"share-panel","aria-label":"Shared file"},re.default.createElement("div",null,re.default.createElement("span",{className:"panel-label"},"Shared"),re.default.createElement("strong",null,"This saved revision is available in GPDoc.")),re.default.createElement("a",{href:T,target:"_blank",rel:"noreferrer"},"Open shared file")),re.default.createElement("section",{className:"editor-stage","aria-label":`Editing ${t.fileName}`},re.default.createElement(Eh,{value:r,onChange:I=>{o(I),I!==t.content&&(i("dirty"),l("Unsaved changes"))},theme:u,gutterVisible:!0,imageEditMode:"modal",tableEditMode:"modal",suggestions:t.suggestions,placeholder:"Start writing…",className:"agent-gpdoc-editor"})))}function tc(e){let t=e?.editor??e;if(!t||typeof t.content!="string"||typeof t.revision!="string")throw new Error("GPDoc did not return an editor document.");return t}function dN(e){let t=e?.error??e?.structuredContent?.error;if(!t)return null;let n=new Error(String(t.message??"The GPDoc operation failed."));return Object.assign(n,{code:t.code}),n}function VV(){let e=new Map,t=new Set,n=1,r=null;function o(s){try{let l=tc(s?.structuredContent??s);r=l;for(let u of t)u(l)}catch{}}window.addEventListener("message",s=>{if(s.source!==window.parent)return;let l=s.data;if(!(!l||l.jsonrpc!=="2.0")){if(l.id!==void 0&&e.has(l.id)){let u=e.get(l.id);if(e.delete(l.id),l.error)u.reject(new Error(String(l.error.message??"Tool call failed.")));else{let c=dN(l.result);c?u.reject(c):u.resolve(l.result)}return}l.method==="ui/notifications/tool-result"&&o(l.params)}},{passive:!0});function a(s,l){let u=n++;return window.parent.postMessage({jsonrpc:"2.0",id:u,method:s,params:l},"*"),new Promise((c,d)=>{e.set(u,{resolve:c,reject:d})})}async function i(s,l={}){let u=await a("tools/call",{name:s,arguments:l});return u?.structuredContent??u}return{async load(){return r||new Promise(s=>{let l=this.subscribe(u=>{l(),s(u)})})},async reload(s){let l=await i("gpdoc_read_file",{filePath:s.filePath}),u=tc({...l,fileName:s.fileName,content:typeof l.content=="string"?l.content:l.content?.document});return r=u,u},subscribe(s){return t.add(s),r&&s(r),()=>t.delete(s)},async save(s,l){let u=await i("gpdoc_update_content",{filePath:s.filePath,expectedRevision:s.revision,content:l,mode:"direct"}),c={...s,content:l,revision:u.revision};return r=c,c},async authStatus(){return i("gpdoc_auth_status")},async authStart(){return i("gpdoc_auth_start")},async authComplete(){return i("gpdoc_auth_complete")},async share(s){return i("gpdoc_share_file",{filePath:s.filePath,expectedRevision:s.revision,operationId:crypto.randomUUID()})}}}function WV(){let e=new Set,t=window.location.pathname.split("/").filter(Boolean)[1],n=`/api/editor/${encodeURIComponent(t??"")}`,r=null;async function o(l){let u=await l.json(),c=dN(u);if(!l.ok||c)throw c??new Error(`GPDoc returned HTTP ${l.status}.`);return u}async function a(){return o(await fetch(n,{headers:{Accept:"application/json"},cache:"no-store"}))}async function i(l,u){return o(await fetch(`${n}/${l}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u)}))}function s(l){r=l;for(let u of e)u(l);return l}return{async load(){return s(tc(await a()))},async reload(){return s(tc(await a()))},subscribe(l){return e.add(l),r&&l(r),()=>e.delete(l)},async save(l,u){return s(tc(await i("save",{expectedRevision:l.revision,content:u})))},async authStatus(){return(await i("auth-status",{})).authentication},async authStart(){return(await i("auth-start",{})).authentication},async authComplete(){return(await i("auth-complete",{})).authentication},async share(l){return(await i("share",{expectedRevision:l.revision,operationId:crypto.randomUUID()})).share}}}function fN(){return window.location.pathname.startsWith("/editor/")?WV():VV()}var hN=document.getElementById("root");if(!hN)throw new Error("GpdocEditor root is unavailable.");(0,pN.createRoot)(hN).render(Lh.default.createElement(Lh.default.StrictMode,null,Lh.default.createElement(cN,{bridge:fN()})));})();</script></body></html>